Repository: sourcenetwork/sourcehub Branch: dev Commit: d5fe809676be Files: 697 Total size: 14.9 MB Directory structure: gitextract_j7sc6xqd/ ├── .dockerignore ├── .github/ │ └── workflows/ │ ├── docker-publish.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .ko.yaml ├── Dockerfile ├── LICENSE.txt ├── Makefile ├── api/ │ ├── osmosis/ │ │ └── epochs/ │ │ ├── module/ │ │ │ └── v1beta1/ │ │ │ └── module.pulsar.go │ │ └── v1beta1/ │ │ ├── genesis.pulsar.go │ │ ├── query.pulsar.go │ │ └── query_grpc.pb.go │ ├── sourcehub/ │ │ ├── acp/ │ │ │ ├── access_decision.pulsar.go │ │ │ ├── access_ticket.pulsar.go │ │ │ ├── commitment.pulsar.go │ │ │ ├── genesis.pulsar.go │ │ │ ├── module/ │ │ │ │ └── module.pulsar.go │ │ │ ├── params.pulsar.go │ │ │ ├── policy_cmd.pulsar.go │ │ │ ├── query.pulsar.go │ │ │ ├── query_grpc.pb.go │ │ │ ├── record.pulsar.go │ │ │ ├── registration.pulsar.go │ │ │ ├── signed_policy_cmd.pulsar.go │ │ │ ├── time.pulsar.go │ │ │ ├── tx.pulsar.go │ │ │ └── tx_grpc.pb.go │ │ ├── ante/ │ │ │ └── jws_extension.pulsar.go │ │ ├── bulletin/ │ │ │ ├── collaborator.pulsar.go │ │ │ ├── events.pulsar.go │ │ │ ├── genesis.pulsar.go │ │ │ ├── module/ │ │ │ │ └── module.pulsar.go │ │ │ ├── namespace.pulsar.go │ │ │ ├── params.pulsar.go │ │ │ ├── post.pulsar.go │ │ │ ├── query.pulsar.go │ │ │ ├── query_grpc.pb.go │ │ │ ├── tx.pulsar.go │ │ │ └── tx_grpc.pb.go │ │ ├── faucet/ │ │ │ └── faucet.pulsar.go │ │ ├── feegrant/ │ │ │ ├── module/ │ │ │ │ └── v1/ │ │ │ │ └── module.pulsar.go │ │ │ └── v1beta1/ │ │ │ ├── feegrant.pulsar.go │ │ │ ├── genesis.pulsar.go │ │ │ ├── query.pulsar.go │ │ │ ├── query_grpc.pb.go │ │ │ ├── tx.pulsar.go │ │ │ └── tx_grpc.pb.go │ │ ├── hub/ │ │ │ ├── chain_config.pulsar.go │ │ │ ├── genesis.pulsar.go │ │ │ ├── ica_connection.pulsar.go │ │ │ ├── jws_token.pulsar.go │ │ │ ├── module/ │ │ │ │ └── module.pulsar.go │ │ │ ├── params.pulsar.go │ │ │ ├── query.pulsar.go │ │ │ ├── query_grpc.pb.go │ │ │ ├── tx.pulsar.go │ │ │ └── tx_grpc.pb.go │ │ └── tier/ │ │ ├── module/ │ │ │ └── v1beta1/ │ │ │ └── module.pulsar.go │ │ └── v1beta1/ │ │ ├── genesis.pulsar.go │ │ ├── lockup.pulsar.go │ │ ├── params.pulsar.go │ │ ├── query.pulsar.go │ │ ├── query_grpc.pb.go │ │ ├── subscription.pulsar.go │ │ ├── tx.pulsar.go │ │ └── tx_grpc.pb.go │ └── sourcenetwork/ │ └── acp_core/ │ ├── access_decision.pulsar.go │ ├── access_ticket.pulsar.go │ ├── engine.pulsar.go │ ├── engine_grpc.pb.go │ ├── errors/ │ │ └── error_type.pulsar.go │ ├── event.pulsar.go │ ├── parsing.pulsar.go │ ├── policy.pulsar.go │ ├── policy_definition.pulsar.go │ ├── policy_record.pulsar.go │ ├── policy_short.pulsar.go │ ├── relationship.pulsar.go │ ├── relationship_selector.pulsar.go │ └── system.pulsar.go ├── app/ │ ├── ante/ │ │ ├── ante.go │ │ ├── expected_keepers.go │ │ ├── extension.go │ │ ├── extension_test.go │ │ ├── extension_utils.go │ │ ├── fee.go │ │ ├── fee_test.go │ │ ├── panic.go │ │ ├── panic_test.go │ │ ├── reject_legacy.go │ │ ├── reject_legacy_test.go │ │ ├── testutil_test.go │ │ └── types/ │ │ ├── bearer_token.go │ │ ├── codec.go │ │ └── jws_extension.pb.go │ ├── app.go │ ├── app_config.go │ ├── export.go │ ├── faucet/ │ │ └── types/ │ │ └── faucet.pb.go │ ├── faucet.go │ ├── genesis.go │ ├── genesis_account.go │ ├── ibc.go │ ├── ica_host_middleware.go │ ├── lanes/ │ │ ├── priority_lane.go │ │ └── priority_lane_test.go │ ├── lanes.go │ ├── metrics/ │ │ ├── constants.go │ │ ├── labels.go │ │ ├── utils.go │ │ └── wrapper.go │ ├── mint.go │ ├── mint_test.go │ ├── overrides/ │ │ ├── bank.go │ │ ├── crisis.go │ │ ├── epochs.go │ │ ├── gov.go │ │ ├── staking.go │ │ └── tier.go │ ├── params/ │ │ └── params.go │ ├── sim_bench_test.go │ ├── sim_test.go │ └── utils.go ├── buf.work.yaml ├── cmd/ │ ├── extension_options_tx/ │ │ ├── main.go │ │ └── readme.md │ ├── ica_packet_gen/ │ │ └── main.go │ ├── sourcehubd/ │ │ ├── cmd/ │ │ │ ├── commands.go │ │ │ ├── config.go │ │ │ ├── root.go │ │ │ └── testnet.go │ │ └── main.go │ ├── test_env_generator/ │ │ └── main.go │ └── tx_listener/ │ └── main.go ├── codecov.yml ├── config.yml ├── devnet/ │ ├── Makefile │ ├── README.md │ ├── configs/ │ │ ├── app.toml │ │ ├── client.toml │ │ └── config.toml │ ├── dial-peers.sh │ ├── docker-compose.yaml │ ├── make-update-gentx.sh │ └── setup-node.sh ├── docker/ │ ├── README.md │ ├── configs/ │ │ ├── app.toml │ │ ├── client.toml │ │ └── config.toml │ ├── entrypoint.sh │ └── faucet-key.json ├── docker-compose.yaml ├── docs/ │ ├── docs.go │ ├── static/ │ │ └── openapi.yml │ └── template/ │ └── index.tpl ├── example/ │ ├── access_ticket/ │ │ └── main.go │ ├── bearer_auth/ │ │ └── main.go │ ├── bearer_token_gen/ │ │ └── main.go │ └── sdk/ │ └── main.go ├── go.mod ├── go.sum ├── manual/ │ ├── acp/ │ │ ├── cmd_auth.md │ │ └── readme.md │ ├── faucet.md │ └── readme.md ├── proto/ │ ├── buf.gen.gogo.yaml │ ├── buf.gen.pulsar.yaml │ ├── buf.gen.sta.yaml │ ├── buf.gen.swagger.yaml │ ├── buf.gen.ts.yaml │ ├── buf.yaml │ ├── osmosis/ │ │ └── epochs/ │ │ ├── module/ │ │ │ └── v1beta1/ │ │ │ └── module.proto │ │ └── v1beta1/ │ │ ├── genesis.proto │ │ └── query.proto │ └── sourcehub/ │ ├── acp/ │ │ ├── access_decision.proto │ │ ├── access_ticket.proto │ │ ├── commitment.proto │ │ ├── genesis.proto │ │ ├── module/ │ │ │ └── module.proto │ │ ├── params.proto │ │ ├── policy_cmd.proto │ │ ├── query.proto │ │ ├── record.proto │ │ ├── registration.proto │ │ ├── signed_policy_cmd.proto │ │ ├── time.proto │ │ └── tx.proto │ ├── ante/ │ │ └── jws_extension.proto │ ├── bulletin/ │ │ ├── collaborator.proto │ │ ├── events.proto │ │ ├── genesis.proto │ │ ├── module/ │ │ │ └── module.proto │ │ ├── namespace.proto │ │ ├── params.proto │ │ ├── post.proto │ │ ├── query.proto │ │ └── tx.proto │ ├── faucet/ │ │ └── faucet.proto │ ├── feegrant/ │ │ ├── module/ │ │ │ └── v1/ │ │ │ └── module.proto │ │ └── v1beta1/ │ │ ├── feegrant.proto │ │ ├── genesis.proto │ │ ├── query.proto │ │ └── tx.proto │ ├── hub/ │ │ ├── chain_config.proto │ │ ├── genesis.proto │ │ ├── ica_connection.proto │ │ ├── jws_token.proto │ │ ├── module/ │ │ │ └── module.proto │ │ ├── params.proto │ │ ├── query.proto │ │ └── tx.proto │ └── tier/ │ ├── module/ │ │ └── v1beta1/ │ │ └── module.proto │ └── v1beta1/ │ ├── genesis.proto │ ├── lockup.proto │ ├── params.proto │ ├── query.proto │ ├── subscription.proto │ └── tx.proto ├── readme.md ├── scripts/ │ ├── faucet-key.json │ ├── faucet.sh │ ├── full-node.sh │ ├── genesis-setup.sh │ ├── hermes_config.toml │ ├── ignite/ │ │ └── config-tier.yml │ ├── rpc-node.sh │ ├── run-test-matrix │ ├── start-multichain-ica.sh │ ├── start-multichain.sh │ ├── stop-multichain.sh │ ├── test-policy.yaml │ ├── tier-dev.sh │ └── tx-listener.sh ├── sdk/ │ ├── acp.go │ ├── constants.go │ ├── doc.go │ ├── errors.go │ ├── listener.go │ ├── listener_test.go │ ├── mapper.go │ ├── msgset.go │ ├── sdk.go │ ├── tx.go │ ├── tx_signer.go │ └── types.go ├── tests/ │ ├── e2e/ │ │ └── sdk/ │ │ └── sdk_test.go │ ├── integration/ │ │ ├── acp/ │ │ │ ├── README.md │ │ │ ├── actions.go │ │ │ ├── actors.go │ │ │ ├── client.go │ │ │ ├── ctx.go │ │ │ ├── dispatchers.go │ │ │ ├── init.go │ │ │ ├── suite/ │ │ │ │ ├── object/ │ │ │ │ │ ├── archive_test.go │ │ │ │ │ ├── commitment_register_test.go │ │ │ │ │ ├── query_owner_test.go │ │ │ │ │ ├── register_test.go │ │ │ │ │ └── reveal_registration_test.go │ │ │ │ ├── policy/ │ │ │ │ │ ├── edit_test.go │ │ │ │ │ ├── query_test.go │ │ │ │ │ └── tx_test.go │ │ │ │ └── relationship/ │ │ │ │ ├── delete_test.go │ │ │ │ ├── filter_test.go │ │ │ │ └── set_test.go │ │ │ ├── types.go │ │ │ └── utils.go │ │ ├── ante/ │ │ │ └── jws_test.go │ │ ├── faucet/ │ │ │ └── faucet_test.go │ │ └── tier/ │ │ ├── autolock_test.go │ │ ├── edge_cases_test.go │ │ ├── feegrant_test.go │ │ ├── test_helpers.go │ │ └── tier_test.go │ └── property/ │ ├── acp/ │ │ └── object_registration/ │ │ ├── constants.go │ │ ├── model.go │ │ ├── params.go │ │ ├── property_test.go │ │ └── types.go │ └── gen.go ├── testutil/ │ ├── e2e/ │ │ └── e2e.go │ ├── jws.go │ ├── keeper/ │ │ ├── account_keeper.go │ │ ├── acp.go │ │ ├── bulletin.go │ │ ├── hub.go │ │ └── tier.go │ ├── mocks.go │ ├── network/ │ │ ├── faucet.go │ │ └── network.go │ ├── nullify/ │ │ └── nullify.go │ ├── sample/ │ │ └── sample.go │ └── utils.go ├── tools/ │ └── tools.go ├── types/ │ ├── constants.go │ └── utils.go ├── utils/ │ ├── functional.go │ ├── glob.go │ ├── sort.go │ └── span.go └── x/ ├── acp/ │ ├── BSL.txt │ ├── abci/ │ │ ├── abci_service.go │ │ └── errors.go │ ├── access_decision/ │ │ ├── commands.go │ │ ├── commands_test.go │ │ ├── params_repository.go │ │ ├── repository.go │ │ └── types.go │ ├── access_ticket/ │ │ ├── abci_service.go │ │ ├── errors.go │ │ ├── issuer_v1.go │ │ ├── signer.go │ │ ├── spec.go │ │ └── types.go │ ├── bearer_token/ │ │ ├── bearer_token.go │ │ ├── bearer_token_test.go │ │ ├── errors.go │ │ ├── parser.go │ │ ├── spec.go │ │ └── types.go │ ├── capability/ │ │ ├── doc.go │ │ ├── error.go │ │ ├── manager.go │ │ └── types.go │ ├── client/ │ │ └── cli/ │ │ ├── policy_cmd.go │ │ ├── query.go │ │ ├── query_filter_relationships.go │ │ ├── query_generate_commitment.go │ │ ├── query_object_owner.go │ │ ├── query_verify_access_request.go │ │ ├── tx.go │ │ ├── tx_bearer_policy_cmd.go │ │ ├── tx_check_access.go │ │ ├── tx_create_policy.go │ │ ├── tx_direct_policy_cmd.go │ │ ├── tx_edit_policy.go │ │ └── tx_signed_policy_cmd.go │ ├── commitment/ │ │ ├── commitment.go │ │ ├── commitment_test.go │ │ ├── constants.go │ │ ├── errors.go │ │ ├── repository.go │ │ └── service.go │ ├── did/ │ │ ├── did.go │ │ ├── key.go │ │ ├── key_test.go │ │ └── types.go │ ├── docs/ │ │ ├── README.md │ │ └── adr-001-polcy-cmd.md │ ├── keeper/ │ │ ├── abci.go │ │ ├── abci_test.go │ │ ├── acp_core.go │ │ ├── actor.go │ │ ├── actor_test.go │ │ ├── grpc_query.go │ │ ├── keeper.go │ │ ├── keeper_common_test.go │ │ ├── keeper_test.go │ │ ├── main_test.go │ │ ├── module_acp.go │ │ ├── module_acp_test.go │ │ ├── msg_server.go │ │ ├── msg_server_bearer_policy_cmd.go │ │ ├── msg_server_check_access.go │ │ ├── msg_server_create_policy.go │ │ ├── msg_server_direct_policy_cmd.go │ │ ├── msg_server_edit_policy.go │ │ ├── msg_server_signed_policy_cmd.go │ │ ├── msg_server_signed_policy_cmd_test.go │ │ ├── msg_update_params.go │ │ ├── msg_update_params_test.go │ │ ├── params.go │ │ ├── params_test.go │ │ ├── policy_cmd/ │ │ │ ├── doc.go │ │ │ ├── handler.go │ │ │ └── types.go │ │ ├── query_access_decision.go │ │ ├── query_access_decision_test.go │ │ ├── query_filter_relationships.go │ │ ├── query_generate_commitment.go │ │ ├── query_hijack_attempts_by_policy.go │ │ ├── query_object_owner.go │ │ ├── query_object_owner_test.go │ │ ├── query_params.go │ │ ├── query_params_test.go │ │ ├── query_policy.go │ │ ├── query_policy_ids.go │ │ ├── query_policy_ids_test.go │ │ ├── query_policy_test.go │ │ ├── query_registrations_commitment.go │ │ ├── query_registrations_commitment_by_commitment.go │ │ ├── query_validate_policy.go │ │ ├── query_validate_policy_test.go │ │ ├── query_verify_access_request.go │ │ ├── query_verify_access_request_test.go │ │ ├── utils.go │ │ └── utils_test.go │ ├── metrics/ │ │ └── metrics.go │ ├── module/ │ │ ├── autocli.go │ │ ├── genesis.go │ │ ├── genesis_test.go │ │ ├── module.go │ │ └── simulation.go │ ├── registration/ │ │ ├── repository.go │ │ └── service.go │ ├── signed_policy_cmd/ │ │ ├── builder.go │ │ ├── builder_test.go │ │ ├── errors.go │ │ ├── jws.go │ │ ├── jws_test.go │ │ ├── spec.go │ │ └── types.go │ ├── simulation/ │ │ ├── check_access.go │ │ ├── create_policy.go │ │ ├── helpers.go │ │ ├── msg_edit_policy.go │ │ └── policy_cmd.go │ ├── stores/ │ │ ├── cosmos/ │ │ │ ├── doc.go │ │ │ ├── error.go │ │ │ ├── iter.go │ │ │ ├── store.go │ │ │ └── store_test.go │ │ ├── kv_stores_cosmos.go │ │ └── marshaler.go │ ├── testutil/ │ │ ├── account_keeper.go │ │ ├── assertions.go │ │ ├── proto.go │ │ └── time.go │ ├── types/ │ │ ├── access_decision.go │ │ ├── access_decision.pb.go │ │ ├── access_ticket.go │ │ ├── access_ticket.pb.go │ │ ├── codec.go │ │ ├── commitment.go │ │ ├── commitment.pb.go │ │ ├── constants.go │ │ ├── errors.go │ │ ├── expected_keepers.go │ │ ├── genesis.go │ │ ├── genesis.pb.go │ │ ├── genesis_test.go │ │ ├── keys.go │ │ ├── mapper.go │ │ ├── message_bearer_policy_cmd.go │ │ ├── message_check_access.go │ │ ├── message_create_policy.go │ │ ├── message_create_policy_test.go │ │ ├── message_direct_policy_cmd.go │ │ ├── message_edit_policy.go │ │ ├── message_policy_cmd.go │ │ ├── msg_update_params.go │ │ ├── params.go │ │ ├── params.pb.go │ │ ├── policy_cmd.go │ │ ├── policy_cmd.pb.go │ │ ├── query.pb.go │ │ ├── query.pb.gw.go │ │ ├── record.pb.go │ │ ├── registration.pb.go │ │ ├── signed_policy_cmd.pb.go │ │ ├── time.go │ │ ├── time.pb.go │ │ ├── tx.pb.go │ │ └── types.go │ └── utils/ │ └── utils.go ├── bulletin/ │ ├── keeper/ │ │ ├── acp_utils.go │ │ ├── bulletin.go │ │ ├── bulletin_test.go │ │ ├── grpc_query.go │ │ ├── grpc_query_test.go │ │ ├── keeper.go │ │ ├── keeper_common_test.go │ │ ├── keeper_test.go │ │ ├── main_test.go │ │ ├── msg_server.go │ │ ├── msg_server_test.go │ │ ├── params.go │ │ └── params_test.go │ ├── module/ │ │ ├── autocli.go │ │ ├── genesis.go │ │ ├── genesis_test.go │ │ ├── module.go │ │ └── simulation.go │ ├── simulation/ │ │ ├── create_post.go │ │ └── helpers.go │ └── types/ │ ├── codec.go │ ├── collaborator.pb.go │ ├── constants.go │ ├── errors.go │ ├── events.pb.go │ ├── expected_keepers.go │ ├── genesis.go │ ├── genesis.pb.go │ ├── genesis_test.go │ ├── keys.go │ ├── message_add_collaborator.go │ ├── message_create_post.go │ ├── message_register_namespace.go │ ├── message_remove_collaborator.go │ ├── msg_update_params.go │ ├── namespace.pb.go │ ├── params.go │ ├── params.pb.go │ ├── policy.go │ ├── post.pb.go │ ├── query.pb.go │ ├── query.pb.gw.go │ ├── tx.pb.go │ └── types.go ├── epochs/ │ ├── README.md │ ├── keeper/ │ │ ├── abci.go │ │ ├── abci_test.go │ │ ├── epoch.go │ │ ├── epoch_test.go │ │ ├── genesis.go │ │ ├── genesis_test.go │ │ ├── grpc_query.go │ │ ├── grpc_query_test.go │ │ ├── hooks.go │ │ ├── keeper.go │ │ └── keeper_test.go │ ├── module/ │ │ ├── abci.go │ │ ├── autocli.go │ │ └── module.go │ ├── osmoutils/ │ │ ├── cache_ctx.go │ │ └── slice_helper.go │ └── types/ │ ├── cache_ctx.go │ ├── doc.go │ ├── events.go │ ├── expected_keepers.go │ ├── genesis.go │ ├── genesis.pb.go │ ├── hooks.go │ ├── hooks_test.go │ ├── identifier.go │ ├── keys.go │ ├── query.pb.go │ ├── query.pb.gw.go │ └── telemetry.go ├── feegrant/ │ ├── basic_fee.go │ ├── basic_fee_test.go │ ├── client/ │ │ └── cli/ │ │ ├── tx.go │ │ └── tx_test.go │ ├── codec.go │ ├── doc.go │ ├── errors.go │ ├── events.go │ ├── expected_keepers.go │ ├── feegrant.pb.go │ ├── fees.go │ ├── filtered_fee.go │ ├── filtered_fee_test.go │ ├── genesis.go │ ├── genesis.pb.go │ ├── grant.go │ ├── grant_test.go │ ├── keeper/ │ │ ├── genesis_test.go │ │ ├── grpc_query.go │ │ ├── grpc_query_test.go │ │ ├── keeper.go │ │ ├── keeper_test.go │ │ ├── migrations.go │ │ ├── msg_server.go │ │ └── msg_server_test.go │ ├── key.go │ ├── key_test.go │ ├── migrations/ │ │ └── v2/ │ │ ├── keys.go │ │ ├── store.go │ │ └── store_test.go │ ├── module/ │ │ ├── abci.go │ │ ├── abci_test.go │ │ ├── autocli.go │ │ └── module.go │ ├── msgs.go │ ├── msgs_test.go │ ├── periodic_fee.go │ ├── periodic_fee_test.go │ ├── query.pb.go │ ├── query.pb.gw.go │ ├── simulation/ │ │ ├── decoder.go │ │ ├── decoder_test.go │ │ ├── genesis.go │ │ ├── genesis_test.go │ │ ├── operations.go │ │ └── operations_test.go │ ├── testutil/ │ │ └── expected_keepers_mocks.go │ └── tx.pb.go ├── hub/ │ ├── keeper/ │ │ ├── abci.go │ │ ├── chain_config.go │ │ ├── chain_config_test.go │ │ ├── grpc_query.go │ │ ├── ica_connection.go │ │ ├── ica_connection_test.go │ │ ├── jws_token.go │ │ ├── keeper.go │ │ ├── keeper_common_test.go │ │ ├── msg_invalidate_jws.go │ │ ├── msg_invalidate_jws_test.go │ │ ├── msg_server.go │ │ ├── msg_server_test.go │ │ ├── msg_update_params.go │ │ ├── msg_update_params_test.go │ │ ├── params.go │ │ ├── params_test.go │ │ ├── query_params.go │ │ └── query_params_test.go │ ├── module/ │ │ ├── autocli.go │ │ ├── genesis.go │ │ ├── genesis_test.go │ │ ├── module.go │ │ └── simulation.go │ ├── simulation/ │ │ └── helpers.go │ ├── testutil/ │ │ └── hub_keeper.go │ └── types/ │ ├── chain_config.pb.go │ ├── codec.go │ ├── errors.go │ ├── expected_keepers.go │ ├── genesis.go │ ├── genesis.pb.go │ ├── genesis_test.go │ ├── ica_connection.pb.go │ ├── jws_token.pb.go │ ├── keys.go │ ├── msg_invalidate_jws.go │ ├── msg_update_params.go │ ├── params.go │ ├── params.pb.go │ ├── query.pb.go │ ├── query.pb.gw.go │ ├── tx.pb.go │ └── types.go └── tier/ ├── keeper/ │ ├── abci.go │ ├── abci_test.go │ ├── calculate_credit.go │ ├── calculate_credit_test.go │ ├── credit.go │ ├── credit_test.go │ ├── epoch_hook.go │ ├── grpc_query.go │ ├── grpc_query_test.go │ ├── insurance.go │ ├── insurance_test.go │ ├── keeper.go │ ├── keeper_common_test.go │ ├── keeper_mock_test.go │ ├── keeper_test.go │ ├── lockup.go │ ├── lockup_test.go │ ├── main_test.go │ ├── msg_add_user_subscription_test.go │ ├── msg_cancel_unlocking_test.go │ ├── msg_create_developer_test.go │ ├── msg_lock_auto_test.go │ ├── msg_lock_test.go │ ├── msg_redelegate_test.go │ ├── msg_remove_developer_test.go │ ├── msg_remove_user_subscription_test.go │ ├── msg_server.go │ ├── msg_server_test.go │ ├── msg_unlock_test.go │ ├── msg_update_developer_test.go │ ├── msg_update_params_test.go │ ├── msg_update_user_subscription_test.go │ ├── params.go │ ├── params_test.go │ ├── rewards.go │ ├── slashing.go │ ├── slashing_test.go │ ├── subscription.go │ └── subscription_test.go ├── module/ │ ├── autocli.go │ ├── genesis.go │ ├── genesis_test.go │ ├── module.go │ └── simulation.go ├── simulation/ │ ├── cancel_unlocking.go │ ├── helpers.go │ ├── lock.go │ ├── redelegate.go │ └── unlock.go └── types/ ├── codec.go ├── constants.go ├── errors.go ├── events.go ├── expected_keepers.go ├── genesis.go ├── genesis.pb.go ├── keys.go ├── lockup.pb.go ├── messages.go ├── messages_test.go ├── params.go ├── params.pb.go ├── query.pb.go ├── query.pb.gw.go ├── subscription.pb.go └── tx.pb.go ================================================ FILE CONTENTS ================================================ ================================================ FILE: .dockerignore ================================================ build .git ================================================ FILE: .github/workflows/docker-publish.yml ================================================ name: Docker # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. on: push: branches: [ "dev" ] tags: - 'v*.*.*' env: # Use docker.io for Docker Hub if empty REGISTRY: ghcr.io # github.repository as / IMAGE_NAME: ${{ github.repository }} jobs: build: runs-on: ubuntu-latest permissions: contents: read packages: write # This is used to complete the identity challenge # with sigstore/fulcio when running outside of PRs. id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer - name: Install cosign if: github.event_name != 'pull_request' uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0 with: cosign-release: 'v2.2.4' # Set up BuildKit Docker container builder to be able to build # multi-platform images and export cache # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | # branch event type=ref,event=branch # tag event type=ref,event=tag # full length commit sha type=sha,format=long # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: context: . push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max # Sign the resulting Docker image digest except on PRs. # This will only write to the public Rekor transparency log when the Docker # repository is public to avoid leaking data. If you would like to publish # transparency data even for private images, pass --force to cosign below. # https://github.com/sigstore/cosign - name: Sign the published Docker image if: ${{ github.event_name != 'pull_request' }} env: # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable TAGS: ${{ steps.meta.outputs.tags }} DIGEST: ${{ steps.build-and-push.outputs.digest }} # This step uses the identity token to provision an ephemeral certificate # against the sigstore community Fulcio instance. run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} ================================================ FILE: .github/workflows/release.yml ================================================ # This workflow is useful if you want to automate the process of: # # a) Creating a new prelease when you push a new tag with a "v" prefix (version). # # This type of prerelease is meant to be used for production: alpha, beta, rc, etc. types of releases. # After the prerelease is created, you need to make your changes on the release page at the relevant # Github page and publish your release. # # b) Creating/updating the "latest" prerelease when you push to your default branch. # # This type of prelease is useful to make your bleeding-edge binaries available to advanced users. # # The workflow will not run if there is no tag pushed with a "v" prefix and no change pushed to your # default branch. on: push: tags: - 'v*.*.*' jobs: might_release: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true - name: Prepare Release Variables id: vars uses: ignite/cli/actions/release/vars@main - name: Issue Release Assets uses: ignite/cli/actions/cli@main if: ${{ steps.vars.outputs.should_release == 'true' }} env: GOFLAGS: "-buildvcs=false" with: args: chain build --release --release.prefix ${{ steps.vars.outputs.tarball_prefix }} -t linux:amd64 -t darwin:amd64 -t darwin:arm64 - name: Delete the "latest" Release uses: dev-drprasad/delete-tag-and-release@v0.2.1 if: ${{ steps.vars.outputs.is_release_type_latest == 'true' }} with: tag_name: ${{ steps.vars.outputs.tag_name }} delete_release: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish the Release uses: softprops/action-gh-release@v1 if: ${{ steps.vars.outputs.should_release == 'true' }} with: tag_name: ${{ steps.vars.outputs.tag_name }} files: release/* prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/test.yml ================================================ # Test workflow runs tests and coverage on all pushes and pull requests. on: push: branches: [ "**" ] jobs: test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true - name: Setup Go uses: actions/setup-go@v5 with: go-version-file: 'go.mod' check-latest: true cache: false - name: Run Tests and Generate Coverage run: | go test -coverpkg=all ./... -coverprofile=coverage.txt - name: Upload Coverage to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage.txt fail_ci_if_error: true verbose: true ================================================ FILE: .gitignore ================================================ vue/node_modules vue/dist release/ .idea/ .vscode/ .DS_Store *.dot *.log build cover.out .env .testnets ================================================ FILE: .ko.yaml ================================================ defaultBaseImage: debian:bullseye-slim defaultPlatforms: - linux/arm64 - linux/amd64 builds: - main: ./cmd/sourcehubd ldflags: - -s -w - -buildid= env: - CGO_ENABLED=0 flas: - -trimpath mod_timestamp: "{{ .CommitTimestamp }}" ================================================ FILE: Dockerfile ================================================ FROM golang:1.25.5 AS builder WORKDIR /app # Cache deps COPY go.* /app/ RUN go mod download # Build COPY . /app RUN --mount=type=cache,target=/root/.cache go build -o /app/build/sourcehubd ./cmd/sourcehubd # Deployment entrypoint FROM debian:bookworm-slim COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh COPY docker/faucet-key.json /etc/sourcehub/faucet-key.json COPY --from=builder /app/build/sourcehubd /usr/local/bin/sourcehubd # Copy the default config files to override the container with COPY docker/configs/*.toml /etc/sourcehub/ RUN useradd --create-home --home-dir /home/node node && mkdir /sourcehub && chown node:node /sourcehub && ln -s /sourcehub /home/node/.sourcehub && chown node:node -R /home/node && chmod -R 555 /etc/sourcehub # MONIKER sets the node moniker ENV MONIKER="node" # CHAIN_ID sets the id for the chain which will be initialized ENV CHAIN_ID="sourcehub-dev" # GENESIS_PATH is an optional variable which if set must point to a genesis file mounted in the container. # The file is copied to the configuration directory during the first container initialization # If empty, the entrypoint will generate a new genesis ENV GENESIS_PATH="" # MNEMONIC_PATH is an optional varible which, if set, must point to a file containing a # cosmos key mnemonic. The mnemonic will be used to restore the node operator / validator key. # If empty, the entrypoint will generate a new key ENV MNEMONIC_PATH="" # CONSENSUS_KEY_PATH is an optional variable which, if set, must point to a file containg # a comebft consesus key for the validator. # If empty, the entrypoint will generate a new key ENV CONSENSUS_KEY_PATH="" # COMET_NODE_KEY_PATH is an optional variable which, if set, must point to a file containg # a comebft p2p node key. # If empty, the entrypoint will generate a new key ENV COMET_NODE_KEY_PATH="" # COMET_CONFIG_PATH is an optional variable which, if set, will overwrite # the default cofig.toml with the provided file. ENV COMET_CONFIG_PATH="" # APP_CONFIG_PATH is an optional variable which, if set, will overwrite # the default app.toml with the provided file. ENV APP_CONFIG_PATH="" ENV STANDALONE="" # Comet P2P Port EXPOSE 26656 # Comet RPC Port EXPOSE 26657 # SourceHub GRPC Port EXPOSE 9090 # SourceHub HTTP API Port EXPOSE 1317 USER node VOLUME ["/sourcehub"] ENTRYPOINT ["entrypoint.sh"] CMD ["sourcehubd", "start"] ================================================ FILE: LICENSE.txt ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2022 Democratized Data (D2) Foundation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: Makefile ================================================ IGNITE_RUN = docker run --rm -ti --volume $(PWD):/apps ignitehq/cli:latest UID := $(shell id --user) GID := $(shell id --group) BIN = build/sourcehubd DEMO_BIN = build/token-protocol-demo .PHONY: build build: GOOS=linux GOARCH=amd64 go build -o ${BIN} ./cmd/sourcehubd .PHONY: build-mac build-mac: GOOS=darwin GOARCH=arm64 go build -o ${BIN} ./cmd/sourcehubd .PHONY: install install: go install ./cmd/sourcehubd .PHONY: proto proto: ignite generate proto-go .PHONY: test test: go test ./... .PHONY: test\:all test\:all: test_env_generator scripts/run-test-matrix .PHONY: simulate simulate: ignite chain simulate .PHONY: fmt fmt: gofmt -w . buf format --write .PHONY: run run: build ${BIN} start .PHONY: docs docs: pkgsite -http 0.0.0.0:8080 .PHONY: test_env_generator test_env_generator: go build -o build/test_env_generator cmd/test_env_generator/main.go .PHONY: docker docker: docker image build -t ghcr.io/sourcenetwork/sourcehub:dev . ================================================ FILE: api/osmosis/epochs/module/v1beta1/module.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package modulev1beta1 import ( _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_Module_1_list)(nil) type _Module_1_list struct { list *[]string } func (x *_Module_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_Module_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } func (x *_Module_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_Module_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_Module_1_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message Module at list field HooksOrder as it is not of Message kind")) } func (x *_Module_1_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_Module_1_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_Module_1_list) IsValid() bool { return x.list != nil } var ( md_Module protoreflect.MessageDescriptor fd_Module_hooks_order protoreflect.FieldDescriptor ) func init() { file_osmosis_epochs_module_v1beta1_module_proto_init() md_Module = File_osmosis_epochs_module_v1beta1_module_proto.Messages().ByName("Module") fd_Module_hooks_order = md_Module.Fields().ByName("hooks_order") } var _ protoreflect.Message = (*fastReflection_Module)(nil) type fastReflection_Module Module func (x *Module) ProtoReflect() protoreflect.Message { return (*fastReflection_Module)(x) } func (x *Module) slowProtoReflect() protoreflect.Message { mi := &file_osmosis_epochs_module_v1beta1_module_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Module_messageType fastReflection_Module_messageType var _ protoreflect.MessageType = fastReflection_Module_messageType{} type fastReflection_Module_messageType struct{} func (x fastReflection_Module_messageType) Zero() protoreflect.Message { return (*fastReflection_Module)(nil) } func (x fastReflection_Module_messageType) New() protoreflect.Message { return new(fastReflection_Module) } func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Module) Type() protoreflect.MessageType { return _fastReflection_Module_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Module) New() protoreflect.Message { return new(fastReflection_Module) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { return (*Module)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.HooksOrder) != 0 { value := protoreflect.ValueOfList(&_Module_1_list{list: &x.HooksOrder}) if !f(fd_Module_hooks_order, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "osmosis.epochs.module.v1beta1.Module.hooks_order": return len(x.HooksOrder) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.module.v1beta1.Module")) } panic(fmt.Errorf("message osmosis.epochs.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "osmosis.epochs.module.v1beta1.Module.hooks_order": x.HooksOrder = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.module.v1beta1.Module")) } panic(fmt.Errorf("message osmosis.epochs.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "osmosis.epochs.module.v1beta1.Module.hooks_order": if len(x.HooksOrder) == 0 { return protoreflect.ValueOfList(&_Module_1_list{}) } listValue := &_Module_1_list{list: &x.HooksOrder} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.module.v1beta1.Module")) } panic(fmt.Errorf("message osmosis.epochs.module.v1beta1.Module does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "osmosis.epochs.module.v1beta1.Module.hooks_order": lv := value.List() clv := lv.(*_Module_1_list) x.HooksOrder = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.module.v1beta1.Module")) } panic(fmt.Errorf("message osmosis.epochs.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.module.v1beta1.Module.hooks_order": if x.HooksOrder == nil { x.HooksOrder = []string{} } value := &_Module_1_list{list: &x.HooksOrder} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.module.v1beta1.Module")) } panic(fmt.Errorf("message osmosis.epochs.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.module.v1beta1.Module.hooks_order": list := []string{} return protoreflect.ValueOfList(&_Module_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.module.v1beta1.Module")) } panic(fmt.Errorf("message osmosis.epochs.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in osmosis.epochs.module.v1beta1.Module", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Module) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Module) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.HooksOrder) > 0 { for _, s := range x.HooksOrder { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.HooksOrder) > 0 { for iNdEx := len(x.HooksOrder) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.HooksOrder[iNdEx]) copy(dAtA[i:], x.HooksOrder[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HooksOrder[iNdEx]))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HooksOrder", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.HooksOrder = append(x.HooksOrder, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: osmosis/epochs/module/v1beta1/module.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Module is the config object for the module. type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // hooks_order specifies the order of epochs hooks and should be a list // of module names which provide a epochs hooks instance. If no order is // provided, then hooks will be applied in alphabetical order of module names. HooksOrder []string `protobuf:"bytes,1,rep,name=hooks_order,json=hooksOrder,proto3" json:"hooks_order,omitempty"` } func (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { mi := &file_osmosis_epochs_module_v1beta1_module_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Module) String() string { return protoimpl.X.MessageStringOf(x) } func (*Module) ProtoMessage() {} // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { return file_osmosis_epochs_module_v1beta1_module_proto_rawDescGZIP(), []int{0} } func (x *Module) GetHooksOrder() []string { if x != nil { return x.HooksOrder } return nil } var File_osmosis_epochs_module_v1beta1_module_proto protoreflect.FileDescriptor var file_osmosis_epochs_module_v1beta1_module_proto_rawDesc = []byte{ 0x0a, 0x2a, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x33, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2d, 0x0a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x42, 0x85, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x45, 0x4d, 0xaa, 0x02, 0x1d, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1d, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x29, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_osmosis_epochs_module_v1beta1_module_proto_rawDescOnce sync.Once file_osmosis_epochs_module_v1beta1_module_proto_rawDescData = file_osmosis_epochs_module_v1beta1_module_proto_rawDesc ) func file_osmosis_epochs_module_v1beta1_module_proto_rawDescGZIP() []byte { file_osmosis_epochs_module_v1beta1_module_proto_rawDescOnce.Do(func() { file_osmosis_epochs_module_v1beta1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_osmosis_epochs_module_v1beta1_module_proto_rawDescData) }) return file_osmosis_epochs_module_v1beta1_module_proto_rawDescData } var file_osmosis_epochs_module_v1beta1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_osmosis_epochs_module_v1beta1_module_proto_goTypes = []interface{}{ (*Module)(nil), // 0: osmosis.epochs.module.v1beta1.Module } var file_osmosis_epochs_module_v1beta1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_osmosis_epochs_module_v1beta1_module_proto_init() } func file_osmosis_epochs_module_v1beta1_module_proto_init() { if File_osmosis_epochs_module_v1beta1_module_proto != nil { return } if !protoimpl.UnsafeEnabled { file_osmosis_epochs_module_v1beta1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_osmosis_epochs_module_v1beta1_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_osmosis_epochs_module_v1beta1_module_proto_goTypes, DependencyIndexes: file_osmosis_epochs_module_v1beta1_module_proto_depIdxs, MessageInfos: file_osmosis_epochs_module_v1beta1_module_proto_msgTypes, }.Build() File_osmosis_epochs_module_v1beta1_module_proto = out.File file_osmosis_epochs_module_v1beta1_module_proto_rawDesc = nil file_osmosis_epochs_module_v1beta1_module_proto_goTypes = nil file_osmosis_epochs_module_v1beta1_module_proto_depIdxs = nil } ================================================ FILE: api/osmosis/epochs/v1beta1/genesis.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package epochsv1beta1 import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_EpochInfo protoreflect.MessageDescriptor fd_EpochInfo_identifier protoreflect.FieldDescriptor fd_EpochInfo_start_time protoreflect.FieldDescriptor fd_EpochInfo_duration protoreflect.FieldDescriptor fd_EpochInfo_current_epoch protoreflect.FieldDescriptor fd_EpochInfo_current_epoch_start_time protoreflect.FieldDescriptor fd_EpochInfo_epoch_counting_started protoreflect.FieldDescriptor fd_EpochInfo_current_epoch_start_height protoreflect.FieldDescriptor ) func init() { file_osmosis_epochs_v1beta1_genesis_proto_init() md_EpochInfo = File_osmosis_epochs_v1beta1_genesis_proto.Messages().ByName("EpochInfo") fd_EpochInfo_identifier = md_EpochInfo.Fields().ByName("identifier") fd_EpochInfo_start_time = md_EpochInfo.Fields().ByName("start_time") fd_EpochInfo_duration = md_EpochInfo.Fields().ByName("duration") fd_EpochInfo_current_epoch = md_EpochInfo.Fields().ByName("current_epoch") fd_EpochInfo_current_epoch_start_time = md_EpochInfo.Fields().ByName("current_epoch_start_time") fd_EpochInfo_epoch_counting_started = md_EpochInfo.Fields().ByName("epoch_counting_started") fd_EpochInfo_current_epoch_start_height = md_EpochInfo.Fields().ByName("current_epoch_start_height") } var _ protoreflect.Message = (*fastReflection_EpochInfo)(nil) type fastReflection_EpochInfo EpochInfo func (x *EpochInfo) ProtoReflect() protoreflect.Message { return (*fastReflection_EpochInfo)(x) } func (x *EpochInfo) slowProtoReflect() protoreflect.Message { mi := &file_osmosis_epochs_v1beta1_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EpochInfo_messageType fastReflection_EpochInfo_messageType var _ protoreflect.MessageType = fastReflection_EpochInfo_messageType{} type fastReflection_EpochInfo_messageType struct{} func (x fastReflection_EpochInfo_messageType) Zero() protoreflect.Message { return (*fastReflection_EpochInfo)(nil) } func (x fastReflection_EpochInfo_messageType) New() protoreflect.Message { return new(fastReflection_EpochInfo) } func (x fastReflection_EpochInfo_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EpochInfo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EpochInfo) Descriptor() protoreflect.MessageDescriptor { return md_EpochInfo } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EpochInfo) Type() protoreflect.MessageType { return _fastReflection_EpochInfo_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EpochInfo) New() protoreflect.Message { return new(fastReflection_EpochInfo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EpochInfo) Interface() protoreflect.ProtoMessage { return (*EpochInfo)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EpochInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Identifier != "" { value := protoreflect.ValueOfString(x.Identifier) if !f(fd_EpochInfo_identifier, value) { return } } if x.StartTime != nil { value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) if !f(fd_EpochInfo_start_time, value) { return } } if x.Duration != nil { value := protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) if !f(fd_EpochInfo_duration, value) { return } } if x.CurrentEpoch != int64(0) { value := protoreflect.ValueOfInt64(x.CurrentEpoch) if !f(fd_EpochInfo_current_epoch, value) { return } } if x.CurrentEpochStartTime != nil { value := protoreflect.ValueOfMessage(x.CurrentEpochStartTime.ProtoReflect()) if !f(fd_EpochInfo_current_epoch_start_time, value) { return } } if x.EpochCountingStarted != false { value := protoreflect.ValueOfBool(x.EpochCountingStarted) if !f(fd_EpochInfo_epoch_counting_started, value) { return } } if x.CurrentEpochStartHeight != int64(0) { value := protoreflect.ValueOfInt64(x.CurrentEpochStartHeight) if !f(fd_EpochInfo_current_epoch_start_height, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EpochInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "osmosis.epochs.v1beta1.EpochInfo.identifier": return x.Identifier != "" case "osmosis.epochs.v1beta1.EpochInfo.start_time": return x.StartTime != nil case "osmosis.epochs.v1beta1.EpochInfo.duration": return x.Duration != nil case "osmosis.epochs.v1beta1.EpochInfo.current_epoch": return x.CurrentEpoch != int64(0) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_time": return x.CurrentEpochStartTime != nil case "osmosis.epochs.v1beta1.EpochInfo.epoch_counting_started": return x.EpochCountingStarted != false case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_height": return x.CurrentEpochStartHeight != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.EpochInfo")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.EpochInfo does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EpochInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "osmosis.epochs.v1beta1.EpochInfo.identifier": x.Identifier = "" case "osmosis.epochs.v1beta1.EpochInfo.start_time": x.StartTime = nil case "osmosis.epochs.v1beta1.EpochInfo.duration": x.Duration = nil case "osmosis.epochs.v1beta1.EpochInfo.current_epoch": x.CurrentEpoch = int64(0) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_time": x.CurrentEpochStartTime = nil case "osmosis.epochs.v1beta1.EpochInfo.epoch_counting_started": x.EpochCountingStarted = false case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_height": x.CurrentEpochStartHeight = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.EpochInfo")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.EpochInfo does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EpochInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "osmosis.epochs.v1beta1.EpochInfo.identifier": value := x.Identifier return protoreflect.ValueOfString(value) case "osmosis.epochs.v1beta1.EpochInfo.start_time": value := x.StartTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.duration": value := x.Duration return protoreflect.ValueOfMessage(value.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch": value := x.CurrentEpoch return protoreflect.ValueOfInt64(value) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_time": value := x.CurrentEpochStartTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.epoch_counting_started": value := x.EpochCountingStarted return protoreflect.ValueOfBool(value) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_height": value := x.CurrentEpochStartHeight return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.EpochInfo")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.EpochInfo does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EpochInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "osmosis.epochs.v1beta1.EpochInfo.identifier": x.Identifier = value.Interface().(string) case "osmosis.epochs.v1beta1.EpochInfo.start_time": x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) case "osmosis.epochs.v1beta1.EpochInfo.duration": x.Duration = value.Message().Interface().(*durationpb.Duration) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch": x.CurrentEpoch = value.Int() case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_time": x.CurrentEpochStartTime = value.Message().Interface().(*timestamppb.Timestamp) case "osmosis.epochs.v1beta1.EpochInfo.epoch_counting_started": x.EpochCountingStarted = value.Bool() case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_height": x.CurrentEpochStartHeight = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.EpochInfo")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.EpochInfo does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EpochInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.EpochInfo.start_time": if x.StartTime == nil { x.StartTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.duration": if x.Duration == nil { x.Duration = new(durationpb.Duration) } return protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_time": if x.CurrentEpochStartTime == nil { x.CurrentEpochStartTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CurrentEpochStartTime.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.identifier": panic(fmt.Errorf("field identifier of message osmosis.epochs.v1beta1.EpochInfo is not mutable")) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch": panic(fmt.Errorf("field current_epoch of message osmosis.epochs.v1beta1.EpochInfo is not mutable")) case "osmosis.epochs.v1beta1.EpochInfo.epoch_counting_started": panic(fmt.Errorf("field epoch_counting_started of message osmosis.epochs.v1beta1.EpochInfo is not mutable")) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_height": panic(fmt.Errorf("field current_epoch_start_height of message osmosis.epochs.v1beta1.EpochInfo is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.EpochInfo")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.EpochInfo does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EpochInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.EpochInfo.identifier": return protoreflect.ValueOfString("") case "osmosis.epochs.v1beta1.EpochInfo.start_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.duration": m := new(durationpb.Duration) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch": return protoreflect.ValueOfInt64(int64(0)) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "osmosis.epochs.v1beta1.EpochInfo.epoch_counting_started": return protoreflect.ValueOfBool(false) case "osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_height": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.EpochInfo")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.EpochInfo does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EpochInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in osmosis.epochs.v1beta1.EpochInfo", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EpochInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EpochInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EpochInfo) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EpochInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EpochInfo) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Identifier) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.StartTime != nil { l = options.Size(x.StartTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.Duration != nil { l = options.Size(x.Duration) n += 1 + l + runtime.Sov(uint64(l)) } if x.CurrentEpoch != 0 { n += 1 + runtime.Sov(uint64(x.CurrentEpoch)) } if x.CurrentEpochStartTime != nil { l = options.Size(x.CurrentEpochStartTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.EpochCountingStarted { n += 2 } if x.CurrentEpochStartHeight != 0 { n += 1 + runtime.Sov(uint64(x.CurrentEpochStartHeight)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EpochInfo) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.CurrentEpochStartHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentEpochStartHeight)) i-- dAtA[i] = 0x40 } if x.EpochCountingStarted { i-- if x.EpochCountingStarted { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x30 } if x.CurrentEpochStartTime != nil { encoded, err := options.Marshal(x.CurrentEpochStartTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if x.CurrentEpoch != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentEpoch)) i-- dAtA[i] = 0x20 } if x.Duration != nil { encoded, err := options.Marshal(x.Duration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.StartTime != nil { encoded, err := options.Marshal(x.StartTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Identifier) > 0 { i -= len(x.Identifier) copy(dAtA[i:], x.Identifier) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EpochInfo) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochInfo: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Identifier = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.StartTime == nil { x.StartTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Duration == nil { x.Duration = &durationpb.Duration{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Duration); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) } x.CurrentEpoch = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CurrentEpoch |= int64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CurrentEpochStartTime == nil { x.CurrentEpochStartTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrentEpochStartTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochCountingStarted", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.EpochCountingStarted = bool(v != 0) case 8: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartHeight", wireType) } x.CurrentEpochStartHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CurrentEpochStartHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_GenesisState_1_list)(nil) type _GenesisState_1_list struct { list *[]*EpochInfo } func (x *_GenesisState_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*EpochInfo) (*x.list)[i] = concreteValue } func (x *_GenesisState_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*EpochInfo) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { v := new(EpochInfo) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_1_list) NewElement() protoreflect.Value { v := new(EpochInfo) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_1_list) IsValid() bool { return x.list != nil } var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_epochs protoreflect.FieldDescriptor ) func init() { file_osmosis_epochs_v1beta1_genesis_proto_init() md_GenesisState = File_osmosis_epochs_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_epochs = md_GenesisState.Fields().ByName("epochs") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) type fastReflection_GenesisState GenesisState func (x *GenesisState) ProtoReflect() protoreflect.Message { return (*fastReflection_GenesisState)(x) } func (x *GenesisState) slowProtoReflect() protoreflect.Message { mi := &file_osmosis_epochs_v1beta1_genesis_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} type fastReflection_GenesisState_messageType struct{} func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { return (*fastReflection_GenesisState)(nil) } func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { return new(fastReflection_GenesisState) } func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { return _fastReflection_GenesisState_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GenesisState) New() protoreflect.Message { return new(fastReflection_GenesisState) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { return (*GenesisState)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Epochs) != 0 { value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Epochs}) if !f(fd_GenesisState_epochs, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "osmosis.epochs.v1beta1.GenesisState.epochs": return len(x.Epochs) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.GenesisState")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "osmosis.epochs.v1beta1.GenesisState.epochs": x.Epochs = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.GenesisState")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "osmosis.epochs.v1beta1.GenesisState.epochs": if len(x.Epochs) == 0 { return protoreflect.ValueOfList(&_GenesisState_1_list{}) } listValue := &_GenesisState_1_list{list: &x.Epochs} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.GenesisState")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "osmosis.epochs.v1beta1.GenesisState.epochs": lv := value.List() clv := lv.(*_GenesisState_1_list) x.Epochs = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.GenesisState")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.GenesisState.epochs": if x.Epochs == nil { x.Epochs = []*EpochInfo{} } value := &_GenesisState_1_list{list: &x.Epochs} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.GenesisState")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.GenesisState.epochs": list := []*EpochInfo{} return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.GenesisState")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in osmosis.epochs.v1beta1.GenesisState", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GenesisState) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Epochs) > 0 { for _, e := range x.Epochs { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Epochs) > 0 { for iNdEx := len(x.Epochs) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Epochs[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Epochs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Epochs = append(x.Epochs, &EpochInfo{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Epochs[len(x.Epochs)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: osmosis/epochs/v1beta1/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // EpochInfo is a struct that describes the data going into // a timer defined by the x/epochs module. type EpochInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // identifier is a unique reference to this particular timer. Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // start_time is the time at which the timer first ever ticks. // If start_time is in the future, the epoch will not begin until the start // time. StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // duration is the time in between epoch ticks. // In order for intended behavior to be met, duration should // be greater than the chains expected block time. // Duration must be non-zero. Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"` // current_epoch is the current epoch number, or in other words, // how many times has the timer 'ticked'. // The first tick (current_epoch=1) is defined as // the first block whose blocktime is greater than the EpochInfo start_time. CurrentEpoch int64 `protobuf:"varint,4,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` // current_epoch_start_time describes the start time of the current timer // interval. The interval is (current_epoch_start_time, // current_epoch_start_time + duration] When the timer ticks, this is set to // current_epoch_start_time = last_epoch_start_time + duration only one timer // tick for a given identifier can occur per block. // // NOTE! The current_epoch_start_time may diverge significantly from the // wall-clock time the epoch began at. Wall-clock time of epoch start may be // >> current_epoch_start_time. Suppose current_epoch_start_time = 10, // duration = 5. Suppose the chain goes offline at t=14, and comes back online // at t=30, and produces blocks at every successive time. (t=31, 32, etc.) // * The t=30 block will start the epoch for (10, 15] // * The t=31 block will start the epoch for (15, 20] // * The t=32 block will start the epoch for (20, 25] // * The t=33 block will start the epoch for (25, 30] // * The t=34 block will start the epoch for (30, 35] // * The **t=36** block will start the epoch for (35, 40] CurrentEpochStartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=current_epoch_start_time,json=currentEpochStartTime,proto3" json:"current_epoch_start_time,omitempty"` // epoch_counting_started is a boolean, that indicates whether this // epoch timer has began yet. EpochCountingStarted bool `protobuf:"varint,6,opt,name=epoch_counting_started,json=epochCountingStarted,proto3" json:"epoch_counting_started,omitempty"` // current_epoch_start_height is the block height at which the current epoch // started. (The block height at which the timer last ticked) CurrentEpochStartHeight int64 `protobuf:"varint,8,opt,name=current_epoch_start_height,json=currentEpochStartHeight,proto3" json:"current_epoch_start_height,omitempty"` } func (x *EpochInfo) Reset() { *x = EpochInfo{} if protoimpl.UnsafeEnabled { mi := &file_osmosis_epochs_v1beta1_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EpochInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*EpochInfo) ProtoMessage() {} // Deprecated: Use EpochInfo.ProtoReflect.Descriptor instead. func (*EpochInfo) Descriptor() ([]byte, []int) { return file_osmosis_epochs_v1beta1_genesis_proto_rawDescGZIP(), []int{0} } func (x *EpochInfo) GetIdentifier() string { if x != nil { return x.Identifier } return "" } func (x *EpochInfo) GetStartTime() *timestamppb.Timestamp { if x != nil { return x.StartTime } return nil } func (x *EpochInfo) GetDuration() *durationpb.Duration { if x != nil { return x.Duration } return nil } func (x *EpochInfo) GetCurrentEpoch() int64 { if x != nil { return x.CurrentEpoch } return 0 } func (x *EpochInfo) GetCurrentEpochStartTime() *timestamppb.Timestamp { if x != nil { return x.CurrentEpochStartTime } return nil } func (x *EpochInfo) GetEpochCountingStarted() bool { if x != nil { return x.EpochCountingStarted } return false } func (x *EpochInfo) GetCurrentEpochStartHeight() int64 { if x != nil { return x.CurrentEpochStartHeight } return 0 } // GenesisState defines the epochs module's genesis state. type GenesisState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Epochs []*EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { mi := &file_osmosis_epochs_v1beta1_genesis_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenesisState) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { return file_osmosis_epochs_v1beta1_genesis_proto_rawDescGZIP(), []int{1} } func (x *GenesisState) GetEpochs() []*EpochInfo { if x != nil { return x.Epochs } return nil } var File_osmosis_epochs_v1beta1_genesis_proto protoreflect.FileDescriptor var file_osmosis_epochs_v1beta1_genesis_proto_rawDesc = []byte{ 0x0a, 0x24, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x04, 0x0a, 0x09, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x68, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x12, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x80, 0x01, 0x0a, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x1f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x4f, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x42, 0xdb, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x45, 0x58, 0xaa, 0x02, 0x16, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_osmosis_epochs_v1beta1_genesis_proto_rawDescOnce sync.Once file_osmosis_epochs_v1beta1_genesis_proto_rawDescData = file_osmosis_epochs_v1beta1_genesis_proto_rawDesc ) func file_osmosis_epochs_v1beta1_genesis_proto_rawDescGZIP() []byte { file_osmosis_epochs_v1beta1_genesis_proto_rawDescOnce.Do(func() { file_osmosis_epochs_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_osmosis_epochs_v1beta1_genesis_proto_rawDescData) }) return file_osmosis_epochs_v1beta1_genesis_proto_rawDescData } var file_osmosis_epochs_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_osmosis_epochs_v1beta1_genesis_proto_goTypes = []interface{}{ (*EpochInfo)(nil), // 0: osmosis.epochs.v1beta1.EpochInfo (*GenesisState)(nil), // 1: osmosis.epochs.v1beta1.GenesisState (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp (*durationpb.Duration)(nil), // 3: google.protobuf.Duration } var file_osmosis_epochs_v1beta1_genesis_proto_depIdxs = []int32{ 2, // 0: osmosis.epochs.v1beta1.EpochInfo.start_time:type_name -> google.protobuf.Timestamp 3, // 1: osmosis.epochs.v1beta1.EpochInfo.duration:type_name -> google.protobuf.Duration 2, // 2: osmosis.epochs.v1beta1.EpochInfo.current_epoch_start_time:type_name -> google.protobuf.Timestamp 0, // 3: osmosis.epochs.v1beta1.GenesisState.epochs:type_name -> osmosis.epochs.v1beta1.EpochInfo 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_osmosis_epochs_v1beta1_genesis_proto_init() } func file_osmosis_epochs_v1beta1_genesis_proto_init() { if File_osmosis_epochs_v1beta1_genesis_proto != nil { return } if !protoimpl.UnsafeEnabled { file_osmosis_epochs_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EpochInfo); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_osmosis_epochs_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_osmosis_epochs_v1beta1_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_osmosis_epochs_v1beta1_genesis_proto_goTypes, DependencyIndexes: file_osmosis_epochs_v1beta1_genesis_proto_depIdxs, MessageInfos: file_osmosis_epochs_v1beta1_genesis_proto_msgTypes, }.Build() File_osmosis_epochs_v1beta1_genesis_proto = out.File file_osmosis_epochs_v1beta1_genesis_proto_rawDesc = nil file_osmosis_epochs_v1beta1_genesis_proto_goTypes = nil file_osmosis_epochs_v1beta1_genesis_proto_depIdxs = nil } ================================================ FILE: api/osmosis/epochs/v1beta1/query.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package epochsv1beta1 import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_QueryEpochsInfoRequest protoreflect.MessageDescriptor ) func init() { file_osmosis_epochs_v1beta1_query_proto_init() md_QueryEpochsInfoRequest = File_osmosis_epochs_v1beta1_query_proto.Messages().ByName("QueryEpochsInfoRequest") } var _ protoreflect.Message = (*fastReflection_QueryEpochsInfoRequest)(nil) type fastReflection_QueryEpochsInfoRequest QueryEpochsInfoRequest func (x *QueryEpochsInfoRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryEpochsInfoRequest)(x) } func (x *QueryEpochsInfoRequest) slowProtoReflect() protoreflect.Message { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryEpochsInfoRequest_messageType fastReflection_QueryEpochsInfoRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryEpochsInfoRequest_messageType{} type fastReflection_QueryEpochsInfoRequest_messageType struct{} func (x fastReflection_QueryEpochsInfoRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryEpochsInfoRequest)(nil) } func (x fastReflection_QueryEpochsInfoRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryEpochsInfoRequest) } func (x fastReflection_QueryEpochsInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryEpochsInfoRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryEpochsInfoRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryEpochsInfoRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryEpochsInfoRequest) Type() protoreflect.MessageType { return _fastReflection_QueryEpochsInfoRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryEpochsInfoRequest) New() protoreflect.Message { return new(fastReflection_QueryEpochsInfoRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryEpochsInfoRequest) Interface() protoreflect.ProtoMessage { return (*QueryEpochsInfoRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryEpochsInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryEpochsInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryEpochsInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryEpochsInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryEpochsInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in osmosis.epochs.v1beta1.QueryEpochsInfoRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryEpochsInfoRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryEpochsInfoRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryEpochsInfoRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryEpochsInfoRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryEpochsInfoRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryEpochsInfoRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryEpochsInfoResponse_1_list)(nil) type _QueryEpochsInfoResponse_1_list struct { list *[]*EpochInfo } func (x *_QueryEpochsInfoResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryEpochsInfoResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryEpochsInfoResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*EpochInfo) (*x.list)[i] = concreteValue } func (x *_QueryEpochsInfoResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*EpochInfo) *x.list = append(*x.list, concreteValue) } func (x *_QueryEpochsInfoResponse_1_list) AppendMutable() protoreflect.Value { v := new(EpochInfo) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryEpochsInfoResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryEpochsInfoResponse_1_list) NewElement() protoreflect.Value { v := new(EpochInfo) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryEpochsInfoResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryEpochsInfoResponse protoreflect.MessageDescriptor fd_QueryEpochsInfoResponse_epochs protoreflect.FieldDescriptor ) func init() { file_osmosis_epochs_v1beta1_query_proto_init() md_QueryEpochsInfoResponse = File_osmosis_epochs_v1beta1_query_proto.Messages().ByName("QueryEpochsInfoResponse") fd_QueryEpochsInfoResponse_epochs = md_QueryEpochsInfoResponse.Fields().ByName("epochs") } var _ protoreflect.Message = (*fastReflection_QueryEpochsInfoResponse)(nil) type fastReflection_QueryEpochsInfoResponse QueryEpochsInfoResponse func (x *QueryEpochsInfoResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryEpochsInfoResponse)(x) } func (x *QueryEpochsInfoResponse) slowProtoReflect() protoreflect.Message { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryEpochsInfoResponse_messageType fastReflection_QueryEpochsInfoResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryEpochsInfoResponse_messageType{} type fastReflection_QueryEpochsInfoResponse_messageType struct{} func (x fastReflection_QueryEpochsInfoResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryEpochsInfoResponse)(nil) } func (x fastReflection_QueryEpochsInfoResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryEpochsInfoResponse) } func (x fastReflection_QueryEpochsInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryEpochsInfoResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryEpochsInfoResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryEpochsInfoResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryEpochsInfoResponse) Type() protoreflect.MessageType { return _fastReflection_QueryEpochsInfoResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryEpochsInfoResponse) New() protoreflect.Message { return new(fastReflection_QueryEpochsInfoResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryEpochsInfoResponse) Interface() protoreflect.ProtoMessage { return (*QueryEpochsInfoResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryEpochsInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Epochs) != 0 { value := protoreflect.ValueOfList(&_QueryEpochsInfoResponse_1_list{list: &x.Epochs}) if !f(fd_QueryEpochsInfoResponse_epochs, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryEpochsInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryEpochsInfoResponse.epochs": return len(x.Epochs) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryEpochsInfoResponse.epochs": x.Epochs = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryEpochsInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "osmosis.epochs.v1beta1.QueryEpochsInfoResponse.epochs": if len(x.Epochs) == 0 { return protoreflect.ValueOfList(&_QueryEpochsInfoResponse_1_list{}) } listValue := &_QueryEpochsInfoResponse_1_list{list: &x.Epochs} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryEpochsInfoResponse.epochs": lv := value.List() clv := lv.(*_QueryEpochsInfoResponse_1_list) x.Epochs = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryEpochsInfoResponse.epochs": if x.Epochs == nil { x.Epochs = []*EpochInfo{} } value := &_QueryEpochsInfoResponse_1_list{list: &x.Epochs} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryEpochsInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryEpochsInfoResponse.epochs": list := []*EpochInfo{} return protoreflect.ValueOfList(&_QueryEpochsInfoResponse_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryEpochsInfoResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryEpochsInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in osmosis.epochs.v1beta1.QueryEpochsInfoResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryEpochsInfoResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryEpochsInfoResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryEpochsInfoResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryEpochsInfoResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryEpochsInfoResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Epochs) > 0 { for _, e := range x.Epochs { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryEpochsInfoResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Epochs) > 0 { for iNdEx := len(x.Epochs) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Epochs[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryEpochsInfoResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Epochs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Epochs = append(x.Epochs, &EpochInfo{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Epochs[len(x.Epochs)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryCurrentEpochRequest protoreflect.MessageDescriptor fd_QueryCurrentEpochRequest_identifier protoreflect.FieldDescriptor ) func init() { file_osmosis_epochs_v1beta1_query_proto_init() md_QueryCurrentEpochRequest = File_osmosis_epochs_v1beta1_query_proto.Messages().ByName("QueryCurrentEpochRequest") fd_QueryCurrentEpochRequest_identifier = md_QueryCurrentEpochRequest.Fields().ByName("identifier") } var _ protoreflect.Message = (*fastReflection_QueryCurrentEpochRequest)(nil) type fastReflection_QueryCurrentEpochRequest QueryCurrentEpochRequest func (x *QueryCurrentEpochRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryCurrentEpochRequest)(x) } func (x *QueryCurrentEpochRequest) slowProtoReflect() protoreflect.Message { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryCurrentEpochRequest_messageType fastReflection_QueryCurrentEpochRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryCurrentEpochRequest_messageType{} type fastReflection_QueryCurrentEpochRequest_messageType struct{} func (x fastReflection_QueryCurrentEpochRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryCurrentEpochRequest)(nil) } func (x fastReflection_QueryCurrentEpochRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryCurrentEpochRequest) } func (x fastReflection_QueryCurrentEpochRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryCurrentEpochRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryCurrentEpochRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryCurrentEpochRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryCurrentEpochRequest) Type() protoreflect.MessageType { return _fastReflection_QueryCurrentEpochRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryCurrentEpochRequest) New() protoreflect.Message { return new(fastReflection_QueryCurrentEpochRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryCurrentEpochRequest) Interface() protoreflect.ProtoMessage { return (*QueryCurrentEpochRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryCurrentEpochRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Identifier != "" { value := protoreflect.ValueOfString(x.Identifier) if !f(fd_QueryCurrentEpochRequest_identifier, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryCurrentEpochRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochRequest.identifier": return x.Identifier != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochRequest.identifier": x.Identifier = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryCurrentEpochRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochRequest.identifier": value := x.Identifier return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochRequest.identifier": x.Identifier = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochRequest.identifier": panic(fmt.Errorf("field identifier of message osmosis.epochs.v1beta1.QueryCurrentEpochRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryCurrentEpochRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochRequest.identifier": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochRequest")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryCurrentEpochRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in osmosis.epochs.v1beta1.QueryCurrentEpochRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryCurrentEpochRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryCurrentEpochRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryCurrentEpochRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryCurrentEpochRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Identifier) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryCurrentEpochRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Identifier) > 0 { i -= len(x.Identifier) copy(dAtA[i:], x.Identifier) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryCurrentEpochRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Identifier = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryCurrentEpochResponse protoreflect.MessageDescriptor fd_QueryCurrentEpochResponse_current_epoch protoreflect.FieldDescriptor ) func init() { file_osmosis_epochs_v1beta1_query_proto_init() md_QueryCurrentEpochResponse = File_osmosis_epochs_v1beta1_query_proto.Messages().ByName("QueryCurrentEpochResponse") fd_QueryCurrentEpochResponse_current_epoch = md_QueryCurrentEpochResponse.Fields().ByName("current_epoch") } var _ protoreflect.Message = (*fastReflection_QueryCurrentEpochResponse)(nil) type fastReflection_QueryCurrentEpochResponse QueryCurrentEpochResponse func (x *QueryCurrentEpochResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryCurrentEpochResponse)(x) } func (x *QueryCurrentEpochResponse) slowProtoReflect() protoreflect.Message { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryCurrentEpochResponse_messageType fastReflection_QueryCurrentEpochResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryCurrentEpochResponse_messageType{} type fastReflection_QueryCurrentEpochResponse_messageType struct{} func (x fastReflection_QueryCurrentEpochResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryCurrentEpochResponse)(nil) } func (x fastReflection_QueryCurrentEpochResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryCurrentEpochResponse) } func (x fastReflection_QueryCurrentEpochResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryCurrentEpochResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryCurrentEpochResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryCurrentEpochResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryCurrentEpochResponse) Type() protoreflect.MessageType { return _fastReflection_QueryCurrentEpochResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryCurrentEpochResponse) New() protoreflect.Message { return new(fastReflection_QueryCurrentEpochResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryCurrentEpochResponse) Interface() protoreflect.ProtoMessage { return (*QueryCurrentEpochResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryCurrentEpochResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.CurrentEpoch != int64(0) { value := protoreflect.ValueOfInt64(x.CurrentEpoch) if !f(fd_QueryCurrentEpochResponse_current_epoch, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryCurrentEpochResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochResponse.current_epoch": return x.CurrentEpoch != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochResponse.current_epoch": x.CurrentEpoch = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryCurrentEpochResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochResponse.current_epoch": value := x.CurrentEpoch return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochResponse.current_epoch": x.CurrentEpoch = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochResponse.current_epoch": panic(fmt.Errorf("field current_epoch of message osmosis.epochs.v1beta1.QueryCurrentEpochResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryCurrentEpochResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "osmosis.epochs.v1beta1.QueryCurrentEpochResponse.current_epoch": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: osmosis.epochs.v1beta1.QueryCurrentEpochResponse")) } panic(fmt.Errorf("message osmosis.epochs.v1beta1.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryCurrentEpochResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in osmosis.epochs.v1beta1.QueryCurrentEpochResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryCurrentEpochResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentEpochResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryCurrentEpochResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryCurrentEpochResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryCurrentEpochResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.CurrentEpoch != 0 { n += 1 + runtime.Sov(uint64(x.CurrentEpoch)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryCurrentEpochResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.CurrentEpoch != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentEpoch)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryCurrentEpochResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) } x.CurrentEpoch = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CurrentEpoch |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: osmosis/epochs/v1beta1/query.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type QueryEpochsInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *QueryEpochsInfoRequest) Reset() { *x = QueryEpochsInfoRequest{} if protoimpl.UnsafeEnabled { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryEpochsInfoRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryEpochsInfoRequest) ProtoMessage() {} // Deprecated: Use QueryEpochsInfoRequest.ProtoReflect.Descriptor instead. func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int) { return file_osmosis_epochs_v1beta1_query_proto_rawDescGZIP(), []int{0} } type QueryEpochsInfoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Epochs []*EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs,omitempty"` } func (x *QueryEpochsInfoResponse) Reset() { *x = QueryEpochsInfoResponse{} if protoimpl.UnsafeEnabled { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryEpochsInfoResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryEpochsInfoResponse) ProtoMessage() {} // Deprecated: Use QueryEpochsInfoResponse.ProtoReflect.Descriptor instead. func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int) { return file_osmosis_epochs_v1beta1_query_proto_rawDescGZIP(), []int{1} } func (x *QueryEpochsInfoResponse) GetEpochs() []*EpochInfo { if x != nil { return x.Epochs } return nil } type QueryCurrentEpochRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` } func (x *QueryCurrentEpochRequest) Reset() { *x = QueryCurrentEpochRequest{} if protoimpl.UnsafeEnabled { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryCurrentEpochRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryCurrentEpochRequest) ProtoMessage() {} // Deprecated: Use QueryCurrentEpochRequest.ProtoReflect.Descriptor instead. func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int) { return file_osmosis_epochs_v1beta1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryCurrentEpochRequest) GetIdentifier() string { if x != nil { return x.Identifier } return "" } type QueryCurrentEpochResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CurrentEpoch int64 `protobuf:"varint,1,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` } func (x *QueryCurrentEpochResponse) Reset() { *x = QueryCurrentEpochResponse{} if protoimpl.UnsafeEnabled { mi := &file_osmosis_epochs_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryCurrentEpochResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryCurrentEpochResponse) ProtoMessage() {} // Deprecated: Use QueryCurrentEpochResponse.ProtoReflect.Descriptor instead. func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int) { return file_osmosis_epochs_v1beta1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryCurrentEpochResponse) GetCurrentEpoch() int64 { if x != nil { return x.CurrentEpoch } return 0 } var File_osmosis_epochs_v1beta1_query_proto protoreflect.FileDescriptor var file_osmosis_epochs_v1beta1_query_proto_rawDesc = []byte{ 0x0a, 0x22, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x22, 0x3a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x40, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x32, 0xc4, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x95, 0x01, 0x0a, 0x0a, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x2e, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x30, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0xd9, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x45, 0x58, 0xaa, 0x02, 0x16, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x4f, 0x73, 0x6d, 0x6f, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_osmosis_epochs_v1beta1_query_proto_rawDescOnce sync.Once file_osmosis_epochs_v1beta1_query_proto_rawDescData = file_osmosis_epochs_v1beta1_query_proto_rawDesc ) func file_osmosis_epochs_v1beta1_query_proto_rawDescGZIP() []byte { file_osmosis_epochs_v1beta1_query_proto_rawDescOnce.Do(func() { file_osmosis_epochs_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_osmosis_epochs_v1beta1_query_proto_rawDescData) }) return file_osmosis_epochs_v1beta1_query_proto_rawDescData } var file_osmosis_epochs_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_osmosis_epochs_v1beta1_query_proto_goTypes = []interface{}{ (*QueryEpochsInfoRequest)(nil), // 0: osmosis.epochs.v1beta1.QueryEpochsInfoRequest (*QueryEpochsInfoResponse)(nil), // 1: osmosis.epochs.v1beta1.QueryEpochsInfoResponse (*QueryCurrentEpochRequest)(nil), // 2: osmosis.epochs.v1beta1.QueryCurrentEpochRequest (*QueryCurrentEpochResponse)(nil), // 3: osmosis.epochs.v1beta1.QueryCurrentEpochResponse (*EpochInfo)(nil), // 4: osmosis.epochs.v1beta1.EpochInfo } var file_osmosis_epochs_v1beta1_query_proto_depIdxs = []int32{ 4, // 0: osmosis.epochs.v1beta1.QueryEpochsInfoResponse.epochs:type_name -> osmosis.epochs.v1beta1.EpochInfo 0, // 1: osmosis.epochs.v1beta1.Query.EpochInfos:input_type -> osmosis.epochs.v1beta1.QueryEpochsInfoRequest 2, // 2: osmosis.epochs.v1beta1.Query.CurrentEpoch:input_type -> osmosis.epochs.v1beta1.QueryCurrentEpochRequest 1, // 3: osmosis.epochs.v1beta1.Query.EpochInfos:output_type -> osmosis.epochs.v1beta1.QueryEpochsInfoResponse 3, // 4: osmosis.epochs.v1beta1.Query.CurrentEpoch:output_type -> osmosis.epochs.v1beta1.QueryCurrentEpochResponse 3, // [3:5] is the sub-list for method output_type 1, // [1:3] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_osmosis_epochs_v1beta1_query_proto_init() } func file_osmosis_epochs_v1beta1_query_proto_init() { if File_osmosis_epochs_v1beta1_query_proto != nil { return } file_osmosis_epochs_v1beta1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_osmosis_epochs_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryEpochsInfoRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_osmosis_epochs_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryEpochsInfoResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_osmosis_epochs_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryCurrentEpochRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_osmosis_epochs_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryCurrentEpochResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_osmosis_epochs_v1beta1_query_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_osmosis_epochs_v1beta1_query_proto_goTypes, DependencyIndexes: file_osmosis_epochs_v1beta1_query_proto_depIdxs, MessageInfos: file_osmosis_epochs_v1beta1_query_proto_msgTypes, }.Build() File_osmosis_epochs_v1beta1_query_proto = out.File file_osmosis_epochs_v1beta1_query_proto_rawDesc = nil file_osmosis_epochs_v1beta1_query_proto_goTypes = nil file_osmosis_epochs_v1beta1_query_proto_depIdxs = nil } ================================================ FILE: api/osmosis/epochs/v1beta1/query_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: osmosis/epochs/v1beta1/query.proto package epochsv1beta1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Query_EpochInfos_FullMethodName = "/osmosis.epochs.v1beta1.Query/EpochInfos" Query_CurrentEpoch_FullMethodName = "/osmosis.epochs.v1beta1.Query/CurrentEpoch" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Query defines the gRPC querier service. type QueryClient interface { // EpochInfos provide running epochInfos EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) } type queryClient struct { cc grpc.ClientConnInterface } func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } func (c *queryClient) EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryEpochsInfoResponse) err := c.cc.Invoke(ctx, Query_EpochInfos_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryCurrentEpochResponse) err := c.cc.Invoke(ctx, Query_CurrentEpoch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility. // // Query defines the gRPC querier service. type QueryServer interface { // EpochInfos provide running epochInfos EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) mustEmbedUnimplementedQueryServer() } // UnimplementedQueryServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EpochInfos not implemented") } func (UnimplementedQueryServer) CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CurrentEpoch not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will // result in compilation errors. type UnsafeQueryServer interface { mustEmbedUnimplementedQueryServer() } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { // If the following call pancis, it indicates UnimplementedQueryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&Query_ServiceDesc, srv) } func _Query_EpochInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryEpochsInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).EpochInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_EpochInfos_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EpochInfos(ctx, req.(*QueryEpochsInfoRequest)) } return interceptor(ctx, in, info, handler) } func _Query_CurrentEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryCurrentEpochRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).CurrentEpoch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_CurrentEpoch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).CurrentEpoch(ctx, req.(*QueryCurrentEpochRequest)) } return interceptor(ctx, in, info, handler) } // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.epochs.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EpochInfos", Handler: _Query_EpochInfos_Handler, }, { MethodName: "CurrentEpoch", Handler: _Query_CurrentEpoch_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/epochs/v1beta1/query.proto", } ================================================ FILE: api/sourcehub/acp/access_decision.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" types "github.com/sourcenetwork/acp_core/pkg/pulsar/types" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_AccessDecision_5_list)(nil) type _AccessDecision_5_list struct { list *[]*types.Operation } func (x *_AccessDecision_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_AccessDecision_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_AccessDecision_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*types.Operation) (*x.list)[i] = concreteValue } func (x *_AccessDecision_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*types.Operation) *x.list = append(*x.list, concreteValue) } func (x *_AccessDecision_5_list) AppendMutable() protoreflect.Value { v := new(types.Operation) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_AccessDecision_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_AccessDecision_5_list) NewElement() protoreflect.Value { v := new(types.Operation) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_AccessDecision_5_list) IsValid() bool { return x.list != nil } var ( md_AccessDecision protoreflect.MessageDescriptor fd_AccessDecision_id protoreflect.FieldDescriptor fd_AccessDecision_policy_id protoreflect.FieldDescriptor fd_AccessDecision_creator protoreflect.FieldDescriptor fd_AccessDecision_creator_acc_sequence protoreflect.FieldDescriptor fd_AccessDecision_operations protoreflect.FieldDescriptor fd_AccessDecision_actor protoreflect.FieldDescriptor fd_AccessDecision_params protoreflect.FieldDescriptor fd_AccessDecision_creation_time protoreflect.FieldDescriptor fd_AccessDecision_issued_height protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_access_decision_proto_init() md_AccessDecision = File_sourcehub_acp_access_decision_proto.Messages().ByName("AccessDecision") fd_AccessDecision_id = md_AccessDecision.Fields().ByName("id") fd_AccessDecision_policy_id = md_AccessDecision.Fields().ByName("policy_id") fd_AccessDecision_creator = md_AccessDecision.Fields().ByName("creator") fd_AccessDecision_creator_acc_sequence = md_AccessDecision.Fields().ByName("creator_acc_sequence") fd_AccessDecision_operations = md_AccessDecision.Fields().ByName("operations") fd_AccessDecision_actor = md_AccessDecision.Fields().ByName("actor") fd_AccessDecision_params = md_AccessDecision.Fields().ByName("params") fd_AccessDecision_creation_time = md_AccessDecision.Fields().ByName("creation_time") fd_AccessDecision_issued_height = md_AccessDecision.Fields().ByName("issued_height") } var _ protoreflect.Message = (*fastReflection_AccessDecision)(nil) type fastReflection_AccessDecision AccessDecision func (x *AccessDecision) ProtoReflect() protoreflect.Message { return (*fastReflection_AccessDecision)(x) } func (x *AccessDecision) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_access_decision_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AccessDecision_messageType fastReflection_AccessDecision_messageType var _ protoreflect.MessageType = fastReflection_AccessDecision_messageType{} type fastReflection_AccessDecision_messageType struct{} func (x fastReflection_AccessDecision_messageType) Zero() protoreflect.Message { return (*fastReflection_AccessDecision)(nil) } func (x fastReflection_AccessDecision_messageType) New() protoreflect.Message { return new(fastReflection_AccessDecision) } func (x fastReflection_AccessDecision_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AccessDecision } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AccessDecision) Descriptor() protoreflect.MessageDescriptor { return md_AccessDecision } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AccessDecision) Type() protoreflect.MessageType { return _fastReflection_AccessDecision_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AccessDecision) New() protoreflect.Message { return new(fastReflection_AccessDecision) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AccessDecision) Interface() protoreflect.ProtoMessage { return (*AccessDecision)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AccessDecision) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_AccessDecision_id, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_AccessDecision_policy_id, value) { return } } if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_AccessDecision_creator, value) { return } } if x.CreatorAccSequence != uint64(0) { value := protoreflect.ValueOfUint64(x.CreatorAccSequence) if !f(fd_AccessDecision_creator_acc_sequence, value) { return } } if len(x.Operations) != 0 { value := protoreflect.ValueOfList(&_AccessDecision_5_list{list: &x.Operations}) if !f(fd_AccessDecision_operations, value) { return } } if x.Actor != "" { value := protoreflect.ValueOfString(x.Actor) if !f(fd_AccessDecision_actor, value) { return } } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_AccessDecision_params, value) { return } } if x.CreationTime != nil { value := protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) if !f(fd_AccessDecision_creation_time, value) { return } } if x.IssuedHeight != uint64(0) { value := protoreflect.ValueOfUint64(x.IssuedHeight) if !f(fd_AccessDecision_issued_height, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AccessDecision) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.AccessDecision.id": return x.Id != "" case "sourcehub.acp.AccessDecision.policy_id": return x.PolicyId != "" case "sourcehub.acp.AccessDecision.creator": return x.Creator != "" case "sourcehub.acp.AccessDecision.creator_acc_sequence": return x.CreatorAccSequence != uint64(0) case "sourcehub.acp.AccessDecision.operations": return len(x.Operations) != 0 case "sourcehub.acp.AccessDecision.actor": return x.Actor != "" case "sourcehub.acp.AccessDecision.params": return x.Params != nil case "sourcehub.acp.AccessDecision.creation_time": return x.CreationTime != nil case "sourcehub.acp.AccessDecision.issued_height": return x.IssuedHeight != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessDecision")) } panic(fmt.Errorf("message sourcehub.acp.AccessDecision does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.AccessDecision.id": x.Id = "" case "sourcehub.acp.AccessDecision.policy_id": x.PolicyId = "" case "sourcehub.acp.AccessDecision.creator": x.Creator = "" case "sourcehub.acp.AccessDecision.creator_acc_sequence": x.CreatorAccSequence = uint64(0) case "sourcehub.acp.AccessDecision.operations": x.Operations = nil case "sourcehub.acp.AccessDecision.actor": x.Actor = "" case "sourcehub.acp.AccessDecision.params": x.Params = nil case "sourcehub.acp.AccessDecision.creation_time": x.CreationTime = nil case "sourcehub.acp.AccessDecision.issued_height": x.IssuedHeight = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessDecision")) } panic(fmt.Errorf("message sourcehub.acp.AccessDecision does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AccessDecision) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.AccessDecision.id": value := x.Id return protoreflect.ValueOfString(value) case "sourcehub.acp.AccessDecision.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.AccessDecision.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.acp.AccessDecision.creator_acc_sequence": value := x.CreatorAccSequence return protoreflect.ValueOfUint64(value) case "sourcehub.acp.AccessDecision.operations": if len(x.Operations) == 0 { return protoreflect.ValueOfList(&_AccessDecision_5_list{}) } listValue := &_AccessDecision_5_list{list: &x.Operations} return protoreflect.ValueOfList(listValue) case "sourcehub.acp.AccessDecision.actor": value := x.Actor return protoreflect.ValueOfString(value) case "sourcehub.acp.AccessDecision.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.AccessDecision.creation_time": value := x.CreationTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.AccessDecision.issued_height": value := x.IssuedHeight return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessDecision")) } panic(fmt.Errorf("message sourcehub.acp.AccessDecision does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.AccessDecision.id": x.Id = value.Interface().(string) case "sourcehub.acp.AccessDecision.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.AccessDecision.creator": x.Creator = value.Interface().(string) case "sourcehub.acp.AccessDecision.creator_acc_sequence": x.CreatorAccSequence = value.Uint() case "sourcehub.acp.AccessDecision.operations": lv := value.List() clv := lv.(*_AccessDecision_5_list) x.Operations = *clv.list case "sourcehub.acp.AccessDecision.actor": x.Actor = value.Interface().(string) case "sourcehub.acp.AccessDecision.params": x.Params = value.Message().Interface().(*DecisionParams) case "sourcehub.acp.AccessDecision.creation_time": x.CreationTime = value.Message().Interface().(*Timestamp) case "sourcehub.acp.AccessDecision.issued_height": x.IssuedHeight = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessDecision")) } panic(fmt.Errorf("message sourcehub.acp.AccessDecision does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.AccessDecision.operations": if x.Operations == nil { x.Operations = []*types.Operation{} } value := &_AccessDecision_5_list{list: &x.Operations} return protoreflect.ValueOfList(value) case "sourcehub.acp.AccessDecision.params": if x.Params == nil { x.Params = new(DecisionParams) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.acp.AccessDecision.creation_time": if x.CreationTime == nil { x.CreationTime = new(Timestamp) } return protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) case "sourcehub.acp.AccessDecision.id": panic(fmt.Errorf("field id of message sourcehub.acp.AccessDecision is not mutable")) case "sourcehub.acp.AccessDecision.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.AccessDecision is not mutable")) case "sourcehub.acp.AccessDecision.creator": panic(fmt.Errorf("field creator of message sourcehub.acp.AccessDecision is not mutable")) case "sourcehub.acp.AccessDecision.creator_acc_sequence": panic(fmt.Errorf("field creator_acc_sequence of message sourcehub.acp.AccessDecision is not mutable")) case "sourcehub.acp.AccessDecision.actor": panic(fmt.Errorf("field actor of message sourcehub.acp.AccessDecision is not mutable")) case "sourcehub.acp.AccessDecision.issued_height": panic(fmt.Errorf("field issued_height of message sourcehub.acp.AccessDecision is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessDecision")) } panic(fmt.Errorf("message sourcehub.acp.AccessDecision does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AccessDecision) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.AccessDecision.id": return protoreflect.ValueOfString("") case "sourcehub.acp.AccessDecision.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.AccessDecision.creator": return protoreflect.ValueOfString("") case "sourcehub.acp.AccessDecision.creator_acc_sequence": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.AccessDecision.operations": list := []*types.Operation{} return protoreflect.ValueOfList(&_AccessDecision_5_list{list: &list}) case "sourcehub.acp.AccessDecision.actor": return protoreflect.ValueOfString("") case "sourcehub.acp.AccessDecision.params": m := new(DecisionParams) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.AccessDecision.creation_time": m := new(Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.AccessDecision.issued_height": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessDecision")) } panic(fmt.Errorf("message sourcehub.acp.AccessDecision does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AccessDecision) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.AccessDecision", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AccessDecision) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AccessDecision) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AccessDecision) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AccessDecision) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreatorAccSequence != 0 { n += 1 + runtime.Sov(uint64(x.CreatorAccSequence)) } if len(x.Operations) > 0 { for _, e := range x.Operations { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } l = len(x.Actor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationTime != nil { l = options.Size(x.CreationTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.IssuedHeight != 0 { n += 1 + runtime.Sov(uint64(x.IssuedHeight)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AccessDecision) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.IssuedHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.IssuedHeight)) i-- dAtA[i] = 0x48 } if x.CreationTime != nil { encoded, err := options.Marshal(x.CreationTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a } if len(x.Actor) > 0 { i -= len(x.Actor) copy(dAtA[i:], x.Actor) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Actor))) i-- dAtA[i] = 0x32 } if len(x.Operations) > 0 { for iNdEx := len(x.Operations) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Operations[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } } if x.CreatorAccSequence != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatorAccSequence)) i-- dAtA[i] = 0x20 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AccessDecision) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessDecision: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessDecision: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatorAccSequence", wireType) } x.CreatorAccSequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CreatorAccSequence |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Operations = append(x.Operations, &types.Operation{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Operations[len(x.Operations)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &DecisionParams{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTime == nil { x.CreationTime = &Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 9: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IssuedHeight", wireType) } x.IssuedHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.IssuedHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DecisionParams protoreflect.MessageDescriptor fd_DecisionParams_decision_expiration_delta protoreflect.FieldDescriptor fd_DecisionParams_proof_expiration_delta protoreflect.FieldDescriptor fd_DecisionParams_ticket_expiration_delta protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_access_decision_proto_init() md_DecisionParams = File_sourcehub_acp_access_decision_proto.Messages().ByName("DecisionParams") fd_DecisionParams_decision_expiration_delta = md_DecisionParams.Fields().ByName("decision_expiration_delta") fd_DecisionParams_proof_expiration_delta = md_DecisionParams.Fields().ByName("proof_expiration_delta") fd_DecisionParams_ticket_expiration_delta = md_DecisionParams.Fields().ByName("ticket_expiration_delta") } var _ protoreflect.Message = (*fastReflection_DecisionParams)(nil) type fastReflection_DecisionParams DecisionParams func (x *DecisionParams) ProtoReflect() protoreflect.Message { return (*fastReflection_DecisionParams)(x) } func (x *DecisionParams) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_access_decision_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DecisionParams_messageType fastReflection_DecisionParams_messageType var _ protoreflect.MessageType = fastReflection_DecisionParams_messageType{} type fastReflection_DecisionParams_messageType struct{} func (x fastReflection_DecisionParams_messageType) Zero() protoreflect.Message { return (*fastReflection_DecisionParams)(nil) } func (x fastReflection_DecisionParams_messageType) New() protoreflect.Message { return new(fastReflection_DecisionParams) } func (x fastReflection_DecisionParams_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DecisionParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DecisionParams) Descriptor() protoreflect.MessageDescriptor { return md_DecisionParams } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DecisionParams) Type() protoreflect.MessageType { return _fastReflection_DecisionParams_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DecisionParams) New() protoreflect.Message { return new(fastReflection_DecisionParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DecisionParams) Interface() protoreflect.ProtoMessage { return (*DecisionParams)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DecisionParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DecisionExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.DecisionExpirationDelta) if !f(fd_DecisionParams_decision_expiration_delta, value) { return } } if x.ProofExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.ProofExpirationDelta) if !f(fd_DecisionParams_proof_expiration_delta, value) { return } } if x.TicketExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.TicketExpirationDelta) if !f(fd_DecisionParams_ticket_expiration_delta, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DecisionParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.DecisionParams.decision_expiration_delta": return x.DecisionExpirationDelta != uint64(0) case "sourcehub.acp.DecisionParams.proof_expiration_delta": return x.ProofExpirationDelta != uint64(0) case "sourcehub.acp.DecisionParams.ticket_expiration_delta": return x.TicketExpirationDelta != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DecisionParams")) } panic(fmt.Errorf("message sourcehub.acp.DecisionParams does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.DecisionParams.decision_expiration_delta": x.DecisionExpirationDelta = uint64(0) case "sourcehub.acp.DecisionParams.proof_expiration_delta": x.ProofExpirationDelta = uint64(0) case "sourcehub.acp.DecisionParams.ticket_expiration_delta": x.TicketExpirationDelta = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DecisionParams")) } panic(fmt.Errorf("message sourcehub.acp.DecisionParams does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DecisionParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.DecisionParams.decision_expiration_delta": value := x.DecisionExpirationDelta return protoreflect.ValueOfUint64(value) case "sourcehub.acp.DecisionParams.proof_expiration_delta": value := x.ProofExpirationDelta return protoreflect.ValueOfUint64(value) case "sourcehub.acp.DecisionParams.ticket_expiration_delta": value := x.TicketExpirationDelta return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DecisionParams")) } panic(fmt.Errorf("message sourcehub.acp.DecisionParams does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.DecisionParams.decision_expiration_delta": x.DecisionExpirationDelta = value.Uint() case "sourcehub.acp.DecisionParams.proof_expiration_delta": x.ProofExpirationDelta = value.Uint() case "sourcehub.acp.DecisionParams.ticket_expiration_delta": x.TicketExpirationDelta = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DecisionParams")) } panic(fmt.Errorf("message sourcehub.acp.DecisionParams does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.DecisionParams.decision_expiration_delta": panic(fmt.Errorf("field decision_expiration_delta of message sourcehub.acp.DecisionParams is not mutable")) case "sourcehub.acp.DecisionParams.proof_expiration_delta": panic(fmt.Errorf("field proof_expiration_delta of message sourcehub.acp.DecisionParams is not mutable")) case "sourcehub.acp.DecisionParams.ticket_expiration_delta": panic(fmt.Errorf("field ticket_expiration_delta of message sourcehub.acp.DecisionParams is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DecisionParams")) } panic(fmt.Errorf("message sourcehub.acp.DecisionParams does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DecisionParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.DecisionParams.decision_expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.DecisionParams.proof_expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.DecisionParams.ticket_expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DecisionParams")) } panic(fmt.Errorf("message sourcehub.acp.DecisionParams does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DecisionParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.DecisionParams", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DecisionParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DecisionParams) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DecisionParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DecisionParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.DecisionExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.DecisionExpirationDelta)) } if x.ProofExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.ProofExpirationDelta)) } if x.TicketExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.TicketExpirationDelta)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DecisionParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.TicketExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.TicketExpirationDelta)) i-- dAtA[i] = 0x18 } if x.ProofExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.ProofExpirationDelta)) i-- dAtA[i] = 0x10 } if x.DecisionExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.DecisionExpirationDelta)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DecisionParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DecisionParams: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DecisionParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionExpirationDelta", wireType) } x.DecisionExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.DecisionExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofExpirationDelta", wireType) } x.ProofExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.ProofExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TicketExpirationDelta", wireType) } x.TicketExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.TicketExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/access_decision.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // AccessDecision models the result of evaluating a set of AccessRequests for an Actor type AccessDecision struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` // used as part of id generation Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` // used as part of id generation CreatorAccSequence uint64 `protobuf:"varint,4,opt,name=creator_acc_sequence,json=creatorAccSequence,proto3" json:"creator_acc_sequence,omitempty"` // used as part of id generation Operations []*types.Operation `protobuf:"bytes,5,rep,name=operations,proto3" json:"operations,omitempty"` // used as part of id generation Actor string `protobuf:"bytes,6,opt,name=actor,proto3" json:"actor,omitempty"` // used as part of id generation Params *DecisionParams `protobuf:"bytes,7,opt,name=params,proto3" json:"params,omitempty"` // used as part of id generation CreationTime *Timestamp `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // issued_height stores the block height when the Decision was evaluated IssuedHeight uint64 `protobuf:"varint,9,opt,name=issued_height,json=issuedHeight,proto3" json:"issued_height,omitempty"` } func (x *AccessDecision) Reset() { *x = AccessDecision{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_access_decision_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AccessDecision) String() string { return protoimpl.X.MessageStringOf(x) } func (*AccessDecision) ProtoMessage() {} // Deprecated: Use AccessDecision.ProtoReflect.Descriptor instead. func (*AccessDecision) Descriptor() ([]byte, []int) { return file_sourcehub_acp_access_decision_proto_rawDescGZIP(), []int{0} } func (x *AccessDecision) GetId() string { if x != nil { return x.Id } return "" } func (x *AccessDecision) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *AccessDecision) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *AccessDecision) GetCreatorAccSequence() uint64 { if x != nil { return x.CreatorAccSequence } return 0 } func (x *AccessDecision) GetOperations() []*types.Operation { if x != nil { return x.Operations } return nil } func (x *AccessDecision) GetActor() string { if x != nil { return x.Actor } return "" } func (x *AccessDecision) GetParams() *DecisionParams { if x != nil { return x.Params } return nil } func (x *AccessDecision) GetCreationTime() *Timestamp { if x != nil { return x.CreationTime } return nil } func (x *AccessDecision) GetIssuedHeight() uint64 { if x != nil { return x.IssuedHeight } return 0 } // DecisionParams stores auxiliary information regarding the validity of a decision type DecisionParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // number of blocks a Decision is valid for DecisionExpirationDelta uint64 `protobuf:"varint,1,opt,name=decision_expiration_delta,json=decisionExpirationDelta,proto3" json:"decision_expiration_delta,omitempty"` // number of blocks a DecisionProof is valid for ProofExpirationDelta uint64 `protobuf:"varint,2,opt,name=proof_expiration_delta,json=proofExpirationDelta,proto3" json:"proof_expiration_delta,omitempty"` // number of blocks an AccessTicket is valid for TicketExpirationDelta uint64 `protobuf:"varint,3,opt,name=ticket_expiration_delta,json=ticketExpirationDelta,proto3" json:"ticket_expiration_delta,omitempty"` } func (x *DecisionParams) Reset() { *x = DecisionParams{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_access_decision_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DecisionParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*DecisionParams) ProtoMessage() {} // Deprecated: Use DecisionParams.ProtoReflect.Descriptor instead. func (*DecisionParams) Descriptor() ([]byte, []int) { return file_sourcehub_acp_access_decision_proto_rawDescGZIP(), []int{1} } func (x *DecisionParams) GetDecisionExpirationDelta() uint64 { if x != nil { return x.DecisionExpirationDelta } return 0 } func (x *DecisionParams) GetProofExpirationDelta() uint64 { if x != nil { return x.ProofExpirationDelta } return 0 } func (x *DecisionParams) GetTicketExpirationDelta() uint64 { if x != nil { return x.TicketExpirationDelta } return 0 } var File_sourcehub_acp_access_decision_proto protoreflect.FileDescriptor var file_sourcehub_acp_access_decision_proto_rawDesc = []byte{ 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x02, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x42, 0x9d, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x13, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_access_decision_proto_rawDescOnce sync.Once file_sourcehub_acp_access_decision_proto_rawDescData = file_sourcehub_acp_access_decision_proto_rawDesc ) func file_sourcehub_acp_access_decision_proto_rawDescGZIP() []byte { file_sourcehub_acp_access_decision_proto_rawDescOnce.Do(func() { file_sourcehub_acp_access_decision_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_access_decision_proto_rawDescData) }) return file_sourcehub_acp_access_decision_proto_rawDescData } var file_sourcehub_acp_access_decision_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_acp_access_decision_proto_goTypes = []interface{}{ (*AccessDecision)(nil), // 0: sourcehub.acp.AccessDecision (*DecisionParams)(nil), // 1: sourcehub.acp.DecisionParams (*types.Operation)(nil), // 2: sourcenetwork.acp_core.Operation (*Timestamp)(nil), // 3: sourcehub.acp.Timestamp } var file_sourcehub_acp_access_decision_proto_depIdxs = []int32{ 2, // 0: sourcehub.acp.AccessDecision.operations:type_name -> sourcenetwork.acp_core.Operation 1, // 1: sourcehub.acp.AccessDecision.params:type_name -> sourcehub.acp.DecisionParams 3, // 2: sourcehub.acp.AccessDecision.creation_time:type_name -> sourcehub.acp.Timestamp 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_sourcehub_acp_access_decision_proto_init() } func file_sourcehub_acp_access_decision_proto_init() { if File_sourcehub_acp_access_decision_proto != nil { return } file_sourcehub_acp_time_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_access_decision_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccessDecision); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_access_decision_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DecisionParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_access_decision_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_access_decision_proto_goTypes, DependencyIndexes: file_sourcehub_acp_access_decision_proto_depIdxs, MessageInfos: file_sourcehub_acp_access_decision_proto_msgTypes, }.Build() File_sourcehub_acp_access_decision_proto = out.File file_sourcehub_acp_access_decision_proto_rawDesc = nil file_sourcehub_acp_access_decision_proto_goTypes = nil file_sourcehub_acp_access_decision_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/access_ticket.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_AccessTicket protoreflect.MessageDescriptor fd_AccessTicket_version_denominator protoreflect.FieldDescriptor fd_AccessTicket_decision_id protoreflect.FieldDescriptor fd_AccessTicket_decision protoreflect.FieldDescriptor fd_AccessTicket_decision_proof protoreflect.FieldDescriptor fd_AccessTicket_signature protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_access_ticket_proto_init() md_AccessTicket = File_sourcehub_acp_access_ticket_proto.Messages().ByName("AccessTicket") fd_AccessTicket_version_denominator = md_AccessTicket.Fields().ByName("version_denominator") fd_AccessTicket_decision_id = md_AccessTicket.Fields().ByName("decision_id") fd_AccessTicket_decision = md_AccessTicket.Fields().ByName("decision") fd_AccessTicket_decision_proof = md_AccessTicket.Fields().ByName("decision_proof") fd_AccessTicket_signature = md_AccessTicket.Fields().ByName("signature") } var _ protoreflect.Message = (*fastReflection_AccessTicket)(nil) type fastReflection_AccessTicket AccessTicket func (x *AccessTicket) ProtoReflect() protoreflect.Message { return (*fastReflection_AccessTicket)(x) } func (x *AccessTicket) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_access_ticket_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AccessTicket_messageType fastReflection_AccessTicket_messageType var _ protoreflect.MessageType = fastReflection_AccessTicket_messageType{} type fastReflection_AccessTicket_messageType struct{} func (x fastReflection_AccessTicket_messageType) Zero() protoreflect.Message { return (*fastReflection_AccessTicket)(nil) } func (x fastReflection_AccessTicket_messageType) New() protoreflect.Message { return new(fastReflection_AccessTicket) } func (x fastReflection_AccessTicket_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AccessTicket } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AccessTicket) Descriptor() protoreflect.MessageDescriptor { return md_AccessTicket } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AccessTicket) Type() protoreflect.MessageType { return _fastReflection_AccessTicket_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AccessTicket) New() protoreflect.Message { return new(fastReflection_AccessTicket) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AccessTicket) Interface() protoreflect.ProtoMessage { return (*AccessTicket)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AccessTicket) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.VersionDenominator != "" { value := protoreflect.ValueOfString(x.VersionDenominator) if !f(fd_AccessTicket_version_denominator, value) { return } } if x.DecisionId != "" { value := protoreflect.ValueOfString(x.DecisionId) if !f(fd_AccessTicket_decision_id, value) { return } } if x.Decision != nil { value := protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) if !f(fd_AccessTicket_decision, value) { return } } if len(x.DecisionProof) != 0 { value := protoreflect.ValueOfBytes(x.DecisionProof) if !f(fd_AccessTicket_decision_proof, value) { return } } if len(x.Signature) != 0 { value := protoreflect.ValueOfBytes(x.Signature) if !f(fd_AccessTicket_signature, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AccessTicket) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.AccessTicket.version_denominator": return x.VersionDenominator != "" case "sourcehub.acp.AccessTicket.decision_id": return x.DecisionId != "" case "sourcehub.acp.AccessTicket.decision": return x.Decision != nil case "sourcehub.acp.AccessTicket.decision_proof": return len(x.DecisionProof) != 0 case "sourcehub.acp.AccessTicket.signature": return len(x.Signature) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessTicket")) } panic(fmt.Errorf("message sourcehub.acp.AccessTicket does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.AccessTicket.version_denominator": x.VersionDenominator = "" case "sourcehub.acp.AccessTicket.decision_id": x.DecisionId = "" case "sourcehub.acp.AccessTicket.decision": x.Decision = nil case "sourcehub.acp.AccessTicket.decision_proof": x.DecisionProof = nil case "sourcehub.acp.AccessTicket.signature": x.Signature = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessTicket")) } panic(fmt.Errorf("message sourcehub.acp.AccessTicket does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AccessTicket) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.AccessTicket.version_denominator": value := x.VersionDenominator return protoreflect.ValueOfString(value) case "sourcehub.acp.AccessTicket.decision_id": value := x.DecisionId return protoreflect.ValueOfString(value) case "sourcehub.acp.AccessTicket.decision": value := x.Decision return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.AccessTicket.decision_proof": value := x.DecisionProof return protoreflect.ValueOfBytes(value) case "sourcehub.acp.AccessTicket.signature": value := x.Signature return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessTicket")) } panic(fmt.Errorf("message sourcehub.acp.AccessTicket does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.AccessTicket.version_denominator": x.VersionDenominator = value.Interface().(string) case "sourcehub.acp.AccessTicket.decision_id": x.DecisionId = value.Interface().(string) case "sourcehub.acp.AccessTicket.decision": x.Decision = value.Message().Interface().(*AccessDecision) case "sourcehub.acp.AccessTicket.decision_proof": x.DecisionProof = value.Bytes() case "sourcehub.acp.AccessTicket.signature": x.Signature = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessTicket")) } panic(fmt.Errorf("message sourcehub.acp.AccessTicket does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.AccessTicket.decision": if x.Decision == nil { x.Decision = new(AccessDecision) } return protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) case "sourcehub.acp.AccessTicket.version_denominator": panic(fmt.Errorf("field version_denominator of message sourcehub.acp.AccessTicket is not mutable")) case "sourcehub.acp.AccessTicket.decision_id": panic(fmt.Errorf("field decision_id of message sourcehub.acp.AccessTicket is not mutable")) case "sourcehub.acp.AccessTicket.decision_proof": panic(fmt.Errorf("field decision_proof of message sourcehub.acp.AccessTicket is not mutable")) case "sourcehub.acp.AccessTicket.signature": panic(fmt.Errorf("field signature of message sourcehub.acp.AccessTicket is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessTicket")) } panic(fmt.Errorf("message sourcehub.acp.AccessTicket does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AccessTicket) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.AccessTicket.version_denominator": return protoreflect.ValueOfString("") case "sourcehub.acp.AccessTicket.decision_id": return protoreflect.ValueOfString("") case "sourcehub.acp.AccessTicket.decision": m := new(AccessDecision) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.AccessTicket.decision_proof": return protoreflect.ValueOfBytes(nil) case "sourcehub.acp.AccessTicket.signature": return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AccessTicket")) } panic(fmt.Errorf("message sourcehub.acp.AccessTicket does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AccessTicket) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.AccessTicket", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AccessTicket) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AccessTicket) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AccessTicket) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AccessTicket) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.VersionDenominator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.DecisionId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Decision != nil { l = options.Size(x.Decision) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.DecisionProof) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Signature) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AccessTicket) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Signature) > 0 { i -= len(x.Signature) copy(dAtA[i:], x.Signature) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) i-- dAtA[i] = 0x2a } if len(x.DecisionProof) > 0 { i -= len(x.DecisionProof) copy(dAtA[i:], x.DecisionProof) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DecisionProof))) i-- dAtA[i] = 0x22 } if x.Decision != nil { encoded, err := options.Marshal(x.Decision) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.DecisionId) > 0 { i -= len(x.DecisionId) copy(dAtA[i:], x.DecisionId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DecisionId))) i-- dAtA[i] = 0x12 } if len(x.VersionDenominator) > 0 { i -= len(x.VersionDenominator) copy(dAtA[i:], x.VersionDenominator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VersionDenominator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AccessTicket) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessTicket: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessTicket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VersionDenominator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.VersionDenominator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DecisionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decision", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Decision == nil { x.Decision = &AccessDecision{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Decision); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionProof", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DecisionProof = append(x.DecisionProof[:0], dAtA[iNdEx:postIndex]...) if x.DecisionProof == nil { x.DecisionProof = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) if x.Signature == nil { x.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/access_ticket.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Represents a Capability token containing an opaque proof and a set of Operations // the Actor is allowed to perform. // Tickets should be verified by a Reference Monitor before granting access to the requested operations. type AccessTicket struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // identified the ticket version VersionDenominator string `protobuf:"bytes,1,opt,name=version_denominator,json=versionDenominator,proto3" json:"version_denominator,omitempty"` DecisionId string `protobuf:"bytes,2,opt,name=decision_id,json=decisionId,proto3" json:"decision_id,omitempty"` Decision *AccessDecision `protobuf:"bytes,3,opt,name=decision,proto3" json:"decision,omitempty"` // proof of existance that the given decision exists in the chain // validation strategy is dependent on ticket version DecisionProof []byte `protobuf:"bytes,4,opt,name=decision_proof,json=decisionProof,proto3" json:"decision_proof,omitempty"` // signature of ticket which must match actor pkey in the access decision Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } func (x *AccessTicket) Reset() { *x = AccessTicket{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_access_ticket_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AccessTicket) String() string { return protoimpl.X.MessageStringOf(x) } func (*AccessTicket) ProtoMessage() {} // Deprecated: Use AccessTicket.ProtoReflect.Descriptor instead. func (*AccessTicket) Descriptor() ([]byte, []int) { return file_sourcehub_acp_access_ticket_proto_rawDescGZIP(), []int{0} } func (x *AccessTicket) GetVersionDenominator() string { if x != nil { return x.VersionDenominator } return "" } func (x *AccessTicket) GetDecisionId() string { if x != nil { return x.DecisionId } return "" } func (x *AccessTicket) GetDecision() *AccessDecision { if x != nil { return x.Decision } return nil } func (x *AccessTicket) GetDecisionProof() []byte { if x != nil { return x.DecisionProof } return nil } func (x *AccessTicket) GetSignature() []byte { if x != nil { return x.Signature } return nil } var File_sourcehub_acp_access_ticket_proto protoreflect.FileDescriptor var file_sourcehub_acp_access_ticket_proto_rawDesc = []byte{ 0x0a, 0x21, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x11, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_access_ticket_proto_rawDescOnce sync.Once file_sourcehub_acp_access_ticket_proto_rawDescData = file_sourcehub_acp_access_ticket_proto_rawDesc ) func file_sourcehub_acp_access_ticket_proto_rawDescGZIP() []byte { file_sourcehub_acp_access_ticket_proto_rawDescOnce.Do(func() { file_sourcehub_acp_access_ticket_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_access_ticket_proto_rawDescData) }) return file_sourcehub_acp_access_ticket_proto_rawDescData } var file_sourcehub_acp_access_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_acp_access_ticket_proto_goTypes = []interface{}{ (*AccessTicket)(nil), // 0: sourcehub.acp.AccessTicket (*AccessDecision)(nil), // 1: sourcehub.acp.AccessDecision } var file_sourcehub_acp_access_ticket_proto_depIdxs = []int32{ 1, // 0: sourcehub.acp.AccessTicket.decision:type_name -> sourcehub.acp.AccessDecision 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcehub_acp_access_ticket_proto_init() } func file_sourcehub_acp_access_ticket_proto_init() { if File_sourcehub_acp_access_ticket_proto != nil { return } file_sourcehub_acp_access_decision_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_access_ticket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccessTicket); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_access_ticket_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_access_ticket_proto_goTypes, DependencyIndexes: file_sourcehub_acp_access_ticket_proto_depIdxs, MessageInfos: file_sourcehub_acp_access_ticket_proto_msgTypes, }.Build() File_sourcehub_acp_access_ticket_proto = out.File file_sourcehub_acp_access_ticket_proto_rawDesc = nil file_sourcehub_acp_access_ticket_proto_goTypes = nil file_sourcehub_acp_access_ticket_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/commitment.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" types "github.com/sourcenetwork/acp_core/pkg/pulsar/types" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_RegistrationProof_2_list)(nil) type _RegistrationProof_2_list struct { list *[][]byte } func (x *_RegistrationProof_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_RegistrationProof_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfBytes((*x.list)[i]) } func (x *_RegistrationProof_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Bytes() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_RegistrationProof_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Bytes() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_RegistrationProof_2_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message RegistrationProof at list field MerkleProof as it is not of Message kind")) } func (x *_RegistrationProof_2_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_RegistrationProof_2_list) NewElement() protoreflect.Value { var v []byte return protoreflect.ValueOfBytes(v) } func (x *_RegistrationProof_2_list) IsValid() bool { return x.list != nil } var ( md_RegistrationProof protoreflect.MessageDescriptor fd_RegistrationProof_object protoreflect.FieldDescriptor fd_RegistrationProof_merkle_proof protoreflect.FieldDescriptor fd_RegistrationProof_leaf_count protoreflect.FieldDescriptor fd_RegistrationProof_leaf_index protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_commitment_proto_init() md_RegistrationProof = File_sourcehub_acp_commitment_proto.Messages().ByName("RegistrationProof") fd_RegistrationProof_object = md_RegistrationProof.Fields().ByName("object") fd_RegistrationProof_merkle_proof = md_RegistrationProof.Fields().ByName("merkle_proof") fd_RegistrationProof_leaf_count = md_RegistrationProof.Fields().ByName("leaf_count") fd_RegistrationProof_leaf_index = md_RegistrationProof.Fields().ByName("leaf_index") } var _ protoreflect.Message = (*fastReflection_RegistrationProof)(nil) type fastReflection_RegistrationProof RegistrationProof func (x *RegistrationProof) ProtoReflect() protoreflect.Message { return (*fastReflection_RegistrationProof)(x) } func (x *RegistrationProof) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_commitment_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RegistrationProof_messageType fastReflection_RegistrationProof_messageType var _ protoreflect.MessageType = fastReflection_RegistrationProof_messageType{} type fastReflection_RegistrationProof_messageType struct{} func (x fastReflection_RegistrationProof_messageType) Zero() protoreflect.Message { return (*fastReflection_RegistrationProof)(nil) } func (x fastReflection_RegistrationProof_messageType) New() protoreflect.Message { return new(fastReflection_RegistrationProof) } func (x fastReflection_RegistrationProof_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RegistrationProof } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RegistrationProof) Descriptor() protoreflect.MessageDescriptor { return md_RegistrationProof } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RegistrationProof) Type() protoreflect.MessageType { return _fastReflection_RegistrationProof_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RegistrationProof) New() protoreflect.Message { return new(fastReflection_RegistrationProof) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RegistrationProof) Interface() protoreflect.ProtoMessage { return (*RegistrationProof)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RegistrationProof) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_RegistrationProof_object, value) { return } } if len(x.MerkleProof) != 0 { value := protoreflect.ValueOfList(&_RegistrationProof_2_list{list: &x.MerkleProof}) if !f(fd_RegistrationProof_merkle_proof, value) { return } } if x.LeafCount != uint64(0) { value := protoreflect.ValueOfUint64(x.LeafCount) if !f(fd_RegistrationProof_leaf_count, value) { return } } if x.LeafIndex != uint64(0) { value := protoreflect.ValueOfUint64(x.LeafIndex) if !f(fd_RegistrationProof_leaf_index, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RegistrationProof) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RegistrationProof.object": return x.Object != nil case "sourcehub.acp.RegistrationProof.merkle_proof": return len(x.MerkleProof) != 0 case "sourcehub.acp.RegistrationProof.leaf_count": return x.LeafCount != uint64(0) case "sourcehub.acp.RegistrationProof.leaf_index": return x.LeafIndex != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationProof")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationProof does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationProof) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RegistrationProof.object": x.Object = nil case "sourcehub.acp.RegistrationProof.merkle_proof": x.MerkleProof = nil case "sourcehub.acp.RegistrationProof.leaf_count": x.LeafCount = uint64(0) case "sourcehub.acp.RegistrationProof.leaf_index": x.LeafIndex = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationProof")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationProof does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RegistrationProof) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RegistrationProof.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.RegistrationProof.merkle_proof": if len(x.MerkleProof) == 0 { return protoreflect.ValueOfList(&_RegistrationProof_2_list{}) } listValue := &_RegistrationProof_2_list{list: &x.MerkleProof} return protoreflect.ValueOfList(listValue) case "sourcehub.acp.RegistrationProof.leaf_count": value := x.LeafCount return protoreflect.ValueOfUint64(value) case "sourcehub.acp.RegistrationProof.leaf_index": value := x.LeafIndex return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationProof")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationProof does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationProof) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RegistrationProof.object": x.Object = value.Message().Interface().(*types.Object) case "sourcehub.acp.RegistrationProof.merkle_proof": lv := value.List() clv := lv.(*_RegistrationProof_2_list) x.MerkleProof = *clv.list case "sourcehub.acp.RegistrationProof.leaf_count": x.LeafCount = value.Uint() case "sourcehub.acp.RegistrationProof.leaf_index": x.LeafIndex = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationProof")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationProof does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationProof) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegistrationProof.object": if x.Object == nil { x.Object = new(types.Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcehub.acp.RegistrationProof.merkle_proof": if x.MerkleProof == nil { x.MerkleProof = [][]byte{} } value := &_RegistrationProof_2_list{list: &x.MerkleProof} return protoreflect.ValueOfList(value) case "sourcehub.acp.RegistrationProof.leaf_count": panic(fmt.Errorf("field leaf_count of message sourcehub.acp.RegistrationProof is not mutable")) case "sourcehub.acp.RegistrationProof.leaf_index": panic(fmt.Errorf("field leaf_index of message sourcehub.acp.RegistrationProof is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationProof")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationProof does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RegistrationProof) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegistrationProof.object": m := new(types.Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.RegistrationProof.merkle_proof": list := [][]byte{} return protoreflect.ValueOfList(&_RegistrationProof_2_list{list: &list}) case "sourcehub.acp.RegistrationProof.leaf_count": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.RegistrationProof.leaf_index": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationProof")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationProof does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RegistrationProof) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RegistrationProof", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RegistrationProof) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationProof) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RegistrationProof) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RegistrationProof) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RegistrationProof) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.MerkleProof) > 0 { for _, b := range x.MerkleProof { l = len(b) n += 1 + l + runtime.Sov(uint64(l)) } } if x.LeafCount != 0 { n += 1 + runtime.Sov(uint64(x.LeafCount)) } if x.LeafIndex != 0 { n += 1 + runtime.Sov(uint64(x.LeafIndex)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RegistrationProof) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.LeafIndex != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.LeafIndex)) i-- dAtA[i] = 0x20 } if x.LeafCount != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.LeafCount)) i-- dAtA[i] = 0x18 } if len(x.MerkleProof) > 0 { for iNdEx := len(x.MerkleProof) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.MerkleProof[iNdEx]) copy(dAtA[i:], x.MerkleProof[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MerkleProof[iNdEx]))) i-- dAtA[i] = 0x12 } } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RegistrationProof) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegistrationProof: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegistrationProof: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &types.Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MerkleProof", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.MerkleProof = append(x.MerkleProof, make([]byte, postIndex-iNdEx)) copy(x.MerkleProof[len(x.MerkleProof)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LeafCount", wireType) } x.LeafCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.LeafCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LeafIndex", wireType) } x.LeafIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.LeafIndex |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RegistrationsCommitment protoreflect.MessageDescriptor fd_RegistrationsCommitment_id protoreflect.FieldDescriptor fd_RegistrationsCommitment_policy_id protoreflect.FieldDescriptor fd_RegistrationsCommitment_commitment protoreflect.FieldDescriptor fd_RegistrationsCommitment_expired protoreflect.FieldDescriptor fd_RegistrationsCommitment_validity protoreflect.FieldDescriptor fd_RegistrationsCommitment_metadata protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_commitment_proto_init() md_RegistrationsCommitment = File_sourcehub_acp_commitment_proto.Messages().ByName("RegistrationsCommitment") fd_RegistrationsCommitment_id = md_RegistrationsCommitment.Fields().ByName("id") fd_RegistrationsCommitment_policy_id = md_RegistrationsCommitment.Fields().ByName("policy_id") fd_RegistrationsCommitment_commitment = md_RegistrationsCommitment.Fields().ByName("commitment") fd_RegistrationsCommitment_expired = md_RegistrationsCommitment.Fields().ByName("expired") fd_RegistrationsCommitment_validity = md_RegistrationsCommitment.Fields().ByName("validity") fd_RegistrationsCommitment_metadata = md_RegistrationsCommitment.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_RegistrationsCommitment)(nil) type fastReflection_RegistrationsCommitment RegistrationsCommitment func (x *RegistrationsCommitment) ProtoReflect() protoreflect.Message { return (*fastReflection_RegistrationsCommitment)(x) } func (x *RegistrationsCommitment) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_commitment_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RegistrationsCommitment_messageType fastReflection_RegistrationsCommitment_messageType var _ protoreflect.MessageType = fastReflection_RegistrationsCommitment_messageType{} type fastReflection_RegistrationsCommitment_messageType struct{} func (x fastReflection_RegistrationsCommitment_messageType) Zero() protoreflect.Message { return (*fastReflection_RegistrationsCommitment)(nil) } func (x fastReflection_RegistrationsCommitment_messageType) New() protoreflect.Message { return new(fastReflection_RegistrationsCommitment) } func (x fastReflection_RegistrationsCommitment_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RegistrationsCommitment } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RegistrationsCommitment) Descriptor() protoreflect.MessageDescriptor { return md_RegistrationsCommitment } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RegistrationsCommitment) Type() protoreflect.MessageType { return _fastReflection_RegistrationsCommitment_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RegistrationsCommitment) New() protoreflect.Message { return new(fastReflection_RegistrationsCommitment) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RegistrationsCommitment) Interface() protoreflect.ProtoMessage { return (*RegistrationsCommitment)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RegistrationsCommitment) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != uint64(0) { value := protoreflect.ValueOfUint64(x.Id) if !f(fd_RegistrationsCommitment_id, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_RegistrationsCommitment_policy_id, value) { return } } if len(x.Commitment) != 0 { value := protoreflect.ValueOfBytes(x.Commitment) if !f(fd_RegistrationsCommitment_commitment, value) { return } } if x.Expired != false { value := protoreflect.ValueOfBool(x.Expired) if !f(fd_RegistrationsCommitment_expired, value) { return } } if x.Validity != nil { value := protoreflect.ValueOfMessage(x.Validity.ProtoReflect()) if !f(fd_RegistrationsCommitment_validity, value) { return } } if x.Metadata != nil { value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) if !f(fd_RegistrationsCommitment_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RegistrationsCommitment) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RegistrationsCommitment.id": return x.Id != uint64(0) case "sourcehub.acp.RegistrationsCommitment.policy_id": return x.PolicyId != "" case "sourcehub.acp.RegistrationsCommitment.commitment": return len(x.Commitment) != 0 case "sourcehub.acp.RegistrationsCommitment.expired": return x.Expired != false case "sourcehub.acp.RegistrationsCommitment.validity": return x.Validity != nil case "sourcehub.acp.RegistrationsCommitment.metadata": return x.Metadata != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationsCommitment")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationsCommitment does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationsCommitment) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RegistrationsCommitment.id": x.Id = uint64(0) case "sourcehub.acp.RegistrationsCommitment.policy_id": x.PolicyId = "" case "sourcehub.acp.RegistrationsCommitment.commitment": x.Commitment = nil case "sourcehub.acp.RegistrationsCommitment.expired": x.Expired = false case "sourcehub.acp.RegistrationsCommitment.validity": x.Validity = nil case "sourcehub.acp.RegistrationsCommitment.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationsCommitment")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationsCommitment does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RegistrationsCommitment) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RegistrationsCommitment.id": value := x.Id return protoreflect.ValueOfUint64(value) case "sourcehub.acp.RegistrationsCommitment.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.RegistrationsCommitment.commitment": value := x.Commitment return protoreflect.ValueOfBytes(value) case "sourcehub.acp.RegistrationsCommitment.expired": value := x.Expired return protoreflect.ValueOfBool(value) case "sourcehub.acp.RegistrationsCommitment.validity": value := x.Validity return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.RegistrationsCommitment.metadata": value := x.Metadata return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationsCommitment")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationsCommitment does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationsCommitment) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RegistrationsCommitment.id": x.Id = value.Uint() case "sourcehub.acp.RegistrationsCommitment.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.RegistrationsCommitment.commitment": x.Commitment = value.Bytes() case "sourcehub.acp.RegistrationsCommitment.expired": x.Expired = value.Bool() case "sourcehub.acp.RegistrationsCommitment.validity": x.Validity = value.Message().Interface().(*Duration) case "sourcehub.acp.RegistrationsCommitment.metadata": x.Metadata = value.Message().Interface().(*RecordMetadata) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationsCommitment")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationsCommitment does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationsCommitment) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegistrationsCommitment.validity": if x.Validity == nil { x.Validity = new(Duration) } return protoreflect.ValueOfMessage(x.Validity.ProtoReflect()) case "sourcehub.acp.RegistrationsCommitment.metadata": if x.Metadata == nil { x.Metadata = new(RecordMetadata) } return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "sourcehub.acp.RegistrationsCommitment.id": panic(fmt.Errorf("field id of message sourcehub.acp.RegistrationsCommitment is not mutable")) case "sourcehub.acp.RegistrationsCommitment.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.RegistrationsCommitment is not mutable")) case "sourcehub.acp.RegistrationsCommitment.commitment": panic(fmt.Errorf("field commitment of message sourcehub.acp.RegistrationsCommitment is not mutable")) case "sourcehub.acp.RegistrationsCommitment.expired": panic(fmt.Errorf("field expired of message sourcehub.acp.RegistrationsCommitment is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationsCommitment")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationsCommitment does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RegistrationsCommitment) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegistrationsCommitment.id": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.RegistrationsCommitment.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.RegistrationsCommitment.commitment": return protoreflect.ValueOfBytes(nil) case "sourcehub.acp.RegistrationsCommitment.expired": return protoreflect.ValueOfBool(false) case "sourcehub.acp.RegistrationsCommitment.validity": m := new(Duration) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.RegistrationsCommitment.metadata": m := new(RecordMetadata) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegistrationsCommitment")) } panic(fmt.Errorf("message sourcehub.acp.RegistrationsCommitment does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RegistrationsCommitment) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RegistrationsCommitment", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RegistrationsCommitment) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegistrationsCommitment) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RegistrationsCommitment) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RegistrationsCommitment) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RegistrationsCommitment) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Id != 0 { n += 1 + runtime.Sov(uint64(x.Id)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Commitment) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Expired { n += 2 } if x.Validity != nil { l = options.Size(x.Validity) n += 1 + l + runtime.Sov(uint64(l)) } if x.Metadata != nil { l = options.Size(x.Metadata) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RegistrationsCommitment) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Metadata != nil { encoded, err := options.Marshal(x.Metadata) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } if x.Validity != nil { encoded, err := options.Marshal(x.Validity) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if x.Expired { i-- if x.Expired { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x20 } if len(x.Commitment) > 0 { i -= len(x.Commitment) copy(dAtA[i:], x.Commitment) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Commitment))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if x.Id != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RegistrationsCommitment) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegistrationsCommitment: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegistrationsCommitment: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } x.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Commitment = append(x.Commitment[:0], dAtA[iNdEx:postIndex]...) if x.Commitment == nil { x.Commitment = []byte{} } iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expired", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Expired = bool(v != 0) case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Validity == nil { x.Validity = &Duration{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validity); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = &RecordMetadata{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/commitment.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // RegistrationProof models an opening proof for a RegistrationCommitment type RegistrationProof struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` // Hash of neighbors required to validate proof. // // Hashes must be ordered as a RFC6962 "merkle audit path" // https://www.rfc-editor.org/rfc/rfc6962#section-2.1.1 MerkleProof [][]byte `protobuf:"bytes,2,rep,name=merkle_proof,json=merkleProof,proto3" json:"merkle_proof,omitempty"` LeafCount uint64 `protobuf:"varint,3,opt,name=leaf_count,json=leafCount,proto3" json:"leaf_count,omitempty"` LeafIndex uint64 `protobuf:"varint,4,opt,name=leaf_index,json=leafIndex,proto3" json:"leaf_index,omitempty"` } func (x *RegistrationProof) Reset() { *x = RegistrationProof{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_commitment_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegistrationProof) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegistrationProof) ProtoMessage() {} // Deprecated: Use RegistrationProof.ProtoReflect.Descriptor instead. func (*RegistrationProof) Descriptor() ([]byte, []int) { return file_sourcehub_acp_commitment_proto_rawDescGZIP(), []int{0} } func (x *RegistrationProof) GetObject() *types.Object { if x != nil { return x.Object } return nil } func (x *RegistrationProof) GetMerkleProof() [][]byte { if x != nil { return x.MerkleProof } return nil } func (x *RegistrationProof) GetLeafCount() uint64 { if x != nil { return x.LeafCount } return 0 } func (x *RegistrationProof) GetLeafIndex() uint64 { if x != nil { return x.LeafIndex } return 0 } // RegistrationsCommitment models a batched cryptographic commitment // of a set of Object registrations issued by an Actor type RegistrationsCommitment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` // commitment is a merkle root of registrations Commitment []byte `protobuf:"bytes,3,opt,name=commitment,proto3" json:"commitment,omitempty"` Expired bool `protobuf:"varint,4,opt,name=expired,proto3" json:"expired,omitempty"` // validity models the duration for which the commitment is valid for Validity *Duration `protobuf:"bytes,5,opt,name=validity,proto3" json:"validity,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *RegistrationsCommitment) Reset() { *x = RegistrationsCommitment{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_commitment_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegistrationsCommitment) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegistrationsCommitment) ProtoMessage() {} // Deprecated: Use RegistrationsCommitment.ProtoReflect.Descriptor instead. func (*RegistrationsCommitment) Descriptor() ([]byte, []int) { return file_sourcehub_acp_commitment_proto_rawDescGZIP(), []int{1} } func (x *RegistrationsCommitment) GetId() uint64 { if x != nil { return x.Id } return 0 } func (x *RegistrationsCommitment) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *RegistrationsCommitment) GetCommitment() []byte { if x != nil { return x.Commitment } return nil } func (x *RegistrationsCommitment) GetExpired() bool { if x != nil { return x.Expired } return false } func (x *RegistrationsCommitment) GetValidity() *Duration { if x != nil { return x.Validity } return nil } func (x *RegistrationsCommitment) GetMetadata() *RecordMetadata { if x != nil { return x.Metadata } return nil } var File_sourcehub_acp_commitment_proto protoreflect.FileDescriptor var file_sourcehub_acp_commitment_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x65, 0x61, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xf0, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x0f, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_commitment_proto_rawDescOnce sync.Once file_sourcehub_acp_commitment_proto_rawDescData = file_sourcehub_acp_commitment_proto_rawDesc ) func file_sourcehub_acp_commitment_proto_rawDescGZIP() []byte { file_sourcehub_acp_commitment_proto_rawDescOnce.Do(func() { file_sourcehub_acp_commitment_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_commitment_proto_rawDescData) }) return file_sourcehub_acp_commitment_proto_rawDescData } var file_sourcehub_acp_commitment_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_acp_commitment_proto_goTypes = []interface{}{ (*RegistrationProof)(nil), // 0: sourcehub.acp.RegistrationProof (*RegistrationsCommitment)(nil), // 1: sourcehub.acp.RegistrationsCommitment (*types.Object)(nil), // 2: sourcenetwork.acp_core.Object (*Duration)(nil), // 3: sourcehub.acp.Duration (*RecordMetadata)(nil), // 4: sourcehub.acp.RecordMetadata } var file_sourcehub_acp_commitment_proto_depIdxs = []int32{ 2, // 0: sourcehub.acp.RegistrationProof.object:type_name -> sourcenetwork.acp_core.Object 3, // 1: sourcehub.acp.RegistrationsCommitment.validity:type_name -> sourcehub.acp.Duration 4, // 2: sourcehub.acp.RegistrationsCommitment.metadata:type_name -> sourcehub.acp.RecordMetadata 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_sourcehub_acp_commitment_proto_init() } func file_sourcehub_acp_commitment_proto_init() { if File_sourcehub_acp_commitment_proto != nil { return } file_sourcehub_acp_record_proto_init() file_sourcehub_acp_time_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_commitment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegistrationProof); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_commitment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegistrationsCommitment); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_commitment_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_commitment_proto_goTypes, DependencyIndexes: file_sourcehub_acp_commitment_proto_depIdxs, MessageInfos: file_sourcehub_acp_commitment_proto_msgTypes, }.Build() File_sourcehub_acp_commitment_proto = out.File file_sourcehub_acp_commitment_proto_rawDesc = nil file_sourcehub_acp_commitment_proto_goTypes = nil file_sourcehub_acp_commitment_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/genesis.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_genesis_proto_init() md_GenesisState = File_sourcehub_acp_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) type fastReflection_GenesisState GenesisState func (x *GenesisState) ProtoReflect() protoreflect.Message { return (*fastReflection_GenesisState)(x) } func (x *GenesisState) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} type fastReflection_GenesisState_messageType struct{} func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { return (*fastReflection_GenesisState)(nil) } func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { return new(fastReflection_GenesisState) } func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { return _fastReflection_GenesisState_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GenesisState) New() protoreflect.Message { return new(fastReflection_GenesisState) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { return (*GenesisState)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_GenesisState_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.GenesisState.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.GenesisState")) } panic(fmt.Errorf("message sourcehub.acp.GenesisState does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.GenesisState.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.GenesisState")) } panic(fmt.Errorf("message sourcehub.acp.GenesisState does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.GenesisState")) } panic(fmt.Errorf("message sourcehub.acp.GenesisState does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.GenesisState.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.GenesisState")) } panic(fmt.Errorf("message sourcehub.acp.GenesisState does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.GenesisState.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.GenesisState")) } panic(fmt.Errorf("message sourcehub.acp.GenesisState does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.GenesisState")) } panic(fmt.Errorf("message sourcehub.acp.GenesisState does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.GenesisState", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GenesisState) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // GenesisState defines the acp module's genesis state. type GenesisState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenesisState) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { return file_sourcehub_acp_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetParams() *Params { if x != nil { return x.Params } return nil } var File_sourcehub_acp_genesis_proto protoreflect.FileDescriptor var file_sourcehub_acp_genesis_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x96, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_genesis_proto_rawDescOnce sync.Once file_sourcehub_acp_genesis_proto_rawDescData = file_sourcehub_acp_genesis_proto_rawDesc ) func file_sourcehub_acp_genesis_proto_rawDescGZIP() []byte { file_sourcehub_acp_genesis_proto_rawDescOnce.Do(func() { file_sourcehub_acp_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_genesis_proto_rawDescData) }) return file_sourcehub_acp_genesis_proto_rawDescData } var file_sourcehub_acp_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_acp_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: sourcehub.acp.GenesisState (*Params)(nil), // 1: sourcehub.acp.Params } var file_sourcehub_acp_genesis_proto_depIdxs = []int32{ 1, // 0: sourcehub.acp.GenesisState.params:type_name -> sourcehub.acp.Params 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcehub_acp_genesis_proto_init() } func file_sourcehub_acp_genesis_proto_init() { if File_sourcehub_acp_genesis_proto != nil { return } file_sourcehub_acp_params_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_genesis_proto_goTypes, DependencyIndexes: file_sourcehub_acp_genesis_proto_depIdxs, MessageInfos: file_sourcehub_acp_genesis_proto_msgTypes, }.Build() File_sourcehub_acp_genesis_proto = out.File file_sourcehub_acp_genesis_proto_rawDesc = nil file_sourcehub_acp_genesis_proto_goTypes = nil file_sourcehub_acp_genesis_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/module/module.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package module import ( _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Module protoreflect.MessageDescriptor fd_Module_authority protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_module_module_proto_init() md_Module = File_sourcehub_acp_module_module_proto.Messages().ByName("Module") fd_Module_authority = md_Module.Fields().ByName("authority") } var _ protoreflect.Message = (*fastReflection_Module)(nil) type fastReflection_Module Module func (x *Module) ProtoReflect() protoreflect.Message { return (*fastReflection_Module)(x) } func (x *Module) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_module_module_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Module_messageType fastReflection_Module_messageType var _ protoreflect.MessageType = fastReflection_Module_messageType{} type fastReflection_Module_messageType struct{} func (x fastReflection_Module_messageType) Zero() protoreflect.Message { return (*fastReflection_Module)(nil) } func (x fastReflection_Module_messageType) New() protoreflect.Message { return new(fastReflection_Module) } func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Module) Type() protoreflect.MessageType { return _fastReflection_Module_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Module) New() protoreflect.Message { return new(fastReflection_Module) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { return (*Module)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_Module_authority, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.module.Module.authority": return x.Authority != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.module.Module")) } panic(fmt.Errorf("message sourcehub.acp.module.Module does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.module.Module.authority": x.Authority = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.module.Module")) } panic(fmt.Errorf("message sourcehub.acp.module.Module does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.module.Module.authority": value := x.Authority return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.module.Module")) } panic(fmt.Errorf("message sourcehub.acp.module.Module does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.module.Module.authority": x.Authority = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.module.Module")) } panic(fmt.Errorf("message sourcehub.acp.module.Module does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.module.Module.authority": panic(fmt.Errorf("field authority of message sourcehub.acp.module.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.module.Module")) } panic(fmt.Errorf("message sourcehub.acp.module.Module does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.module.Module.authority": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.module.Module")) } panic(fmt.Errorf("message sourcehub.acp.module.Module does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.module.Module", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Module) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Module) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/module/module.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Module is the config object for the module. type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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 (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_module_module_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Module) String() string { return protoimpl.X.MessageStringOf(x) } func (*Module) ProtoMessage() {} // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { return file_sourcehub_acp_module_module_proto_rawDescGZIP(), []int{0} } func (x *Module) GetAuthority() string { if x != nil { return x.Authority } return "" } var File_sourcehub_acp_module_module_proto protoreflect.FileDescriptor var file_sourcehub_acp_module_module_proto_rawDesc = []byte{ 0x0a, 0x21, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x30, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2a, 0x0a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x61, 0x63, 0x70, 0x42, 0xc0, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x4d, 0xaa, 0x02, 0x14, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xca, 0x02, 0x14, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xe2, 0x02, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_module_module_proto_rawDescOnce sync.Once file_sourcehub_acp_module_module_proto_rawDescData = file_sourcehub_acp_module_module_proto_rawDesc ) func file_sourcehub_acp_module_module_proto_rawDescGZIP() []byte { file_sourcehub_acp_module_module_proto_rawDescOnce.Do(func() { file_sourcehub_acp_module_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_module_module_proto_rawDescData) }) return file_sourcehub_acp_module_module_proto_rawDescData } var file_sourcehub_acp_module_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_acp_module_module_proto_goTypes = []interface{}{ (*Module)(nil), // 0: sourcehub.acp.module.Module } var file_sourcehub_acp_module_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_acp_module_module_proto_init() } func file_sourcehub_acp_module_module_proto_init() { if File_sourcehub_acp_module_module_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_acp_module_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_module_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_module_module_proto_goTypes, DependencyIndexes: file_sourcehub_acp_module_module_proto_depIdxs, MessageInfos: file_sourcehub_acp_module_module_proto_msgTypes, }.Build() File_sourcehub_acp_module_module_proto = out.File file_sourcehub_acp_module_module_proto_rawDesc = nil file_sourcehub_acp_module_module_proto_goTypes = nil file_sourcehub_acp_module_module_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/params.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Params protoreflect.MessageDescriptor fd_Params_policy_command_max_expiration_delta protoreflect.FieldDescriptor fd_Params_registrations_commitment_validity protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_params_proto_init() md_Params = File_sourcehub_acp_params_proto.Messages().ByName("Params") fd_Params_policy_command_max_expiration_delta = md_Params.Fields().ByName("policy_command_max_expiration_delta") fd_Params_registrations_commitment_validity = md_Params.Fields().ByName("registrations_commitment_validity") } var _ protoreflect.Message = (*fastReflection_Params)(nil) type fastReflection_Params Params func (x *Params) ProtoReflect() protoreflect.Message { return (*fastReflection_Params)(x) } func (x *Params) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Params_messageType fastReflection_Params_messageType var _ protoreflect.MessageType = fastReflection_Params_messageType{} type fastReflection_Params_messageType struct{} func (x fastReflection_Params_messageType) Zero() protoreflect.Message { return (*fastReflection_Params)(nil) } func (x fastReflection_Params_messageType) New() protoreflect.Message { return new(fastReflection_Params) } func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Params) Type() protoreflect.MessageType { return _fastReflection_Params_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Params) New() protoreflect.Message { return new(fastReflection_Params) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { return (*Params)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyCommandMaxExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.PolicyCommandMaxExpirationDelta) if !f(fd_Params_policy_command_max_expiration_delta, value) { return } } if x.RegistrationsCommitmentValidity != nil { value := protoreflect.ValueOfMessage(x.RegistrationsCommitmentValidity.ProtoReflect()) if !f(fd_Params_registrations_commitment_validity, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.Params.policy_command_max_expiration_delta": return x.PolicyCommandMaxExpirationDelta != uint64(0) case "sourcehub.acp.Params.registrations_commitment_validity": return x.RegistrationsCommitmentValidity != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Params")) } panic(fmt.Errorf("message sourcehub.acp.Params does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.Params.policy_command_max_expiration_delta": x.PolicyCommandMaxExpirationDelta = uint64(0) case "sourcehub.acp.Params.registrations_commitment_validity": x.RegistrationsCommitmentValidity = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Params")) } panic(fmt.Errorf("message sourcehub.acp.Params does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.Params.policy_command_max_expiration_delta": value := x.PolicyCommandMaxExpirationDelta return protoreflect.ValueOfUint64(value) case "sourcehub.acp.Params.registrations_commitment_validity": value := x.RegistrationsCommitmentValidity return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Params")) } panic(fmt.Errorf("message sourcehub.acp.Params does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.Params.policy_command_max_expiration_delta": x.PolicyCommandMaxExpirationDelta = value.Uint() case "sourcehub.acp.Params.registrations_commitment_validity": x.RegistrationsCommitmentValidity = value.Message().Interface().(*Duration) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Params")) } panic(fmt.Errorf("message sourcehub.acp.Params does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.Params.registrations_commitment_validity": if x.RegistrationsCommitmentValidity == nil { x.RegistrationsCommitmentValidity = new(Duration) } return protoreflect.ValueOfMessage(x.RegistrationsCommitmentValidity.ProtoReflect()) case "sourcehub.acp.Params.policy_command_max_expiration_delta": panic(fmt.Errorf("field policy_command_max_expiration_delta of message sourcehub.acp.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Params")) } panic(fmt.Errorf("message sourcehub.acp.Params does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.Params.policy_command_max_expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.Params.registrations_commitment_validity": m := new(Duration) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Params")) } panic(fmt.Errorf("message sourcehub.acp.Params does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.Params", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Params) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Params) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.PolicyCommandMaxExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.PolicyCommandMaxExpirationDelta)) } if x.RegistrationsCommitmentValidity != nil { l = options.Size(x.RegistrationsCommitmentValidity) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RegistrationsCommitmentValidity != nil { encoded, err := options.Marshal(x.RegistrationsCommitmentValidity) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.PolicyCommandMaxExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.PolicyCommandMaxExpirationDelta)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyCommandMaxExpirationDelta", wireType) } x.PolicyCommandMaxExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.PolicyCommandMaxExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitmentValidity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.RegistrationsCommitmentValidity == nil { x.RegistrationsCommitmentValidity = &Duration{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RegistrationsCommitmentValidity); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/params.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Params defines the parameters for the module. type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. PolicyCommandMaxExpirationDelta uint64 `protobuf:"varint,1,opt,name=policy_command_max_expiration_delta,json=policyCommandMaxExpirationDelta,proto3" json:"policy_command_max_expiration_delta,omitempty"` // registrations_commitment_validity specifies a duration for the lifetime of a commitment. // Performing a RevealRegistration against an expired commitment causes a protocol error. RegistrationsCommitmentValidity *Duration `protobuf:"bytes,2,opt,name=registrations_commitment_validity,json=registrationsCommitmentValidity,proto3" json:"registrations_commitment_validity,omitempty"` } func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Params) String() string { return protoimpl.X.MessageStringOf(x) } func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { return file_sourcehub_acp_params_proto_rawDescGZIP(), []int{0} } func (x *Params) GetPolicyCommandMaxExpirationDelta() uint64 { if x != nil { return x.PolicyCommandMaxExpirationDelta } return 0 } func (x *Params) GetRegistrationsCommitmentValidity() *Duration { if x != nil { return x.RegistrationsCommitmentValidity } return nil } var File_sourcehub_acp_params_proto protoreflect.FileDescriptor var file_sourcehub_acp_params_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x23, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x21, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x3a, 0x1b, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x95, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_params_proto_rawDescOnce sync.Once file_sourcehub_acp_params_proto_rawDescData = file_sourcehub_acp_params_proto_rawDesc ) func file_sourcehub_acp_params_proto_rawDescGZIP() []byte { file_sourcehub_acp_params_proto_rawDescOnce.Do(func() { file_sourcehub_acp_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_params_proto_rawDescData) }) return file_sourcehub_acp_params_proto_rawDescData } var file_sourcehub_acp_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_acp_params_proto_goTypes = []interface{}{ (*Params)(nil), // 0: sourcehub.acp.Params (*Duration)(nil), // 1: sourcehub.acp.Duration } var file_sourcehub_acp_params_proto_depIdxs = []int32{ 1, // 0: sourcehub.acp.Params.registrations_commitment_validity:type_name -> sourcehub.acp.Duration 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcehub_acp_params_proto_init() } func file_sourcehub_acp_params_proto_init() { if File_sourcehub_acp_params_proto != nil { return } file_sourcehub_acp_time_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_params_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_params_proto_goTypes, DependencyIndexes: file_sourcehub_acp_params_proto_depIdxs, MessageInfos: file_sourcehub_acp_params_proto_msgTypes, }.Build() File_sourcehub_acp_params_proto = out.File file_sourcehub_acp_params_proto_rawDesc = nil file_sourcehub_acp_params_proto_goTypes = nil file_sourcehub_acp_params_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/policy_cmd.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" types "github.com/sourcenetwork/acp_core/pkg/pulsar/types" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_PolicyCmd protoreflect.MessageDescriptor fd_PolicyCmd_set_relationship_cmd protoreflect.FieldDescriptor fd_PolicyCmd_delete_relationship_cmd protoreflect.FieldDescriptor fd_PolicyCmd_register_object_cmd protoreflect.FieldDescriptor fd_PolicyCmd_archive_object_cmd protoreflect.FieldDescriptor fd_PolicyCmd_commit_registrations_cmd protoreflect.FieldDescriptor fd_PolicyCmd_reveal_registration_cmd protoreflect.FieldDescriptor fd_PolicyCmd_flag_hijack_attempt_cmd protoreflect.FieldDescriptor fd_PolicyCmd_unarchive_object_cmd protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_PolicyCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("PolicyCmd") fd_PolicyCmd_set_relationship_cmd = md_PolicyCmd.Fields().ByName("set_relationship_cmd") fd_PolicyCmd_delete_relationship_cmd = md_PolicyCmd.Fields().ByName("delete_relationship_cmd") fd_PolicyCmd_register_object_cmd = md_PolicyCmd.Fields().ByName("register_object_cmd") fd_PolicyCmd_archive_object_cmd = md_PolicyCmd.Fields().ByName("archive_object_cmd") fd_PolicyCmd_commit_registrations_cmd = md_PolicyCmd.Fields().ByName("commit_registrations_cmd") fd_PolicyCmd_reveal_registration_cmd = md_PolicyCmd.Fields().ByName("reveal_registration_cmd") fd_PolicyCmd_flag_hijack_attempt_cmd = md_PolicyCmd.Fields().ByName("flag_hijack_attempt_cmd") fd_PolicyCmd_unarchive_object_cmd = md_PolicyCmd.Fields().ByName("unarchive_object_cmd") } var _ protoreflect.Message = (*fastReflection_PolicyCmd)(nil) type fastReflection_PolicyCmd PolicyCmd func (x *PolicyCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_PolicyCmd)(x) } func (x *PolicyCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PolicyCmd_messageType fastReflection_PolicyCmd_messageType var _ protoreflect.MessageType = fastReflection_PolicyCmd_messageType{} type fastReflection_PolicyCmd_messageType struct{} func (x fastReflection_PolicyCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_PolicyCmd)(nil) } func (x fastReflection_PolicyCmd_messageType) New() protoreflect.Message { return new(fastReflection_PolicyCmd) } func (x fastReflection_PolicyCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PolicyCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PolicyCmd) Descriptor() protoreflect.MessageDescriptor { return md_PolicyCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PolicyCmd) Type() protoreflect.MessageType { return _fastReflection_PolicyCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PolicyCmd) New() protoreflect.Message { return new(fastReflection_PolicyCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PolicyCmd) Interface() protoreflect.ProtoMessage { return (*PolicyCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PolicyCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Cmd != nil { switch o := x.Cmd.(type) { case *PolicyCmd_SetRelationshipCmd: v := o.SetRelationshipCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_set_relationship_cmd, value) { return } case *PolicyCmd_DeleteRelationshipCmd: v := o.DeleteRelationshipCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_delete_relationship_cmd, value) { return } case *PolicyCmd_RegisterObjectCmd: v := o.RegisterObjectCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_register_object_cmd, value) { return } case *PolicyCmd_ArchiveObjectCmd: v := o.ArchiveObjectCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_archive_object_cmd, value) { return } case *PolicyCmd_CommitRegistrationsCmd: v := o.CommitRegistrationsCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_commit_registrations_cmd, value) { return } case *PolicyCmd_RevealRegistrationCmd: v := o.RevealRegistrationCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_reveal_registration_cmd, value) { return } case *PolicyCmd_FlagHijackAttemptCmd: v := o.FlagHijackAttemptCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_flag_hijack_attempt_cmd, value) { return } case *PolicyCmd_UnarchiveObjectCmd: v := o.UnarchiveObjectCmd value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmd_unarchive_object_cmd, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PolicyCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.PolicyCmd.set_relationship_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_SetRelationshipCmd); ok { return true } else { return false } case "sourcehub.acp.PolicyCmd.delete_relationship_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_DeleteRelationshipCmd); ok { return true } else { return false } case "sourcehub.acp.PolicyCmd.register_object_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_RegisterObjectCmd); ok { return true } else { return false } case "sourcehub.acp.PolicyCmd.archive_object_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_ArchiveObjectCmd); ok { return true } else { return false } case "sourcehub.acp.PolicyCmd.commit_registrations_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_CommitRegistrationsCmd); ok { return true } else { return false } case "sourcehub.acp.PolicyCmd.reveal_registration_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_RevealRegistrationCmd); ok { return true } else { return false } case "sourcehub.acp.PolicyCmd.flag_hijack_attempt_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_FlagHijackAttemptCmd); ok { return true } else { return false } case "sourcehub.acp.PolicyCmd.unarchive_object_cmd": if x.Cmd == nil { return false } else if _, ok := x.Cmd.(*PolicyCmd_UnarchiveObjectCmd); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.PolicyCmd.set_relationship_cmd": x.Cmd = nil case "sourcehub.acp.PolicyCmd.delete_relationship_cmd": x.Cmd = nil case "sourcehub.acp.PolicyCmd.register_object_cmd": x.Cmd = nil case "sourcehub.acp.PolicyCmd.archive_object_cmd": x.Cmd = nil case "sourcehub.acp.PolicyCmd.commit_registrations_cmd": x.Cmd = nil case "sourcehub.acp.PolicyCmd.reveal_registration_cmd": x.Cmd = nil case "sourcehub.acp.PolicyCmd.flag_hijack_attempt_cmd": x.Cmd = nil case "sourcehub.acp.PolicyCmd.unarchive_object_cmd": x.Cmd = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PolicyCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.PolicyCmd.set_relationship_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*SetRelationshipCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_SetRelationshipCmd); ok { return protoreflect.ValueOfMessage(v.SetRelationshipCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*SetRelationshipCmd)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmd.delete_relationship_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*DeleteRelationshipCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_DeleteRelationshipCmd); ok { return protoreflect.ValueOfMessage(v.DeleteRelationshipCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*DeleteRelationshipCmd)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmd.register_object_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*RegisterObjectCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_RegisterObjectCmd); ok { return protoreflect.ValueOfMessage(v.RegisterObjectCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*RegisterObjectCmd)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmd.archive_object_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*ArchiveObjectCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_ArchiveObjectCmd); ok { return protoreflect.ValueOfMessage(v.ArchiveObjectCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*ArchiveObjectCmd)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmd.commit_registrations_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*CommitRegistrationsCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_CommitRegistrationsCmd); ok { return protoreflect.ValueOfMessage(v.CommitRegistrationsCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*CommitRegistrationsCmd)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmd.reveal_registration_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*RevealRegistrationCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_RevealRegistrationCmd); ok { return protoreflect.ValueOfMessage(v.RevealRegistrationCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*RevealRegistrationCmd)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmd.flag_hijack_attempt_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*FlagHijackAttemptCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_FlagHijackAttemptCmd); ok { return protoreflect.ValueOfMessage(v.FlagHijackAttemptCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*FlagHijackAttemptCmd)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmd.unarchive_object_cmd": if x.Cmd == nil { return protoreflect.ValueOfMessage((*UnarchiveObjectCmd)(nil).ProtoReflect()) } else if v, ok := x.Cmd.(*PolicyCmd_UnarchiveObjectCmd); ok { return protoreflect.ValueOfMessage(v.UnarchiveObjectCmd.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*UnarchiveObjectCmd)(nil).ProtoReflect()) } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.PolicyCmd.set_relationship_cmd": cv := value.Message().Interface().(*SetRelationshipCmd) x.Cmd = &PolicyCmd_SetRelationshipCmd{SetRelationshipCmd: cv} case "sourcehub.acp.PolicyCmd.delete_relationship_cmd": cv := value.Message().Interface().(*DeleteRelationshipCmd) x.Cmd = &PolicyCmd_DeleteRelationshipCmd{DeleteRelationshipCmd: cv} case "sourcehub.acp.PolicyCmd.register_object_cmd": cv := value.Message().Interface().(*RegisterObjectCmd) x.Cmd = &PolicyCmd_RegisterObjectCmd{RegisterObjectCmd: cv} case "sourcehub.acp.PolicyCmd.archive_object_cmd": cv := value.Message().Interface().(*ArchiveObjectCmd) x.Cmd = &PolicyCmd_ArchiveObjectCmd{ArchiveObjectCmd: cv} case "sourcehub.acp.PolicyCmd.commit_registrations_cmd": cv := value.Message().Interface().(*CommitRegistrationsCmd) x.Cmd = &PolicyCmd_CommitRegistrationsCmd{CommitRegistrationsCmd: cv} case "sourcehub.acp.PolicyCmd.reveal_registration_cmd": cv := value.Message().Interface().(*RevealRegistrationCmd) x.Cmd = &PolicyCmd_RevealRegistrationCmd{RevealRegistrationCmd: cv} case "sourcehub.acp.PolicyCmd.flag_hijack_attempt_cmd": cv := value.Message().Interface().(*FlagHijackAttemptCmd) x.Cmd = &PolicyCmd_FlagHijackAttemptCmd{FlagHijackAttemptCmd: cv} case "sourcehub.acp.PolicyCmd.unarchive_object_cmd": cv := value.Message().Interface().(*UnarchiveObjectCmd) x.Cmd = &PolicyCmd_UnarchiveObjectCmd{UnarchiveObjectCmd: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.PolicyCmd.set_relationship_cmd": if x.Cmd == nil { value := &SetRelationshipCmd{} oneofValue := &PolicyCmd_SetRelationshipCmd{SetRelationshipCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_SetRelationshipCmd: return protoreflect.ValueOfMessage(m.SetRelationshipCmd.ProtoReflect()) default: value := &SetRelationshipCmd{} oneofValue := &PolicyCmd_SetRelationshipCmd{SetRelationshipCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmd.delete_relationship_cmd": if x.Cmd == nil { value := &DeleteRelationshipCmd{} oneofValue := &PolicyCmd_DeleteRelationshipCmd{DeleteRelationshipCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_DeleteRelationshipCmd: return protoreflect.ValueOfMessage(m.DeleteRelationshipCmd.ProtoReflect()) default: value := &DeleteRelationshipCmd{} oneofValue := &PolicyCmd_DeleteRelationshipCmd{DeleteRelationshipCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmd.register_object_cmd": if x.Cmd == nil { value := &RegisterObjectCmd{} oneofValue := &PolicyCmd_RegisterObjectCmd{RegisterObjectCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_RegisterObjectCmd: return protoreflect.ValueOfMessage(m.RegisterObjectCmd.ProtoReflect()) default: value := &RegisterObjectCmd{} oneofValue := &PolicyCmd_RegisterObjectCmd{RegisterObjectCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmd.archive_object_cmd": if x.Cmd == nil { value := &ArchiveObjectCmd{} oneofValue := &PolicyCmd_ArchiveObjectCmd{ArchiveObjectCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_ArchiveObjectCmd: return protoreflect.ValueOfMessage(m.ArchiveObjectCmd.ProtoReflect()) default: value := &ArchiveObjectCmd{} oneofValue := &PolicyCmd_ArchiveObjectCmd{ArchiveObjectCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmd.commit_registrations_cmd": if x.Cmd == nil { value := &CommitRegistrationsCmd{} oneofValue := &PolicyCmd_CommitRegistrationsCmd{CommitRegistrationsCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_CommitRegistrationsCmd: return protoreflect.ValueOfMessage(m.CommitRegistrationsCmd.ProtoReflect()) default: value := &CommitRegistrationsCmd{} oneofValue := &PolicyCmd_CommitRegistrationsCmd{CommitRegistrationsCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmd.reveal_registration_cmd": if x.Cmd == nil { value := &RevealRegistrationCmd{} oneofValue := &PolicyCmd_RevealRegistrationCmd{RevealRegistrationCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_RevealRegistrationCmd: return protoreflect.ValueOfMessage(m.RevealRegistrationCmd.ProtoReflect()) default: value := &RevealRegistrationCmd{} oneofValue := &PolicyCmd_RevealRegistrationCmd{RevealRegistrationCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmd.flag_hijack_attempt_cmd": if x.Cmd == nil { value := &FlagHijackAttemptCmd{} oneofValue := &PolicyCmd_FlagHijackAttemptCmd{FlagHijackAttemptCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_FlagHijackAttemptCmd: return protoreflect.ValueOfMessage(m.FlagHijackAttemptCmd.ProtoReflect()) default: value := &FlagHijackAttemptCmd{} oneofValue := &PolicyCmd_FlagHijackAttemptCmd{FlagHijackAttemptCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmd.unarchive_object_cmd": if x.Cmd == nil { value := &UnarchiveObjectCmd{} oneofValue := &PolicyCmd_UnarchiveObjectCmd{UnarchiveObjectCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Cmd.(type) { case *PolicyCmd_UnarchiveObjectCmd: return protoreflect.ValueOfMessage(m.UnarchiveObjectCmd.ProtoReflect()) default: value := &UnarchiveObjectCmd{} oneofValue := &PolicyCmd_UnarchiveObjectCmd{UnarchiveObjectCmd: value} x.Cmd = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PolicyCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.PolicyCmd.set_relationship_cmd": value := &SetRelationshipCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmd.delete_relationship_cmd": value := &DeleteRelationshipCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmd.register_object_cmd": value := &RegisterObjectCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmd.archive_object_cmd": value := &ArchiveObjectCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmd.commit_registrations_cmd": value := &CommitRegistrationsCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmd.reveal_registration_cmd": value := &RevealRegistrationCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmd.flag_hijack_attempt_cmd": value := &FlagHijackAttemptCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmd.unarchive_object_cmd": value := &UnarchiveObjectCmd{} return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PolicyCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcehub.acp.PolicyCmd.cmd": if x.Cmd == nil { return nil } switch x.Cmd.(type) { case *PolicyCmd_SetRelationshipCmd: return x.Descriptor().Fields().ByName("set_relationship_cmd") case *PolicyCmd_DeleteRelationshipCmd: return x.Descriptor().Fields().ByName("delete_relationship_cmd") case *PolicyCmd_RegisterObjectCmd: return x.Descriptor().Fields().ByName("register_object_cmd") case *PolicyCmd_ArchiveObjectCmd: return x.Descriptor().Fields().ByName("archive_object_cmd") case *PolicyCmd_CommitRegistrationsCmd: return x.Descriptor().Fields().ByName("commit_registrations_cmd") case *PolicyCmd_RevealRegistrationCmd: return x.Descriptor().Fields().ByName("reveal_registration_cmd") case *PolicyCmd_FlagHijackAttemptCmd: return x.Descriptor().Fields().ByName("flag_hijack_attempt_cmd") case *PolicyCmd_UnarchiveObjectCmd: return x.Descriptor().Fields().ByName("unarchive_object_cmd") } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.PolicyCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PolicyCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PolicyCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PolicyCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PolicyCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Cmd.(type) { case *PolicyCmd_SetRelationshipCmd: if x == nil { break } l = options.Size(x.SetRelationshipCmd) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmd_DeleteRelationshipCmd: if x == nil { break } l = options.Size(x.DeleteRelationshipCmd) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmd_RegisterObjectCmd: if x == nil { break } l = options.Size(x.RegisterObjectCmd) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmd_ArchiveObjectCmd: if x == nil { break } l = options.Size(x.ArchiveObjectCmd) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmd_CommitRegistrationsCmd: if x == nil { break } l = options.Size(x.CommitRegistrationsCmd) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmd_RevealRegistrationCmd: if x == nil { break } l = options.Size(x.RevealRegistrationCmd) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmd_FlagHijackAttemptCmd: if x == nil { break } l = options.Size(x.FlagHijackAttemptCmd) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmd_UnarchiveObjectCmd: if x == nil { break } l = options.Size(x.UnarchiveObjectCmd) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PolicyCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Cmd.(type) { case *PolicyCmd_SetRelationshipCmd: encoded, err := options.Marshal(x.SetRelationshipCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa case *PolicyCmd_DeleteRelationshipCmd: encoded, err := options.Marshal(x.DeleteRelationshipCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 case *PolicyCmd_RegisterObjectCmd: encoded, err := options.Marshal(x.RegisterObjectCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a case *PolicyCmd_ArchiveObjectCmd: encoded, err := options.Marshal(x.ArchiveObjectCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 case *PolicyCmd_CommitRegistrationsCmd: encoded, err := options.Marshal(x.CommitRegistrationsCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a case *PolicyCmd_RevealRegistrationCmd: encoded, err := options.Marshal(x.RevealRegistrationCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 case *PolicyCmd_FlagHijackAttemptCmd: encoded, err := options.Marshal(x.FlagHijackAttemptCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a case *PolicyCmd_UnarchiveObjectCmd: encoded, err := options.Marshal(x.UnarchiveObjectCmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PolicyCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SetRelationshipCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &SetRelationshipCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_SetRelationshipCmd{v} iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeleteRelationshipCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &DeleteRelationshipCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_DeleteRelationshipCmd{v} iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegisterObjectCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &RegisterObjectCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_RegisterObjectCmd{v} iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ArchiveObjectCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &ArchiveObjectCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_ArchiveObjectCmd{v} iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitRegistrationsCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &CommitRegistrationsCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_CommitRegistrationsCmd{v} iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevealRegistrationCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &RevealRegistrationCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_RevealRegistrationCmd{v} iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FlagHijackAttemptCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &FlagHijackAttemptCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_FlagHijackAttemptCmd{v} iNdEx = postIndex case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnarchiveObjectCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &UnarchiveObjectCmd{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Cmd = &PolicyCmd_UnarchiveObjectCmd{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SetRelationshipCmd protoreflect.MessageDescriptor fd_SetRelationshipCmd_relationship protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_SetRelationshipCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("SetRelationshipCmd") fd_SetRelationshipCmd_relationship = md_SetRelationshipCmd.Fields().ByName("relationship") } var _ protoreflect.Message = (*fastReflection_SetRelationshipCmd)(nil) type fastReflection_SetRelationshipCmd SetRelationshipCmd func (x *SetRelationshipCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_SetRelationshipCmd)(x) } func (x *SetRelationshipCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SetRelationshipCmd_messageType fastReflection_SetRelationshipCmd_messageType var _ protoreflect.MessageType = fastReflection_SetRelationshipCmd_messageType{} type fastReflection_SetRelationshipCmd_messageType struct{} func (x fastReflection_SetRelationshipCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_SetRelationshipCmd)(nil) } func (x fastReflection_SetRelationshipCmd_messageType) New() protoreflect.Message { return new(fastReflection_SetRelationshipCmd) } func (x fastReflection_SetRelationshipCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SetRelationshipCmd) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SetRelationshipCmd) Type() protoreflect.MessageType { return _fastReflection_SetRelationshipCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SetRelationshipCmd) New() protoreflect.Message { return new(fastReflection_SetRelationshipCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SetRelationshipCmd) Interface() protoreflect.ProtoMessage { return (*SetRelationshipCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SetRelationshipCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Relationship != nil { value := protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) if !f(fd_SetRelationshipCmd_relationship, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SetRelationshipCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmd.relationship": return x.Relationship != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmd.relationship": x.Relationship = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SetRelationshipCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.SetRelationshipCmd.relationship": value := x.Relationship return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmd.relationship": x.Relationship = value.Message().Interface().(*types.Relationship) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmd.relationship": if x.Relationship == nil { x.Relationship = new(types.Relationship) } return protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SetRelationshipCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmd.relationship": m := new(types.Relationship) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SetRelationshipCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.SetRelationshipCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SetRelationshipCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SetRelationshipCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SetRelationshipCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SetRelationshipCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Relationship != nil { l = options.Size(x.Relationship) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Relationship != nil { encoded, err := options.Marshal(x.Relationship) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Relationship == nil { x.Relationship = &types.Relationship{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relationship); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DeleteRelationshipCmd protoreflect.MessageDescriptor fd_DeleteRelationshipCmd_relationship protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_DeleteRelationshipCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("DeleteRelationshipCmd") fd_DeleteRelationshipCmd_relationship = md_DeleteRelationshipCmd.Fields().ByName("relationship") } var _ protoreflect.Message = (*fastReflection_DeleteRelationshipCmd)(nil) type fastReflection_DeleteRelationshipCmd DeleteRelationshipCmd func (x *DeleteRelationshipCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_DeleteRelationshipCmd)(x) } func (x *DeleteRelationshipCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DeleteRelationshipCmd_messageType fastReflection_DeleteRelationshipCmd_messageType var _ protoreflect.MessageType = fastReflection_DeleteRelationshipCmd_messageType{} type fastReflection_DeleteRelationshipCmd_messageType struct{} func (x fastReflection_DeleteRelationshipCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_DeleteRelationshipCmd)(nil) } func (x fastReflection_DeleteRelationshipCmd_messageType) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipCmd) } func (x fastReflection_DeleteRelationshipCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DeleteRelationshipCmd) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DeleteRelationshipCmd) Type() protoreflect.MessageType { return _fastReflection_DeleteRelationshipCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DeleteRelationshipCmd) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DeleteRelationshipCmd) Interface() protoreflect.ProtoMessage { return (*DeleteRelationshipCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DeleteRelationshipCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Relationship != nil { value := protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) if !f(fd_DeleteRelationshipCmd_relationship, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DeleteRelationshipCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmd.relationship": return x.Relationship != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmd.relationship": x.Relationship = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DeleteRelationshipCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.DeleteRelationshipCmd.relationship": value := x.Relationship return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmd.relationship": x.Relationship = value.Message().Interface().(*types.Relationship) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmd.relationship": if x.Relationship == nil { x.Relationship = new(types.Relationship) } return protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DeleteRelationshipCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmd.relationship": m := new(types.Relationship) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmd")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DeleteRelationshipCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.DeleteRelationshipCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DeleteRelationshipCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DeleteRelationshipCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DeleteRelationshipCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DeleteRelationshipCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Relationship != nil { l = options.Size(x.Relationship) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Relationship != nil { encoded, err := options.Marshal(x.Relationship) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Relationship == nil { x.Relationship = &types.Relationship{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relationship); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RegisterObjectCmd protoreflect.MessageDescriptor fd_RegisterObjectCmd_object protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_RegisterObjectCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("RegisterObjectCmd") fd_RegisterObjectCmd_object = md_RegisterObjectCmd.Fields().ByName("object") } var _ protoreflect.Message = (*fastReflection_RegisterObjectCmd)(nil) type fastReflection_RegisterObjectCmd RegisterObjectCmd func (x *RegisterObjectCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_RegisterObjectCmd)(x) } func (x *RegisterObjectCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RegisterObjectCmd_messageType fastReflection_RegisterObjectCmd_messageType var _ protoreflect.MessageType = fastReflection_RegisterObjectCmd_messageType{} type fastReflection_RegisterObjectCmd_messageType struct{} func (x fastReflection_RegisterObjectCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_RegisterObjectCmd)(nil) } func (x fastReflection_RegisterObjectCmd_messageType) New() protoreflect.Message { return new(fastReflection_RegisterObjectCmd) } func (x fastReflection_RegisterObjectCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RegisterObjectCmd) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RegisterObjectCmd) Type() protoreflect.MessageType { return _fastReflection_RegisterObjectCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RegisterObjectCmd) New() protoreflect.Message { return new(fastReflection_RegisterObjectCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RegisterObjectCmd) Interface() protoreflect.ProtoMessage { return (*RegisterObjectCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RegisterObjectCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_RegisterObjectCmd_object, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RegisterObjectCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmd.object": return x.Object != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmd.object": x.Object = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RegisterObjectCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RegisterObjectCmd.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmd.object": x.Object = value.Message().Interface().(*types.Object) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmd.object": if x.Object == nil { x.Object = new(types.Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RegisterObjectCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmd.object": m := new(types.Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RegisterObjectCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RegisterObjectCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RegisterObjectCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RegisterObjectCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RegisterObjectCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RegisterObjectCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &types.Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_CommitRegistrationsCmd protoreflect.MessageDescriptor fd_CommitRegistrationsCmd_commitment protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_CommitRegistrationsCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("CommitRegistrationsCmd") fd_CommitRegistrationsCmd_commitment = md_CommitRegistrationsCmd.Fields().ByName("commitment") } var _ protoreflect.Message = (*fastReflection_CommitRegistrationsCmd)(nil) type fastReflection_CommitRegistrationsCmd CommitRegistrationsCmd func (x *CommitRegistrationsCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_CommitRegistrationsCmd)(x) } func (x *CommitRegistrationsCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_CommitRegistrationsCmd_messageType fastReflection_CommitRegistrationsCmd_messageType var _ protoreflect.MessageType = fastReflection_CommitRegistrationsCmd_messageType{} type fastReflection_CommitRegistrationsCmd_messageType struct{} func (x fastReflection_CommitRegistrationsCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_CommitRegistrationsCmd)(nil) } func (x fastReflection_CommitRegistrationsCmd_messageType) New() protoreflect.Message { return new(fastReflection_CommitRegistrationsCmd) } func (x fastReflection_CommitRegistrationsCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_CommitRegistrationsCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_CommitRegistrationsCmd) Descriptor() protoreflect.MessageDescriptor { return md_CommitRegistrationsCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_CommitRegistrationsCmd) Type() protoreflect.MessageType { return _fastReflection_CommitRegistrationsCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_CommitRegistrationsCmd) New() protoreflect.Message { return new(fastReflection_CommitRegistrationsCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_CommitRegistrationsCmd) Interface() protoreflect.ProtoMessage { return (*CommitRegistrationsCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_CommitRegistrationsCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Commitment) != 0 { value := protoreflect.ValueOfBytes(x.Commitment) if !f(fd_CommitRegistrationsCmd_commitment, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_CommitRegistrationsCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmd.commitment": return len(x.Commitment) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmd")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmd.commitment": x.Commitment = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmd")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_CommitRegistrationsCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.CommitRegistrationsCmd.commitment": value := x.Commitment return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmd")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmd.commitment": x.Commitment = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmd")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmd.commitment": panic(fmt.Errorf("field commitment of message sourcehub.acp.CommitRegistrationsCmd is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmd")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_CommitRegistrationsCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmd.commitment": return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmd")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_CommitRegistrationsCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.CommitRegistrationsCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_CommitRegistrationsCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_CommitRegistrationsCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_CommitRegistrationsCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*CommitRegistrationsCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Commitment) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*CommitRegistrationsCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Commitment) > 0 { i -= len(x.Commitment) copy(dAtA[i:], x.Commitment) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Commitment))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*CommitRegistrationsCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommitRegistrationsCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommitRegistrationsCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Commitment = append(x.Commitment[:0], dAtA[iNdEx:postIndex]...) if x.Commitment == nil { x.Commitment = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_CommitRegistrationsCmdResult protoreflect.MessageDescriptor fd_CommitRegistrationsCmdResult_registrations_commitment protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_CommitRegistrationsCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("CommitRegistrationsCmdResult") fd_CommitRegistrationsCmdResult_registrations_commitment = md_CommitRegistrationsCmdResult.Fields().ByName("registrations_commitment") } var _ protoreflect.Message = (*fastReflection_CommitRegistrationsCmdResult)(nil) type fastReflection_CommitRegistrationsCmdResult CommitRegistrationsCmdResult func (x *CommitRegistrationsCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_CommitRegistrationsCmdResult)(x) } func (x *CommitRegistrationsCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_CommitRegistrationsCmdResult_messageType fastReflection_CommitRegistrationsCmdResult_messageType var _ protoreflect.MessageType = fastReflection_CommitRegistrationsCmdResult_messageType{} type fastReflection_CommitRegistrationsCmdResult_messageType struct{} func (x fastReflection_CommitRegistrationsCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_CommitRegistrationsCmdResult)(nil) } func (x fastReflection_CommitRegistrationsCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_CommitRegistrationsCmdResult) } func (x fastReflection_CommitRegistrationsCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_CommitRegistrationsCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_CommitRegistrationsCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_CommitRegistrationsCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_CommitRegistrationsCmdResult) Type() protoreflect.MessageType { return _fastReflection_CommitRegistrationsCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_CommitRegistrationsCmdResult) New() protoreflect.Message { return new(fastReflection_CommitRegistrationsCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_CommitRegistrationsCmdResult) Interface() protoreflect.ProtoMessage { return (*CommitRegistrationsCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_CommitRegistrationsCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RegistrationsCommitment != nil { value := protoreflect.ValueOfMessage(x.RegistrationsCommitment.ProtoReflect()) if !f(fd_CommitRegistrationsCmdResult_registrations_commitment, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_CommitRegistrationsCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmdResult.registrations_commitment": return x.RegistrationsCommitment != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmdResult.registrations_commitment": x.RegistrationsCommitment = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_CommitRegistrationsCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.CommitRegistrationsCmdResult.registrations_commitment": value := x.RegistrationsCommitment return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmdResult.registrations_commitment": x.RegistrationsCommitment = value.Message().Interface().(*RegistrationsCommitment) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmdResult.registrations_commitment": if x.RegistrationsCommitment == nil { x.RegistrationsCommitment = new(RegistrationsCommitment) } return protoreflect.ValueOfMessage(x.RegistrationsCommitment.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_CommitRegistrationsCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.CommitRegistrationsCmdResult.registrations_commitment": m := new(RegistrationsCommitment) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.CommitRegistrationsCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.CommitRegistrationsCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_CommitRegistrationsCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.CommitRegistrationsCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_CommitRegistrationsCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CommitRegistrationsCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_CommitRegistrationsCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_CommitRegistrationsCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*CommitRegistrationsCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RegistrationsCommitment != nil { l = options.Size(x.RegistrationsCommitment) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*CommitRegistrationsCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RegistrationsCommitment != nil { encoded, err := options.Marshal(x.RegistrationsCommitment) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*CommitRegistrationsCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommitRegistrationsCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommitRegistrationsCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitment", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.RegistrationsCommitment == nil { x.RegistrationsCommitment = &RegistrationsCommitment{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RegistrationsCommitment); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RevealRegistrationCmd protoreflect.MessageDescriptor fd_RevealRegistrationCmd_registrations_commitment_id protoreflect.FieldDescriptor fd_RevealRegistrationCmd_proof protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_RevealRegistrationCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("RevealRegistrationCmd") fd_RevealRegistrationCmd_registrations_commitment_id = md_RevealRegistrationCmd.Fields().ByName("registrations_commitment_id") fd_RevealRegistrationCmd_proof = md_RevealRegistrationCmd.Fields().ByName("proof") } var _ protoreflect.Message = (*fastReflection_RevealRegistrationCmd)(nil) type fastReflection_RevealRegistrationCmd RevealRegistrationCmd func (x *RevealRegistrationCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_RevealRegistrationCmd)(x) } func (x *RevealRegistrationCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RevealRegistrationCmd_messageType fastReflection_RevealRegistrationCmd_messageType var _ protoreflect.MessageType = fastReflection_RevealRegistrationCmd_messageType{} type fastReflection_RevealRegistrationCmd_messageType struct{} func (x fastReflection_RevealRegistrationCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_RevealRegistrationCmd)(nil) } func (x fastReflection_RevealRegistrationCmd_messageType) New() protoreflect.Message { return new(fastReflection_RevealRegistrationCmd) } func (x fastReflection_RevealRegistrationCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RevealRegistrationCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RevealRegistrationCmd) Descriptor() protoreflect.MessageDescriptor { return md_RevealRegistrationCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RevealRegistrationCmd) Type() protoreflect.MessageType { return _fastReflection_RevealRegistrationCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RevealRegistrationCmd) New() protoreflect.Message { return new(fastReflection_RevealRegistrationCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RevealRegistrationCmd) Interface() protoreflect.ProtoMessage { return (*RevealRegistrationCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RevealRegistrationCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RegistrationsCommitmentId != uint64(0) { value := protoreflect.ValueOfUint64(x.RegistrationsCommitmentId) if !f(fd_RevealRegistrationCmd_registrations_commitment_id, value) { return } } if x.Proof != nil { value := protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) if !f(fd_RevealRegistrationCmd_proof, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RevealRegistrationCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmd.registrations_commitment_id": return x.RegistrationsCommitmentId != uint64(0) case "sourcehub.acp.RevealRegistrationCmd.proof": return x.Proof != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmd")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmd.registrations_commitment_id": x.RegistrationsCommitmentId = uint64(0) case "sourcehub.acp.RevealRegistrationCmd.proof": x.Proof = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmd")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RevealRegistrationCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RevealRegistrationCmd.registrations_commitment_id": value := x.RegistrationsCommitmentId return protoreflect.ValueOfUint64(value) case "sourcehub.acp.RevealRegistrationCmd.proof": value := x.Proof return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmd")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmd.registrations_commitment_id": x.RegistrationsCommitmentId = value.Uint() case "sourcehub.acp.RevealRegistrationCmd.proof": x.Proof = value.Message().Interface().(*RegistrationProof) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmd")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmd.proof": if x.Proof == nil { x.Proof = new(RegistrationProof) } return protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) case "sourcehub.acp.RevealRegistrationCmd.registrations_commitment_id": panic(fmt.Errorf("field registrations_commitment_id of message sourcehub.acp.RevealRegistrationCmd is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmd")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RevealRegistrationCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmd.registrations_commitment_id": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.RevealRegistrationCmd.proof": m := new(RegistrationProof) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmd")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RevealRegistrationCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RevealRegistrationCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RevealRegistrationCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RevealRegistrationCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RevealRegistrationCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RevealRegistrationCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RegistrationsCommitmentId != 0 { n += 1 + runtime.Sov(uint64(x.RegistrationsCommitmentId)) } if x.Proof != nil { l = options.Size(x.Proof) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RevealRegistrationCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Proof != nil { encoded, err := options.Marshal(x.Proof) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.RegistrationsCommitmentId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.RegistrationsCommitmentId)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RevealRegistrationCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RevealRegistrationCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RevealRegistrationCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitmentId", wireType) } x.RegistrationsCommitmentId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.RegistrationsCommitmentId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Proof == nil { x.Proof = &RegistrationProof{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proof); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RevealRegistrationCmdResult protoreflect.MessageDescriptor fd_RevealRegistrationCmdResult_record protoreflect.FieldDescriptor fd_RevealRegistrationCmdResult_event protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_RevealRegistrationCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("RevealRegistrationCmdResult") fd_RevealRegistrationCmdResult_record = md_RevealRegistrationCmdResult.Fields().ByName("record") fd_RevealRegistrationCmdResult_event = md_RevealRegistrationCmdResult.Fields().ByName("event") } var _ protoreflect.Message = (*fastReflection_RevealRegistrationCmdResult)(nil) type fastReflection_RevealRegistrationCmdResult RevealRegistrationCmdResult func (x *RevealRegistrationCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_RevealRegistrationCmdResult)(x) } func (x *RevealRegistrationCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RevealRegistrationCmdResult_messageType fastReflection_RevealRegistrationCmdResult_messageType var _ protoreflect.MessageType = fastReflection_RevealRegistrationCmdResult_messageType{} type fastReflection_RevealRegistrationCmdResult_messageType struct{} func (x fastReflection_RevealRegistrationCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_RevealRegistrationCmdResult)(nil) } func (x fastReflection_RevealRegistrationCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_RevealRegistrationCmdResult) } func (x fastReflection_RevealRegistrationCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RevealRegistrationCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RevealRegistrationCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_RevealRegistrationCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RevealRegistrationCmdResult) Type() protoreflect.MessageType { return _fastReflection_RevealRegistrationCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RevealRegistrationCmdResult) New() protoreflect.Message { return new(fastReflection_RevealRegistrationCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RevealRegistrationCmdResult) Interface() protoreflect.ProtoMessage { return (*RevealRegistrationCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RevealRegistrationCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_RevealRegistrationCmdResult_record, value) { return } } if x.Event != nil { value := protoreflect.ValueOfMessage(x.Event.ProtoReflect()) if !f(fd_RevealRegistrationCmdResult_event, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RevealRegistrationCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmdResult.record": return x.Record != nil case "sourcehub.acp.RevealRegistrationCmdResult.event": return x.Event != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmdResult.record": x.Record = nil case "sourcehub.acp.RevealRegistrationCmdResult.event": x.Event = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RevealRegistrationCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RevealRegistrationCmdResult.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.RevealRegistrationCmdResult.event": value := x.Event return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmdResult.record": x.Record = value.Message().Interface().(*RelationshipRecord) case "sourcehub.acp.RevealRegistrationCmdResult.event": x.Event = value.Message().Interface().(*AmendmentEvent) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmdResult.record": if x.Record == nil { x.Record = new(RelationshipRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) case "sourcehub.acp.RevealRegistrationCmdResult.event": if x.Event == nil { x.Event = new(AmendmentEvent) } return protoreflect.ValueOfMessage(x.Event.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RevealRegistrationCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RevealRegistrationCmdResult.record": m := new(RelationshipRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.RevealRegistrationCmdResult.event": m := new(AmendmentEvent) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RevealRegistrationCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RevealRegistrationCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RevealRegistrationCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RevealRegistrationCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RevealRegistrationCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RevealRegistrationCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RevealRegistrationCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RevealRegistrationCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RevealRegistrationCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.Event != nil { l = options.Size(x.Event) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RevealRegistrationCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Event != nil { encoded, err := options.Marshal(x.Event) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RevealRegistrationCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RevealRegistrationCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RevealRegistrationCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &RelationshipRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Event == nil { x.Event = &AmendmentEvent{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Event); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_FlagHijackAttemptCmd protoreflect.MessageDescriptor fd_FlagHijackAttemptCmd_event_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_FlagHijackAttemptCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("FlagHijackAttemptCmd") fd_FlagHijackAttemptCmd_event_id = md_FlagHijackAttemptCmd.Fields().ByName("event_id") } var _ protoreflect.Message = (*fastReflection_FlagHijackAttemptCmd)(nil) type fastReflection_FlagHijackAttemptCmd FlagHijackAttemptCmd func (x *FlagHijackAttemptCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_FlagHijackAttemptCmd)(x) } func (x *FlagHijackAttemptCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FlagHijackAttemptCmd_messageType fastReflection_FlagHijackAttemptCmd_messageType var _ protoreflect.MessageType = fastReflection_FlagHijackAttemptCmd_messageType{} type fastReflection_FlagHijackAttemptCmd_messageType struct{} func (x fastReflection_FlagHijackAttemptCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_FlagHijackAttemptCmd)(nil) } func (x fastReflection_FlagHijackAttemptCmd_messageType) New() protoreflect.Message { return new(fastReflection_FlagHijackAttemptCmd) } func (x fastReflection_FlagHijackAttemptCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FlagHijackAttemptCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FlagHijackAttemptCmd) Descriptor() protoreflect.MessageDescriptor { return md_FlagHijackAttemptCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FlagHijackAttemptCmd) Type() protoreflect.MessageType { return _fastReflection_FlagHijackAttemptCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FlagHijackAttemptCmd) New() protoreflect.Message { return new(fastReflection_FlagHijackAttemptCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FlagHijackAttemptCmd) Interface() protoreflect.ProtoMessage { return (*FlagHijackAttemptCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FlagHijackAttemptCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.EventId != uint64(0) { value := protoreflect.ValueOfUint64(x.EventId) if !f(fd_FlagHijackAttemptCmd_event_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FlagHijackAttemptCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmd.event_id": return x.EventId != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmd")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmd.event_id": x.EventId = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmd")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FlagHijackAttemptCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.FlagHijackAttemptCmd.event_id": value := x.EventId return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmd")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmd.event_id": x.EventId = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmd")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmd.event_id": panic(fmt.Errorf("field event_id of message sourcehub.acp.FlagHijackAttemptCmd is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmd")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FlagHijackAttemptCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmd.event_id": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmd")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FlagHijackAttemptCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.FlagHijackAttemptCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FlagHijackAttemptCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FlagHijackAttemptCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FlagHijackAttemptCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FlagHijackAttemptCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.EventId != 0 { n += 1 + runtime.Sov(uint64(x.EventId)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FlagHijackAttemptCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.EventId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.EventId)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FlagHijackAttemptCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FlagHijackAttemptCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FlagHijackAttemptCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EventId", wireType) } x.EventId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.EventId |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_FlagHijackAttemptCmdResult protoreflect.MessageDescriptor fd_FlagHijackAttemptCmdResult_event protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_FlagHijackAttemptCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("FlagHijackAttemptCmdResult") fd_FlagHijackAttemptCmdResult_event = md_FlagHijackAttemptCmdResult.Fields().ByName("event") } var _ protoreflect.Message = (*fastReflection_FlagHijackAttemptCmdResult)(nil) type fastReflection_FlagHijackAttemptCmdResult FlagHijackAttemptCmdResult func (x *FlagHijackAttemptCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_FlagHijackAttemptCmdResult)(x) } func (x *FlagHijackAttemptCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FlagHijackAttemptCmdResult_messageType fastReflection_FlagHijackAttemptCmdResult_messageType var _ protoreflect.MessageType = fastReflection_FlagHijackAttemptCmdResult_messageType{} type fastReflection_FlagHijackAttemptCmdResult_messageType struct{} func (x fastReflection_FlagHijackAttemptCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_FlagHijackAttemptCmdResult)(nil) } func (x fastReflection_FlagHijackAttemptCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_FlagHijackAttemptCmdResult) } func (x fastReflection_FlagHijackAttemptCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FlagHijackAttemptCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FlagHijackAttemptCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_FlagHijackAttemptCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FlagHijackAttemptCmdResult) Type() protoreflect.MessageType { return _fastReflection_FlagHijackAttemptCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FlagHijackAttemptCmdResult) New() protoreflect.Message { return new(fastReflection_FlagHijackAttemptCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FlagHijackAttemptCmdResult) Interface() protoreflect.ProtoMessage { return (*FlagHijackAttemptCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FlagHijackAttemptCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Event != nil { value := protoreflect.ValueOfMessage(x.Event.ProtoReflect()) if !f(fd_FlagHijackAttemptCmdResult_event, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FlagHijackAttemptCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmdResult.event": return x.Event != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmdResult.event": x.Event = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FlagHijackAttemptCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.FlagHijackAttemptCmdResult.event": value := x.Event return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmdResult.event": x.Event = value.Message().Interface().(*AmendmentEvent) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmdResult.event": if x.Event == nil { x.Event = new(AmendmentEvent) } return protoreflect.ValueOfMessage(x.Event.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FlagHijackAttemptCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.FlagHijackAttemptCmdResult.event": m := new(AmendmentEvent) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.FlagHijackAttemptCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.FlagHijackAttemptCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FlagHijackAttemptCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.FlagHijackAttemptCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FlagHijackAttemptCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FlagHijackAttemptCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FlagHijackAttemptCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FlagHijackAttemptCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FlagHijackAttemptCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Event != nil { l = options.Size(x.Event) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FlagHijackAttemptCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Event != nil { encoded, err := options.Marshal(x.Event) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FlagHijackAttemptCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FlagHijackAttemptCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FlagHijackAttemptCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Event == nil { x.Event = &AmendmentEvent{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Event); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnarchiveObjectCmd protoreflect.MessageDescriptor fd_UnarchiveObjectCmd_object protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_UnarchiveObjectCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("UnarchiveObjectCmd") fd_UnarchiveObjectCmd_object = md_UnarchiveObjectCmd.Fields().ByName("object") } var _ protoreflect.Message = (*fastReflection_UnarchiveObjectCmd)(nil) type fastReflection_UnarchiveObjectCmd UnarchiveObjectCmd func (x *UnarchiveObjectCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_UnarchiveObjectCmd)(x) } func (x *UnarchiveObjectCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnarchiveObjectCmd_messageType fastReflection_UnarchiveObjectCmd_messageType var _ protoreflect.MessageType = fastReflection_UnarchiveObjectCmd_messageType{} type fastReflection_UnarchiveObjectCmd_messageType struct{} func (x fastReflection_UnarchiveObjectCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_UnarchiveObjectCmd)(nil) } func (x fastReflection_UnarchiveObjectCmd_messageType) New() protoreflect.Message { return new(fastReflection_UnarchiveObjectCmd) } func (x fastReflection_UnarchiveObjectCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnarchiveObjectCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnarchiveObjectCmd) Descriptor() protoreflect.MessageDescriptor { return md_UnarchiveObjectCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnarchiveObjectCmd) Type() protoreflect.MessageType { return _fastReflection_UnarchiveObjectCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnarchiveObjectCmd) New() protoreflect.Message { return new(fastReflection_UnarchiveObjectCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnarchiveObjectCmd) Interface() protoreflect.ProtoMessage { return (*UnarchiveObjectCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnarchiveObjectCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_UnarchiveObjectCmd_object, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnarchiveObjectCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmd.object": return x.Object != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmd.object": x.Object = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnarchiveObjectCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.UnarchiveObjectCmd.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmd.object": x.Object = value.Message().Interface().(*types.Object) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmd.object": if x.Object == nil { x.Object = new(types.Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnarchiveObjectCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmd.object": m := new(types.Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnarchiveObjectCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.UnarchiveObjectCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnarchiveObjectCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnarchiveObjectCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnarchiveObjectCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnarchiveObjectCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnarchiveObjectCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnarchiveObjectCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnarchiveObjectCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnarchiveObjectCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &types.Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnarchiveObjectCmdResult protoreflect.MessageDescriptor fd_UnarchiveObjectCmdResult_record protoreflect.FieldDescriptor fd_UnarchiveObjectCmdResult_relationship_modified protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_UnarchiveObjectCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("UnarchiveObjectCmdResult") fd_UnarchiveObjectCmdResult_record = md_UnarchiveObjectCmdResult.Fields().ByName("record") fd_UnarchiveObjectCmdResult_relationship_modified = md_UnarchiveObjectCmdResult.Fields().ByName("relationship_modified") } var _ protoreflect.Message = (*fastReflection_UnarchiveObjectCmdResult)(nil) type fastReflection_UnarchiveObjectCmdResult UnarchiveObjectCmdResult func (x *UnarchiveObjectCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_UnarchiveObjectCmdResult)(x) } func (x *UnarchiveObjectCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnarchiveObjectCmdResult_messageType fastReflection_UnarchiveObjectCmdResult_messageType var _ protoreflect.MessageType = fastReflection_UnarchiveObjectCmdResult_messageType{} type fastReflection_UnarchiveObjectCmdResult_messageType struct{} func (x fastReflection_UnarchiveObjectCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_UnarchiveObjectCmdResult)(nil) } func (x fastReflection_UnarchiveObjectCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_UnarchiveObjectCmdResult) } func (x fastReflection_UnarchiveObjectCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnarchiveObjectCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnarchiveObjectCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_UnarchiveObjectCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnarchiveObjectCmdResult) Type() protoreflect.MessageType { return _fastReflection_UnarchiveObjectCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnarchiveObjectCmdResult) New() protoreflect.Message { return new(fastReflection_UnarchiveObjectCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnarchiveObjectCmdResult) Interface() protoreflect.ProtoMessage { return (*UnarchiveObjectCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnarchiveObjectCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_UnarchiveObjectCmdResult_record, value) { return } } if x.RelationshipModified != false { value := protoreflect.ValueOfBool(x.RelationshipModified) if !f(fd_UnarchiveObjectCmdResult_relationship_modified, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnarchiveObjectCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmdResult.record": return x.Record != nil case "sourcehub.acp.UnarchiveObjectCmdResult.relationship_modified": return x.RelationshipModified != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmdResult.record": x.Record = nil case "sourcehub.acp.UnarchiveObjectCmdResult.relationship_modified": x.RelationshipModified = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnarchiveObjectCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.UnarchiveObjectCmdResult.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.UnarchiveObjectCmdResult.relationship_modified": value := x.RelationshipModified return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmdResult.record": x.Record = value.Message().Interface().(*RelationshipRecord) case "sourcehub.acp.UnarchiveObjectCmdResult.relationship_modified": x.RelationshipModified = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmdResult.record": if x.Record == nil { x.Record = new(RelationshipRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) case "sourcehub.acp.UnarchiveObjectCmdResult.relationship_modified": panic(fmt.Errorf("field relationship_modified of message sourcehub.acp.UnarchiveObjectCmdResult is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnarchiveObjectCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.UnarchiveObjectCmdResult.record": m := new(RelationshipRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.UnarchiveObjectCmdResult.relationship_modified": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.UnarchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.UnarchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnarchiveObjectCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.UnarchiveObjectCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnarchiveObjectCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnarchiveObjectCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnarchiveObjectCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnarchiveObjectCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnarchiveObjectCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.RelationshipModified { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnarchiveObjectCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RelationshipModified { i-- if x.RelationshipModified { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnarchiveObjectCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnarchiveObjectCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnarchiveObjectCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &RelationshipRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelationshipModified", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.RelationshipModified = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ArchiveObjectCmd protoreflect.MessageDescriptor fd_ArchiveObjectCmd_object protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_ArchiveObjectCmd = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("ArchiveObjectCmd") fd_ArchiveObjectCmd_object = md_ArchiveObjectCmd.Fields().ByName("object") } var _ protoreflect.Message = (*fastReflection_ArchiveObjectCmd)(nil) type fastReflection_ArchiveObjectCmd ArchiveObjectCmd func (x *ArchiveObjectCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_ArchiveObjectCmd)(x) } func (x *ArchiveObjectCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ArchiveObjectCmd_messageType fastReflection_ArchiveObjectCmd_messageType var _ protoreflect.MessageType = fastReflection_ArchiveObjectCmd_messageType{} type fastReflection_ArchiveObjectCmd_messageType struct{} func (x fastReflection_ArchiveObjectCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_ArchiveObjectCmd)(nil) } func (x fastReflection_ArchiveObjectCmd_messageType) New() protoreflect.Message { return new(fastReflection_ArchiveObjectCmd) } func (x fastReflection_ArchiveObjectCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ArchiveObjectCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ArchiveObjectCmd) Descriptor() protoreflect.MessageDescriptor { return md_ArchiveObjectCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ArchiveObjectCmd) Type() protoreflect.MessageType { return _fastReflection_ArchiveObjectCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ArchiveObjectCmd) New() protoreflect.Message { return new(fastReflection_ArchiveObjectCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ArchiveObjectCmd) Interface() protoreflect.ProtoMessage { return (*ArchiveObjectCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ArchiveObjectCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_ArchiveObjectCmd_object, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ArchiveObjectCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmd.object": return x.Object != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmd.object": x.Object = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ArchiveObjectCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.ArchiveObjectCmd.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmd.object": x.Object = value.Message().Interface().(*types.Object) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmd.object": if x.Object == nil { x.Object = new(types.Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ArchiveObjectCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmd.object": m := new(types.Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmd")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ArchiveObjectCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.ArchiveObjectCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ArchiveObjectCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ArchiveObjectCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ArchiveObjectCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ArchiveObjectCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ArchiveObjectCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ArchiveObjectCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ArchiveObjectCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ArchiveObjectCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &types.Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SetRelationshipCmdResult protoreflect.MessageDescriptor fd_SetRelationshipCmdResult_record_existed protoreflect.FieldDescriptor fd_SetRelationshipCmdResult_record protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_SetRelationshipCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("SetRelationshipCmdResult") fd_SetRelationshipCmdResult_record_existed = md_SetRelationshipCmdResult.Fields().ByName("record_existed") fd_SetRelationshipCmdResult_record = md_SetRelationshipCmdResult.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_SetRelationshipCmdResult)(nil) type fastReflection_SetRelationshipCmdResult SetRelationshipCmdResult func (x *SetRelationshipCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_SetRelationshipCmdResult)(x) } func (x *SetRelationshipCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SetRelationshipCmdResult_messageType fastReflection_SetRelationshipCmdResult_messageType var _ protoreflect.MessageType = fastReflection_SetRelationshipCmdResult_messageType{} type fastReflection_SetRelationshipCmdResult_messageType struct{} func (x fastReflection_SetRelationshipCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_SetRelationshipCmdResult)(nil) } func (x fastReflection_SetRelationshipCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_SetRelationshipCmdResult) } func (x fastReflection_SetRelationshipCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SetRelationshipCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SetRelationshipCmdResult) Type() protoreflect.MessageType { return _fastReflection_SetRelationshipCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SetRelationshipCmdResult) New() protoreflect.Message { return new(fastReflection_SetRelationshipCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SetRelationshipCmdResult) Interface() protoreflect.ProtoMessage { return (*SetRelationshipCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SetRelationshipCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RecordExisted != false { value := protoreflect.ValueOfBool(x.RecordExisted) if !f(fd_SetRelationshipCmdResult_record_existed, value) { return } } if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_SetRelationshipCmdResult_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SetRelationshipCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmdResult.record_existed": return x.RecordExisted != false case "sourcehub.acp.SetRelationshipCmdResult.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmdResult.record_existed": x.RecordExisted = false case "sourcehub.acp.SetRelationshipCmdResult.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SetRelationshipCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.SetRelationshipCmdResult.record_existed": value := x.RecordExisted return protoreflect.ValueOfBool(value) case "sourcehub.acp.SetRelationshipCmdResult.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmdResult.record_existed": x.RecordExisted = value.Bool() case "sourcehub.acp.SetRelationshipCmdResult.record": x.Record = value.Message().Interface().(*RelationshipRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmdResult.record": if x.Record == nil { x.Record = new(RelationshipRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) case "sourcehub.acp.SetRelationshipCmdResult.record_existed": panic(fmt.Errorf("field record_existed of message sourcehub.acp.SetRelationshipCmdResult is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SetRelationshipCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SetRelationshipCmdResult.record_existed": return protoreflect.ValueOfBool(false) case "sourcehub.acp.SetRelationshipCmdResult.record": m := new(RelationshipRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SetRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.SetRelationshipCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SetRelationshipCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.SetRelationshipCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SetRelationshipCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SetRelationshipCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SetRelationshipCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SetRelationshipCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RecordExisted { n += 2 } if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.RecordExisted { i-- if x.RecordExisted { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecordExisted", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.RecordExisted = bool(v != 0) case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &RelationshipRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DeleteRelationshipCmdResult protoreflect.MessageDescriptor fd_DeleteRelationshipCmdResult_record_found protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_DeleteRelationshipCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("DeleteRelationshipCmdResult") fd_DeleteRelationshipCmdResult_record_found = md_DeleteRelationshipCmdResult.Fields().ByName("record_found") } var _ protoreflect.Message = (*fastReflection_DeleteRelationshipCmdResult)(nil) type fastReflection_DeleteRelationshipCmdResult DeleteRelationshipCmdResult func (x *DeleteRelationshipCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_DeleteRelationshipCmdResult)(x) } func (x *DeleteRelationshipCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DeleteRelationshipCmdResult_messageType fastReflection_DeleteRelationshipCmdResult_messageType var _ protoreflect.MessageType = fastReflection_DeleteRelationshipCmdResult_messageType{} type fastReflection_DeleteRelationshipCmdResult_messageType struct{} func (x fastReflection_DeleteRelationshipCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_DeleteRelationshipCmdResult)(nil) } func (x fastReflection_DeleteRelationshipCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipCmdResult) } func (x fastReflection_DeleteRelationshipCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DeleteRelationshipCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DeleteRelationshipCmdResult) Type() protoreflect.MessageType { return _fastReflection_DeleteRelationshipCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DeleteRelationshipCmdResult) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DeleteRelationshipCmdResult) Interface() protoreflect.ProtoMessage { return (*DeleteRelationshipCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DeleteRelationshipCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RecordFound != false { value := protoreflect.ValueOfBool(x.RecordFound) if !f(fd_DeleteRelationshipCmdResult_record_found, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DeleteRelationshipCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmdResult.record_found": return x.RecordFound != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmdResult.record_found": x.RecordFound = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DeleteRelationshipCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.DeleteRelationshipCmdResult.record_found": value := x.RecordFound return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmdResult.record_found": x.RecordFound = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmdResult.record_found": panic(fmt.Errorf("field record_found of message sourcehub.acp.DeleteRelationshipCmdResult is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DeleteRelationshipCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.DeleteRelationshipCmdResult.record_found": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.DeleteRelationshipCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.DeleteRelationshipCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DeleteRelationshipCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.DeleteRelationshipCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DeleteRelationshipCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DeleteRelationshipCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DeleteRelationshipCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DeleteRelationshipCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RecordFound { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RecordFound { i-- if x.RecordFound { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecordFound", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.RecordFound = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RegisterObjectCmdResult protoreflect.MessageDescriptor fd_RegisterObjectCmdResult_record protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_RegisterObjectCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("RegisterObjectCmdResult") fd_RegisterObjectCmdResult_record = md_RegisterObjectCmdResult.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_RegisterObjectCmdResult)(nil) type fastReflection_RegisterObjectCmdResult RegisterObjectCmdResult func (x *RegisterObjectCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_RegisterObjectCmdResult)(x) } func (x *RegisterObjectCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RegisterObjectCmdResult_messageType fastReflection_RegisterObjectCmdResult_messageType var _ protoreflect.MessageType = fastReflection_RegisterObjectCmdResult_messageType{} type fastReflection_RegisterObjectCmdResult_messageType struct{} func (x fastReflection_RegisterObjectCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_RegisterObjectCmdResult)(nil) } func (x fastReflection_RegisterObjectCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_RegisterObjectCmdResult) } func (x fastReflection_RegisterObjectCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RegisterObjectCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RegisterObjectCmdResult) Type() protoreflect.MessageType { return _fastReflection_RegisterObjectCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RegisterObjectCmdResult) New() protoreflect.Message { return new(fastReflection_RegisterObjectCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RegisterObjectCmdResult) Interface() protoreflect.ProtoMessage { return (*RegisterObjectCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RegisterObjectCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_RegisterObjectCmdResult_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RegisterObjectCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmdResult.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmdResult.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RegisterObjectCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RegisterObjectCmdResult.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmdResult.record": x.Record = value.Message().Interface().(*RelationshipRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmdResult.record": if x.Record == nil { x.Record = new(RelationshipRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RegisterObjectCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RegisterObjectCmdResult.record": m := new(RelationshipRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RegisterObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.RegisterObjectCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RegisterObjectCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RegisterObjectCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RegisterObjectCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RegisterObjectCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RegisterObjectCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RegisterObjectCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &RelationshipRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ArchiveObjectCmdResult protoreflect.MessageDescriptor fd_ArchiveObjectCmdResult_found protoreflect.FieldDescriptor fd_ArchiveObjectCmdResult_relationships_removed protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_ArchiveObjectCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("ArchiveObjectCmdResult") fd_ArchiveObjectCmdResult_found = md_ArchiveObjectCmdResult.Fields().ByName("found") fd_ArchiveObjectCmdResult_relationships_removed = md_ArchiveObjectCmdResult.Fields().ByName("relationships_removed") } var _ protoreflect.Message = (*fastReflection_ArchiveObjectCmdResult)(nil) type fastReflection_ArchiveObjectCmdResult ArchiveObjectCmdResult func (x *ArchiveObjectCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_ArchiveObjectCmdResult)(x) } func (x *ArchiveObjectCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ArchiveObjectCmdResult_messageType fastReflection_ArchiveObjectCmdResult_messageType var _ protoreflect.MessageType = fastReflection_ArchiveObjectCmdResult_messageType{} type fastReflection_ArchiveObjectCmdResult_messageType struct{} func (x fastReflection_ArchiveObjectCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_ArchiveObjectCmdResult)(nil) } func (x fastReflection_ArchiveObjectCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_ArchiveObjectCmdResult) } func (x fastReflection_ArchiveObjectCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ArchiveObjectCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ArchiveObjectCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_ArchiveObjectCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ArchiveObjectCmdResult) Type() protoreflect.MessageType { return _fastReflection_ArchiveObjectCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ArchiveObjectCmdResult) New() protoreflect.Message { return new(fastReflection_ArchiveObjectCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ArchiveObjectCmdResult) Interface() protoreflect.ProtoMessage { return (*ArchiveObjectCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ArchiveObjectCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Found != false { value := protoreflect.ValueOfBool(x.Found) if !f(fd_ArchiveObjectCmdResult_found, value) { return } } if x.RelationshipsRemoved != uint64(0) { value := protoreflect.ValueOfUint64(x.RelationshipsRemoved) if !f(fd_ArchiveObjectCmdResult_relationships_removed, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ArchiveObjectCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmdResult.found": return x.Found != false case "sourcehub.acp.ArchiveObjectCmdResult.relationships_removed": return x.RelationshipsRemoved != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmdResult.found": x.Found = false case "sourcehub.acp.ArchiveObjectCmdResult.relationships_removed": x.RelationshipsRemoved = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ArchiveObjectCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.ArchiveObjectCmdResult.found": value := x.Found return protoreflect.ValueOfBool(value) case "sourcehub.acp.ArchiveObjectCmdResult.relationships_removed": value := x.RelationshipsRemoved return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmdResult.found": x.Found = value.Bool() case "sourcehub.acp.ArchiveObjectCmdResult.relationships_removed": x.RelationshipsRemoved = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmdResult.found": panic(fmt.Errorf("field found of message sourcehub.acp.ArchiveObjectCmdResult is not mutable")) case "sourcehub.acp.ArchiveObjectCmdResult.relationships_removed": panic(fmt.Errorf("field relationships_removed of message sourcehub.acp.ArchiveObjectCmdResult is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ArchiveObjectCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.ArchiveObjectCmdResult.found": return protoreflect.ValueOfBool(false) case "sourcehub.acp.ArchiveObjectCmdResult.relationships_removed": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.ArchiveObjectCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.ArchiveObjectCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ArchiveObjectCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.ArchiveObjectCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ArchiveObjectCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ArchiveObjectCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ArchiveObjectCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ArchiveObjectCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ArchiveObjectCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Found { n += 2 } if x.RelationshipsRemoved != 0 { n += 1 + runtime.Sov(uint64(x.RelationshipsRemoved)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ArchiveObjectCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RelationshipsRemoved != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.RelationshipsRemoved)) i-- dAtA[i] = 0x10 } if x.Found { i-- if x.Found { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ArchiveObjectCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ArchiveObjectCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ArchiveObjectCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Found", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Found = bool(v != 0) case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelationshipsRemoved", wireType) } x.RelationshipsRemoved = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.RelationshipsRemoved |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_PolicyCmdResult protoreflect.MessageDescriptor fd_PolicyCmdResult_set_relationship_result protoreflect.FieldDescriptor fd_PolicyCmdResult_delete_relationship_result protoreflect.FieldDescriptor fd_PolicyCmdResult_register_object_result protoreflect.FieldDescriptor fd_PolicyCmdResult_archive_object_result protoreflect.FieldDescriptor fd_PolicyCmdResult_commit_registrations_result protoreflect.FieldDescriptor fd_PolicyCmdResult_reveal_registration_result protoreflect.FieldDescriptor fd_PolicyCmdResult_flag_hijack_attempt_result protoreflect.FieldDescriptor fd_PolicyCmdResult_unarchive_object_result protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_policy_cmd_proto_init() md_PolicyCmdResult = File_sourcehub_acp_policy_cmd_proto.Messages().ByName("PolicyCmdResult") fd_PolicyCmdResult_set_relationship_result = md_PolicyCmdResult.Fields().ByName("set_relationship_result") fd_PolicyCmdResult_delete_relationship_result = md_PolicyCmdResult.Fields().ByName("delete_relationship_result") fd_PolicyCmdResult_register_object_result = md_PolicyCmdResult.Fields().ByName("register_object_result") fd_PolicyCmdResult_archive_object_result = md_PolicyCmdResult.Fields().ByName("archive_object_result") fd_PolicyCmdResult_commit_registrations_result = md_PolicyCmdResult.Fields().ByName("commit_registrations_result") fd_PolicyCmdResult_reveal_registration_result = md_PolicyCmdResult.Fields().ByName("reveal_registration_result") fd_PolicyCmdResult_flag_hijack_attempt_result = md_PolicyCmdResult.Fields().ByName("flag_hijack_attempt_result") fd_PolicyCmdResult_unarchive_object_result = md_PolicyCmdResult.Fields().ByName("unarchive_object_result") } var _ protoreflect.Message = (*fastReflection_PolicyCmdResult)(nil) type fastReflection_PolicyCmdResult PolicyCmdResult func (x *PolicyCmdResult) ProtoReflect() protoreflect.Message { return (*fastReflection_PolicyCmdResult)(x) } func (x *PolicyCmdResult) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PolicyCmdResult_messageType fastReflection_PolicyCmdResult_messageType var _ protoreflect.MessageType = fastReflection_PolicyCmdResult_messageType{} type fastReflection_PolicyCmdResult_messageType struct{} func (x fastReflection_PolicyCmdResult_messageType) Zero() protoreflect.Message { return (*fastReflection_PolicyCmdResult)(nil) } func (x fastReflection_PolicyCmdResult_messageType) New() protoreflect.Message { return new(fastReflection_PolicyCmdResult) } func (x fastReflection_PolicyCmdResult_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PolicyCmdResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PolicyCmdResult) Descriptor() protoreflect.MessageDescriptor { return md_PolicyCmdResult } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PolicyCmdResult) Type() protoreflect.MessageType { return _fastReflection_PolicyCmdResult_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PolicyCmdResult) New() protoreflect.Message { return new(fastReflection_PolicyCmdResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PolicyCmdResult) Interface() protoreflect.ProtoMessage { return (*PolicyCmdResult)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PolicyCmdResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Result != nil { switch o := x.Result.(type) { case *PolicyCmdResult_SetRelationshipResult: v := o.SetRelationshipResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_set_relationship_result, value) { return } case *PolicyCmdResult_DeleteRelationshipResult: v := o.DeleteRelationshipResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_delete_relationship_result, value) { return } case *PolicyCmdResult_RegisterObjectResult: v := o.RegisterObjectResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_register_object_result, value) { return } case *PolicyCmdResult_ArchiveObjectResult: v := o.ArchiveObjectResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_archive_object_result, value) { return } case *PolicyCmdResult_CommitRegistrationsResult: v := o.CommitRegistrationsResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_commit_registrations_result, value) { return } case *PolicyCmdResult_RevealRegistrationResult: v := o.RevealRegistrationResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_reveal_registration_result, value) { return } case *PolicyCmdResult_FlagHijackAttemptResult: v := o.FlagHijackAttemptResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_flag_hijack_attempt_result, value) { return } case *PolicyCmdResult_UnarchiveObjectResult: v := o.UnarchiveObjectResult value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyCmdResult_unarchive_object_result, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PolicyCmdResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.PolicyCmdResult.set_relationship_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_SetRelationshipResult); ok { return true } else { return false } case "sourcehub.acp.PolicyCmdResult.delete_relationship_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_DeleteRelationshipResult); ok { return true } else { return false } case "sourcehub.acp.PolicyCmdResult.register_object_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_RegisterObjectResult); ok { return true } else { return false } case "sourcehub.acp.PolicyCmdResult.archive_object_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_ArchiveObjectResult); ok { return true } else { return false } case "sourcehub.acp.PolicyCmdResult.commit_registrations_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_CommitRegistrationsResult); ok { return true } else { return false } case "sourcehub.acp.PolicyCmdResult.reveal_registration_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_RevealRegistrationResult); ok { return true } else { return false } case "sourcehub.acp.PolicyCmdResult.flag_hijack_attempt_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_FlagHijackAttemptResult); ok { return true } else { return false } case "sourcehub.acp.PolicyCmdResult.unarchive_object_result": if x.Result == nil { return false } else if _, ok := x.Result.(*PolicyCmdResult_UnarchiveObjectResult); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmdResult does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmdResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.PolicyCmdResult.set_relationship_result": x.Result = nil case "sourcehub.acp.PolicyCmdResult.delete_relationship_result": x.Result = nil case "sourcehub.acp.PolicyCmdResult.register_object_result": x.Result = nil case "sourcehub.acp.PolicyCmdResult.archive_object_result": x.Result = nil case "sourcehub.acp.PolicyCmdResult.commit_registrations_result": x.Result = nil case "sourcehub.acp.PolicyCmdResult.reveal_registration_result": x.Result = nil case "sourcehub.acp.PolicyCmdResult.flag_hijack_attempt_result": x.Result = nil case "sourcehub.acp.PolicyCmdResult.unarchive_object_result": x.Result = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmdResult does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PolicyCmdResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.PolicyCmdResult.set_relationship_result": if x.Result == nil { return protoreflect.ValueOfMessage((*SetRelationshipCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_SetRelationshipResult); ok { return protoreflect.ValueOfMessage(v.SetRelationshipResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*SetRelationshipCmdResult)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.delete_relationship_result": if x.Result == nil { return protoreflect.ValueOfMessage((*DeleteRelationshipCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_DeleteRelationshipResult); ok { return protoreflect.ValueOfMessage(v.DeleteRelationshipResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*DeleteRelationshipCmdResult)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.register_object_result": if x.Result == nil { return protoreflect.ValueOfMessage((*RegisterObjectCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_RegisterObjectResult); ok { return protoreflect.ValueOfMessage(v.RegisterObjectResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*RegisterObjectCmdResult)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.archive_object_result": if x.Result == nil { return protoreflect.ValueOfMessage((*ArchiveObjectCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_ArchiveObjectResult); ok { return protoreflect.ValueOfMessage(v.ArchiveObjectResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*ArchiveObjectCmdResult)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.commit_registrations_result": if x.Result == nil { return protoreflect.ValueOfMessage((*CommitRegistrationsCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_CommitRegistrationsResult); ok { return protoreflect.ValueOfMessage(v.CommitRegistrationsResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*CommitRegistrationsCmdResult)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.reveal_registration_result": if x.Result == nil { return protoreflect.ValueOfMessage((*RevealRegistrationCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_RevealRegistrationResult); ok { return protoreflect.ValueOfMessage(v.RevealRegistrationResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*RevealRegistrationCmdResult)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.flag_hijack_attempt_result": if x.Result == nil { return protoreflect.ValueOfMessage((*FlagHijackAttemptCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_FlagHijackAttemptResult); ok { return protoreflect.ValueOfMessage(v.FlagHijackAttemptResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*FlagHijackAttemptCmdResult)(nil).ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.unarchive_object_result": if x.Result == nil { return protoreflect.ValueOfMessage((*UnarchiveObjectCmdResult)(nil).ProtoReflect()) } else if v, ok := x.Result.(*PolicyCmdResult_UnarchiveObjectResult); ok { return protoreflect.ValueOfMessage(v.UnarchiveObjectResult.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*UnarchiveObjectCmdResult)(nil).ProtoReflect()) } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmdResult does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmdResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.PolicyCmdResult.set_relationship_result": cv := value.Message().Interface().(*SetRelationshipCmdResult) x.Result = &PolicyCmdResult_SetRelationshipResult{SetRelationshipResult: cv} case "sourcehub.acp.PolicyCmdResult.delete_relationship_result": cv := value.Message().Interface().(*DeleteRelationshipCmdResult) x.Result = &PolicyCmdResult_DeleteRelationshipResult{DeleteRelationshipResult: cv} case "sourcehub.acp.PolicyCmdResult.register_object_result": cv := value.Message().Interface().(*RegisterObjectCmdResult) x.Result = &PolicyCmdResult_RegisterObjectResult{RegisterObjectResult: cv} case "sourcehub.acp.PolicyCmdResult.archive_object_result": cv := value.Message().Interface().(*ArchiveObjectCmdResult) x.Result = &PolicyCmdResult_ArchiveObjectResult{ArchiveObjectResult: cv} case "sourcehub.acp.PolicyCmdResult.commit_registrations_result": cv := value.Message().Interface().(*CommitRegistrationsCmdResult) x.Result = &PolicyCmdResult_CommitRegistrationsResult{CommitRegistrationsResult: cv} case "sourcehub.acp.PolicyCmdResult.reveal_registration_result": cv := value.Message().Interface().(*RevealRegistrationCmdResult) x.Result = &PolicyCmdResult_RevealRegistrationResult{RevealRegistrationResult: cv} case "sourcehub.acp.PolicyCmdResult.flag_hijack_attempt_result": cv := value.Message().Interface().(*FlagHijackAttemptCmdResult) x.Result = &PolicyCmdResult_FlagHijackAttemptResult{FlagHijackAttemptResult: cv} case "sourcehub.acp.PolicyCmdResult.unarchive_object_result": cv := value.Message().Interface().(*UnarchiveObjectCmdResult) x.Result = &PolicyCmdResult_UnarchiveObjectResult{UnarchiveObjectResult: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmdResult does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmdResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.PolicyCmdResult.set_relationship_result": if x.Result == nil { value := &SetRelationshipCmdResult{} oneofValue := &PolicyCmdResult_SetRelationshipResult{SetRelationshipResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_SetRelationshipResult: return protoreflect.ValueOfMessage(m.SetRelationshipResult.ProtoReflect()) default: value := &SetRelationshipCmdResult{} oneofValue := &PolicyCmdResult_SetRelationshipResult{SetRelationshipResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.delete_relationship_result": if x.Result == nil { value := &DeleteRelationshipCmdResult{} oneofValue := &PolicyCmdResult_DeleteRelationshipResult{DeleteRelationshipResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_DeleteRelationshipResult: return protoreflect.ValueOfMessage(m.DeleteRelationshipResult.ProtoReflect()) default: value := &DeleteRelationshipCmdResult{} oneofValue := &PolicyCmdResult_DeleteRelationshipResult{DeleteRelationshipResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.register_object_result": if x.Result == nil { value := &RegisterObjectCmdResult{} oneofValue := &PolicyCmdResult_RegisterObjectResult{RegisterObjectResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_RegisterObjectResult: return protoreflect.ValueOfMessage(m.RegisterObjectResult.ProtoReflect()) default: value := &RegisterObjectCmdResult{} oneofValue := &PolicyCmdResult_RegisterObjectResult{RegisterObjectResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.archive_object_result": if x.Result == nil { value := &ArchiveObjectCmdResult{} oneofValue := &PolicyCmdResult_ArchiveObjectResult{ArchiveObjectResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_ArchiveObjectResult: return protoreflect.ValueOfMessage(m.ArchiveObjectResult.ProtoReflect()) default: value := &ArchiveObjectCmdResult{} oneofValue := &PolicyCmdResult_ArchiveObjectResult{ArchiveObjectResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.commit_registrations_result": if x.Result == nil { value := &CommitRegistrationsCmdResult{} oneofValue := &PolicyCmdResult_CommitRegistrationsResult{CommitRegistrationsResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_CommitRegistrationsResult: return protoreflect.ValueOfMessage(m.CommitRegistrationsResult.ProtoReflect()) default: value := &CommitRegistrationsCmdResult{} oneofValue := &PolicyCmdResult_CommitRegistrationsResult{CommitRegistrationsResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.reveal_registration_result": if x.Result == nil { value := &RevealRegistrationCmdResult{} oneofValue := &PolicyCmdResult_RevealRegistrationResult{RevealRegistrationResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_RevealRegistrationResult: return protoreflect.ValueOfMessage(m.RevealRegistrationResult.ProtoReflect()) default: value := &RevealRegistrationCmdResult{} oneofValue := &PolicyCmdResult_RevealRegistrationResult{RevealRegistrationResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.flag_hijack_attempt_result": if x.Result == nil { value := &FlagHijackAttemptCmdResult{} oneofValue := &PolicyCmdResult_FlagHijackAttemptResult{FlagHijackAttemptResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_FlagHijackAttemptResult: return protoreflect.ValueOfMessage(m.FlagHijackAttemptResult.ProtoReflect()) default: value := &FlagHijackAttemptCmdResult{} oneofValue := &PolicyCmdResult_FlagHijackAttemptResult{FlagHijackAttemptResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.PolicyCmdResult.unarchive_object_result": if x.Result == nil { value := &UnarchiveObjectCmdResult{} oneofValue := &PolicyCmdResult_UnarchiveObjectResult{UnarchiveObjectResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Result.(type) { case *PolicyCmdResult_UnarchiveObjectResult: return protoreflect.ValueOfMessage(m.UnarchiveObjectResult.ProtoReflect()) default: value := &UnarchiveObjectCmdResult{} oneofValue := &PolicyCmdResult_UnarchiveObjectResult{UnarchiveObjectResult: value} x.Result = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmdResult does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PolicyCmdResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.PolicyCmdResult.set_relationship_result": value := &SetRelationshipCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmdResult.delete_relationship_result": value := &DeleteRelationshipCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmdResult.register_object_result": value := &RegisterObjectCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmdResult.archive_object_result": value := &ArchiveObjectCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmdResult.commit_registrations_result": value := &CommitRegistrationsCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmdResult.reveal_registration_result": value := &RevealRegistrationCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmdResult.flag_hijack_attempt_result": value := &FlagHijackAttemptCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyCmdResult.unarchive_object_result": value := &UnarchiveObjectCmdResult{} return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyCmdResult")) } panic(fmt.Errorf("message sourcehub.acp.PolicyCmdResult does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PolicyCmdResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcehub.acp.PolicyCmdResult.result": if x.Result == nil { return nil } switch x.Result.(type) { case *PolicyCmdResult_SetRelationshipResult: return x.Descriptor().Fields().ByName("set_relationship_result") case *PolicyCmdResult_DeleteRelationshipResult: return x.Descriptor().Fields().ByName("delete_relationship_result") case *PolicyCmdResult_RegisterObjectResult: return x.Descriptor().Fields().ByName("register_object_result") case *PolicyCmdResult_ArchiveObjectResult: return x.Descriptor().Fields().ByName("archive_object_result") case *PolicyCmdResult_CommitRegistrationsResult: return x.Descriptor().Fields().ByName("commit_registrations_result") case *PolicyCmdResult_RevealRegistrationResult: return x.Descriptor().Fields().ByName("reveal_registration_result") case *PolicyCmdResult_FlagHijackAttemptResult: return x.Descriptor().Fields().ByName("flag_hijack_attempt_result") case *PolicyCmdResult_UnarchiveObjectResult: return x.Descriptor().Fields().ByName("unarchive_object_result") } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.PolicyCmdResult", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PolicyCmdResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyCmdResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PolicyCmdResult) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PolicyCmdResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PolicyCmdResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Result.(type) { case *PolicyCmdResult_SetRelationshipResult: if x == nil { break } l = options.Size(x.SetRelationshipResult) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmdResult_DeleteRelationshipResult: if x == nil { break } l = options.Size(x.DeleteRelationshipResult) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmdResult_RegisterObjectResult: if x == nil { break } l = options.Size(x.RegisterObjectResult) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmdResult_ArchiveObjectResult: if x == nil { break } l = options.Size(x.ArchiveObjectResult) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmdResult_CommitRegistrationsResult: if x == nil { break } l = options.Size(x.CommitRegistrationsResult) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmdResult_RevealRegistrationResult: if x == nil { break } l = options.Size(x.RevealRegistrationResult) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmdResult_FlagHijackAttemptResult: if x == nil { break } l = options.Size(x.FlagHijackAttemptResult) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyCmdResult_UnarchiveObjectResult: if x == nil { break } l = options.Size(x.UnarchiveObjectResult) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PolicyCmdResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Result.(type) { case *PolicyCmdResult_SetRelationshipResult: encoded, err := options.Marshal(x.SetRelationshipResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa case *PolicyCmdResult_DeleteRelationshipResult: encoded, err := options.Marshal(x.DeleteRelationshipResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 case *PolicyCmdResult_RegisterObjectResult: encoded, err := options.Marshal(x.RegisterObjectResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a case *PolicyCmdResult_ArchiveObjectResult: encoded, err := options.Marshal(x.ArchiveObjectResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 case *PolicyCmdResult_CommitRegistrationsResult: encoded, err := options.Marshal(x.CommitRegistrationsResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a case *PolicyCmdResult_RevealRegistrationResult: encoded, err := options.Marshal(x.RevealRegistrationResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 case *PolicyCmdResult_FlagHijackAttemptResult: encoded, err := options.Marshal(x.FlagHijackAttemptResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a case *PolicyCmdResult_UnarchiveObjectResult: encoded, err := options.Marshal(x.UnarchiveObjectResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PolicyCmdResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SetRelationshipResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &SetRelationshipCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_SetRelationshipResult{v} iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeleteRelationshipResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &DeleteRelationshipCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_DeleteRelationshipResult{v} iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegisterObjectResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &RegisterObjectCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_RegisterObjectResult{v} iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ArchiveObjectResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &ArchiveObjectCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_ArchiveObjectResult{v} iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitRegistrationsResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &CommitRegistrationsCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_CommitRegistrationsResult{v} iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevealRegistrationResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &RevealRegistrationCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_RevealRegistrationResult{v} iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FlagHijackAttemptResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &FlagHijackAttemptCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_FlagHijackAttemptResult{v} iNdEx = postIndex case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnarchiveObjectResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &UnarchiveObjectCmdResult{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Result = &PolicyCmdResult_UnarchiveObjectResult{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/policy_cmd.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // PolicyCmd models an operation to be performed against the context of a Policy type PolicyCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Cmd: // // *PolicyCmd_SetRelationshipCmd // *PolicyCmd_DeleteRelationshipCmd // *PolicyCmd_RegisterObjectCmd // *PolicyCmd_ArchiveObjectCmd // *PolicyCmd_CommitRegistrationsCmd // *PolicyCmd_RevealRegistrationCmd // *PolicyCmd_FlagHijackAttemptCmd // *PolicyCmd_UnarchiveObjectCmd Cmd isPolicyCmd_Cmd `protobuf_oneof:"cmd"` } func (x *PolicyCmd) Reset() { *x = PolicyCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PolicyCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*PolicyCmd) ProtoMessage() {} // Deprecated: Use PolicyCmd.ProtoReflect.Descriptor instead. func (*PolicyCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{0} } func (x *PolicyCmd) GetCmd() isPolicyCmd_Cmd { if x != nil { return x.Cmd } return nil } func (x *PolicyCmd) GetSetRelationshipCmd() *SetRelationshipCmd { if x, ok := x.GetCmd().(*PolicyCmd_SetRelationshipCmd); ok { return x.SetRelationshipCmd } return nil } func (x *PolicyCmd) GetDeleteRelationshipCmd() *DeleteRelationshipCmd { if x, ok := x.GetCmd().(*PolicyCmd_DeleteRelationshipCmd); ok { return x.DeleteRelationshipCmd } return nil } func (x *PolicyCmd) GetRegisterObjectCmd() *RegisterObjectCmd { if x, ok := x.GetCmd().(*PolicyCmd_RegisterObjectCmd); ok { return x.RegisterObjectCmd } return nil } func (x *PolicyCmd) GetArchiveObjectCmd() *ArchiveObjectCmd { if x, ok := x.GetCmd().(*PolicyCmd_ArchiveObjectCmd); ok { return x.ArchiveObjectCmd } return nil } func (x *PolicyCmd) GetCommitRegistrationsCmd() *CommitRegistrationsCmd { if x, ok := x.GetCmd().(*PolicyCmd_CommitRegistrationsCmd); ok { return x.CommitRegistrationsCmd } return nil } func (x *PolicyCmd) GetRevealRegistrationCmd() *RevealRegistrationCmd { if x, ok := x.GetCmd().(*PolicyCmd_RevealRegistrationCmd); ok { return x.RevealRegistrationCmd } return nil } func (x *PolicyCmd) GetFlagHijackAttemptCmd() *FlagHijackAttemptCmd { if x, ok := x.GetCmd().(*PolicyCmd_FlagHijackAttemptCmd); ok { return x.FlagHijackAttemptCmd } return nil } func (x *PolicyCmd) GetUnarchiveObjectCmd() *UnarchiveObjectCmd { if x, ok := x.GetCmd().(*PolicyCmd_UnarchiveObjectCmd); ok { return x.UnarchiveObjectCmd } return nil } type isPolicyCmd_Cmd interface { isPolicyCmd_Cmd() } type PolicyCmd_SetRelationshipCmd struct { SetRelationshipCmd *SetRelationshipCmd `protobuf:"bytes,1,opt,name=set_relationship_cmd,json=setRelationshipCmd,proto3,oneof"` } type PolicyCmd_DeleteRelationshipCmd struct { DeleteRelationshipCmd *DeleteRelationshipCmd `protobuf:"bytes,2,opt,name=delete_relationship_cmd,json=deleteRelationshipCmd,proto3,oneof"` } type PolicyCmd_RegisterObjectCmd struct { RegisterObjectCmd *RegisterObjectCmd `protobuf:"bytes,3,opt,name=register_object_cmd,json=registerObjectCmd,proto3,oneof"` } type PolicyCmd_ArchiveObjectCmd struct { ArchiveObjectCmd *ArchiveObjectCmd `protobuf:"bytes,4,opt,name=archive_object_cmd,json=archiveObjectCmd,proto3,oneof"` } type PolicyCmd_CommitRegistrationsCmd struct { CommitRegistrationsCmd *CommitRegistrationsCmd `protobuf:"bytes,5,opt,name=commit_registrations_cmd,json=commitRegistrationsCmd,proto3,oneof"` } type PolicyCmd_RevealRegistrationCmd struct { RevealRegistrationCmd *RevealRegistrationCmd `protobuf:"bytes,6,opt,name=reveal_registration_cmd,json=revealRegistrationCmd,proto3,oneof"` } type PolicyCmd_FlagHijackAttemptCmd struct { FlagHijackAttemptCmd *FlagHijackAttemptCmd `protobuf:"bytes,7,opt,name=flag_hijack_attempt_cmd,json=flagHijackAttemptCmd,proto3,oneof"` } type PolicyCmd_UnarchiveObjectCmd struct { UnarchiveObjectCmd *UnarchiveObjectCmd `protobuf:"bytes,8,opt,name=unarchive_object_cmd,json=unarchiveObjectCmd,proto3,oneof"` } func (*PolicyCmd_SetRelationshipCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_DeleteRelationshipCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_RegisterObjectCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_ArchiveObjectCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_CommitRegistrationsCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_RevealRegistrationCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_FlagHijackAttemptCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_UnarchiveObjectCmd) isPolicyCmd_Cmd() {} // SetRelationship creates or updates a Relationship within a Policy // A Relationship is a statement which ties together an object and a subjecto with a "relation", // which means the set of high level rules defined in the Policy will apply to these entities. type SetRelationshipCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Relationship *types.Relationship `protobuf:"bytes,1,opt,name=relationship,proto3" json:"relationship,omitempty"` } func (x *SetRelationshipCmd) Reset() { *x = SetRelationshipCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetRelationshipCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetRelationshipCmd) ProtoMessage() {} // Deprecated: Use SetRelationshipCmd.ProtoReflect.Descriptor instead. func (*SetRelationshipCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{1} } func (x *SetRelationshipCmd) GetRelationship() *types.Relationship { if x != nil { return x.Relationship } return nil } // DelereRelationship removes a Relationship from a Policy. // If the Relationship was not found in a Policy, this Cmd is a no-op. type DeleteRelationshipCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Relationship *types.Relationship `protobuf:"bytes,1,opt,name=relationship,proto3" json:"relationship,omitempty"` } func (x *DeleteRelationshipCmd) Reset() { *x = DeleteRelationshipCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteRelationshipCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteRelationshipCmd) ProtoMessage() {} // Deprecated: Use DeleteRelationshipCmd.ProtoReflect.Descriptor instead. func (*DeleteRelationshipCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{2} } func (x *DeleteRelationshipCmd) GetRelationship() *types.Relationship { if x != nil { return x.Relationship } return nil } // RegisterObject creates a special kind of Relationship within a Policy which ties // the msg's Actor as the owner of the msg's Object. // The Owner has complete control over the set of subjects that are related to their Object, // giving them autonomy to share the object and revoke acces to the object, // much like owners in a Discretionary Access Control model. // // Attempting to register a previously registered Object is an error, // Object IDs are therefore assumed to be unique within a Policy. type RegisterObjectCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` } func (x *RegisterObjectCmd) Reset() { *x = RegisterObjectCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegisterObjectCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegisterObjectCmd) ProtoMessage() {} // Deprecated: Use RegisterObjectCmd.ProtoReflect.Descriptor instead. func (*RegisterObjectCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{3} } func (x *RegisterObjectCmd) GetObject() *types.Object { if x != nil { return x.Object } return nil } // CommitRegistrationsCmd creates a new batched commitment to a set of Object registrations type CommitRegistrationsCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` } func (x *CommitRegistrationsCmd) Reset() { *x = CommitRegistrationsCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CommitRegistrationsCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*CommitRegistrationsCmd) ProtoMessage() {} // Deprecated: Use CommitRegistrationsCmd.ProtoReflect.Descriptor instead. func (*CommitRegistrationsCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{4} } func (x *CommitRegistrationsCmd) GetCommitment() []byte { if x != nil { return x.Commitment } return nil } type CommitRegistrationsCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RegistrationsCommitment *RegistrationsCommitment `protobuf:"bytes,1,opt,name=registrations_commitment,json=registrationsCommitment,proto3" json:"registrations_commitment,omitempty"` } func (x *CommitRegistrationsCmdResult) Reset() { *x = CommitRegistrationsCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CommitRegistrationsCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*CommitRegistrationsCmdResult) ProtoMessage() {} // Deprecated: Use CommitRegistrationsCmdResult.ProtoReflect.Descriptor instead. func (*CommitRegistrationsCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{5} } func (x *CommitRegistrationsCmdResult) GetRegistrationsCommitment() *RegistrationsCommitment { if x != nil { return x.RegistrationsCommitment } return nil } type RevealRegistrationCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RegistrationsCommitmentId uint64 `protobuf:"varint,1,opt,name=registrations_commitment_id,json=registrationsCommitmentId,proto3" json:"registrations_commitment_id,omitempty"` Proof *RegistrationProof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` } func (x *RevealRegistrationCmd) Reset() { *x = RevealRegistrationCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RevealRegistrationCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*RevealRegistrationCmd) ProtoMessage() {} // Deprecated: Use RevealRegistrationCmd.ProtoReflect.Descriptor instead. func (*RevealRegistrationCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{6} } func (x *RevealRegistrationCmd) GetRegistrationsCommitmentId() uint64 { if x != nil { return x.RegistrationsCommitmentId } return 0 } func (x *RevealRegistrationCmd) GetProof() *RegistrationProof { if x != nil { return x.Proof } return nil } type RevealRegistrationCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` Event *AmendmentEvent `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` } func (x *RevealRegistrationCmdResult) Reset() { *x = RevealRegistrationCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RevealRegistrationCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*RevealRegistrationCmdResult) ProtoMessage() {} // Deprecated: Use RevealRegistrationCmdResult.ProtoReflect.Descriptor instead. func (*RevealRegistrationCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{7} } func (x *RevealRegistrationCmdResult) GetRecord() *RelationshipRecord { if x != nil { return x.Record } return nil } func (x *RevealRegistrationCmdResult) GetEvent() *AmendmentEvent { if x != nil { return x.Event } return nil } type FlagHijackAttemptCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields EventId uint64 `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` } func (x *FlagHijackAttemptCmd) Reset() { *x = FlagHijackAttemptCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FlagHijackAttemptCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*FlagHijackAttemptCmd) ProtoMessage() {} // Deprecated: Use FlagHijackAttemptCmd.ProtoReflect.Descriptor instead. func (*FlagHijackAttemptCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{8} } func (x *FlagHijackAttemptCmd) GetEventId() uint64 { if x != nil { return x.EventId } return 0 } type FlagHijackAttemptCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Event *AmendmentEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` } func (x *FlagHijackAttemptCmdResult) Reset() { *x = FlagHijackAttemptCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FlagHijackAttemptCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*FlagHijackAttemptCmdResult) ProtoMessage() {} // Deprecated: Use FlagHijackAttemptCmdResult.ProtoReflect.Descriptor instead. func (*FlagHijackAttemptCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{9} } func (x *FlagHijackAttemptCmdResult) GetEvent() *AmendmentEvent { if x != nil { return x.Event } return nil } type UnarchiveObjectCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` } func (x *UnarchiveObjectCmd) Reset() { *x = UnarchiveObjectCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnarchiveObjectCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnarchiveObjectCmd) ProtoMessage() {} // Deprecated: Use UnarchiveObjectCmd.ProtoReflect.Descriptor instead. func (*UnarchiveObjectCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{10} } func (x *UnarchiveObjectCmd) GetObject() *types.Object { if x != nil { return x.Object } return nil } type UnarchiveObjectCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` RelationshipModified bool `protobuf:"varint,2,opt,name=relationship_modified,json=relationshipModified,proto3" json:"relationship_modified,omitempty"` } func (x *UnarchiveObjectCmdResult) Reset() { *x = UnarchiveObjectCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnarchiveObjectCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnarchiveObjectCmdResult) ProtoMessage() {} // Deprecated: Use UnarchiveObjectCmdResult.ProtoReflect.Descriptor instead. func (*UnarchiveObjectCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{11} } func (x *UnarchiveObjectCmdResult) GetRecord() *RelationshipRecord { if x != nil { return x.Record } return nil } func (x *UnarchiveObjectCmdResult) GetRelationshipModified() bool { if x != nil { return x.RelationshipModified } return false } // ArchiveObject let's an Object's Owner effectively "unshare" their Object. // This method wipes all Relationships referencing the given Object. // // A caveat is that after removing the Relationships, a record of the original Object owner // is maintained to prevent an "ownership hijack" attack. // // Suppose Bob owns object Foo, which is shared with Bob but not Eve. // Eve wants to access Foo but was not given permission to, they could "hijack" Bob's object by waiting for Bob to Archive Foo, // then submitting a RegisterObject Msg, effectively becoming Foo's new owner. // If Charlie has a copy of the object, Eve could convince Charlie to share his copy, granting Eve access to Foo. // The previous scenario where an unauthorized user is able to claim ownership to data previously unaccessible to them // is an "ownership hijack". type ArchiveObjectCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` } func (x *ArchiveObjectCmd) Reset() { *x = ArchiveObjectCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ArchiveObjectCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*ArchiveObjectCmd) ProtoMessage() {} // Deprecated: Use ArchiveObjectCmd.ProtoReflect.Descriptor instead. func (*ArchiveObjectCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{12} } func (x *ArchiveObjectCmd) GetObject() *types.Object { if x != nil { return x.Object } return nil } // SetRelationshipCmd sets a Relationship in a Policy type SetRelationshipCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Indicates whether the given Relationship previously existed, ie the Tx was a no op RecordExisted bool `protobuf:"varint,1,opt,name=record_existed,json=recordExisted,proto3" json:"record_existed,omitempty"` Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (x *SetRelationshipCmdResult) Reset() { *x = SetRelationshipCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetRelationshipCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetRelationshipCmdResult) ProtoMessage() {} // Deprecated: Use SetRelationshipCmdResult.ProtoReflect.Descriptor instead. func (*SetRelationshipCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{13} } func (x *SetRelationshipCmdResult) GetRecordExisted() bool { if x != nil { return x.RecordExisted } return false } func (x *SetRelationshipCmdResult) GetRecord() *RelationshipRecord { if x != nil { return x.Record } return nil } // DeleteRelationshipCmdResult removes a Relationship in a Policy type DeleteRelationshipCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RecordFound bool `protobuf:"varint,1,opt,name=record_found,json=recordFound,proto3" json:"record_found,omitempty"` } func (x *DeleteRelationshipCmdResult) Reset() { *x = DeleteRelationshipCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteRelationshipCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteRelationshipCmdResult) ProtoMessage() {} // Deprecated: Use DeleteRelationshipCmdResult.ProtoReflect.Descriptor instead. func (*DeleteRelationshipCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{14} } func (x *DeleteRelationshipCmdResult) GetRecordFound() bool { if x != nil { return x.RecordFound } return false } // RegisterObjectCmdResult registers an Object in a Policy type RegisterObjectCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (x *RegisterObjectCmdResult) Reset() { *x = RegisterObjectCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegisterObjectCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegisterObjectCmdResult) ProtoMessage() {} // Deprecated: Use RegisterObjectCmdResult.ProtoReflect.Descriptor instead. func (*RegisterObjectCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{15} } func (x *RegisterObjectCmdResult) GetRecord() *RelationshipRecord { if x != nil { return x.Record } return nil } // ArchiveObjectCmdResult unregisters an Object in a Policy type ArchiveObjectCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` RelationshipsRemoved uint64 `protobuf:"varint,2,opt,name=relationships_removed,json=relationshipsRemoved,proto3" json:"relationships_removed,omitempty"` } func (x *ArchiveObjectCmdResult) Reset() { *x = ArchiveObjectCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ArchiveObjectCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*ArchiveObjectCmdResult) ProtoMessage() {} // Deprecated: Use ArchiveObjectCmdResult.ProtoReflect.Descriptor instead. func (*ArchiveObjectCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{16} } func (x *ArchiveObjectCmdResult) GetFound() bool { if x != nil { return x.Found } return false } func (x *ArchiveObjectCmdResult) GetRelationshipsRemoved() uint64 { if x != nil { return x.RelationshipsRemoved } return 0 } type PolicyCmdResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Result: // // *PolicyCmdResult_SetRelationshipResult // *PolicyCmdResult_DeleteRelationshipResult // *PolicyCmdResult_RegisterObjectResult // *PolicyCmdResult_ArchiveObjectResult // *PolicyCmdResult_CommitRegistrationsResult // *PolicyCmdResult_RevealRegistrationResult // *PolicyCmdResult_FlagHijackAttemptResult // *PolicyCmdResult_UnarchiveObjectResult Result isPolicyCmdResult_Result `protobuf_oneof:"result"` } func (x *PolicyCmdResult) Reset() { *x = PolicyCmdResult{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_policy_cmd_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PolicyCmdResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*PolicyCmdResult) ProtoMessage() {} // Deprecated: Use PolicyCmdResult.ProtoReflect.Descriptor instead. func (*PolicyCmdResult) Descriptor() ([]byte, []int) { return file_sourcehub_acp_policy_cmd_proto_rawDescGZIP(), []int{17} } func (x *PolicyCmdResult) GetResult() isPolicyCmdResult_Result { if x != nil { return x.Result } return nil } func (x *PolicyCmdResult) GetSetRelationshipResult() *SetRelationshipCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_SetRelationshipResult); ok { return x.SetRelationshipResult } return nil } func (x *PolicyCmdResult) GetDeleteRelationshipResult() *DeleteRelationshipCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_DeleteRelationshipResult); ok { return x.DeleteRelationshipResult } return nil } func (x *PolicyCmdResult) GetRegisterObjectResult() *RegisterObjectCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_RegisterObjectResult); ok { return x.RegisterObjectResult } return nil } func (x *PolicyCmdResult) GetArchiveObjectResult() *ArchiveObjectCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_ArchiveObjectResult); ok { return x.ArchiveObjectResult } return nil } func (x *PolicyCmdResult) GetCommitRegistrationsResult() *CommitRegistrationsCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_CommitRegistrationsResult); ok { return x.CommitRegistrationsResult } return nil } func (x *PolicyCmdResult) GetRevealRegistrationResult() *RevealRegistrationCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_RevealRegistrationResult); ok { return x.RevealRegistrationResult } return nil } func (x *PolicyCmdResult) GetFlagHijackAttemptResult() *FlagHijackAttemptCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_FlagHijackAttemptResult); ok { return x.FlagHijackAttemptResult } return nil } func (x *PolicyCmdResult) GetUnarchiveObjectResult() *UnarchiveObjectCmdResult { if x, ok := x.GetResult().(*PolicyCmdResult_UnarchiveObjectResult); ok { return x.UnarchiveObjectResult } return nil } type isPolicyCmdResult_Result interface { isPolicyCmdResult_Result() } type PolicyCmdResult_SetRelationshipResult struct { SetRelationshipResult *SetRelationshipCmdResult `protobuf:"bytes,1,opt,name=set_relationship_result,json=setRelationshipResult,proto3,oneof"` } type PolicyCmdResult_DeleteRelationshipResult struct { DeleteRelationshipResult *DeleteRelationshipCmdResult `protobuf:"bytes,2,opt,name=delete_relationship_result,json=deleteRelationshipResult,proto3,oneof"` } type PolicyCmdResult_RegisterObjectResult struct { RegisterObjectResult *RegisterObjectCmdResult `protobuf:"bytes,3,opt,name=register_object_result,json=registerObjectResult,proto3,oneof"` } type PolicyCmdResult_ArchiveObjectResult struct { ArchiveObjectResult *ArchiveObjectCmdResult `protobuf:"bytes,4,opt,name=archive_object_result,json=archiveObjectResult,proto3,oneof"` } type PolicyCmdResult_CommitRegistrationsResult struct { CommitRegistrationsResult *CommitRegistrationsCmdResult `protobuf:"bytes,5,opt,name=commit_registrations_result,json=commitRegistrationsResult,proto3,oneof"` } type PolicyCmdResult_RevealRegistrationResult struct { RevealRegistrationResult *RevealRegistrationCmdResult `protobuf:"bytes,6,opt,name=reveal_registration_result,json=revealRegistrationResult,proto3,oneof"` } type PolicyCmdResult_FlagHijackAttemptResult struct { FlagHijackAttemptResult *FlagHijackAttemptCmdResult `protobuf:"bytes,7,opt,name=flag_hijack_attempt_result,json=flagHijackAttemptResult,proto3,oneof"` } type PolicyCmdResult_UnarchiveObjectResult struct { UnarchiveObjectResult *UnarchiveObjectCmdResult `protobuf:"bytes,8,opt,name=unarchive_object_result,json=unarchiveObjectResult,proto3,oneof"` } func (*PolicyCmdResult_SetRelationshipResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_DeleteRelationshipResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_RegisterObjectResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_ArchiveObjectResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_CommitRegistrationsResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_RevealRegistrationResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_FlagHijackAttemptResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_UnarchiveObjectResult) isPolicyCmdResult_Result() {} var File_sourcehub_acp_policy_cmd_proto protoreflect.FileDescriptor var file_sourcehub_acp_policy_cmd_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x05, 0x0a, 0x09, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x55, 0x0a, 0x14, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x12, 0x5e, 0x0a, 0x17, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x15, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x12, 0x52, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x12, 0x4f, 0x0a, 0x12, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x10, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x12, 0x61, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6d, 0x64, 0x12, 0x5e, 0x0a, 0x17, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x15, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6d, 0x64, 0x12, 0x5c, 0x0a, 0x17, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x68, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x14, 0x66, 0x6c, 0x61, 0x67, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6d, 0x64, 0x12, 0x55, 0x0a, 0x14, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6d, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x48, 0x00, 0x52, 0x12, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x42, 0x05, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x5e, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0x61, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0x4b, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6d, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x1c, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x61, 0x0a, 0x18, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6d, 0x64, 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x8d, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x31, 0x0a, 0x14, 0x46, 0x6c, 0x61, 0x67, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6d, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x51, 0x0a, 0x1a, 0x46, 0x6c, 0x61, 0x67, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x4c, 0x0a, 0x12, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x8a, 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x4a, 0x0a, 0x10, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7c, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x40, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x54, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x63, 0x0a, 0x16, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0xcf, 0x06, 0x0a, 0x0f, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x61, 0x0a, 0x17, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x15, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x6a, 0x0a, 0x1a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x18, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x5e, 0x0a, 0x16, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x5b, 0x0a, 0x15, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x13, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x6d, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x6a, 0x0a, 0x1a, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x18, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x68, 0x0a, 0x1a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x68, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x17, 0x66, 0x6c, 0x61, 0x67, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x61, 0x0a, 0x17, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x15, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x98, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x0e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_policy_cmd_proto_rawDescOnce sync.Once file_sourcehub_acp_policy_cmd_proto_rawDescData = file_sourcehub_acp_policy_cmd_proto_rawDesc ) func file_sourcehub_acp_policy_cmd_proto_rawDescGZIP() []byte { file_sourcehub_acp_policy_cmd_proto_rawDescOnce.Do(func() { file_sourcehub_acp_policy_cmd_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_policy_cmd_proto_rawDescData) }) return file_sourcehub_acp_policy_cmd_proto_rawDescData } var file_sourcehub_acp_policy_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_sourcehub_acp_policy_cmd_proto_goTypes = []interface{}{ (*PolicyCmd)(nil), // 0: sourcehub.acp.PolicyCmd (*SetRelationshipCmd)(nil), // 1: sourcehub.acp.SetRelationshipCmd (*DeleteRelationshipCmd)(nil), // 2: sourcehub.acp.DeleteRelationshipCmd (*RegisterObjectCmd)(nil), // 3: sourcehub.acp.RegisterObjectCmd (*CommitRegistrationsCmd)(nil), // 4: sourcehub.acp.CommitRegistrationsCmd (*CommitRegistrationsCmdResult)(nil), // 5: sourcehub.acp.CommitRegistrationsCmdResult (*RevealRegistrationCmd)(nil), // 6: sourcehub.acp.RevealRegistrationCmd (*RevealRegistrationCmdResult)(nil), // 7: sourcehub.acp.RevealRegistrationCmdResult (*FlagHijackAttemptCmd)(nil), // 8: sourcehub.acp.FlagHijackAttemptCmd (*FlagHijackAttemptCmdResult)(nil), // 9: sourcehub.acp.FlagHijackAttemptCmdResult (*UnarchiveObjectCmd)(nil), // 10: sourcehub.acp.UnarchiveObjectCmd (*UnarchiveObjectCmdResult)(nil), // 11: sourcehub.acp.UnarchiveObjectCmdResult (*ArchiveObjectCmd)(nil), // 12: sourcehub.acp.ArchiveObjectCmd (*SetRelationshipCmdResult)(nil), // 13: sourcehub.acp.SetRelationshipCmdResult (*DeleteRelationshipCmdResult)(nil), // 14: sourcehub.acp.DeleteRelationshipCmdResult (*RegisterObjectCmdResult)(nil), // 15: sourcehub.acp.RegisterObjectCmdResult (*ArchiveObjectCmdResult)(nil), // 16: sourcehub.acp.ArchiveObjectCmdResult (*PolicyCmdResult)(nil), // 17: sourcehub.acp.PolicyCmdResult (*types.Relationship)(nil), // 18: sourcenetwork.acp_core.Relationship (*types.Object)(nil), // 19: sourcenetwork.acp_core.Object (*RegistrationsCommitment)(nil), // 20: sourcehub.acp.RegistrationsCommitment (*RegistrationProof)(nil), // 21: sourcehub.acp.RegistrationProof (*RelationshipRecord)(nil), // 22: sourcehub.acp.RelationshipRecord (*AmendmentEvent)(nil), // 23: sourcehub.acp.AmendmentEvent } var file_sourcehub_acp_policy_cmd_proto_depIdxs = []int32{ 1, // 0: sourcehub.acp.PolicyCmd.set_relationship_cmd:type_name -> sourcehub.acp.SetRelationshipCmd 2, // 1: sourcehub.acp.PolicyCmd.delete_relationship_cmd:type_name -> sourcehub.acp.DeleteRelationshipCmd 3, // 2: sourcehub.acp.PolicyCmd.register_object_cmd:type_name -> sourcehub.acp.RegisterObjectCmd 12, // 3: sourcehub.acp.PolicyCmd.archive_object_cmd:type_name -> sourcehub.acp.ArchiveObjectCmd 4, // 4: sourcehub.acp.PolicyCmd.commit_registrations_cmd:type_name -> sourcehub.acp.CommitRegistrationsCmd 6, // 5: sourcehub.acp.PolicyCmd.reveal_registration_cmd:type_name -> sourcehub.acp.RevealRegistrationCmd 8, // 6: sourcehub.acp.PolicyCmd.flag_hijack_attempt_cmd:type_name -> sourcehub.acp.FlagHijackAttemptCmd 10, // 7: sourcehub.acp.PolicyCmd.unarchive_object_cmd:type_name -> sourcehub.acp.UnarchiveObjectCmd 18, // 8: sourcehub.acp.SetRelationshipCmd.relationship:type_name -> sourcenetwork.acp_core.Relationship 18, // 9: sourcehub.acp.DeleteRelationshipCmd.relationship:type_name -> sourcenetwork.acp_core.Relationship 19, // 10: sourcehub.acp.RegisterObjectCmd.object:type_name -> sourcenetwork.acp_core.Object 20, // 11: sourcehub.acp.CommitRegistrationsCmdResult.registrations_commitment:type_name -> sourcehub.acp.RegistrationsCommitment 21, // 12: sourcehub.acp.RevealRegistrationCmd.proof:type_name -> sourcehub.acp.RegistrationProof 22, // 13: sourcehub.acp.RevealRegistrationCmdResult.record:type_name -> sourcehub.acp.RelationshipRecord 23, // 14: sourcehub.acp.RevealRegistrationCmdResult.event:type_name -> sourcehub.acp.AmendmentEvent 23, // 15: sourcehub.acp.FlagHijackAttemptCmdResult.event:type_name -> sourcehub.acp.AmendmentEvent 19, // 16: sourcehub.acp.UnarchiveObjectCmd.object:type_name -> sourcenetwork.acp_core.Object 22, // 17: sourcehub.acp.UnarchiveObjectCmdResult.record:type_name -> sourcehub.acp.RelationshipRecord 19, // 18: sourcehub.acp.ArchiveObjectCmd.object:type_name -> sourcenetwork.acp_core.Object 22, // 19: sourcehub.acp.SetRelationshipCmdResult.record:type_name -> sourcehub.acp.RelationshipRecord 22, // 20: sourcehub.acp.RegisterObjectCmdResult.record:type_name -> sourcehub.acp.RelationshipRecord 13, // 21: sourcehub.acp.PolicyCmdResult.set_relationship_result:type_name -> sourcehub.acp.SetRelationshipCmdResult 14, // 22: sourcehub.acp.PolicyCmdResult.delete_relationship_result:type_name -> sourcehub.acp.DeleteRelationshipCmdResult 15, // 23: sourcehub.acp.PolicyCmdResult.register_object_result:type_name -> sourcehub.acp.RegisterObjectCmdResult 16, // 24: sourcehub.acp.PolicyCmdResult.archive_object_result:type_name -> sourcehub.acp.ArchiveObjectCmdResult 5, // 25: sourcehub.acp.PolicyCmdResult.commit_registrations_result:type_name -> sourcehub.acp.CommitRegistrationsCmdResult 7, // 26: sourcehub.acp.PolicyCmdResult.reveal_registration_result:type_name -> sourcehub.acp.RevealRegistrationCmdResult 9, // 27: sourcehub.acp.PolicyCmdResult.flag_hijack_attempt_result:type_name -> sourcehub.acp.FlagHijackAttemptCmdResult 11, // 28: sourcehub.acp.PolicyCmdResult.unarchive_object_result:type_name -> sourcehub.acp.UnarchiveObjectCmdResult 29, // [29:29] is the sub-list for method output_type 29, // [29:29] is the sub-list for method input_type 29, // [29:29] is the sub-list for extension type_name 29, // [29:29] is the sub-list for extension extendee 0, // [0:29] is the sub-list for field type_name } func init() { file_sourcehub_acp_policy_cmd_proto_init() } func file_sourcehub_acp_policy_cmd_proto_init() { if File_sourcehub_acp_policy_cmd_proto != nil { return } file_sourcehub_acp_commitment_proto_init() file_sourcehub_acp_record_proto_init() file_sourcehub_acp_registration_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_policy_cmd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolicyCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetRelationshipCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRelationshipCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterObjectCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommitRegistrationsCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommitRegistrationsCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RevealRegistrationCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RevealRegistrationCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlagHijackAttemptCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlagHijackAttemptCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnarchiveObjectCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnarchiveObjectCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArchiveObjectCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetRelationshipCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRelationshipCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterObjectCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArchiveObjectCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_policy_cmd_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolicyCmdResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_sourcehub_acp_policy_cmd_proto_msgTypes[0].OneofWrappers = []interface{}{ (*PolicyCmd_SetRelationshipCmd)(nil), (*PolicyCmd_DeleteRelationshipCmd)(nil), (*PolicyCmd_RegisterObjectCmd)(nil), (*PolicyCmd_ArchiveObjectCmd)(nil), (*PolicyCmd_CommitRegistrationsCmd)(nil), (*PolicyCmd_RevealRegistrationCmd)(nil), (*PolicyCmd_FlagHijackAttemptCmd)(nil), (*PolicyCmd_UnarchiveObjectCmd)(nil), } file_sourcehub_acp_policy_cmd_proto_msgTypes[17].OneofWrappers = []interface{}{ (*PolicyCmdResult_SetRelationshipResult)(nil), (*PolicyCmdResult_DeleteRelationshipResult)(nil), (*PolicyCmdResult_RegisterObjectResult)(nil), (*PolicyCmdResult_ArchiveObjectResult)(nil), (*PolicyCmdResult_CommitRegistrationsResult)(nil), (*PolicyCmdResult_RevealRegistrationResult)(nil), (*PolicyCmdResult_FlagHijackAttemptResult)(nil), (*PolicyCmdResult_UnarchiveObjectResult)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_policy_cmd_proto_rawDesc, NumEnums: 0, NumMessages: 18, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_policy_cmd_proto_goTypes, DependencyIndexes: file_sourcehub_acp_policy_cmd_proto_depIdxs, MessageInfos: file_sourcehub_acp_policy_cmd_proto_msgTypes, }.Build() File_sourcehub_acp_policy_cmd_proto = out.File file_sourcehub_acp_policy_cmd_proto_rawDesc = nil file_sourcehub_acp_policy_cmd_proto_goTypes = nil file_sourcehub_acp_policy_cmd_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/query.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" types "github.com/sourcenetwork/acp_core/pkg/pulsar/types" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryParamsRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryParamsRequest") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) type fastReflection_QueryParamsRequest QueryParamsRequest func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(x) } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} type fastReflection_QueryParamsRequest_messageType struct{} func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(nil) } func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryParamsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { return (*QueryParamsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryParamsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryParamsResponse protoreflect.MessageDescriptor fd_QueryParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryParamsResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryParamsResponse") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) type fastReflection_QueryParamsResponse QueryParamsResponse func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(x) } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} type fastReflection_QueryParamsResponse_messageType struct{} func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(nil) } func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { return (*QueryParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_QueryParamsResponse_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryParamsResponse.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryParamsResponse.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryParamsResponse.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryPolicyRequest protoreflect.MessageDescriptor fd_QueryPolicyRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryPolicyRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryPolicyRequest") fd_QueryPolicyRequest_id = md_QueryPolicyRequest.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_QueryPolicyRequest)(nil) type fastReflection_QueryPolicyRequest QueryPolicyRequest func (x *QueryPolicyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPolicyRequest)(x) } func (x *QueryPolicyRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPolicyRequest_messageType fastReflection_QueryPolicyRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryPolicyRequest_messageType{} type fastReflection_QueryPolicyRequest_messageType struct{} func (x fastReflection_QueryPolicyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPolicyRequest)(nil) } func (x fastReflection_QueryPolicyRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryPolicyRequest) } func (x fastReflection_QueryPolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPolicyRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPolicyRequest) Type() protoreflect.MessageType { return _fastReflection_QueryPolicyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPolicyRequest) New() protoreflect.Message { return new(fastReflection_QueryPolicyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPolicyRequest) Interface() protoreflect.ProtoMessage { return (*QueryPolicyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_QueryPolicyRequest_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryPolicyRequest.id": return x.Id != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyRequest.id": x.Id = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryPolicyRequest.id": value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyRequest.id": x.Id = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyRequest.id": panic(fmt.Errorf("field id of message sourcehub.acp.QueryPolicyRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyRequest.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryPolicyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPolicyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPolicyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPolicyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPolicyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryPolicyResponse protoreflect.MessageDescriptor fd_QueryPolicyResponse_record protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryPolicyResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryPolicyResponse") fd_QueryPolicyResponse_record = md_QueryPolicyResponse.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_QueryPolicyResponse)(nil) type fastReflection_QueryPolicyResponse QueryPolicyResponse func (x *QueryPolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPolicyResponse)(x) } func (x *QueryPolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPolicyResponse_messageType fastReflection_QueryPolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryPolicyResponse_messageType{} type fastReflection_QueryPolicyResponse_messageType struct{} func (x fastReflection_QueryPolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPolicyResponse)(nil) } func (x fastReflection_QueryPolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryPolicyResponse) } func (x fastReflection_QueryPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPolicyResponse) Type() protoreflect.MessageType { return _fastReflection_QueryPolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPolicyResponse) New() protoreflect.Message { return new(fastReflection_QueryPolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPolicyResponse) Interface() protoreflect.ProtoMessage { return (*QueryPolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_QueryPolicyResponse_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryPolicyResponse.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyResponse.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryPolicyResponse.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyResponse.record": x.Record = value.Message().Interface().(*PolicyRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyResponse.record": if x.Record == nil { x.Record = new(PolicyRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyResponse.record": m := new(PolicyRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryPolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &PolicyRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryPolicyIdsRequest protoreflect.MessageDescriptor fd_QueryPolicyIdsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryPolicyIdsRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryPolicyIdsRequest") fd_QueryPolicyIdsRequest_pagination = md_QueryPolicyIdsRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryPolicyIdsRequest)(nil) type fastReflection_QueryPolicyIdsRequest QueryPolicyIdsRequest func (x *QueryPolicyIdsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPolicyIdsRequest)(x) } func (x *QueryPolicyIdsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPolicyIdsRequest_messageType fastReflection_QueryPolicyIdsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryPolicyIdsRequest_messageType{} type fastReflection_QueryPolicyIdsRequest_messageType struct{} func (x fastReflection_QueryPolicyIdsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPolicyIdsRequest)(nil) } func (x fastReflection_QueryPolicyIdsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryPolicyIdsRequest) } func (x fastReflection_QueryPolicyIdsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyIdsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPolicyIdsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyIdsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPolicyIdsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryPolicyIdsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPolicyIdsRequest) New() protoreflect.Message { return new(fastReflection_QueryPolicyIdsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPolicyIdsRequest) Interface() protoreflect.ProtoMessage { return (*QueryPolicyIdsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPolicyIdsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryPolicyIdsRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPolicyIdsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPolicyIdsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryPolicyIdsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPolicyIdsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPolicyIdsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryPolicyIdsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPolicyIdsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPolicyIdsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPolicyIdsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPolicyIdsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyIdsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyIdsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyIdsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyIdsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryPolicyIdsResponse_1_list)(nil) type _QueryPolicyIdsResponse_1_list struct { list *[]string } func (x *_QueryPolicyIdsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryPolicyIdsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } func (x *_QueryPolicyIdsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_QueryPolicyIdsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_QueryPolicyIdsResponse_1_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message QueryPolicyIdsResponse at list field Ids as it is not of Message kind")) } func (x *_QueryPolicyIdsResponse_1_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_QueryPolicyIdsResponse_1_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_QueryPolicyIdsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryPolicyIdsResponse protoreflect.MessageDescriptor fd_QueryPolicyIdsResponse_ids protoreflect.FieldDescriptor fd_QueryPolicyIdsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryPolicyIdsResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryPolicyIdsResponse") fd_QueryPolicyIdsResponse_ids = md_QueryPolicyIdsResponse.Fields().ByName("ids") fd_QueryPolicyIdsResponse_pagination = md_QueryPolicyIdsResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryPolicyIdsResponse)(nil) type fastReflection_QueryPolicyIdsResponse QueryPolicyIdsResponse func (x *QueryPolicyIdsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPolicyIdsResponse)(x) } func (x *QueryPolicyIdsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPolicyIdsResponse_messageType fastReflection_QueryPolicyIdsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryPolicyIdsResponse_messageType{} type fastReflection_QueryPolicyIdsResponse_messageType struct{} func (x fastReflection_QueryPolicyIdsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPolicyIdsResponse)(nil) } func (x fastReflection_QueryPolicyIdsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryPolicyIdsResponse) } func (x fastReflection_QueryPolicyIdsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyIdsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPolicyIdsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryPolicyIdsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPolicyIdsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryPolicyIdsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPolicyIdsResponse) New() protoreflect.Message { return new(fastReflection_QueryPolicyIdsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPolicyIdsResponse) Interface() protoreflect.ProtoMessage { return (*QueryPolicyIdsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPolicyIdsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Ids) != 0 { value := protoreflect.ValueOfList(&_QueryPolicyIdsResponse_1_list{list: &x.Ids}) if !f(fd_QueryPolicyIdsResponse_ids, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryPolicyIdsResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPolicyIdsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsResponse.ids": return len(x.Ids) != 0 case "sourcehub.acp.QueryPolicyIdsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsResponse.ids": x.Ids = nil case "sourcehub.acp.QueryPolicyIdsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPolicyIdsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryPolicyIdsResponse.ids": if len(x.Ids) == 0 { return protoreflect.ValueOfList(&_QueryPolicyIdsResponse_1_list{}) } listValue := &_QueryPolicyIdsResponse_1_list{list: &x.Ids} return protoreflect.ValueOfList(listValue) case "sourcehub.acp.QueryPolicyIdsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsResponse.ids": lv := value.List() clv := lv.(*_QueryPolicyIdsResponse_1_list) x.Ids = *clv.list case "sourcehub.acp.QueryPolicyIdsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsResponse.ids": if x.Ids == nil { x.Ids = []string{} } value := &_QueryPolicyIdsResponse_1_list{list: &x.Ids} return protoreflect.ValueOfList(value) case "sourcehub.acp.QueryPolicyIdsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPolicyIdsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryPolicyIdsResponse.ids": list := []string{} return protoreflect.ValueOfList(&_QueryPolicyIdsResponse_1_list{list: &list}) case "sourcehub.acp.QueryPolicyIdsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryPolicyIdsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryPolicyIdsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPolicyIdsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryPolicyIdsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPolicyIdsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPolicyIdsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPolicyIdsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPolicyIdsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPolicyIdsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Ids) > 0 { for _, s := range x.Ids { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyIdsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Ids) > 0 { for iNdEx := len(x.Ids) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.Ids[iNdEx]) copy(dAtA[i:], x.Ids[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Ids[iNdEx]))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPolicyIdsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyIdsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPolicyIdsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Ids = append(x.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryFilterRelationshipsRequest protoreflect.MessageDescriptor fd_QueryFilterRelationshipsRequest_policy_id protoreflect.FieldDescriptor fd_QueryFilterRelationshipsRequest_selector protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryFilterRelationshipsRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryFilterRelationshipsRequest") fd_QueryFilterRelationshipsRequest_policy_id = md_QueryFilterRelationshipsRequest.Fields().ByName("policy_id") fd_QueryFilterRelationshipsRequest_selector = md_QueryFilterRelationshipsRequest.Fields().ByName("selector") } var _ protoreflect.Message = (*fastReflection_QueryFilterRelationshipsRequest)(nil) type fastReflection_QueryFilterRelationshipsRequest QueryFilterRelationshipsRequest func (x *QueryFilterRelationshipsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryFilterRelationshipsRequest)(x) } func (x *QueryFilterRelationshipsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryFilterRelationshipsRequest_messageType fastReflection_QueryFilterRelationshipsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryFilterRelationshipsRequest_messageType{} type fastReflection_QueryFilterRelationshipsRequest_messageType struct{} func (x fastReflection_QueryFilterRelationshipsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryFilterRelationshipsRequest)(nil) } func (x fastReflection_QueryFilterRelationshipsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryFilterRelationshipsRequest) } func (x fastReflection_QueryFilterRelationshipsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryFilterRelationshipsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryFilterRelationshipsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryFilterRelationshipsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryFilterRelationshipsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryFilterRelationshipsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryFilterRelationshipsRequest) New() protoreflect.Message { return new(fastReflection_QueryFilterRelationshipsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryFilterRelationshipsRequest) Interface() protoreflect.ProtoMessage { return (*QueryFilterRelationshipsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryFilterRelationshipsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_QueryFilterRelationshipsRequest_policy_id, value) { return } } if x.Selector != nil { value := protoreflect.ValueOfMessage(x.Selector.ProtoReflect()) if !f(fd_QueryFilterRelationshipsRequest_selector, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryFilterRelationshipsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsRequest.policy_id": return x.PolicyId != "" case "sourcehub.acp.QueryFilterRelationshipsRequest.selector": return x.Selector != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsRequest.policy_id": x.PolicyId = "" case "sourcehub.acp.QueryFilterRelationshipsRequest.selector": x.Selector = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryFilterRelationshipsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryFilterRelationshipsRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.QueryFilterRelationshipsRequest.selector": value := x.Selector return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.QueryFilterRelationshipsRequest.selector": x.Selector = value.Message().Interface().(*types.RelationshipSelector) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsRequest.selector": if x.Selector == nil { x.Selector = new(types.RelationshipSelector) } return protoreflect.ValueOfMessage(x.Selector.ProtoReflect()) case "sourcehub.acp.QueryFilterRelationshipsRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.QueryFilterRelationshipsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryFilterRelationshipsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsRequest.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.QueryFilterRelationshipsRequest.selector": m := new(types.RelationshipSelector) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryFilterRelationshipsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryFilterRelationshipsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryFilterRelationshipsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryFilterRelationshipsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryFilterRelationshipsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryFilterRelationshipsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Selector != nil { l = options.Size(x.Selector) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryFilterRelationshipsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Selector != nil { encoded, err := options.Marshal(x.Selector) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryFilterRelationshipsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFilterRelationshipsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFilterRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Selector == nil { x.Selector = &types.RelationshipSelector{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Selector); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryFilterRelationshipsResponse_1_list)(nil) type _QueryFilterRelationshipsResponse_1_list struct { list *[]*RelationshipRecord } func (x *_QueryFilterRelationshipsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryFilterRelationshipsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryFilterRelationshipsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RelationshipRecord) (*x.list)[i] = concreteValue } func (x *_QueryFilterRelationshipsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RelationshipRecord) *x.list = append(*x.list, concreteValue) } func (x *_QueryFilterRelationshipsResponse_1_list) AppendMutable() protoreflect.Value { v := new(RelationshipRecord) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryFilterRelationshipsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryFilterRelationshipsResponse_1_list) NewElement() protoreflect.Value { v := new(RelationshipRecord) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryFilterRelationshipsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryFilterRelationshipsResponse protoreflect.MessageDescriptor fd_QueryFilterRelationshipsResponse_records protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryFilterRelationshipsResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryFilterRelationshipsResponse") fd_QueryFilterRelationshipsResponse_records = md_QueryFilterRelationshipsResponse.Fields().ByName("records") } var _ protoreflect.Message = (*fastReflection_QueryFilterRelationshipsResponse)(nil) type fastReflection_QueryFilterRelationshipsResponse QueryFilterRelationshipsResponse func (x *QueryFilterRelationshipsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryFilterRelationshipsResponse)(x) } func (x *QueryFilterRelationshipsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryFilterRelationshipsResponse_messageType fastReflection_QueryFilterRelationshipsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryFilterRelationshipsResponse_messageType{} type fastReflection_QueryFilterRelationshipsResponse_messageType struct{} func (x fastReflection_QueryFilterRelationshipsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryFilterRelationshipsResponse)(nil) } func (x fastReflection_QueryFilterRelationshipsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryFilterRelationshipsResponse) } func (x fastReflection_QueryFilterRelationshipsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryFilterRelationshipsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryFilterRelationshipsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryFilterRelationshipsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryFilterRelationshipsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryFilterRelationshipsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryFilterRelationshipsResponse) New() protoreflect.Message { return new(fastReflection_QueryFilterRelationshipsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryFilterRelationshipsResponse) Interface() protoreflect.ProtoMessage { return (*QueryFilterRelationshipsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryFilterRelationshipsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Records) != 0 { value := protoreflect.ValueOfList(&_QueryFilterRelationshipsResponse_1_list{list: &x.Records}) if !f(fd_QueryFilterRelationshipsResponse_records, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryFilterRelationshipsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsResponse.records": return len(x.Records) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsResponse.records": x.Records = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryFilterRelationshipsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryFilterRelationshipsResponse.records": if len(x.Records) == 0 { return protoreflect.ValueOfList(&_QueryFilterRelationshipsResponse_1_list{}) } listValue := &_QueryFilterRelationshipsResponse_1_list{list: &x.Records} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsResponse.records": lv := value.List() clv := lv.(*_QueryFilterRelationshipsResponse_1_list) x.Records = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsResponse.records": if x.Records == nil { x.Records = []*RelationshipRecord{} } value := &_QueryFilterRelationshipsResponse_1_list{list: &x.Records} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryFilterRelationshipsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryFilterRelationshipsResponse.records": list := []*RelationshipRecord{} return protoreflect.ValueOfList(&_QueryFilterRelationshipsResponse_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryFilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryFilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryFilterRelationshipsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryFilterRelationshipsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryFilterRelationshipsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryFilterRelationshipsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryFilterRelationshipsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryFilterRelationshipsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryFilterRelationshipsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Records) > 0 { for _, e := range x.Records { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryFilterRelationshipsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Records) > 0 { for iNdEx := len(x.Records) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Records[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryFilterRelationshipsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFilterRelationshipsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFilterRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Records = append(x.Records, &RelationshipRecord{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Records[len(x.Records)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryVerifyAccessRequestRequest protoreflect.MessageDescriptor fd_QueryVerifyAccessRequestRequest_policy_id protoreflect.FieldDescriptor fd_QueryVerifyAccessRequestRequest_access_request protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryVerifyAccessRequestRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryVerifyAccessRequestRequest") fd_QueryVerifyAccessRequestRequest_policy_id = md_QueryVerifyAccessRequestRequest.Fields().ByName("policy_id") fd_QueryVerifyAccessRequestRequest_access_request = md_QueryVerifyAccessRequestRequest.Fields().ByName("access_request") } var _ protoreflect.Message = (*fastReflection_QueryVerifyAccessRequestRequest)(nil) type fastReflection_QueryVerifyAccessRequestRequest QueryVerifyAccessRequestRequest func (x *QueryVerifyAccessRequestRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryVerifyAccessRequestRequest)(x) } func (x *QueryVerifyAccessRequestRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryVerifyAccessRequestRequest_messageType fastReflection_QueryVerifyAccessRequestRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryVerifyAccessRequestRequest_messageType{} type fastReflection_QueryVerifyAccessRequestRequest_messageType struct{} func (x fastReflection_QueryVerifyAccessRequestRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryVerifyAccessRequestRequest)(nil) } func (x fastReflection_QueryVerifyAccessRequestRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryVerifyAccessRequestRequest) } func (x fastReflection_QueryVerifyAccessRequestRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryVerifyAccessRequestRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryVerifyAccessRequestRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryVerifyAccessRequestRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryVerifyAccessRequestRequest) Type() protoreflect.MessageType { return _fastReflection_QueryVerifyAccessRequestRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryVerifyAccessRequestRequest) New() protoreflect.Message { return new(fastReflection_QueryVerifyAccessRequestRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryVerifyAccessRequestRequest) Interface() protoreflect.ProtoMessage { return (*QueryVerifyAccessRequestRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryVerifyAccessRequestRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_QueryVerifyAccessRequestRequest_policy_id, value) { return } } if x.AccessRequest != nil { value := protoreflect.ValueOfMessage(x.AccessRequest.ProtoReflect()) if !f(fd_QueryVerifyAccessRequestRequest_access_request, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryVerifyAccessRequestRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestRequest.policy_id": return x.PolicyId != "" case "sourcehub.acp.QueryVerifyAccessRequestRequest.access_request": return x.AccessRequest != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestRequest.policy_id": x.PolicyId = "" case "sourcehub.acp.QueryVerifyAccessRequestRequest.access_request": x.AccessRequest = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryVerifyAccessRequestRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.QueryVerifyAccessRequestRequest.access_request": value := x.AccessRequest return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.QueryVerifyAccessRequestRequest.access_request": x.AccessRequest = value.Message().Interface().(*types.AccessRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestRequest.access_request": if x.AccessRequest == nil { x.AccessRequest = new(types.AccessRequest) } return protoreflect.ValueOfMessage(x.AccessRequest.ProtoReflect()) case "sourcehub.acp.QueryVerifyAccessRequestRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.QueryVerifyAccessRequestRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryVerifyAccessRequestRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestRequest.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.QueryVerifyAccessRequestRequest.access_request": m := new(types.AccessRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryVerifyAccessRequestRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryVerifyAccessRequestRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryVerifyAccessRequestRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryVerifyAccessRequestRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryVerifyAccessRequestRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryVerifyAccessRequestRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AccessRequest != nil { l = options.Size(x.AccessRequest) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryVerifyAccessRequestRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.AccessRequest != nil { encoded, err := options.Marshal(x.AccessRequest) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryVerifyAccessRequestRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVerifyAccessRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVerifyAccessRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccessRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AccessRequest == nil { x.AccessRequest = &types.AccessRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AccessRequest); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryVerifyAccessRequestResponse protoreflect.MessageDescriptor fd_QueryVerifyAccessRequestResponse_valid protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryVerifyAccessRequestResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryVerifyAccessRequestResponse") fd_QueryVerifyAccessRequestResponse_valid = md_QueryVerifyAccessRequestResponse.Fields().ByName("valid") } var _ protoreflect.Message = (*fastReflection_QueryVerifyAccessRequestResponse)(nil) type fastReflection_QueryVerifyAccessRequestResponse QueryVerifyAccessRequestResponse func (x *QueryVerifyAccessRequestResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryVerifyAccessRequestResponse)(x) } func (x *QueryVerifyAccessRequestResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryVerifyAccessRequestResponse_messageType fastReflection_QueryVerifyAccessRequestResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryVerifyAccessRequestResponse_messageType{} type fastReflection_QueryVerifyAccessRequestResponse_messageType struct{} func (x fastReflection_QueryVerifyAccessRequestResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryVerifyAccessRequestResponse)(nil) } func (x fastReflection_QueryVerifyAccessRequestResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryVerifyAccessRequestResponse) } func (x fastReflection_QueryVerifyAccessRequestResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryVerifyAccessRequestResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryVerifyAccessRequestResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryVerifyAccessRequestResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryVerifyAccessRequestResponse) Type() protoreflect.MessageType { return _fastReflection_QueryVerifyAccessRequestResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryVerifyAccessRequestResponse) New() protoreflect.Message { return new(fastReflection_QueryVerifyAccessRequestResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryVerifyAccessRequestResponse) Interface() protoreflect.ProtoMessage { return (*QueryVerifyAccessRequestResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryVerifyAccessRequestResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Valid != false { value := protoreflect.ValueOfBool(x.Valid) if !f(fd_QueryVerifyAccessRequestResponse_valid, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryVerifyAccessRequestResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestResponse.valid": return x.Valid != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestResponse.valid": x.Valid = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryVerifyAccessRequestResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestResponse.valid": value := x.Valid return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestResponse.valid": x.Valid = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestResponse.valid": panic(fmt.Errorf("field valid of message sourcehub.acp.QueryVerifyAccessRequestResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryVerifyAccessRequestResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryVerifyAccessRequestResponse.valid": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryVerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryVerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryVerifyAccessRequestResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryVerifyAccessRequestResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryVerifyAccessRequestResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryVerifyAccessRequestResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryVerifyAccessRequestResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryVerifyAccessRequestResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryVerifyAccessRequestResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Valid { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryVerifyAccessRequestResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Valid { i-- if x.Valid { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryVerifyAccessRequestResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVerifyAccessRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVerifyAccessRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Valid = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryValidatePolicyRequest protoreflect.MessageDescriptor fd_QueryValidatePolicyRequest_policy protoreflect.FieldDescriptor fd_QueryValidatePolicyRequest_marshal_type protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryValidatePolicyRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryValidatePolicyRequest") fd_QueryValidatePolicyRequest_policy = md_QueryValidatePolicyRequest.Fields().ByName("policy") fd_QueryValidatePolicyRequest_marshal_type = md_QueryValidatePolicyRequest.Fields().ByName("marshal_type") } var _ protoreflect.Message = (*fastReflection_QueryValidatePolicyRequest)(nil) type fastReflection_QueryValidatePolicyRequest QueryValidatePolicyRequest func (x *QueryValidatePolicyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryValidatePolicyRequest)(x) } func (x *QueryValidatePolicyRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryValidatePolicyRequest_messageType fastReflection_QueryValidatePolicyRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryValidatePolicyRequest_messageType{} type fastReflection_QueryValidatePolicyRequest_messageType struct{} func (x fastReflection_QueryValidatePolicyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryValidatePolicyRequest)(nil) } func (x fastReflection_QueryValidatePolicyRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryValidatePolicyRequest) } func (x fastReflection_QueryValidatePolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryValidatePolicyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryValidatePolicyRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryValidatePolicyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryValidatePolicyRequest) Type() protoreflect.MessageType { return _fastReflection_QueryValidatePolicyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryValidatePolicyRequest) New() protoreflect.Message { return new(fastReflection_QueryValidatePolicyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryValidatePolicyRequest) Interface() protoreflect.ProtoMessage { return (*QueryValidatePolicyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryValidatePolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != "" { value := protoreflect.ValueOfString(x.Policy) if !f(fd_QueryValidatePolicyRequest_policy, value) { return } } if x.MarshalType != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MarshalType)) if !f(fd_QueryValidatePolicyRequest_marshal_type, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryValidatePolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyRequest.policy": return x.Policy != "" case "sourcehub.acp.QueryValidatePolicyRequest.marshal_type": return x.MarshalType != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyRequest.policy": x.Policy = "" case "sourcehub.acp.QueryValidatePolicyRequest.marshal_type": x.MarshalType = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryValidatePolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryValidatePolicyRequest.policy": value := x.Policy return protoreflect.ValueOfString(value) case "sourcehub.acp.QueryValidatePolicyRequest.marshal_type": value := x.MarshalType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyRequest.policy": x.Policy = value.Interface().(string) case "sourcehub.acp.QueryValidatePolicyRequest.marshal_type": x.MarshalType = (types.PolicyMarshalingType)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyRequest.policy": panic(fmt.Errorf("field policy of message sourcehub.acp.QueryValidatePolicyRequest is not mutable")) case "sourcehub.acp.QueryValidatePolicyRequest.marshal_type": panic(fmt.Errorf("field marshal_type of message sourcehub.acp.QueryValidatePolicyRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryValidatePolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyRequest.policy": return protoreflect.ValueOfString("") case "sourcehub.acp.QueryValidatePolicyRequest.marshal_type": return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryValidatePolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryValidatePolicyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryValidatePolicyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryValidatePolicyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryValidatePolicyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryValidatePolicyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Policy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.MarshalType != 0 { n += 1 + runtime.Sov(uint64(x.MarshalType)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryValidatePolicyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.MarshalType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MarshalType)) i-- dAtA[i] = 0x18 } if len(x.Policy) > 0 { i -= len(x.Policy) copy(dAtA[i:], x.Policy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Policy))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryValidatePolicyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatePolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatePolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } x.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryValidatePolicyResponse protoreflect.MessageDescriptor fd_QueryValidatePolicyResponse_valid protoreflect.FieldDescriptor fd_QueryValidatePolicyResponse_error_msg protoreflect.FieldDescriptor fd_QueryValidatePolicyResponse_policy protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryValidatePolicyResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryValidatePolicyResponse") fd_QueryValidatePolicyResponse_valid = md_QueryValidatePolicyResponse.Fields().ByName("valid") fd_QueryValidatePolicyResponse_error_msg = md_QueryValidatePolicyResponse.Fields().ByName("error_msg") fd_QueryValidatePolicyResponse_policy = md_QueryValidatePolicyResponse.Fields().ByName("policy") } var _ protoreflect.Message = (*fastReflection_QueryValidatePolicyResponse)(nil) type fastReflection_QueryValidatePolicyResponse QueryValidatePolicyResponse func (x *QueryValidatePolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryValidatePolicyResponse)(x) } func (x *QueryValidatePolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryValidatePolicyResponse_messageType fastReflection_QueryValidatePolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryValidatePolicyResponse_messageType{} type fastReflection_QueryValidatePolicyResponse_messageType struct{} func (x fastReflection_QueryValidatePolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryValidatePolicyResponse)(nil) } func (x fastReflection_QueryValidatePolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryValidatePolicyResponse) } func (x fastReflection_QueryValidatePolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryValidatePolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryValidatePolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryValidatePolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryValidatePolicyResponse) Type() protoreflect.MessageType { return _fastReflection_QueryValidatePolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryValidatePolicyResponse) New() protoreflect.Message { return new(fastReflection_QueryValidatePolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryValidatePolicyResponse) Interface() protoreflect.ProtoMessage { return (*QueryValidatePolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryValidatePolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Valid != false { value := protoreflect.ValueOfBool(x.Valid) if !f(fd_QueryValidatePolicyResponse_valid, value) { return } } if x.ErrorMsg != "" { value := protoreflect.ValueOfString(x.ErrorMsg) if !f(fd_QueryValidatePolicyResponse_error_msg, value) { return } } if x.Policy != nil { value := protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) if !f(fd_QueryValidatePolicyResponse_policy, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryValidatePolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyResponse.valid": return x.Valid != false case "sourcehub.acp.QueryValidatePolicyResponse.error_msg": return x.ErrorMsg != "" case "sourcehub.acp.QueryValidatePolicyResponse.policy": return x.Policy != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyResponse.valid": x.Valid = false case "sourcehub.acp.QueryValidatePolicyResponse.error_msg": x.ErrorMsg = "" case "sourcehub.acp.QueryValidatePolicyResponse.policy": x.Policy = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryValidatePolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryValidatePolicyResponse.valid": value := x.Valid return protoreflect.ValueOfBool(value) case "sourcehub.acp.QueryValidatePolicyResponse.error_msg": value := x.ErrorMsg return protoreflect.ValueOfString(value) case "sourcehub.acp.QueryValidatePolicyResponse.policy": value := x.Policy return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyResponse.valid": x.Valid = value.Bool() case "sourcehub.acp.QueryValidatePolicyResponse.error_msg": x.ErrorMsg = value.Interface().(string) case "sourcehub.acp.QueryValidatePolicyResponse.policy": x.Policy = value.Message().Interface().(*types.Policy) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyResponse.policy": if x.Policy == nil { x.Policy = new(types.Policy) } return protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) case "sourcehub.acp.QueryValidatePolicyResponse.valid": panic(fmt.Errorf("field valid of message sourcehub.acp.QueryValidatePolicyResponse is not mutable")) case "sourcehub.acp.QueryValidatePolicyResponse.error_msg": panic(fmt.Errorf("field error_msg of message sourcehub.acp.QueryValidatePolicyResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryValidatePolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryValidatePolicyResponse.valid": return protoreflect.ValueOfBool(false) case "sourcehub.acp.QueryValidatePolicyResponse.error_msg": return protoreflect.ValueOfString("") case "sourcehub.acp.QueryValidatePolicyResponse.policy": m := new(types.Policy) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryValidatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryValidatePolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryValidatePolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryValidatePolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryValidatePolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatePolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryValidatePolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryValidatePolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryValidatePolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Valid { n += 2 } l = len(x.ErrorMsg) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Policy != nil { l = options.Size(x.Policy) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryValidatePolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Policy != nil { encoded, err := options.Marshal(x.Policy) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.ErrorMsg) > 0 { i -= len(x.ErrorMsg) copy(dAtA[i:], x.ErrorMsg) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ErrorMsg))) i-- dAtA[i] = 0x12 } if x.Valid { i-- if x.Valid { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryValidatePolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatePolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatePolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Valid = bool(v != 0) case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ErrorMsg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Policy == nil { x.Policy = &types.Policy{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Policy); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryAccessDecisionRequest protoreflect.MessageDescriptor fd_QueryAccessDecisionRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryAccessDecisionRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryAccessDecisionRequest") fd_QueryAccessDecisionRequest_id = md_QueryAccessDecisionRequest.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_QueryAccessDecisionRequest)(nil) type fastReflection_QueryAccessDecisionRequest QueryAccessDecisionRequest func (x *QueryAccessDecisionRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAccessDecisionRequest)(x) } func (x *QueryAccessDecisionRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAccessDecisionRequest_messageType fastReflection_QueryAccessDecisionRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryAccessDecisionRequest_messageType{} type fastReflection_QueryAccessDecisionRequest_messageType struct{} func (x fastReflection_QueryAccessDecisionRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAccessDecisionRequest)(nil) } func (x fastReflection_QueryAccessDecisionRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryAccessDecisionRequest) } func (x fastReflection_QueryAccessDecisionRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAccessDecisionRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAccessDecisionRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryAccessDecisionRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAccessDecisionRequest) Type() protoreflect.MessageType { return _fastReflection_QueryAccessDecisionRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAccessDecisionRequest) New() protoreflect.Message { return new(fastReflection_QueryAccessDecisionRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAccessDecisionRequest) Interface() protoreflect.ProtoMessage { return (*QueryAccessDecisionRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAccessDecisionRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_QueryAccessDecisionRequest_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAccessDecisionRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionRequest.id": return x.Id != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionRequest.id": x.Id = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAccessDecisionRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryAccessDecisionRequest.id": value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionRequest.id": x.Id = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionRequest.id": panic(fmt.Errorf("field id of message sourcehub.acp.QueryAccessDecisionRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAccessDecisionRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionRequest.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAccessDecisionRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryAccessDecisionRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAccessDecisionRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAccessDecisionRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAccessDecisionRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAccessDecisionRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAccessDecisionRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAccessDecisionRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccessDecisionRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccessDecisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryAccessDecisionResponse protoreflect.MessageDescriptor fd_QueryAccessDecisionResponse_decision protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryAccessDecisionResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryAccessDecisionResponse") fd_QueryAccessDecisionResponse_decision = md_QueryAccessDecisionResponse.Fields().ByName("decision") } var _ protoreflect.Message = (*fastReflection_QueryAccessDecisionResponse)(nil) type fastReflection_QueryAccessDecisionResponse QueryAccessDecisionResponse func (x *QueryAccessDecisionResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAccessDecisionResponse)(x) } func (x *QueryAccessDecisionResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAccessDecisionResponse_messageType fastReflection_QueryAccessDecisionResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryAccessDecisionResponse_messageType{} type fastReflection_QueryAccessDecisionResponse_messageType struct{} func (x fastReflection_QueryAccessDecisionResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAccessDecisionResponse)(nil) } func (x fastReflection_QueryAccessDecisionResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryAccessDecisionResponse) } func (x fastReflection_QueryAccessDecisionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAccessDecisionResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAccessDecisionResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryAccessDecisionResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAccessDecisionResponse) Type() protoreflect.MessageType { return _fastReflection_QueryAccessDecisionResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAccessDecisionResponse) New() protoreflect.Message { return new(fastReflection_QueryAccessDecisionResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAccessDecisionResponse) Interface() protoreflect.ProtoMessage { return (*QueryAccessDecisionResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAccessDecisionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Decision != nil { value := protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) if !f(fd_QueryAccessDecisionResponse_decision, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAccessDecisionResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionResponse.decision": return x.Decision != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionResponse.decision": x.Decision = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAccessDecisionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryAccessDecisionResponse.decision": value := x.Decision return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionResponse.decision": x.Decision = value.Message().Interface().(*AccessDecision) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionResponse.decision": if x.Decision == nil { x.Decision = new(AccessDecision) } return protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAccessDecisionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryAccessDecisionResponse.decision": m := new(AccessDecision) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryAccessDecisionResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryAccessDecisionResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAccessDecisionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryAccessDecisionResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAccessDecisionResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAccessDecisionResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAccessDecisionResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAccessDecisionResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAccessDecisionResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Decision != nil { l = options.Size(x.Decision) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAccessDecisionResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Decision != nil { encoded, err := options.Marshal(x.Decision) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAccessDecisionResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccessDecisionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccessDecisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decision", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Decision == nil { x.Decision = &AccessDecision{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Decision); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryObjectOwnerRequest protoreflect.MessageDescriptor fd_QueryObjectOwnerRequest_policy_id protoreflect.FieldDescriptor fd_QueryObjectOwnerRequest_object protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryObjectOwnerRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryObjectOwnerRequest") fd_QueryObjectOwnerRequest_policy_id = md_QueryObjectOwnerRequest.Fields().ByName("policy_id") fd_QueryObjectOwnerRequest_object = md_QueryObjectOwnerRequest.Fields().ByName("object") } var _ protoreflect.Message = (*fastReflection_QueryObjectOwnerRequest)(nil) type fastReflection_QueryObjectOwnerRequest QueryObjectOwnerRequest func (x *QueryObjectOwnerRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryObjectOwnerRequest)(x) } func (x *QueryObjectOwnerRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryObjectOwnerRequest_messageType fastReflection_QueryObjectOwnerRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryObjectOwnerRequest_messageType{} type fastReflection_QueryObjectOwnerRequest_messageType struct{} func (x fastReflection_QueryObjectOwnerRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryObjectOwnerRequest)(nil) } func (x fastReflection_QueryObjectOwnerRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryObjectOwnerRequest) } func (x fastReflection_QueryObjectOwnerRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryObjectOwnerRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryObjectOwnerRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryObjectOwnerRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryObjectOwnerRequest) Type() protoreflect.MessageType { return _fastReflection_QueryObjectOwnerRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryObjectOwnerRequest) New() protoreflect.Message { return new(fastReflection_QueryObjectOwnerRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryObjectOwnerRequest) Interface() protoreflect.ProtoMessage { return (*QueryObjectOwnerRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryObjectOwnerRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_QueryObjectOwnerRequest_policy_id, value) { return } } if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_QueryObjectOwnerRequest_object, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryObjectOwnerRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerRequest.policy_id": return x.PolicyId != "" case "sourcehub.acp.QueryObjectOwnerRequest.object": return x.Object != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerRequest.policy_id": x.PolicyId = "" case "sourcehub.acp.QueryObjectOwnerRequest.object": x.Object = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryObjectOwnerRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryObjectOwnerRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.QueryObjectOwnerRequest.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.QueryObjectOwnerRequest.object": x.Object = value.Message().Interface().(*types.Object) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerRequest.object": if x.Object == nil { x.Object = new(types.Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcehub.acp.QueryObjectOwnerRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.QueryObjectOwnerRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryObjectOwnerRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerRequest.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.QueryObjectOwnerRequest.object": m := new(types.Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryObjectOwnerRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryObjectOwnerRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryObjectOwnerRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryObjectOwnerRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryObjectOwnerRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryObjectOwnerRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryObjectOwnerRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryObjectOwnerRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryObjectOwnerRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryObjectOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &types.Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryObjectOwnerResponse protoreflect.MessageDescriptor fd_QueryObjectOwnerResponse_is_registered protoreflect.FieldDescriptor fd_QueryObjectOwnerResponse_record protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryObjectOwnerResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryObjectOwnerResponse") fd_QueryObjectOwnerResponse_is_registered = md_QueryObjectOwnerResponse.Fields().ByName("is_registered") fd_QueryObjectOwnerResponse_record = md_QueryObjectOwnerResponse.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_QueryObjectOwnerResponse)(nil) type fastReflection_QueryObjectOwnerResponse QueryObjectOwnerResponse func (x *QueryObjectOwnerResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryObjectOwnerResponse)(x) } func (x *QueryObjectOwnerResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryObjectOwnerResponse_messageType fastReflection_QueryObjectOwnerResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryObjectOwnerResponse_messageType{} type fastReflection_QueryObjectOwnerResponse_messageType struct{} func (x fastReflection_QueryObjectOwnerResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryObjectOwnerResponse)(nil) } func (x fastReflection_QueryObjectOwnerResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryObjectOwnerResponse) } func (x fastReflection_QueryObjectOwnerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryObjectOwnerResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryObjectOwnerResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryObjectOwnerResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryObjectOwnerResponse) Type() protoreflect.MessageType { return _fastReflection_QueryObjectOwnerResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryObjectOwnerResponse) New() protoreflect.Message { return new(fastReflection_QueryObjectOwnerResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryObjectOwnerResponse) Interface() protoreflect.ProtoMessage { return (*QueryObjectOwnerResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryObjectOwnerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.IsRegistered != false { value := protoreflect.ValueOfBool(x.IsRegistered) if !f(fd_QueryObjectOwnerResponse_is_registered, value) { return } } if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_QueryObjectOwnerResponse_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryObjectOwnerResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerResponse.is_registered": return x.IsRegistered != false case "sourcehub.acp.QueryObjectOwnerResponse.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerResponse.is_registered": x.IsRegistered = false case "sourcehub.acp.QueryObjectOwnerResponse.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryObjectOwnerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryObjectOwnerResponse.is_registered": value := x.IsRegistered return protoreflect.ValueOfBool(value) case "sourcehub.acp.QueryObjectOwnerResponse.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerResponse.is_registered": x.IsRegistered = value.Bool() case "sourcehub.acp.QueryObjectOwnerResponse.record": x.Record = value.Message().Interface().(*RelationshipRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerResponse.record": if x.Record == nil { x.Record = new(RelationshipRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) case "sourcehub.acp.QueryObjectOwnerResponse.is_registered": panic(fmt.Errorf("field is_registered of message sourcehub.acp.QueryObjectOwnerResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryObjectOwnerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryObjectOwnerResponse.is_registered": return protoreflect.ValueOfBool(false) case "sourcehub.acp.QueryObjectOwnerResponse.record": m := new(RelationshipRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryObjectOwnerResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryObjectOwnerResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryObjectOwnerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryObjectOwnerResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryObjectOwnerResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryObjectOwnerResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryObjectOwnerResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryObjectOwnerResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryObjectOwnerResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.IsRegistered { n += 2 } if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryObjectOwnerResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.IsRegistered { i-- if x.IsRegistered { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryObjectOwnerResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryObjectOwnerResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryObjectOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsRegistered", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.IsRegistered = bool(v != 0) case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &RelationshipRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryRegistrationsCommitmentRequest protoreflect.MessageDescriptor fd_QueryRegistrationsCommitmentRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryRegistrationsCommitmentRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryRegistrationsCommitmentRequest") fd_QueryRegistrationsCommitmentRequest_id = md_QueryRegistrationsCommitmentRequest.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_QueryRegistrationsCommitmentRequest)(nil) type fastReflection_QueryRegistrationsCommitmentRequest QueryRegistrationsCommitmentRequest func (x *QueryRegistrationsCommitmentRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentRequest)(x) } func (x *QueryRegistrationsCommitmentRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryRegistrationsCommitmentRequest_messageType fastReflection_QueryRegistrationsCommitmentRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryRegistrationsCommitmentRequest_messageType{} type fastReflection_QueryRegistrationsCommitmentRequest_messageType struct{} func (x fastReflection_QueryRegistrationsCommitmentRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentRequest)(nil) } func (x fastReflection_QueryRegistrationsCommitmentRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentRequest) } func (x fastReflection_QueryRegistrationsCommitmentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Type() protoreflect.MessageType { return _fastReflection_QueryRegistrationsCommitmentRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryRegistrationsCommitmentRequest) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Interface() protoreflect.ProtoMessage { return (*QueryRegistrationsCommitmentRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != uint64(0) { value := protoreflect.ValueOfUint64(x.Id) if !f(fd_QueryRegistrationsCommitmentRequest_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentRequest.id": return x.Id != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentRequest.id": x.Id = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentRequest.id": value := x.Id return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentRequest.id": x.Id = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentRequest.id": panic(fmt.Errorf("field id of message sourcehub.acp.QueryRegistrationsCommitmentRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryRegistrationsCommitmentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentRequest.id": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryRegistrationsCommitmentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryRegistrationsCommitmentRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryRegistrationsCommitmentRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryRegistrationsCommitmentRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryRegistrationsCommitmentRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryRegistrationsCommitmentRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Id != 0 { n += 1 + runtime.Sov(uint64(x.Id)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Id != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } x.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryRegistrationsCommitmentResponse protoreflect.MessageDescriptor fd_QueryRegistrationsCommitmentResponse_registrations_commitment protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryRegistrationsCommitmentResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryRegistrationsCommitmentResponse") fd_QueryRegistrationsCommitmentResponse_registrations_commitment = md_QueryRegistrationsCommitmentResponse.Fields().ByName("registrations_commitment") } var _ protoreflect.Message = (*fastReflection_QueryRegistrationsCommitmentResponse)(nil) type fastReflection_QueryRegistrationsCommitmentResponse QueryRegistrationsCommitmentResponse func (x *QueryRegistrationsCommitmentResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentResponse)(x) } func (x *QueryRegistrationsCommitmentResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryRegistrationsCommitmentResponse_messageType fastReflection_QueryRegistrationsCommitmentResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryRegistrationsCommitmentResponse_messageType{} type fastReflection_QueryRegistrationsCommitmentResponse_messageType struct{} func (x fastReflection_QueryRegistrationsCommitmentResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentResponse)(nil) } func (x fastReflection_QueryRegistrationsCommitmentResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentResponse) } func (x fastReflection_QueryRegistrationsCommitmentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Type() protoreflect.MessageType { return _fastReflection_QueryRegistrationsCommitmentResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryRegistrationsCommitmentResponse) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Interface() protoreflect.ProtoMessage { return (*QueryRegistrationsCommitmentResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RegistrationsCommitment != nil { value := protoreflect.ValueOfMessage(x.RegistrationsCommitment.ProtoReflect()) if !f(fd_QueryRegistrationsCommitmentResponse_registrations_commitment, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentResponse.registrations_commitment": return x.RegistrationsCommitment != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentResponse.registrations_commitment": x.RegistrationsCommitment = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentResponse.registrations_commitment": value := x.RegistrationsCommitment return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentResponse.registrations_commitment": x.RegistrationsCommitment = value.Message().Interface().(*RegistrationsCommitment) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentResponse.registrations_commitment": if x.RegistrationsCommitment == nil { x.RegistrationsCommitment = new(RegistrationsCommitment) } return protoreflect.ValueOfMessage(x.RegistrationsCommitment.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryRegistrationsCommitmentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentResponse.registrations_commitment": m := new(RegistrationsCommitment) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryRegistrationsCommitmentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryRegistrationsCommitmentResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryRegistrationsCommitmentResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryRegistrationsCommitmentResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryRegistrationsCommitmentResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryRegistrationsCommitmentResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RegistrationsCommitment != nil { l = options.Size(x.RegistrationsCommitment) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RegistrationsCommitment != nil { encoded, err := options.Marshal(x.RegistrationsCommitment) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitment", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.RegistrationsCommitment == nil { x.RegistrationsCommitment = &RegistrationsCommitment{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RegistrationsCommitment); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryRegistrationsCommitmentByCommitmentRequest protoreflect.MessageDescriptor fd_QueryRegistrationsCommitmentByCommitmentRequest_commitment protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryRegistrationsCommitmentByCommitmentRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryRegistrationsCommitmentByCommitmentRequest") fd_QueryRegistrationsCommitmentByCommitmentRequest_commitment = md_QueryRegistrationsCommitmentByCommitmentRequest.Fields().ByName("commitment") } var _ protoreflect.Message = (*fastReflection_QueryRegistrationsCommitmentByCommitmentRequest)(nil) type fastReflection_QueryRegistrationsCommitmentByCommitmentRequest QueryRegistrationsCommitmentByCommitmentRequest func (x *QueryRegistrationsCommitmentByCommitmentRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentByCommitmentRequest)(x) } func (x *QueryRegistrationsCommitmentByCommitmentRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType{} type fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType struct{} func (x fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentByCommitmentRequest)(nil) } func (x fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) } func (x fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentByCommitmentRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentByCommitmentRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Type() protoreflect.MessageType { return _fastReflection_QueryRegistrationsCommitmentByCommitmentRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Interface() protoreflect.ProtoMessage { return (*QueryRegistrationsCommitmentByCommitmentRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Commitment) != 0 { value := protoreflect.ValueOfBytes(x.Commitment) if !f(fd_QueryRegistrationsCommitmentByCommitmentRequest_commitment, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest.commitment": return len(x.Commitment) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest.commitment": x.Commitment = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest.commitment": value := x.Commitment return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest.commitment": x.Commitment = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest.commitment": panic(fmt.Errorf("field commitment of message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest.commitment": return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryRegistrationsCommitmentByCommitmentRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Commitment) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentByCommitmentRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Commitment) > 0 { i -= len(x.Commitment) copy(dAtA[i:], x.Commitment) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Commitment))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentByCommitmentRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentByCommitmentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentByCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Commitment = append(x.Commitment[:0], dAtA[iNdEx:postIndex]...) if x.Commitment == nil { x.Commitment = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryRegistrationsCommitmentByCommitmentResponse_1_list)(nil) type _QueryRegistrationsCommitmentByCommitmentResponse_1_list struct { list *[]*RegistrationsCommitment } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RegistrationsCommitment) (*x.list)[i] = concreteValue } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RegistrationsCommitment) *x.list = append(*x.list, concreteValue) } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) AppendMutable() protoreflect.Value { v := new(RegistrationsCommitment) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) NewElement() protoreflect.Value { v := new(RegistrationsCommitment) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryRegistrationsCommitmentByCommitmentResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryRegistrationsCommitmentByCommitmentResponse protoreflect.MessageDescriptor fd_QueryRegistrationsCommitmentByCommitmentResponse_registrations_commitments protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryRegistrationsCommitmentByCommitmentResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryRegistrationsCommitmentByCommitmentResponse") fd_QueryRegistrationsCommitmentByCommitmentResponse_registrations_commitments = md_QueryRegistrationsCommitmentByCommitmentResponse.Fields().ByName("registrations_commitments") } var _ protoreflect.Message = (*fastReflection_QueryRegistrationsCommitmentByCommitmentResponse)(nil) type fastReflection_QueryRegistrationsCommitmentByCommitmentResponse QueryRegistrationsCommitmentByCommitmentResponse func (x *QueryRegistrationsCommitmentByCommitmentResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentByCommitmentResponse)(x) } func (x *QueryRegistrationsCommitmentByCommitmentResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType{} type fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType struct{} func (x fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryRegistrationsCommitmentByCommitmentResponse)(nil) } func (x fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) } func (x fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentByCommitmentResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryRegistrationsCommitmentByCommitmentResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Type() protoreflect.MessageType { return _fastReflection_QueryRegistrationsCommitmentByCommitmentResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) New() protoreflect.Message { return new(fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Interface() protoreflect.ProtoMessage { return (*QueryRegistrationsCommitmentByCommitmentResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.RegistrationsCommitments) != 0 { value := protoreflect.ValueOfList(&_QueryRegistrationsCommitmentByCommitmentResponse_1_list{list: &x.RegistrationsCommitments}) if !f(fd_QueryRegistrationsCommitmentByCommitmentResponse_registrations_commitments, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse.registrations_commitments": return len(x.RegistrationsCommitments) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse.registrations_commitments": x.RegistrationsCommitments = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse.registrations_commitments": if len(x.RegistrationsCommitments) == 0 { return protoreflect.ValueOfList(&_QueryRegistrationsCommitmentByCommitmentResponse_1_list{}) } listValue := &_QueryRegistrationsCommitmentByCommitmentResponse_1_list{list: &x.RegistrationsCommitments} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse.registrations_commitments": lv := value.List() clv := lv.(*_QueryRegistrationsCommitmentByCommitmentResponse_1_list) x.RegistrationsCommitments = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse.registrations_commitments": if x.RegistrationsCommitments == nil { x.RegistrationsCommitments = []*RegistrationsCommitment{} } value := &_QueryRegistrationsCommitmentByCommitmentResponse_1_list{list: &x.RegistrationsCommitments} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse.registrations_commitments": list := []*RegistrationsCommitment{} return protoreflect.ValueOfList(&_QueryRegistrationsCommitmentByCommitmentResponse_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryRegistrationsCommitmentByCommitmentResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryRegistrationsCommitmentByCommitmentResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.RegistrationsCommitments) > 0 { for _, e := range x.RegistrationsCommitments { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentByCommitmentResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.RegistrationsCommitments) > 0 { for iNdEx := len(x.RegistrationsCommitments) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.RegistrationsCommitments[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryRegistrationsCommitmentByCommitmentResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentByCommitmentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationsCommitmentByCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitments", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RegistrationsCommitments = append(x.RegistrationsCommitments, &RegistrationsCommitment{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RegistrationsCommitments[len(x.RegistrationsCommitments)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryGenerateCommitmentRequest_2_list)(nil) type _QueryGenerateCommitmentRequest_2_list struct { list *[]*types.Object } func (x *_QueryGenerateCommitmentRequest_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryGenerateCommitmentRequest_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryGenerateCommitmentRequest_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*types.Object) (*x.list)[i] = concreteValue } func (x *_QueryGenerateCommitmentRequest_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*types.Object) *x.list = append(*x.list, concreteValue) } func (x *_QueryGenerateCommitmentRequest_2_list) AppendMutable() protoreflect.Value { v := new(types.Object) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryGenerateCommitmentRequest_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryGenerateCommitmentRequest_2_list) NewElement() protoreflect.Value { v := new(types.Object) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryGenerateCommitmentRequest_2_list) IsValid() bool { return x.list != nil } var ( md_QueryGenerateCommitmentRequest protoreflect.MessageDescriptor fd_QueryGenerateCommitmentRequest_policy_id protoreflect.FieldDescriptor fd_QueryGenerateCommitmentRequest_objects protoreflect.FieldDescriptor fd_QueryGenerateCommitmentRequest_actor protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryGenerateCommitmentRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryGenerateCommitmentRequest") fd_QueryGenerateCommitmentRequest_policy_id = md_QueryGenerateCommitmentRequest.Fields().ByName("policy_id") fd_QueryGenerateCommitmentRequest_objects = md_QueryGenerateCommitmentRequest.Fields().ByName("objects") fd_QueryGenerateCommitmentRequest_actor = md_QueryGenerateCommitmentRequest.Fields().ByName("actor") } var _ protoreflect.Message = (*fastReflection_QueryGenerateCommitmentRequest)(nil) type fastReflection_QueryGenerateCommitmentRequest QueryGenerateCommitmentRequest func (x *QueryGenerateCommitmentRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryGenerateCommitmentRequest)(x) } func (x *QueryGenerateCommitmentRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryGenerateCommitmentRequest_messageType fastReflection_QueryGenerateCommitmentRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryGenerateCommitmentRequest_messageType{} type fastReflection_QueryGenerateCommitmentRequest_messageType struct{} func (x fastReflection_QueryGenerateCommitmentRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryGenerateCommitmentRequest)(nil) } func (x fastReflection_QueryGenerateCommitmentRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryGenerateCommitmentRequest) } func (x fastReflection_QueryGenerateCommitmentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryGenerateCommitmentRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryGenerateCommitmentRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryGenerateCommitmentRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryGenerateCommitmentRequest) Type() protoreflect.MessageType { return _fastReflection_QueryGenerateCommitmentRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryGenerateCommitmentRequest) New() protoreflect.Message { return new(fastReflection_QueryGenerateCommitmentRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryGenerateCommitmentRequest) Interface() protoreflect.ProtoMessage { return (*QueryGenerateCommitmentRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGenerateCommitmentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_QueryGenerateCommitmentRequest_policy_id, value) { return } } if len(x.Objects) != 0 { value := protoreflect.ValueOfList(&_QueryGenerateCommitmentRequest_2_list{list: &x.Objects}) if !f(fd_QueryGenerateCommitmentRequest_objects, value) { return } } if x.Actor != nil { value := protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) if !f(fd_QueryGenerateCommitmentRequest_actor, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGenerateCommitmentRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentRequest.policy_id": return x.PolicyId != "" case "sourcehub.acp.QueryGenerateCommitmentRequest.objects": return len(x.Objects) != 0 case "sourcehub.acp.QueryGenerateCommitmentRequest.actor": return x.Actor != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentRequest.policy_id": x.PolicyId = "" case "sourcehub.acp.QueryGenerateCommitmentRequest.objects": x.Objects = nil case "sourcehub.acp.QueryGenerateCommitmentRequest.actor": x.Actor = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGenerateCommitmentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryGenerateCommitmentRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.QueryGenerateCommitmentRequest.objects": if len(x.Objects) == 0 { return protoreflect.ValueOfList(&_QueryGenerateCommitmentRequest_2_list{}) } listValue := &_QueryGenerateCommitmentRequest_2_list{list: &x.Objects} return protoreflect.ValueOfList(listValue) case "sourcehub.acp.QueryGenerateCommitmentRequest.actor": value := x.Actor return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.QueryGenerateCommitmentRequest.objects": lv := value.List() clv := lv.(*_QueryGenerateCommitmentRequest_2_list) x.Objects = *clv.list case "sourcehub.acp.QueryGenerateCommitmentRequest.actor": x.Actor = value.Message().Interface().(*types.Actor) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentRequest.objects": if x.Objects == nil { x.Objects = []*types.Object{} } value := &_QueryGenerateCommitmentRequest_2_list{list: &x.Objects} return protoreflect.ValueOfList(value) case "sourcehub.acp.QueryGenerateCommitmentRequest.actor": if x.Actor == nil { x.Actor = new(types.Actor) } return protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) case "sourcehub.acp.QueryGenerateCommitmentRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.QueryGenerateCommitmentRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGenerateCommitmentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentRequest.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.QueryGenerateCommitmentRequest.objects": list := []*types.Object{} return protoreflect.ValueOfList(&_QueryGenerateCommitmentRequest_2_list{list: &list}) case "sourcehub.acp.QueryGenerateCommitmentRequest.actor": m := new(types.Actor) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryGenerateCommitmentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryGenerateCommitmentRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryGenerateCommitmentRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryGenerateCommitmentRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryGenerateCommitmentRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryGenerateCommitmentRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Objects) > 0 { for _, e := range x.Objects { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Actor != nil { l = options.Size(x.Actor) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryGenerateCommitmentRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Actor != nil { encoded, err := options.Marshal(x.Actor) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.Objects) > 0 { for iNdEx := len(x.Objects) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Objects[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryGenerateCommitmentRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGenerateCommitmentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGenerateCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Objects", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Objects = append(x.Objects, &types.Object{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Objects[len(x.Objects)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Actor == nil { x.Actor = &types.Actor{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Actor); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryGenerateCommitmentResponse_3_list)(nil) type _QueryGenerateCommitmentResponse_3_list struct { list *[]*RegistrationProof } func (x *_QueryGenerateCommitmentResponse_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryGenerateCommitmentResponse_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryGenerateCommitmentResponse_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RegistrationProof) (*x.list)[i] = concreteValue } func (x *_QueryGenerateCommitmentResponse_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RegistrationProof) *x.list = append(*x.list, concreteValue) } func (x *_QueryGenerateCommitmentResponse_3_list) AppendMutable() protoreflect.Value { v := new(RegistrationProof) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryGenerateCommitmentResponse_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryGenerateCommitmentResponse_3_list) NewElement() protoreflect.Value { v := new(RegistrationProof) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryGenerateCommitmentResponse_3_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_QueryGenerateCommitmentResponse_4_list)(nil) type _QueryGenerateCommitmentResponse_4_list struct { list *[]string } func (x *_QueryGenerateCommitmentResponse_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryGenerateCommitmentResponse_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } func (x *_QueryGenerateCommitmentResponse_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_QueryGenerateCommitmentResponse_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_QueryGenerateCommitmentResponse_4_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message QueryGenerateCommitmentResponse at list field ProofsJson as it is not of Message kind")) } func (x *_QueryGenerateCommitmentResponse_4_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_QueryGenerateCommitmentResponse_4_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_QueryGenerateCommitmentResponse_4_list) IsValid() bool { return x.list != nil } var ( md_QueryGenerateCommitmentResponse protoreflect.MessageDescriptor fd_QueryGenerateCommitmentResponse_commitment protoreflect.FieldDescriptor fd_QueryGenerateCommitmentResponse_hex_commitment protoreflect.FieldDescriptor fd_QueryGenerateCommitmentResponse_proofs protoreflect.FieldDescriptor fd_QueryGenerateCommitmentResponse_proofs_json protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryGenerateCommitmentResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryGenerateCommitmentResponse") fd_QueryGenerateCommitmentResponse_commitment = md_QueryGenerateCommitmentResponse.Fields().ByName("commitment") fd_QueryGenerateCommitmentResponse_hex_commitment = md_QueryGenerateCommitmentResponse.Fields().ByName("hex_commitment") fd_QueryGenerateCommitmentResponse_proofs = md_QueryGenerateCommitmentResponse.Fields().ByName("proofs") fd_QueryGenerateCommitmentResponse_proofs_json = md_QueryGenerateCommitmentResponse.Fields().ByName("proofs_json") } var _ protoreflect.Message = (*fastReflection_QueryGenerateCommitmentResponse)(nil) type fastReflection_QueryGenerateCommitmentResponse QueryGenerateCommitmentResponse func (x *QueryGenerateCommitmentResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryGenerateCommitmentResponse)(x) } func (x *QueryGenerateCommitmentResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryGenerateCommitmentResponse_messageType fastReflection_QueryGenerateCommitmentResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryGenerateCommitmentResponse_messageType{} type fastReflection_QueryGenerateCommitmentResponse_messageType struct{} func (x fastReflection_QueryGenerateCommitmentResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryGenerateCommitmentResponse)(nil) } func (x fastReflection_QueryGenerateCommitmentResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryGenerateCommitmentResponse) } func (x fastReflection_QueryGenerateCommitmentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryGenerateCommitmentResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryGenerateCommitmentResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryGenerateCommitmentResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryGenerateCommitmentResponse) Type() protoreflect.MessageType { return _fastReflection_QueryGenerateCommitmentResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryGenerateCommitmentResponse) New() protoreflect.Message { return new(fastReflection_QueryGenerateCommitmentResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryGenerateCommitmentResponse) Interface() protoreflect.ProtoMessage { return (*QueryGenerateCommitmentResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGenerateCommitmentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Commitment) != 0 { value := protoreflect.ValueOfBytes(x.Commitment) if !f(fd_QueryGenerateCommitmentResponse_commitment, value) { return } } if x.HexCommitment != "" { value := protoreflect.ValueOfString(x.HexCommitment) if !f(fd_QueryGenerateCommitmentResponse_hex_commitment, value) { return } } if len(x.Proofs) != 0 { value := protoreflect.ValueOfList(&_QueryGenerateCommitmentResponse_3_list{list: &x.Proofs}) if !f(fd_QueryGenerateCommitmentResponse_proofs, value) { return } } if len(x.ProofsJson) != 0 { value := protoreflect.ValueOfList(&_QueryGenerateCommitmentResponse_4_list{list: &x.ProofsJson}) if !f(fd_QueryGenerateCommitmentResponse_proofs_json, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGenerateCommitmentResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentResponse.commitment": return len(x.Commitment) != 0 case "sourcehub.acp.QueryGenerateCommitmentResponse.hex_commitment": return x.HexCommitment != "" case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs": return len(x.Proofs) != 0 case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs_json": return len(x.ProofsJson) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentResponse.commitment": x.Commitment = nil case "sourcehub.acp.QueryGenerateCommitmentResponse.hex_commitment": x.HexCommitment = "" case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs": x.Proofs = nil case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs_json": x.ProofsJson = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGenerateCommitmentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryGenerateCommitmentResponse.commitment": value := x.Commitment return protoreflect.ValueOfBytes(value) case "sourcehub.acp.QueryGenerateCommitmentResponse.hex_commitment": value := x.HexCommitment return protoreflect.ValueOfString(value) case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs": if len(x.Proofs) == 0 { return protoreflect.ValueOfList(&_QueryGenerateCommitmentResponse_3_list{}) } listValue := &_QueryGenerateCommitmentResponse_3_list{list: &x.Proofs} return protoreflect.ValueOfList(listValue) case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs_json": if len(x.ProofsJson) == 0 { return protoreflect.ValueOfList(&_QueryGenerateCommitmentResponse_4_list{}) } listValue := &_QueryGenerateCommitmentResponse_4_list{list: &x.ProofsJson} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentResponse.commitment": x.Commitment = value.Bytes() case "sourcehub.acp.QueryGenerateCommitmentResponse.hex_commitment": x.HexCommitment = value.Interface().(string) case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs": lv := value.List() clv := lv.(*_QueryGenerateCommitmentResponse_3_list) x.Proofs = *clv.list case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs_json": lv := value.List() clv := lv.(*_QueryGenerateCommitmentResponse_4_list) x.ProofsJson = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs": if x.Proofs == nil { x.Proofs = []*RegistrationProof{} } value := &_QueryGenerateCommitmentResponse_3_list{list: &x.Proofs} return protoreflect.ValueOfList(value) case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs_json": if x.ProofsJson == nil { x.ProofsJson = []string{} } value := &_QueryGenerateCommitmentResponse_4_list{list: &x.ProofsJson} return protoreflect.ValueOfList(value) case "sourcehub.acp.QueryGenerateCommitmentResponse.commitment": panic(fmt.Errorf("field commitment of message sourcehub.acp.QueryGenerateCommitmentResponse is not mutable")) case "sourcehub.acp.QueryGenerateCommitmentResponse.hex_commitment": panic(fmt.Errorf("field hex_commitment of message sourcehub.acp.QueryGenerateCommitmentResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGenerateCommitmentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryGenerateCommitmentResponse.commitment": return protoreflect.ValueOfBytes(nil) case "sourcehub.acp.QueryGenerateCommitmentResponse.hex_commitment": return protoreflect.ValueOfString("") case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs": list := []*RegistrationProof{} return protoreflect.ValueOfList(&_QueryGenerateCommitmentResponse_3_list{list: &list}) case "sourcehub.acp.QueryGenerateCommitmentResponse.proofs_json": list := []string{} return protoreflect.ValueOfList(&_QueryGenerateCommitmentResponse_4_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryGenerateCommitmentResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryGenerateCommitmentResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryGenerateCommitmentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryGenerateCommitmentResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryGenerateCommitmentResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateCommitmentResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryGenerateCommitmentResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryGenerateCommitmentResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryGenerateCommitmentResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Commitment) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.HexCommitment) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Proofs) > 0 { for _, e := range x.Proofs { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.ProofsJson) > 0 { for _, s := range x.ProofsJson { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryGenerateCommitmentResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ProofsJson) > 0 { for iNdEx := len(x.ProofsJson) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.ProofsJson[iNdEx]) copy(dAtA[i:], x.ProofsJson[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProofsJson[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(x.Proofs) > 0 { for iNdEx := len(x.Proofs) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Proofs[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } } if len(x.HexCommitment) > 0 { i -= len(x.HexCommitment) copy(dAtA[i:], x.HexCommitment) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HexCommitment))) i-- dAtA[i] = 0x12 } if len(x.Commitment) > 0 { i -= len(x.Commitment) copy(dAtA[i:], x.Commitment) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Commitment))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryGenerateCommitmentResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGenerateCommitmentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGenerateCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Commitment = append(x.Commitment[:0], dAtA[iNdEx:postIndex]...) if x.Commitment == nil { x.Commitment = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HexCommitment", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.HexCommitment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proofs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Proofs = append(x.Proofs, &RegistrationProof{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proofs[len(x.Proofs)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofsJson", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ProofsJson = append(x.ProofsJson, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryHijackAttemptsByPolicyRequest protoreflect.MessageDescriptor fd_QueryHijackAttemptsByPolicyRequest_policy_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryHijackAttemptsByPolicyRequest = File_sourcehub_acp_query_proto.Messages().ByName("QueryHijackAttemptsByPolicyRequest") fd_QueryHijackAttemptsByPolicyRequest_policy_id = md_QueryHijackAttemptsByPolicyRequest.Fields().ByName("policy_id") } var _ protoreflect.Message = (*fastReflection_QueryHijackAttemptsByPolicyRequest)(nil) type fastReflection_QueryHijackAttemptsByPolicyRequest QueryHijackAttemptsByPolicyRequest func (x *QueryHijackAttemptsByPolicyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryHijackAttemptsByPolicyRequest)(x) } func (x *QueryHijackAttemptsByPolicyRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryHijackAttemptsByPolicyRequest_messageType fastReflection_QueryHijackAttemptsByPolicyRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryHijackAttemptsByPolicyRequest_messageType{} type fastReflection_QueryHijackAttemptsByPolicyRequest_messageType struct{} func (x fastReflection_QueryHijackAttemptsByPolicyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryHijackAttemptsByPolicyRequest)(nil) } func (x fastReflection_QueryHijackAttemptsByPolicyRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryHijackAttemptsByPolicyRequest) } func (x fastReflection_QueryHijackAttemptsByPolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryHijackAttemptsByPolicyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryHijackAttemptsByPolicyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Type() protoreflect.MessageType { return _fastReflection_QueryHijackAttemptsByPolicyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) New() protoreflect.Message { return new(fastReflection_QueryHijackAttemptsByPolicyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Interface() protoreflect.ProtoMessage { return (*QueryHijackAttemptsByPolicyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_QueryHijackAttemptsByPolicyRequest_policy_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyRequest.policy_id": return x.PolicyId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyRequest.policy_id": x.PolicyId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyRequest.policy_id": x.PolicyId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.QueryHijackAttemptsByPolicyRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyRequest.policy_id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyRequest")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryHijackAttemptsByPolicyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryHijackAttemptsByPolicyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryHijackAttemptsByPolicyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryHijackAttemptsByPolicyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryHijackAttemptsByPolicyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryHijackAttemptsByPolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryHijackAttemptsByPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryHijackAttemptsByPolicyResponse_1_list)(nil) type _QueryHijackAttemptsByPolicyResponse_1_list struct { list *[]*AmendmentEvent } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*AmendmentEvent) (*x.list)[i] = concreteValue } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*AmendmentEvent) *x.list = append(*x.list, concreteValue) } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) AppendMutable() protoreflect.Value { v := new(AmendmentEvent) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) NewElement() protoreflect.Value { v := new(AmendmentEvent) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryHijackAttemptsByPolicyResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryHijackAttemptsByPolicyResponse protoreflect.MessageDescriptor fd_QueryHijackAttemptsByPolicyResponse_events protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_query_proto_init() md_QueryHijackAttemptsByPolicyResponse = File_sourcehub_acp_query_proto.Messages().ByName("QueryHijackAttemptsByPolicyResponse") fd_QueryHijackAttemptsByPolicyResponse_events = md_QueryHijackAttemptsByPolicyResponse.Fields().ByName("events") } var _ protoreflect.Message = (*fastReflection_QueryHijackAttemptsByPolicyResponse)(nil) type fastReflection_QueryHijackAttemptsByPolicyResponse QueryHijackAttemptsByPolicyResponse func (x *QueryHijackAttemptsByPolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryHijackAttemptsByPolicyResponse)(x) } func (x *QueryHijackAttemptsByPolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_query_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryHijackAttemptsByPolicyResponse_messageType fastReflection_QueryHijackAttemptsByPolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryHijackAttemptsByPolicyResponse_messageType{} type fastReflection_QueryHijackAttemptsByPolicyResponse_messageType struct{} func (x fastReflection_QueryHijackAttemptsByPolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryHijackAttemptsByPolicyResponse)(nil) } func (x fastReflection_QueryHijackAttemptsByPolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryHijackAttemptsByPolicyResponse) } func (x fastReflection_QueryHijackAttemptsByPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryHijackAttemptsByPolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryHijackAttemptsByPolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Type() protoreflect.MessageType { return _fastReflection_QueryHijackAttemptsByPolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) New() protoreflect.Message { return new(fastReflection_QueryHijackAttemptsByPolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Interface() protoreflect.ProtoMessage { return (*QueryHijackAttemptsByPolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Events) != 0 { value := protoreflect.ValueOfList(&_QueryHijackAttemptsByPolicyResponse_1_list{list: &x.Events}) if !f(fd_QueryHijackAttemptsByPolicyResponse_events, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyResponse.events": return len(x.Events) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyResponse.events": x.Events = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyResponse.events": if len(x.Events) == 0 { return protoreflect.ValueOfList(&_QueryHijackAttemptsByPolicyResponse_1_list{}) } listValue := &_QueryHijackAttemptsByPolicyResponse_1_list{list: &x.Events} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyResponse.events": lv := value.List() clv := lv.(*_QueryHijackAttemptsByPolicyResponse_1_list) x.Events = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyResponse.events": if x.Events == nil { x.Events = []*AmendmentEvent{} } value := &_QueryHijackAttemptsByPolicyResponse_1_list{list: &x.Events} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.QueryHijackAttemptsByPolicyResponse.events": list := []*AmendmentEvent{} return protoreflect.ValueOfList(&_QueryHijackAttemptsByPolicyResponse_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.QueryHijackAttemptsByPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.QueryHijackAttemptsByPolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.QueryHijackAttemptsByPolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryHijackAttemptsByPolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryHijackAttemptsByPolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Events) > 0 { for _, e := range x.Events { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryHijackAttemptsByPolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Events) > 0 { for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Events[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryHijackAttemptsByPolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryHijackAttemptsByPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryHijackAttemptsByPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Events = append(x.Events, &AmendmentEvent{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/query.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{0} } // QueryParamsResponse is response type for the Query/Params RPC method. type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params holds all the parameters of this module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{1} } func (x *QueryParamsResponse) GetParams() *Params { if x != nil { return x.Params } return nil } type QueryPolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *QueryPolicyRequest) Reset() { *x = QueryPolicyRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPolicyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPolicyRequest) ProtoMessage() {} // Deprecated: Use QueryPolicyRequest.ProtoReflect.Descriptor instead. func (*QueryPolicyRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{2} } func (x *QueryPolicyRequest) GetId() string { if x != nil { return x.Id } return "" } type QueryPolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Record *PolicyRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (x *QueryPolicyResponse) Reset() { *x = QueryPolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPolicyResponse) ProtoMessage() {} // Deprecated: Use QueryPolicyResponse.ProtoReflect.Descriptor instead. func (*QueryPolicyResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{3} } func (x *QueryPolicyResponse) GetRecord() *PolicyRecord { if x != nil { return x.Record } return nil } type QueryPolicyIdsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryPolicyIdsRequest) Reset() { *x = QueryPolicyIdsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPolicyIdsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPolicyIdsRequest) ProtoMessage() {} // Deprecated: Use QueryPolicyIdsRequest.ProtoReflect.Descriptor instead. func (*QueryPolicyIdsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{4} } func (x *QueryPolicyIdsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } type QueryPolicyIdsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryPolicyIdsResponse) Reset() { *x = QueryPolicyIdsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPolicyIdsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPolicyIdsResponse) ProtoMessage() {} // Deprecated: Use QueryPolicyIdsResponse.ProtoReflect.Descriptor instead. func (*QueryPolicyIdsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{5} } func (x *QueryPolicyIdsResponse) GetIds() []string { if x != nil { return x.Ids } return nil } func (x *QueryPolicyIdsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } type QueryFilterRelationshipsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Selector *types.RelationshipSelector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` } func (x *QueryFilterRelationshipsRequest) Reset() { *x = QueryFilterRelationshipsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryFilterRelationshipsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryFilterRelationshipsRequest) ProtoMessage() {} // Deprecated: Use QueryFilterRelationshipsRequest.ProtoReflect.Descriptor instead. func (*QueryFilterRelationshipsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{6} } func (x *QueryFilterRelationshipsRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *QueryFilterRelationshipsRequest) GetSelector() *types.RelationshipSelector { if x != nil { return x.Selector } return nil } type QueryFilterRelationshipsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Records []*RelationshipRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` } func (x *QueryFilterRelationshipsResponse) Reset() { *x = QueryFilterRelationshipsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryFilterRelationshipsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryFilterRelationshipsResponse) ProtoMessage() {} // Deprecated: Use QueryFilterRelationshipsResponse.ProtoReflect.Descriptor instead. func (*QueryFilterRelationshipsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{7} } func (x *QueryFilterRelationshipsResponse) GetRecords() []*RelationshipRecord { if x != nil { return x.Records } return nil } type QueryVerifyAccessRequestRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` AccessRequest *types.AccessRequest `protobuf:"bytes,2,opt,name=access_request,json=accessRequest,proto3" json:"access_request,omitempty"` } func (x *QueryVerifyAccessRequestRequest) Reset() { *x = QueryVerifyAccessRequestRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryVerifyAccessRequestRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryVerifyAccessRequestRequest) ProtoMessage() {} // Deprecated: Use QueryVerifyAccessRequestRequest.ProtoReflect.Descriptor instead. func (*QueryVerifyAccessRequestRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{8} } func (x *QueryVerifyAccessRequestRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *QueryVerifyAccessRequestRequest) GetAccessRequest() *types.AccessRequest { if x != nil { return x.AccessRequest } return nil } type QueryVerifyAccessRequestResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` } func (x *QueryVerifyAccessRequestResponse) Reset() { *x = QueryVerifyAccessRequestResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryVerifyAccessRequestResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryVerifyAccessRequestResponse) ProtoMessage() {} // Deprecated: Use QueryVerifyAccessRequestResponse.ProtoReflect.Descriptor instead. func (*QueryVerifyAccessRequestResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{9} } func (x *QueryVerifyAccessRequestResponse) GetValid() bool { if x != nil { return x.Valid } return false } type QueryValidatePolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType types.PolicyMarshalingType `protobuf:"varint,3,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (x *QueryValidatePolicyRequest) Reset() { *x = QueryValidatePolicyRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryValidatePolicyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryValidatePolicyRequest) ProtoMessage() {} // Deprecated: Use QueryValidatePolicyRequest.ProtoReflect.Descriptor instead. func (*QueryValidatePolicyRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{10} } func (x *QueryValidatePolicyRequest) GetPolicy() string { if x != nil { return x.Policy } return "" } func (x *QueryValidatePolicyRequest) GetMarshalType() types.PolicyMarshalingType { if x != nil { return x.MarshalType } return types.PolicyMarshalingType(0) } type QueryValidatePolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` Policy *types.Policy `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"` } func (x *QueryValidatePolicyResponse) Reset() { *x = QueryValidatePolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryValidatePolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryValidatePolicyResponse) ProtoMessage() {} // Deprecated: Use QueryValidatePolicyResponse.ProtoReflect.Descriptor instead. func (*QueryValidatePolicyResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{11} } func (x *QueryValidatePolicyResponse) GetValid() bool { if x != nil { return x.Valid } return false } func (x *QueryValidatePolicyResponse) GetErrorMsg() string { if x != nil { return x.ErrorMsg } return "" } func (x *QueryValidatePolicyResponse) GetPolicy() *types.Policy { if x != nil { return x.Policy } return nil } type QueryAccessDecisionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *QueryAccessDecisionRequest) Reset() { *x = QueryAccessDecisionRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAccessDecisionRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAccessDecisionRequest) ProtoMessage() {} // Deprecated: Use QueryAccessDecisionRequest.ProtoReflect.Descriptor instead. func (*QueryAccessDecisionRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{12} } func (x *QueryAccessDecisionRequest) GetId() string { if x != nil { return x.Id } return "" } type QueryAccessDecisionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Decision *AccessDecision `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` } func (x *QueryAccessDecisionResponse) Reset() { *x = QueryAccessDecisionResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAccessDecisionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAccessDecisionResponse) ProtoMessage() {} // Deprecated: Use QueryAccessDecisionResponse.ProtoReflect.Descriptor instead. func (*QueryAccessDecisionResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{13} } func (x *QueryAccessDecisionResponse) GetDecision() *AccessDecision { if x != nil { return x.Decision } return nil } type QueryObjectOwnerRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Object *types.Object `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` } func (x *QueryObjectOwnerRequest) Reset() { *x = QueryObjectOwnerRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryObjectOwnerRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryObjectOwnerRequest) ProtoMessage() {} // Deprecated: Use QueryObjectOwnerRequest.ProtoReflect.Descriptor instead. func (*QueryObjectOwnerRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{14} } func (x *QueryObjectOwnerRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *QueryObjectOwnerRequest) GetObject() *types.Object { if x != nil { return x.Object } return nil } type QueryObjectOwnerResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields IsRegistered bool `protobuf:"varint,1,opt,name=is_registered,json=isRegistered,proto3" json:"is_registered,omitempty"` Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (x *QueryObjectOwnerResponse) Reset() { *x = QueryObjectOwnerResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryObjectOwnerResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryObjectOwnerResponse) ProtoMessage() {} // Deprecated: Use QueryObjectOwnerResponse.ProtoReflect.Descriptor instead. func (*QueryObjectOwnerResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{15} } func (x *QueryObjectOwnerResponse) GetIsRegistered() bool { if x != nil { return x.IsRegistered } return false } func (x *QueryObjectOwnerResponse) GetRecord() *RelationshipRecord { if x != nil { return x.Record } return nil } type QueryRegistrationsCommitmentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *QueryRegistrationsCommitmentRequest) Reset() { *x = QueryRegistrationsCommitmentRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryRegistrationsCommitmentRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryRegistrationsCommitmentRequest) ProtoMessage() {} // Deprecated: Use QueryRegistrationsCommitmentRequest.ProtoReflect.Descriptor instead. func (*QueryRegistrationsCommitmentRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{16} } func (x *QueryRegistrationsCommitmentRequest) GetId() uint64 { if x != nil { return x.Id } return 0 } type QueryRegistrationsCommitmentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RegistrationsCommitment *RegistrationsCommitment `protobuf:"bytes,1,opt,name=registrations_commitment,json=registrationsCommitment,proto3" json:"registrations_commitment,omitempty"` } func (x *QueryRegistrationsCommitmentResponse) Reset() { *x = QueryRegistrationsCommitmentResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryRegistrationsCommitmentResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryRegistrationsCommitmentResponse) ProtoMessage() {} // Deprecated: Use QueryRegistrationsCommitmentResponse.ProtoReflect.Descriptor instead. func (*QueryRegistrationsCommitmentResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{17} } func (x *QueryRegistrationsCommitmentResponse) GetRegistrationsCommitment() *RegistrationsCommitment { if x != nil { return x.RegistrationsCommitment } return nil } type QueryRegistrationsCommitmentByCommitmentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` } func (x *QueryRegistrationsCommitmentByCommitmentRequest) Reset() { *x = QueryRegistrationsCommitmentByCommitmentRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryRegistrationsCommitmentByCommitmentRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryRegistrationsCommitmentByCommitmentRequest) ProtoMessage() {} // Deprecated: Use QueryRegistrationsCommitmentByCommitmentRequest.ProtoReflect.Descriptor instead. func (*QueryRegistrationsCommitmentByCommitmentRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{18} } func (x *QueryRegistrationsCommitmentByCommitmentRequest) GetCommitment() []byte { if x != nil { return x.Commitment } return nil } type QueryRegistrationsCommitmentByCommitmentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RegistrationsCommitments []*RegistrationsCommitment `protobuf:"bytes,1,rep,name=registrations_commitments,json=registrationsCommitments,proto3" json:"registrations_commitments,omitempty"` } func (x *QueryRegistrationsCommitmentByCommitmentResponse) Reset() { *x = QueryRegistrationsCommitmentByCommitmentResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryRegistrationsCommitmentByCommitmentResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryRegistrationsCommitmentByCommitmentResponse) ProtoMessage() {} // Deprecated: Use QueryRegistrationsCommitmentByCommitmentResponse.ProtoReflect.Descriptor instead. func (*QueryRegistrationsCommitmentByCommitmentResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{19} } func (x *QueryRegistrationsCommitmentByCommitmentResponse) GetRegistrationsCommitments() []*RegistrationsCommitment { if x != nil { return x.RegistrationsCommitments } return nil } type QueryGenerateCommitmentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Objects []*types.Object `protobuf:"bytes,2,rep,name=objects,proto3" json:"objects,omitempty"` Actor *types.Actor `protobuf:"bytes,3,opt,name=actor,proto3" json:"actor,omitempty"` } func (x *QueryGenerateCommitmentRequest) Reset() { *x = QueryGenerateCommitmentRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryGenerateCommitmentRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryGenerateCommitmentRequest) ProtoMessage() {} // Deprecated: Use QueryGenerateCommitmentRequest.ProtoReflect.Descriptor instead. func (*QueryGenerateCommitmentRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{20} } func (x *QueryGenerateCommitmentRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *QueryGenerateCommitmentRequest) GetObjects() []*types.Object { if x != nil { return x.Objects } return nil } func (x *QueryGenerateCommitmentRequest) GetActor() *types.Actor { if x != nil { return x.Actor } return nil } type QueryGenerateCommitmentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` HexCommitment string `protobuf:"bytes,2,opt,name=hex_commitment,json=hexCommitment,proto3" json:"hex_commitment,omitempty"` Proofs []*RegistrationProof `protobuf:"bytes,3,rep,name=proofs,proto3" json:"proofs,omitempty"` ProofsJson []string `protobuf:"bytes,4,rep,name=proofs_json,json=proofsJson,proto3" json:"proofs_json,omitempty"` } func (x *QueryGenerateCommitmentResponse) Reset() { *x = QueryGenerateCommitmentResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryGenerateCommitmentResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryGenerateCommitmentResponse) ProtoMessage() {} // Deprecated: Use QueryGenerateCommitmentResponse.ProtoReflect.Descriptor instead. func (*QueryGenerateCommitmentResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{21} } func (x *QueryGenerateCommitmentResponse) GetCommitment() []byte { if x != nil { return x.Commitment } return nil } func (x *QueryGenerateCommitmentResponse) GetHexCommitment() string { if x != nil { return x.HexCommitment } return "" } func (x *QueryGenerateCommitmentResponse) GetProofs() []*RegistrationProof { if x != nil { return x.Proofs } return nil } func (x *QueryGenerateCommitmentResponse) GetProofsJson() []string { if x != nil { return x.ProofsJson } return nil } type QueryHijackAttemptsByPolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` } func (x *QueryHijackAttemptsByPolicyRequest) Reset() { *x = QueryHijackAttemptsByPolicyRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryHijackAttemptsByPolicyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryHijackAttemptsByPolicyRequest) ProtoMessage() {} // Deprecated: Use QueryHijackAttemptsByPolicyRequest.ProtoReflect.Descriptor instead. func (*QueryHijackAttemptsByPolicyRequest) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{22} } func (x *QueryHijackAttemptsByPolicyRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } type QueryHijackAttemptsByPolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Events []*AmendmentEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` } func (x *QueryHijackAttemptsByPolicyResponse) Reset() { *x = QueryHijackAttemptsByPolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_query_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryHijackAttemptsByPolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryHijackAttemptsByPolicyResponse) ProtoMessage() {} // Deprecated: Use QueryHijackAttemptsByPolicyResponse.ProtoReflect.Descriptor instead. func (*QueryHijackAttemptsByPolicyResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_query_proto_rawDescGZIP(), []int{23} } func (x *QueryHijackAttemptsByPolicyResponse) GetEvents() []*AmendmentEvent { if x != nil { return x.Events } return nil } var File_sourcehub_acp_query_proto protoreflect.FileDescriptor var file_sourcehub_acp_query_proto_rawDesc = []byte{ 0x0a, 0x19, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x24, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4a, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x5f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x73, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x5f, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x38, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x58, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x35, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x18, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x51, 0x0a, 0x2f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x30, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x19, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x18, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xc3, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x68, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x78, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0x41, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xce, 0x10, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x89, 0x01, 0x0a, 0x09, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x73, 0x12, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x12, 0xbd, 0x01, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xbe, 0x01, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xbb, 0x01, 0x0a, 0x0b, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x55, 0x12, 0x53, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0xc1, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0xf3, 0x01, 0x0a, 0x23, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0xad, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0xbf, 0x01, 0x0a, 0x16, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x68, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x94, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_query_proto_rawDescOnce sync.Once file_sourcehub_acp_query_proto_rawDescData = file_sourcehub_acp_query_proto_rawDesc ) func file_sourcehub_acp_query_proto_rawDescGZIP() []byte { file_sourcehub_acp_query_proto_rawDescOnce.Do(func() { file_sourcehub_acp_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_query_proto_rawDescData) }) return file_sourcehub_acp_query_proto_rawDescData } var file_sourcehub_acp_query_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_sourcehub_acp_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: sourcehub.acp.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: sourcehub.acp.QueryParamsResponse (*QueryPolicyRequest)(nil), // 2: sourcehub.acp.QueryPolicyRequest (*QueryPolicyResponse)(nil), // 3: sourcehub.acp.QueryPolicyResponse (*QueryPolicyIdsRequest)(nil), // 4: sourcehub.acp.QueryPolicyIdsRequest (*QueryPolicyIdsResponse)(nil), // 5: sourcehub.acp.QueryPolicyIdsResponse (*QueryFilterRelationshipsRequest)(nil), // 6: sourcehub.acp.QueryFilterRelationshipsRequest (*QueryFilterRelationshipsResponse)(nil), // 7: sourcehub.acp.QueryFilterRelationshipsResponse (*QueryVerifyAccessRequestRequest)(nil), // 8: sourcehub.acp.QueryVerifyAccessRequestRequest (*QueryVerifyAccessRequestResponse)(nil), // 9: sourcehub.acp.QueryVerifyAccessRequestResponse (*QueryValidatePolicyRequest)(nil), // 10: sourcehub.acp.QueryValidatePolicyRequest (*QueryValidatePolicyResponse)(nil), // 11: sourcehub.acp.QueryValidatePolicyResponse (*QueryAccessDecisionRequest)(nil), // 12: sourcehub.acp.QueryAccessDecisionRequest (*QueryAccessDecisionResponse)(nil), // 13: sourcehub.acp.QueryAccessDecisionResponse (*QueryObjectOwnerRequest)(nil), // 14: sourcehub.acp.QueryObjectOwnerRequest (*QueryObjectOwnerResponse)(nil), // 15: sourcehub.acp.QueryObjectOwnerResponse (*QueryRegistrationsCommitmentRequest)(nil), // 16: sourcehub.acp.QueryRegistrationsCommitmentRequest (*QueryRegistrationsCommitmentResponse)(nil), // 17: sourcehub.acp.QueryRegistrationsCommitmentResponse (*QueryRegistrationsCommitmentByCommitmentRequest)(nil), // 18: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest (*QueryRegistrationsCommitmentByCommitmentResponse)(nil), // 19: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse (*QueryGenerateCommitmentRequest)(nil), // 20: sourcehub.acp.QueryGenerateCommitmentRequest (*QueryGenerateCommitmentResponse)(nil), // 21: sourcehub.acp.QueryGenerateCommitmentResponse (*QueryHijackAttemptsByPolicyRequest)(nil), // 22: sourcehub.acp.QueryHijackAttemptsByPolicyRequest (*QueryHijackAttemptsByPolicyResponse)(nil), // 23: sourcehub.acp.QueryHijackAttemptsByPolicyResponse (*Params)(nil), // 24: sourcehub.acp.Params (*PolicyRecord)(nil), // 25: sourcehub.acp.PolicyRecord (*v1beta1.PageRequest)(nil), // 26: cosmos.base.query.v1beta1.PageRequest (*v1beta1.PageResponse)(nil), // 27: cosmos.base.query.v1beta1.PageResponse (*types.RelationshipSelector)(nil), // 28: sourcenetwork.acp_core.RelationshipSelector (*RelationshipRecord)(nil), // 29: sourcehub.acp.RelationshipRecord (*types.AccessRequest)(nil), // 30: sourcenetwork.acp_core.AccessRequest (types.PolicyMarshalingType)(0), // 31: sourcenetwork.acp_core.PolicyMarshalingType (*types.Policy)(nil), // 32: sourcenetwork.acp_core.Policy (*AccessDecision)(nil), // 33: sourcehub.acp.AccessDecision (*types.Object)(nil), // 34: sourcenetwork.acp_core.Object (*RegistrationsCommitment)(nil), // 35: sourcehub.acp.RegistrationsCommitment (*types.Actor)(nil), // 36: sourcenetwork.acp_core.Actor (*RegistrationProof)(nil), // 37: sourcehub.acp.RegistrationProof (*AmendmentEvent)(nil), // 38: sourcehub.acp.AmendmentEvent } var file_sourcehub_acp_query_proto_depIdxs = []int32{ 24, // 0: sourcehub.acp.QueryParamsResponse.params:type_name -> sourcehub.acp.Params 25, // 1: sourcehub.acp.QueryPolicyResponse.record:type_name -> sourcehub.acp.PolicyRecord 26, // 2: sourcehub.acp.QueryPolicyIdsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 27, // 3: sourcehub.acp.QueryPolicyIdsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 28, // 4: sourcehub.acp.QueryFilterRelationshipsRequest.selector:type_name -> sourcenetwork.acp_core.RelationshipSelector 29, // 5: sourcehub.acp.QueryFilterRelationshipsResponse.records:type_name -> sourcehub.acp.RelationshipRecord 30, // 6: sourcehub.acp.QueryVerifyAccessRequestRequest.access_request:type_name -> sourcenetwork.acp_core.AccessRequest 31, // 7: sourcehub.acp.QueryValidatePolicyRequest.marshal_type:type_name -> sourcenetwork.acp_core.PolicyMarshalingType 32, // 8: sourcehub.acp.QueryValidatePolicyResponse.policy:type_name -> sourcenetwork.acp_core.Policy 33, // 9: sourcehub.acp.QueryAccessDecisionResponse.decision:type_name -> sourcehub.acp.AccessDecision 34, // 10: sourcehub.acp.QueryObjectOwnerRequest.object:type_name -> sourcenetwork.acp_core.Object 29, // 11: sourcehub.acp.QueryObjectOwnerResponse.record:type_name -> sourcehub.acp.RelationshipRecord 35, // 12: sourcehub.acp.QueryRegistrationsCommitmentResponse.registrations_commitment:type_name -> sourcehub.acp.RegistrationsCommitment 35, // 13: sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse.registrations_commitments:type_name -> sourcehub.acp.RegistrationsCommitment 34, // 14: sourcehub.acp.QueryGenerateCommitmentRequest.objects:type_name -> sourcenetwork.acp_core.Object 36, // 15: sourcehub.acp.QueryGenerateCommitmentRequest.actor:type_name -> sourcenetwork.acp_core.Actor 37, // 16: sourcehub.acp.QueryGenerateCommitmentResponse.proofs:type_name -> sourcehub.acp.RegistrationProof 38, // 17: sourcehub.acp.QueryHijackAttemptsByPolicyResponse.events:type_name -> sourcehub.acp.AmendmentEvent 0, // 18: sourcehub.acp.Query.Params:input_type -> sourcehub.acp.QueryParamsRequest 2, // 19: sourcehub.acp.Query.Policy:input_type -> sourcehub.acp.QueryPolicyRequest 4, // 20: sourcehub.acp.Query.PolicyIds:input_type -> sourcehub.acp.QueryPolicyIdsRequest 6, // 21: sourcehub.acp.Query.FilterRelationships:input_type -> sourcehub.acp.QueryFilterRelationshipsRequest 8, // 22: sourcehub.acp.Query.VerifyAccessRequest:input_type -> sourcehub.acp.QueryVerifyAccessRequestRequest 10, // 23: sourcehub.acp.Query.ValidatePolicy:input_type -> sourcehub.acp.QueryValidatePolicyRequest 12, // 24: sourcehub.acp.Query.AccessDecision:input_type -> sourcehub.acp.QueryAccessDecisionRequest 14, // 25: sourcehub.acp.Query.ObjectOwner:input_type -> sourcehub.acp.QueryObjectOwnerRequest 16, // 26: sourcehub.acp.Query.RegistrationsCommitment:input_type -> sourcehub.acp.QueryRegistrationsCommitmentRequest 18, // 27: sourcehub.acp.Query.RegistrationsCommitmentByCommitment:input_type -> sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest 20, // 28: sourcehub.acp.Query.GenerateCommitment:input_type -> sourcehub.acp.QueryGenerateCommitmentRequest 22, // 29: sourcehub.acp.Query.HijackAttemptsByPolicy:input_type -> sourcehub.acp.QueryHijackAttemptsByPolicyRequest 1, // 30: sourcehub.acp.Query.Params:output_type -> sourcehub.acp.QueryParamsResponse 3, // 31: sourcehub.acp.Query.Policy:output_type -> sourcehub.acp.QueryPolicyResponse 5, // 32: sourcehub.acp.Query.PolicyIds:output_type -> sourcehub.acp.QueryPolicyIdsResponse 7, // 33: sourcehub.acp.Query.FilterRelationships:output_type -> sourcehub.acp.QueryFilterRelationshipsResponse 9, // 34: sourcehub.acp.Query.VerifyAccessRequest:output_type -> sourcehub.acp.QueryVerifyAccessRequestResponse 11, // 35: sourcehub.acp.Query.ValidatePolicy:output_type -> sourcehub.acp.QueryValidatePolicyResponse 13, // 36: sourcehub.acp.Query.AccessDecision:output_type -> sourcehub.acp.QueryAccessDecisionResponse 15, // 37: sourcehub.acp.Query.ObjectOwner:output_type -> sourcehub.acp.QueryObjectOwnerResponse 17, // 38: sourcehub.acp.Query.RegistrationsCommitment:output_type -> sourcehub.acp.QueryRegistrationsCommitmentResponse 19, // 39: sourcehub.acp.Query.RegistrationsCommitmentByCommitment:output_type -> sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse 21, // 40: sourcehub.acp.Query.GenerateCommitment:output_type -> sourcehub.acp.QueryGenerateCommitmentResponse 23, // 41: sourcehub.acp.Query.HijackAttemptsByPolicy:output_type -> sourcehub.acp.QueryHijackAttemptsByPolicyResponse 30, // [30:42] is the sub-list for method output_type 18, // [18:30] is the sub-list for method input_type 18, // [18:18] is the sub-list for extension type_name 18, // [18:18] is the sub-list for extension extendee 0, // [0:18] is the sub-list for field type_name } func init() { file_sourcehub_acp_query_proto_init() } func file_sourcehub_acp_query_proto_init() { if File_sourcehub_acp_query_proto != nil { return } file_sourcehub_acp_access_decision_proto_init() file_sourcehub_acp_commitment_proto_init() file_sourcehub_acp_params_proto_init() file_sourcehub_acp_record_proto_init() file_sourcehub_acp_registration_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPolicyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPolicyIdsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPolicyIdsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryFilterRelationshipsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryFilterRelationshipsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryVerifyAccessRequestRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryVerifyAccessRequestResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryValidatePolicyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryValidatePolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAccessDecisionRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAccessDecisionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryObjectOwnerRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryObjectOwnerResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRegistrationsCommitmentRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRegistrationsCommitmentResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRegistrationsCommitmentByCommitmentRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRegistrationsCommitmentByCommitmentResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGenerateCommitmentRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGenerateCommitmentResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryHijackAttemptsByPolicyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryHijackAttemptsByPolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_query_proto_rawDesc, NumEnums: 0, NumMessages: 24, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_acp_query_proto_goTypes, DependencyIndexes: file_sourcehub_acp_query_proto_depIdxs, MessageInfos: file_sourcehub_acp_query_proto_msgTypes, }.Build() File_sourcehub_acp_query_proto = out.File file_sourcehub_acp_query_proto_rawDesc = nil file_sourcehub_acp_query_proto_goTypes = nil file_sourcehub_acp_query_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/query_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/acp/query.proto package acp import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Query_Params_FullMethodName = "/sourcehub.acp.Query/Params" Query_Policy_FullMethodName = "/sourcehub.acp.Query/Policy" Query_PolicyIds_FullMethodName = "/sourcehub.acp.Query/PolicyIds" Query_FilterRelationships_FullMethodName = "/sourcehub.acp.Query/FilterRelationships" Query_VerifyAccessRequest_FullMethodName = "/sourcehub.acp.Query/VerifyAccessRequest" Query_ValidatePolicy_FullMethodName = "/sourcehub.acp.Query/ValidatePolicy" Query_AccessDecision_FullMethodName = "/sourcehub.acp.Query/AccessDecision" Query_ObjectOwner_FullMethodName = "/sourcehub.acp.Query/ObjectOwner" Query_RegistrationsCommitment_FullMethodName = "/sourcehub.acp.Query/RegistrationsCommitment" Query_RegistrationsCommitmentByCommitment_FullMethodName = "/sourcehub.acp.Query/RegistrationsCommitmentByCommitment" Query_GenerateCommitment_FullMethodName = "/sourcehub.acp.Query/GenerateCommitment" Query_HijackAttemptsByPolicy_FullMethodName = "/sourcehub.acp.Query/HijackAttemptsByPolicy" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Query defines the gRPC querier service. type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Policy returns a Policy with the given ID. Policy(ctx context.Context, in *QueryPolicyRequest, opts ...grpc.CallOption) (*QueryPolicyResponse, error) // PolicyIds returns list of Ids for Policies registered in the system. PolicyIds(ctx context.Context, in *QueryPolicyIdsRequest, opts ...grpc.CallOption) (*QueryPolicyIdsResponse, error) // FilterRelationships returns filtered set of Relationships in a Policy. FilterRelationships(ctx context.Context, in *QueryFilterRelationshipsRequest, opts ...grpc.CallOption) (*QueryFilterRelationshipsResponse, error) // VerifyAccessRequest verifies whether an Access Request is accepted with respect to the given Policy's Relation Graph. VerifyAccessRequest(ctx context.Context, in *QueryVerifyAccessRequestRequest, opts ...grpc.CallOption) (*QueryVerifyAccessRequestResponse, error) // ValidatePolicy verifies whether the given Policy definition is properly formatted ValidatePolicy(ctx context.Context, in *QueryValidatePolicyRequest, opts ...grpc.CallOption) (*QueryValidatePolicyResponse, error) // AccessDecision queries the system for an AccessDecision with the given ID. AccessDecision(ctx context.Context, in *QueryAccessDecisionRequest, opts ...grpc.CallOption) (*QueryAccessDecisionResponse, error) // ObjectOwner returns the Actor ID of the the given Object's owner ObjectOwner(ctx context.Context, in *QueryObjectOwnerRequest, opts ...grpc.CallOption) (*QueryObjectOwnerResponse, error) // RegistrationsCommitment returns a specific RegistrationsCommitment record RegistrationsCommitment(ctx context.Context, in *QueryRegistrationsCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentResponse, error) // RegistrationsCommitmentByCommitment returns all RegistrationCommitment records with a given commitment RegistrationsCommitmentByCommitment(ctx context.Context, in *QueryRegistrationsCommitmentByCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentByCommitmentResponse, error) // GenerateCommitment generates a Object registration commitment for the given objects // // Note: this operation assures the commitment is valid (no object is registered and the policy exists) // but exposes the Object Ids to the RPC node. // ONLY use this method if the node is trusted GenerateCommitment(ctx context.Context, in *QueryGenerateCommitmentRequest, opts ...grpc.CallOption) (*QueryGenerateCommitmentResponse, error) // HijackAttemptsByPolicy returns, for a given policy, all AmendmentEvent whose hijack flag is true HijackAttemptsByPolicy(ctx context.Context, in *QueryHijackAttemptsByPolicyRequest, opts ...grpc.CallOption) (*QueryHijackAttemptsByPolicyResponse, error) } type queryClient struct { cc grpc.ClientConnInterface } func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Policy(ctx context.Context, in *QueryPolicyRequest, opts ...grpc.CallOption) (*QueryPolicyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryPolicyResponse) err := c.cc.Invoke(ctx, Query_Policy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) PolicyIds(ctx context.Context, in *QueryPolicyIdsRequest, opts ...grpc.CallOption) (*QueryPolicyIdsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryPolicyIdsResponse) err := c.cc.Invoke(ctx, Query_PolicyIds_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) FilterRelationships(ctx context.Context, in *QueryFilterRelationshipsRequest, opts ...grpc.CallOption) (*QueryFilterRelationshipsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryFilterRelationshipsResponse) err := c.cc.Invoke(ctx, Query_FilterRelationships_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) VerifyAccessRequest(ctx context.Context, in *QueryVerifyAccessRequestRequest, opts ...grpc.CallOption) (*QueryVerifyAccessRequestResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryVerifyAccessRequestResponse) err := c.cc.Invoke(ctx, Query_VerifyAccessRequest_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) ValidatePolicy(ctx context.Context, in *QueryValidatePolicyRequest, opts ...grpc.CallOption) (*QueryValidatePolicyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryValidatePolicyResponse) err := c.cc.Invoke(ctx, Query_ValidatePolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) AccessDecision(ctx context.Context, in *QueryAccessDecisionRequest, opts ...grpc.CallOption) (*QueryAccessDecisionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryAccessDecisionResponse) err := c.cc.Invoke(ctx, Query_AccessDecision_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) ObjectOwner(ctx context.Context, in *QueryObjectOwnerRequest, opts ...grpc.CallOption) (*QueryObjectOwnerResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryObjectOwnerResponse) err := c.cc.Invoke(ctx, Query_ObjectOwner_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) RegistrationsCommitment(ctx context.Context, in *QueryRegistrationsCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryRegistrationsCommitmentResponse) err := c.cc.Invoke(ctx, Query_RegistrationsCommitment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) RegistrationsCommitmentByCommitment(ctx context.Context, in *QueryRegistrationsCommitmentByCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentByCommitmentResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryRegistrationsCommitmentByCommitmentResponse) err := c.cc.Invoke(ctx, Query_RegistrationsCommitmentByCommitment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) GenerateCommitment(ctx context.Context, in *QueryGenerateCommitmentRequest, opts ...grpc.CallOption) (*QueryGenerateCommitmentResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryGenerateCommitmentResponse) err := c.cc.Invoke(ctx, Query_GenerateCommitment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) HijackAttemptsByPolicy(ctx context.Context, in *QueryHijackAttemptsByPolicyRequest, opts ...grpc.CallOption) (*QueryHijackAttemptsByPolicyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryHijackAttemptsByPolicyResponse) err := c.cc.Invoke(ctx, Query_HijackAttemptsByPolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility. // // Query defines the gRPC querier service. type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Policy returns a Policy with the given ID. Policy(context.Context, *QueryPolicyRequest) (*QueryPolicyResponse, error) // PolicyIds returns list of Ids for Policies registered in the system. PolicyIds(context.Context, *QueryPolicyIdsRequest) (*QueryPolicyIdsResponse, error) // FilterRelationships returns filtered set of Relationships in a Policy. FilterRelationships(context.Context, *QueryFilterRelationshipsRequest) (*QueryFilterRelationshipsResponse, error) // VerifyAccessRequest verifies whether an Access Request is accepted with respect to the given Policy's Relation Graph. VerifyAccessRequest(context.Context, *QueryVerifyAccessRequestRequest) (*QueryVerifyAccessRequestResponse, error) // ValidatePolicy verifies whether the given Policy definition is properly formatted ValidatePolicy(context.Context, *QueryValidatePolicyRequest) (*QueryValidatePolicyResponse, error) // AccessDecision queries the system for an AccessDecision with the given ID. AccessDecision(context.Context, *QueryAccessDecisionRequest) (*QueryAccessDecisionResponse, error) // ObjectOwner returns the Actor ID of the the given Object's owner ObjectOwner(context.Context, *QueryObjectOwnerRequest) (*QueryObjectOwnerResponse, error) // RegistrationsCommitment returns a specific RegistrationsCommitment record RegistrationsCommitment(context.Context, *QueryRegistrationsCommitmentRequest) (*QueryRegistrationsCommitmentResponse, error) // RegistrationsCommitmentByCommitment returns all RegistrationCommitment records with a given commitment RegistrationsCommitmentByCommitment(context.Context, *QueryRegistrationsCommitmentByCommitmentRequest) (*QueryRegistrationsCommitmentByCommitmentResponse, error) // GenerateCommitment generates a Object registration commitment for the given objects // // Note: this operation assures the commitment is valid (no object is registered and the policy exists) // but exposes the Object Ids to the RPC node. // ONLY use this method if the node is trusted GenerateCommitment(context.Context, *QueryGenerateCommitmentRequest) (*QueryGenerateCommitmentResponse, error) // HijackAttemptsByPolicy returns, for a given policy, all AmendmentEvent whose hijack flag is true HijackAttemptsByPolicy(context.Context, *QueryHijackAttemptsByPolicyRequest) (*QueryHijackAttemptsByPolicyResponse, error) mustEmbedUnimplementedQueryServer() } // UnimplementedQueryServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } func (UnimplementedQueryServer) Policy(context.Context, *QueryPolicyRequest) (*QueryPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Policy not implemented") } func (UnimplementedQueryServer) PolicyIds(context.Context, *QueryPolicyIdsRequest) (*QueryPolicyIdsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PolicyIds not implemented") } func (UnimplementedQueryServer) FilterRelationships(context.Context, *QueryFilterRelationshipsRequest) (*QueryFilterRelationshipsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FilterRelationships not implemented") } func (UnimplementedQueryServer) VerifyAccessRequest(context.Context, *QueryVerifyAccessRequestRequest) (*QueryVerifyAccessRequestResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VerifyAccessRequest not implemented") } func (UnimplementedQueryServer) ValidatePolicy(context.Context, *QueryValidatePolicyRequest) (*QueryValidatePolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidatePolicy not implemented") } func (UnimplementedQueryServer) AccessDecision(context.Context, *QueryAccessDecisionRequest) (*QueryAccessDecisionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AccessDecision not implemented") } func (UnimplementedQueryServer) ObjectOwner(context.Context, *QueryObjectOwnerRequest) (*QueryObjectOwnerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ObjectOwner not implemented") } func (UnimplementedQueryServer) RegistrationsCommitment(context.Context, *QueryRegistrationsCommitmentRequest) (*QueryRegistrationsCommitmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegistrationsCommitment not implemented") } func (UnimplementedQueryServer) RegistrationsCommitmentByCommitment(context.Context, *QueryRegistrationsCommitmentByCommitmentRequest) (*QueryRegistrationsCommitmentByCommitmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegistrationsCommitmentByCommitment not implemented") } func (UnimplementedQueryServer) GenerateCommitment(context.Context, *QueryGenerateCommitmentRequest) (*QueryGenerateCommitmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateCommitment not implemented") } func (UnimplementedQueryServer) HijackAttemptsByPolicy(context.Context, *QueryHijackAttemptsByPolicyRequest) (*QueryHijackAttemptsByPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HijackAttemptsByPolicy not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will // result in compilation errors. type UnsafeQueryServer interface { mustEmbedUnimplementedQueryServer() } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { // If the following call pancis, it indicates UnimplementedQueryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Query_Params_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Policy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Policy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Policy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Policy(ctx, req.(*QueryPolicyRequest)) } return interceptor(ctx, in, info, handler) } func _Query_PolicyIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPolicyIdsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).PolicyIds(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_PolicyIds_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).PolicyIds(ctx, req.(*QueryPolicyIdsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_FilterRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryFilterRelationshipsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).FilterRelationships(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_FilterRelationships_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).FilterRelationships(ctx, req.(*QueryFilterRelationshipsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_VerifyAccessRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryVerifyAccessRequestRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).VerifyAccessRequest(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_VerifyAccessRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).VerifyAccessRequest(ctx, req.(*QueryVerifyAccessRequestRequest)) } return interceptor(ctx, in, info, handler) } func _Query_ValidatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryValidatePolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).ValidatePolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_ValidatePolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValidatePolicy(ctx, req.(*QueryValidatePolicyRequest)) } return interceptor(ctx, in, info, handler) } func _Query_AccessDecision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAccessDecisionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).AccessDecision(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_AccessDecision_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AccessDecision(ctx, req.(*QueryAccessDecisionRequest)) } return interceptor(ctx, in, info, handler) } func _Query_ObjectOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryObjectOwnerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).ObjectOwner(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_ObjectOwner_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ObjectOwner(ctx, req.(*QueryObjectOwnerRequest)) } return interceptor(ctx, in, info, handler) } func _Query_RegistrationsCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRegistrationsCommitmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).RegistrationsCommitment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_RegistrationsCommitment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).RegistrationsCommitment(ctx, req.(*QueryRegistrationsCommitmentRequest)) } return interceptor(ctx, in, info, handler) } func _Query_RegistrationsCommitmentByCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRegistrationsCommitmentByCommitmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).RegistrationsCommitmentByCommitment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_RegistrationsCommitmentByCommitment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).RegistrationsCommitmentByCommitment(ctx, req.(*QueryRegistrationsCommitmentByCommitmentRequest)) } return interceptor(ctx, in, info, handler) } func _Query_GenerateCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGenerateCommitmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).GenerateCommitment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_GenerateCommitment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).GenerateCommitment(ctx, req.(*QueryGenerateCommitmentRequest)) } return interceptor(ctx, in, info, handler) } func _Query_HijackAttemptsByPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryHijackAttemptsByPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).HijackAttemptsByPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_HijackAttemptsByPolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).HijackAttemptsByPolicy(ctx, req.(*QueryHijackAttemptsByPolicyRequest)) } return interceptor(ctx, in, info, handler) } // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.acp.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, { MethodName: "Policy", Handler: _Query_Policy_Handler, }, { MethodName: "PolicyIds", Handler: _Query_PolicyIds_Handler, }, { MethodName: "FilterRelationships", Handler: _Query_FilterRelationships_Handler, }, { MethodName: "VerifyAccessRequest", Handler: _Query_VerifyAccessRequest_Handler, }, { MethodName: "ValidatePolicy", Handler: _Query_ValidatePolicy_Handler, }, { MethodName: "AccessDecision", Handler: _Query_AccessDecision_Handler, }, { MethodName: "ObjectOwner", Handler: _Query_ObjectOwner_Handler, }, { MethodName: "RegistrationsCommitment", Handler: _Query_RegistrationsCommitment_Handler, }, { MethodName: "RegistrationsCommitmentByCommitment", Handler: _Query_RegistrationsCommitmentByCommitment_Handler, }, { MethodName: "GenerateCommitment", Handler: _Query_GenerateCommitment_Handler, }, { MethodName: "HijackAttemptsByPolicy", Handler: _Query_HijackAttemptsByPolicy_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/acp/query.proto", } ================================================ FILE: api/sourcehub/acp/record.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" types "github.com/sourcenetwork/acp_core/pkg/pulsar/types" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_RecordMetadata protoreflect.MessageDescriptor fd_RecordMetadata_creation_ts protoreflect.FieldDescriptor fd_RecordMetadata_tx_hash protoreflect.FieldDescriptor fd_RecordMetadata_tx_signer protoreflect.FieldDescriptor fd_RecordMetadata_owner_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_record_proto_init() md_RecordMetadata = File_sourcehub_acp_record_proto.Messages().ByName("RecordMetadata") fd_RecordMetadata_creation_ts = md_RecordMetadata.Fields().ByName("creation_ts") fd_RecordMetadata_tx_hash = md_RecordMetadata.Fields().ByName("tx_hash") fd_RecordMetadata_tx_signer = md_RecordMetadata.Fields().ByName("tx_signer") fd_RecordMetadata_owner_did = md_RecordMetadata.Fields().ByName("owner_did") } var _ protoreflect.Message = (*fastReflection_RecordMetadata)(nil) type fastReflection_RecordMetadata RecordMetadata func (x *RecordMetadata) ProtoReflect() protoreflect.Message { return (*fastReflection_RecordMetadata)(x) } func (x *RecordMetadata) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_record_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RecordMetadata_messageType fastReflection_RecordMetadata_messageType var _ protoreflect.MessageType = fastReflection_RecordMetadata_messageType{} type fastReflection_RecordMetadata_messageType struct{} func (x fastReflection_RecordMetadata_messageType) Zero() protoreflect.Message { return (*fastReflection_RecordMetadata)(nil) } func (x fastReflection_RecordMetadata_messageType) New() protoreflect.Message { return new(fastReflection_RecordMetadata) } func (x fastReflection_RecordMetadata_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RecordMetadata } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RecordMetadata) Descriptor() protoreflect.MessageDescriptor { return md_RecordMetadata } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RecordMetadata) Type() protoreflect.MessageType { return _fastReflection_RecordMetadata_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RecordMetadata) New() protoreflect.Message { return new(fastReflection_RecordMetadata) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RecordMetadata) Interface() protoreflect.ProtoMessage { return (*RecordMetadata)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RecordMetadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.CreationTs != nil { value := protoreflect.ValueOfMessage(x.CreationTs.ProtoReflect()) if !f(fd_RecordMetadata_creation_ts, value) { return } } if len(x.TxHash) != 0 { value := protoreflect.ValueOfBytes(x.TxHash) if !f(fd_RecordMetadata_tx_hash, value) { return } } if x.TxSigner != "" { value := protoreflect.ValueOfString(x.TxSigner) if !f(fd_RecordMetadata_tx_signer, value) { return } } if x.OwnerDid != "" { value := protoreflect.ValueOfString(x.OwnerDid) if !f(fd_RecordMetadata_owner_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RecordMetadata) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RecordMetadata.creation_ts": return x.CreationTs != nil case "sourcehub.acp.RecordMetadata.tx_hash": return len(x.TxHash) != 0 case "sourcehub.acp.RecordMetadata.tx_signer": return x.TxSigner != "" case "sourcehub.acp.RecordMetadata.owner_did": return x.OwnerDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RecordMetadata")) } panic(fmt.Errorf("message sourcehub.acp.RecordMetadata does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RecordMetadata) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RecordMetadata.creation_ts": x.CreationTs = nil case "sourcehub.acp.RecordMetadata.tx_hash": x.TxHash = nil case "sourcehub.acp.RecordMetadata.tx_signer": x.TxSigner = "" case "sourcehub.acp.RecordMetadata.owner_did": x.OwnerDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RecordMetadata")) } panic(fmt.Errorf("message sourcehub.acp.RecordMetadata does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RecordMetadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RecordMetadata.creation_ts": value := x.CreationTs return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.RecordMetadata.tx_hash": value := x.TxHash return protoreflect.ValueOfBytes(value) case "sourcehub.acp.RecordMetadata.tx_signer": value := x.TxSigner return protoreflect.ValueOfString(value) case "sourcehub.acp.RecordMetadata.owner_did": value := x.OwnerDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RecordMetadata")) } panic(fmt.Errorf("message sourcehub.acp.RecordMetadata does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RecordMetadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RecordMetadata.creation_ts": x.CreationTs = value.Message().Interface().(*Timestamp) case "sourcehub.acp.RecordMetadata.tx_hash": x.TxHash = value.Bytes() case "sourcehub.acp.RecordMetadata.tx_signer": x.TxSigner = value.Interface().(string) case "sourcehub.acp.RecordMetadata.owner_did": x.OwnerDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RecordMetadata")) } panic(fmt.Errorf("message sourcehub.acp.RecordMetadata does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RecordMetadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RecordMetadata.creation_ts": if x.CreationTs == nil { x.CreationTs = new(Timestamp) } return protoreflect.ValueOfMessage(x.CreationTs.ProtoReflect()) case "sourcehub.acp.RecordMetadata.tx_hash": panic(fmt.Errorf("field tx_hash of message sourcehub.acp.RecordMetadata is not mutable")) case "sourcehub.acp.RecordMetadata.tx_signer": panic(fmt.Errorf("field tx_signer of message sourcehub.acp.RecordMetadata is not mutable")) case "sourcehub.acp.RecordMetadata.owner_did": panic(fmt.Errorf("field owner_did of message sourcehub.acp.RecordMetadata is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RecordMetadata")) } panic(fmt.Errorf("message sourcehub.acp.RecordMetadata does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RecordMetadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RecordMetadata.creation_ts": m := new(Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.RecordMetadata.tx_hash": return protoreflect.ValueOfBytes(nil) case "sourcehub.acp.RecordMetadata.tx_signer": return protoreflect.ValueOfString("") case "sourcehub.acp.RecordMetadata.owner_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RecordMetadata")) } panic(fmt.Errorf("message sourcehub.acp.RecordMetadata does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RecordMetadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RecordMetadata", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RecordMetadata) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RecordMetadata) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RecordMetadata) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RecordMetadata) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RecordMetadata) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.CreationTs != nil { l = options.Size(x.CreationTs) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.TxHash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.TxSigner) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.OwnerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RecordMetadata) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.OwnerDid) > 0 { i -= len(x.OwnerDid) copy(dAtA[i:], x.OwnerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerDid))) i-- dAtA[i] = 0x22 } if len(x.TxSigner) > 0 { i -= len(x.TxSigner) copy(dAtA[i:], x.TxSigner) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxSigner))) i-- dAtA[i] = 0x1a } if len(x.TxHash) > 0 { i -= len(x.TxHash) copy(dAtA[i:], x.TxHash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) i-- dAtA[i] = 0x12 } if x.CreationTs != nil { encoded, err := options.Marshal(x.CreationTs) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RecordMetadata) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RecordMetadata: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RecordMetadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTs == nil { x.CreationTs = &Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTs); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.TxHash = append(x.TxHash[:0], dAtA[iNdEx:postIndex]...) if x.TxHash == nil { x.TxHash = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxSigner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.TxSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.OwnerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_PolicyRecord protoreflect.MessageDescriptor fd_PolicyRecord_policy protoreflect.FieldDescriptor fd_PolicyRecord_metadata protoreflect.FieldDescriptor fd_PolicyRecord_raw_policy protoreflect.FieldDescriptor fd_PolicyRecord_marshal_type protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_record_proto_init() md_PolicyRecord = File_sourcehub_acp_record_proto.Messages().ByName("PolicyRecord") fd_PolicyRecord_policy = md_PolicyRecord.Fields().ByName("policy") fd_PolicyRecord_metadata = md_PolicyRecord.Fields().ByName("metadata") fd_PolicyRecord_raw_policy = md_PolicyRecord.Fields().ByName("raw_policy") fd_PolicyRecord_marshal_type = md_PolicyRecord.Fields().ByName("marshal_type") } var _ protoreflect.Message = (*fastReflection_PolicyRecord)(nil) type fastReflection_PolicyRecord PolicyRecord func (x *PolicyRecord) ProtoReflect() protoreflect.Message { return (*fastReflection_PolicyRecord)(x) } func (x *PolicyRecord) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_record_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PolicyRecord_messageType fastReflection_PolicyRecord_messageType var _ protoreflect.MessageType = fastReflection_PolicyRecord_messageType{} type fastReflection_PolicyRecord_messageType struct{} func (x fastReflection_PolicyRecord_messageType) Zero() protoreflect.Message { return (*fastReflection_PolicyRecord)(nil) } func (x fastReflection_PolicyRecord_messageType) New() protoreflect.Message { return new(fastReflection_PolicyRecord) } func (x fastReflection_PolicyRecord_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PolicyRecord } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PolicyRecord) Descriptor() protoreflect.MessageDescriptor { return md_PolicyRecord } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PolicyRecord) Type() protoreflect.MessageType { return _fastReflection_PolicyRecord_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PolicyRecord) New() protoreflect.Message { return new(fastReflection_PolicyRecord) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PolicyRecord) Interface() protoreflect.ProtoMessage { return (*PolicyRecord)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PolicyRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != nil { value := protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) if !f(fd_PolicyRecord_policy, value) { return } } if x.Metadata != nil { value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) if !f(fd_PolicyRecord_metadata, value) { return } } if x.RawPolicy != "" { value := protoreflect.ValueOfString(x.RawPolicy) if !f(fd_PolicyRecord_raw_policy, value) { return } } if x.MarshalType != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MarshalType)) if !f(fd_PolicyRecord_marshal_type, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PolicyRecord) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.PolicyRecord.policy": return x.Policy != nil case "sourcehub.acp.PolicyRecord.metadata": return x.Metadata != nil case "sourcehub.acp.PolicyRecord.raw_policy": return x.RawPolicy != "" case "sourcehub.acp.PolicyRecord.marshal_type": return x.MarshalType != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyRecord")) } panic(fmt.Errorf("message sourcehub.acp.PolicyRecord does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.PolicyRecord.policy": x.Policy = nil case "sourcehub.acp.PolicyRecord.metadata": x.Metadata = nil case "sourcehub.acp.PolicyRecord.raw_policy": x.RawPolicy = "" case "sourcehub.acp.PolicyRecord.marshal_type": x.MarshalType = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyRecord")) } panic(fmt.Errorf("message sourcehub.acp.PolicyRecord does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PolicyRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.PolicyRecord.policy": value := x.Policy return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyRecord.metadata": value := x.Metadata return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.PolicyRecord.raw_policy": value := x.RawPolicy return protoreflect.ValueOfString(value) case "sourcehub.acp.PolicyRecord.marshal_type": value := x.MarshalType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyRecord")) } panic(fmt.Errorf("message sourcehub.acp.PolicyRecord does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.PolicyRecord.policy": x.Policy = value.Message().Interface().(*types.Policy) case "sourcehub.acp.PolicyRecord.metadata": x.Metadata = value.Message().Interface().(*RecordMetadata) case "sourcehub.acp.PolicyRecord.raw_policy": x.RawPolicy = value.Interface().(string) case "sourcehub.acp.PolicyRecord.marshal_type": x.MarshalType = (types.PolicyMarshalingType)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyRecord")) } panic(fmt.Errorf("message sourcehub.acp.PolicyRecord does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.PolicyRecord.policy": if x.Policy == nil { x.Policy = new(types.Policy) } return protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) case "sourcehub.acp.PolicyRecord.metadata": if x.Metadata == nil { x.Metadata = new(RecordMetadata) } return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "sourcehub.acp.PolicyRecord.raw_policy": panic(fmt.Errorf("field raw_policy of message sourcehub.acp.PolicyRecord is not mutable")) case "sourcehub.acp.PolicyRecord.marshal_type": panic(fmt.Errorf("field marshal_type of message sourcehub.acp.PolicyRecord is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyRecord")) } panic(fmt.Errorf("message sourcehub.acp.PolicyRecord does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PolicyRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.PolicyRecord.policy": m := new(types.Policy) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.PolicyRecord.metadata": m := new(RecordMetadata) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.PolicyRecord.raw_policy": return protoreflect.ValueOfString("") case "sourcehub.acp.PolicyRecord.marshal_type": return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.PolicyRecord")) } panic(fmt.Errorf("message sourcehub.acp.PolicyRecord does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PolicyRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.PolicyRecord", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PolicyRecord) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PolicyRecord) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PolicyRecord) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PolicyRecord) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Policy != nil { l = options.Size(x.Policy) n += 1 + l + runtime.Sov(uint64(l)) } if x.Metadata != nil { l = options.Size(x.Metadata) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.RawPolicy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.MarshalType != 0 { n += 1 + runtime.Sov(uint64(x.MarshalType)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PolicyRecord) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.MarshalType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MarshalType)) i-- dAtA[i] = 0x20 } if len(x.RawPolicy) > 0 { i -= len(x.RawPolicy) copy(dAtA[i:], x.RawPolicy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RawPolicy))) i-- dAtA[i] = 0x1a } if x.Metadata != nil { encoded, err := options.Marshal(x.Metadata) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.Policy != nil { encoded, err := options.Marshal(x.Policy) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PolicyRecord) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyRecord: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Policy == nil { x.Policy = &types.Policy{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Policy); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = &RecordMetadata{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawPolicy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RawPolicy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } x.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RelationshipRecord protoreflect.MessageDescriptor fd_RelationshipRecord_policy_id protoreflect.FieldDescriptor fd_RelationshipRecord_relationship protoreflect.FieldDescriptor fd_RelationshipRecord_archived protoreflect.FieldDescriptor fd_RelationshipRecord_metadata protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_record_proto_init() md_RelationshipRecord = File_sourcehub_acp_record_proto.Messages().ByName("RelationshipRecord") fd_RelationshipRecord_policy_id = md_RelationshipRecord.Fields().ByName("policy_id") fd_RelationshipRecord_relationship = md_RelationshipRecord.Fields().ByName("relationship") fd_RelationshipRecord_archived = md_RelationshipRecord.Fields().ByName("archived") fd_RelationshipRecord_metadata = md_RelationshipRecord.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_RelationshipRecord)(nil) type fastReflection_RelationshipRecord RelationshipRecord func (x *RelationshipRecord) ProtoReflect() protoreflect.Message { return (*fastReflection_RelationshipRecord)(x) } func (x *RelationshipRecord) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_record_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RelationshipRecord_messageType fastReflection_RelationshipRecord_messageType var _ protoreflect.MessageType = fastReflection_RelationshipRecord_messageType{} type fastReflection_RelationshipRecord_messageType struct{} func (x fastReflection_RelationshipRecord_messageType) Zero() protoreflect.Message { return (*fastReflection_RelationshipRecord)(nil) } func (x fastReflection_RelationshipRecord_messageType) New() protoreflect.Message { return new(fastReflection_RelationshipRecord) } func (x fastReflection_RelationshipRecord_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RelationshipRecord } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RelationshipRecord) Descriptor() protoreflect.MessageDescriptor { return md_RelationshipRecord } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RelationshipRecord) Type() protoreflect.MessageType { return _fastReflection_RelationshipRecord_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RelationshipRecord) New() protoreflect.Message { return new(fastReflection_RelationshipRecord) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RelationshipRecord) Interface() protoreflect.ProtoMessage { return (*RelationshipRecord)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RelationshipRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_RelationshipRecord_policy_id, value) { return } } if x.Relationship != nil { value := protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) if !f(fd_RelationshipRecord_relationship, value) { return } } if x.Archived != false { value := protoreflect.ValueOfBool(x.Archived) if !f(fd_RelationshipRecord_archived, value) { return } } if x.Metadata != nil { value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) if !f(fd_RelationshipRecord_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RelationshipRecord) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.RelationshipRecord.policy_id": return x.PolicyId != "" case "sourcehub.acp.RelationshipRecord.relationship": return x.Relationship != nil case "sourcehub.acp.RelationshipRecord.archived": return x.Archived != false case "sourcehub.acp.RelationshipRecord.metadata": return x.Metadata != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RelationshipRecord")) } panic(fmt.Errorf("message sourcehub.acp.RelationshipRecord does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.RelationshipRecord.policy_id": x.PolicyId = "" case "sourcehub.acp.RelationshipRecord.relationship": x.Relationship = nil case "sourcehub.acp.RelationshipRecord.archived": x.Archived = false case "sourcehub.acp.RelationshipRecord.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RelationshipRecord")) } panic(fmt.Errorf("message sourcehub.acp.RelationshipRecord does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RelationshipRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.RelationshipRecord.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.RelationshipRecord.relationship": value := x.Relationship return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.RelationshipRecord.archived": value := x.Archived return protoreflect.ValueOfBool(value) case "sourcehub.acp.RelationshipRecord.metadata": value := x.Metadata return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RelationshipRecord")) } panic(fmt.Errorf("message sourcehub.acp.RelationshipRecord does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.RelationshipRecord.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.RelationshipRecord.relationship": x.Relationship = value.Message().Interface().(*types.Relationship) case "sourcehub.acp.RelationshipRecord.archived": x.Archived = value.Bool() case "sourcehub.acp.RelationshipRecord.metadata": x.Metadata = value.Message().Interface().(*RecordMetadata) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RelationshipRecord")) } panic(fmt.Errorf("message sourcehub.acp.RelationshipRecord does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RelationshipRecord.relationship": if x.Relationship == nil { x.Relationship = new(types.Relationship) } return protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) case "sourcehub.acp.RelationshipRecord.metadata": if x.Metadata == nil { x.Metadata = new(RecordMetadata) } return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "sourcehub.acp.RelationshipRecord.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.RelationshipRecord is not mutable")) case "sourcehub.acp.RelationshipRecord.archived": panic(fmt.Errorf("field archived of message sourcehub.acp.RelationshipRecord is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RelationshipRecord")) } panic(fmt.Errorf("message sourcehub.acp.RelationshipRecord does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RelationshipRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.RelationshipRecord.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.RelationshipRecord.relationship": m := new(types.Relationship) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.RelationshipRecord.archived": return protoreflect.ValueOfBool(false) case "sourcehub.acp.RelationshipRecord.metadata": m := new(RecordMetadata) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.RelationshipRecord")) } panic(fmt.Errorf("message sourcehub.acp.RelationshipRecord does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RelationshipRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.RelationshipRecord", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RelationshipRecord) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RelationshipRecord) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RelationshipRecord) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RelationshipRecord) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Relationship != nil { l = options.Size(x.Relationship) n += 1 + l + runtime.Sov(uint64(l)) } if x.Archived { n += 2 } if x.Metadata != nil { l = options.Size(x.Metadata) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RelationshipRecord) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Metadata != nil { encoded, err := options.Marshal(x.Metadata) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if x.Archived { i-- if x.Archived { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x18 } if x.Relationship != nil { encoded, err := options.Marshal(x.Relationship) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RelationshipRecord) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationshipRecord: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationshipRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Relationship == nil { x.Relationship = &types.Relationship{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relationship); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Archived", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Archived = bool(v != 0) case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = &RecordMetadata{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/record.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // RecordMetadata models metadata which is stored alongside acp records type RecordMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // creation_ts is the timestamp of record creation CreationTs *Timestamp `protobuf:"bytes,1,opt,name=creation_ts,json=creationTs,proto3" json:"creation_ts,omitempty"` // tx_hash is the hash256 of the tx bytes which produced the record TxHash []byte `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // tx_signer is the SourceHub bech32 address of the account that signed the Tx TxSigner string `protobuf:"bytes,3,opt,name=tx_signer,json=txSigner,proto3" json:"tx_signer,omitempty"` // owner_did is the DID of the PolicyCmd actor OwnerDid string `protobuf:"bytes,4,opt,name=owner_did,json=ownerDid,proto3" json:"owner_did,omitempty"` } func (x *RecordMetadata) Reset() { *x = RecordMetadata{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_record_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RecordMetadata) String() string { return protoimpl.X.MessageStringOf(x) } func (*RecordMetadata) ProtoMessage() {} // Deprecated: Use RecordMetadata.ProtoReflect.Descriptor instead. func (*RecordMetadata) Descriptor() ([]byte, []int) { return file_sourcehub_acp_record_proto_rawDescGZIP(), []int{0} } func (x *RecordMetadata) GetCreationTs() *Timestamp { if x != nil { return x.CreationTs } return nil } func (x *RecordMetadata) GetTxHash() []byte { if x != nil { return x.TxHash } return nil } func (x *RecordMetadata) GetTxSigner() string { if x != nil { return x.TxSigner } return "" } func (x *RecordMetadata) GetOwnerDid() string { if x != nil { return x.OwnerDid } return "" } type PolicyRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy *types.Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` RawPolicy string `protobuf:"bytes,3,opt,name=raw_policy,json=rawPolicy,proto3" json:"raw_policy,omitempty"` // marshal_type flags the format of policy_raw MarshalType types.PolicyMarshalingType `protobuf:"varint,4,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (x *PolicyRecord) Reset() { *x = PolicyRecord{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_record_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PolicyRecord) String() string { return protoimpl.X.MessageStringOf(x) } func (*PolicyRecord) ProtoMessage() {} // Deprecated: Use PolicyRecord.ProtoReflect.Descriptor instead. func (*PolicyRecord) Descriptor() ([]byte, []int) { return file_sourcehub_acp_record_proto_rawDescGZIP(), []int{1} } func (x *PolicyRecord) GetPolicy() *types.Policy { if x != nil { return x.Policy } return nil } func (x *PolicyRecord) GetMetadata() *RecordMetadata { if x != nil { return x.Metadata } return nil } func (x *PolicyRecord) GetRawPolicy() string { if x != nil { return x.RawPolicy } return "" } func (x *PolicyRecord) GetMarshalType() types.PolicyMarshalingType { if x != nil { return x.MarshalType } return types.PolicyMarshalingType(0) } type RelationshipRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Relationship *types.Relationship `protobuf:"bytes,2,opt,name=relationship,proto3" json:"relationship,omitempty"` Archived bool `protobuf:"varint,3,opt,name=archived,proto3" json:"archived,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *RelationshipRecord) Reset() { *x = RelationshipRecord{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_record_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RelationshipRecord) String() string { return protoimpl.X.MessageStringOf(x) } func (*RelationshipRecord) ProtoMessage() {} // Deprecated: Use RelationshipRecord.ProtoReflect.Descriptor instead. func (*RelationshipRecord) Descriptor() ([]byte, []int) { return file_sourcehub_acp_record_proto_rawDescGZIP(), []int{2} } func (x *RelationshipRecord) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *RelationshipRecord) GetRelationship() *types.Relationship { if x != nil { return x.Relationship } return nil } func (x *RelationshipRecord) GetArchived() bool { if x != nil { return x.Archived } return false } func (x *RelationshipRecord) GetMetadata() *RecordMetadata { if x != nil { return x.Metadata } return nil } var File_sourcehub_acp_record_proto protoreflect.FileDescriptor var file_sourcehub_acp_record_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x64, 0x22, 0xf1, 0x01, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x39, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x61, 0x77, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x61, 0x77, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x95, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_record_proto_rawDescOnce sync.Once file_sourcehub_acp_record_proto_rawDescData = file_sourcehub_acp_record_proto_rawDesc ) func file_sourcehub_acp_record_proto_rawDescGZIP() []byte { file_sourcehub_acp_record_proto_rawDescOnce.Do(func() { file_sourcehub_acp_record_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_record_proto_rawDescData) }) return file_sourcehub_acp_record_proto_rawDescData } var file_sourcehub_acp_record_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_sourcehub_acp_record_proto_goTypes = []interface{}{ (*RecordMetadata)(nil), // 0: sourcehub.acp.RecordMetadata (*PolicyRecord)(nil), // 1: sourcehub.acp.PolicyRecord (*RelationshipRecord)(nil), // 2: sourcehub.acp.RelationshipRecord (*Timestamp)(nil), // 3: sourcehub.acp.Timestamp (*types.Policy)(nil), // 4: sourcenetwork.acp_core.Policy (types.PolicyMarshalingType)(0), // 5: sourcenetwork.acp_core.PolicyMarshalingType (*types.Relationship)(nil), // 6: sourcenetwork.acp_core.Relationship } var file_sourcehub_acp_record_proto_depIdxs = []int32{ 3, // 0: sourcehub.acp.RecordMetadata.creation_ts:type_name -> sourcehub.acp.Timestamp 4, // 1: sourcehub.acp.PolicyRecord.policy:type_name -> sourcenetwork.acp_core.Policy 0, // 2: sourcehub.acp.PolicyRecord.metadata:type_name -> sourcehub.acp.RecordMetadata 5, // 3: sourcehub.acp.PolicyRecord.marshal_type:type_name -> sourcenetwork.acp_core.PolicyMarshalingType 6, // 4: sourcehub.acp.RelationshipRecord.relationship:type_name -> sourcenetwork.acp_core.Relationship 0, // 5: sourcehub.acp.RelationshipRecord.metadata:type_name -> sourcehub.acp.RecordMetadata 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name } func init() { file_sourcehub_acp_record_proto_init() } func file_sourcehub_acp_record_proto_init() { if File_sourcehub_acp_record_proto != nil { return } file_sourcehub_acp_access_decision_proto_init() file_sourcehub_acp_time_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_record_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RecordMetadata); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_record_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolicyRecord); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_record_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RelationshipRecord); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_record_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_record_proto_goTypes, DependencyIndexes: file_sourcehub_acp_record_proto_depIdxs, MessageInfos: file_sourcehub_acp_record_proto_msgTypes, }.Build() File_sourcehub_acp_record_proto = out.File file_sourcehub_acp_record_proto_rawDesc = nil file_sourcehub_acp_record_proto_goTypes = nil file_sourcehub_acp_record_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/registration.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" types "github.com/sourcenetwork/acp_core/pkg/pulsar/types" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_AmendmentEvent protoreflect.MessageDescriptor fd_AmendmentEvent_id protoreflect.FieldDescriptor fd_AmendmentEvent_policy_id protoreflect.FieldDescriptor fd_AmendmentEvent_object protoreflect.FieldDescriptor fd_AmendmentEvent_new_owner protoreflect.FieldDescriptor fd_AmendmentEvent_previous_owner protoreflect.FieldDescriptor fd_AmendmentEvent_commitment_id protoreflect.FieldDescriptor fd_AmendmentEvent_hijack_flag protoreflect.FieldDescriptor fd_AmendmentEvent_metadata protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_registration_proto_init() md_AmendmentEvent = File_sourcehub_acp_registration_proto.Messages().ByName("AmendmentEvent") fd_AmendmentEvent_id = md_AmendmentEvent.Fields().ByName("id") fd_AmendmentEvent_policy_id = md_AmendmentEvent.Fields().ByName("policy_id") fd_AmendmentEvent_object = md_AmendmentEvent.Fields().ByName("object") fd_AmendmentEvent_new_owner = md_AmendmentEvent.Fields().ByName("new_owner") fd_AmendmentEvent_previous_owner = md_AmendmentEvent.Fields().ByName("previous_owner") fd_AmendmentEvent_commitment_id = md_AmendmentEvent.Fields().ByName("commitment_id") fd_AmendmentEvent_hijack_flag = md_AmendmentEvent.Fields().ByName("hijack_flag") fd_AmendmentEvent_metadata = md_AmendmentEvent.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_AmendmentEvent)(nil) type fastReflection_AmendmentEvent AmendmentEvent func (x *AmendmentEvent) ProtoReflect() protoreflect.Message { return (*fastReflection_AmendmentEvent)(x) } func (x *AmendmentEvent) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_registration_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AmendmentEvent_messageType fastReflection_AmendmentEvent_messageType var _ protoreflect.MessageType = fastReflection_AmendmentEvent_messageType{} type fastReflection_AmendmentEvent_messageType struct{} func (x fastReflection_AmendmentEvent_messageType) Zero() protoreflect.Message { return (*fastReflection_AmendmentEvent)(nil) } func (x fastReflection_AmendmentEvent_messageType) New() protoreflect.Message { return new(fastReflection_AmendmentEvent) } func (x fastReflection_AmendmentEvent_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AmendmentEvent } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AmendmentEvent) Descriptor() protoreflect.MessageDescriptor { return md_AmendmentEvent } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AmendmentEvent) Type() protoreflect.MessageType { return _fastReflection_AmendmentEvent_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AmendmentEvent) New() protoreflect.Message { return new(fastReflection_AmendmentEvent) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AmendmentEvent) Interface() protoreflect.ProtoMessage { return (*AmendmentEvent)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AmendmentEvent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != uint64(0) { value := protoreflect.ValueOfUint64(x.Id) if !f(fd_AmendmentEvent_id, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_AmendmentEvent_policy_id, value) { return } } if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_AmendmentEvent_object, value) { return } } if x.NewOwner != nil { value := protoreflect.ValueOfMessage(x.NewOwner.ProtoReflect()) if !f(fd_AmendmentEvent_new_owner, value) { return } } if x.PreviousOwner != nil { value := protoreflect.ValueOfMessage(x.PreviousOwner.ProtoReflect()) if !f(fd_AmendmentEvent_previous_owner, value) { return } } if x.CommitmentId != uint64(0) { value := protoreflect.ValueOfUint64(x.CommitmentId) if !f(fd_AmendmentEvent_commitment_id, value) { return } } if x.HijackFlag != false { value := protoreflect.ValueOfBool(x.HijackFlag) if !f(fd_AmendmentEvent_hijack_flag, value) { return } } if x.Metadata != nil { value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) if !f(fd_AmendmentEvent_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AmendmentEvent) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.AmendmentEvent.id": return x.Id != uint64(0) case "sourcehub.acp.AmendmentEvent.policy_id": return x.PolicyId != "" case "sourcehub.acp.AmendmentEvent.object": return x.Object != nil case "sourcehub.acp.AmendmentEvent.new_owner": return x.NewOwner != nil case "sourcehub.acp.AmendmentEvent.previous_owner": return x.PreviousOwner != nil case "sourcehub.acp.AmendmentEvent.commitment_id": return x.CommitmentId != uint64(0) case "sourcehub.acp.AmendmentEvent.hijack_flag": return x.HijackFlag != false case "sourcehub.acp.AmendmentEvent.metadata": return x.Metadata != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AmendmentEvent")) } panic(fmt.Errorf("message sourcehub.acp.AmendmentEvent does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AmendmentEvent) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.AmendmentEvent.id": x.Id = uint64(0) case "sourcehub.acp.AmendmentEvent.policy_id": x.PolicyId = "" case "sourcehub.acp.AmendmentEvent.object": x.Object = nil case "sourcehub.acp.AmendmentEvent.new_owner": x.NewOwner = nil case "sourcehub.acp.AmendmentEvent.previous_owner": x.PreviousOwner = nil case "sourcehub.acp.AmendmentEvent.commitment_id": x.CommitmentId = uint64(0) case "sourcehub.acp.AmendmentEvent.hijack_flag": x.HijackFlag = false case "sourcehub.acp.AmendmentEvent.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AmendmentEvent")) } panic(fmt.Errorf("message sourcehub.acp.AmendmentEvent does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AmendmentEvent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.AmendmentEvent.id": value := x.Id return protoreflect.ValueOfUint64(value) case "sourcehub.acp.AmendmentEvent.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.AmendmentEvent.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.new_owner": value := x.NewOwner return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.previous_owner": value := x.PreviousOwner return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.commitment_id": value := x.CommitmentId return protoreflect.ValueOfUint64(value) case "sourcehub.acp.AmendmentEvent.hijack_flag": value := x.HijackFlag return protoreflect.ValueOfBool(value) case "sourcehub.acp.AmendmentEvent.metadata": value := x.Metadata return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AmendmentEvent")) } panic(fmt.Errorf("message sourcehub.acp.AmendmentEvent does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AmendmentEvent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.AmendmentEvent.id": x.Id = value.Uint() case "sourcehub.acp.AmendmentEvent.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.AmendmentEvent.object": x.Object = value.Message().Interface().(*types.Object) case "sourcehub.acp.AmendmentEvent.new_owner": x.NewOwner = value.Message().Interface().(*types.Actor) case "sourcehub.acp.AmendmentEvent.previous_owner": x.PreviousOwner = value.Message().Interface().(*types.Actor) case "sourcehub.acp.AmendmentEvent.commitment_id": x.CommitmentId = value.Uint() case "sourcehub.acp.AmendmentEvent.hijack_flag": x.HijackFlag = value.Bool() case "sourcehub.acp.AmendmentEvent.metadata": x.Metadata = value.Message().Interface().(*RecordMetadata) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AmendmentEvent")) } panic(fmt.Errorf("message sourcehub.acp.AmendmentEvent does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AmendmentEvent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.AmendmentEvent.object": if x.Object == nil { x.Object = new(types.Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.new_owner": if x.NewOwner == nil { x.NewOwner = new(types.Actor) } return protoreflect.ValueOfMessage(x.NewOwner.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.previous_owner": if x.PreviousOwner == nil { x.PreviousOwner = new(types.Actor) } return protoreflect.ValueOfMessage(x.PreviousOwner.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.metadata": if x.Metadata == nil { x.Metadata = new(RecordMetadata) } return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.id": panic(fmt.Errorf("field id of message sourcehub.acp.AmendmentEvent is not mutable")) case "sourcehub.acp.AmendmentEvent.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.AmendmentEvent is not mutable")) case "sourcehub.acp.AmendmentEvent.commitment_id": panic(fmt.Errorf("field commitment_id of message sourcehub.acp.AmendmentEvent is not mutable")) case "sourcehub.acp.AmendmentEvent.hijack_flag": panic(fmt.Errorf("field hijack_flag of message sourcehub.acp.AmendmentEvent is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AmendmentEvent")) } panic(fmt.Errorf("message sourcehub.acp.AmendmentEvent does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AmendmentEvent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.AmendmentEvent.id": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.AmendmentEvent.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.AmendmentEvent.object": m := new(types.Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.new_owner": m := new(types.Actor) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.previous_owner": m := new(types.Actor) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.AmendmentEvent.commitment_id": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.AmendmentEvent.hijack_flag": return protoreflect.ValueOfBool(false) case "sourcehub.acp.AmendmentEvent.metadata": m := new(RecordMetadata) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.AmendmentEvent")) } panic(fmt.Errorf("message sourcehub.acp.AmendmentEvent does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AmendmentEvent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.AmendmentEvent", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AmendmentEvent) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AmendmentEvent) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AmendmentEvent) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AmendmentEvent) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AmendmentEvent) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Id != 0 { n += 1 + runtime.Sov(uint64(x.Id)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.NewOwner != nil { l = options.Size(x.NewOwner) n += 1 + l + runtime.Sov(uint64(l)) } if x.PreviousOwner != nil { l = options.Size(x.PreviousOwner) n += 1 + l + runtime.Sov(uint64(l)) } if x.CommitmentId != 0 { n += 1 + runtime.Sov(uint64(x.CommitmentId)) } if x.HijackFlag { n += 2 } if x.Metadata != nil { l = options.Size(x.Metadata) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AmendmentEvent) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Metadata != nil { encoded, err := options.Marshal(x.Metadata) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if x.HijackFlag { i-- if x.HijackFlag { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x38 } if x.CommitmentId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CommitmentId)) i-- dAtA[i] = 0x30 } if x.PreviousOwner != nil { encoded, err := options.Marshal(x.PreviousOwner) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if x.NewOwner != nil { encoded, err := options.Marshal(x.NewOwner) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if x.Id != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AmendmentEvent) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AmendmentEvent: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AmendmentEvent: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } x.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &types.Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.NewOwner == nil { x.NewOwner = &types.Actor{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NewOwner); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousOwner", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.PreviousOwner == nil { x.PreviousOwner = &types.Actor{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PreviousOwner); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitmentId", wireType) } x.CommitmentId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CommitmentId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HijackFlag", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.HijackFlag = bool(v != 0) case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = &RecordMetadata{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/registration.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // AmendmentEvent is a record which tracks executions of the Registration Amendment rule in SourceHub ACP type AmendmentEvent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // event id Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // id of affected policy PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` // object whose registration was amended Object *types.Object `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"` // new_owner is the new object owner NewOwner *types.Actor `protobuf:"bytes,4,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` // previous_owner is the previous object owner PreviousOwner *types.Actor `protobuf:"bytes,5,opt,name=previous_owner,json=previousOwner,proto3" json:"previous_owner,omitempty"` // commitment_id is the id of the commitment which generated the amendment CommitmentId uint64 `protobuf:"varint,6,opt,name=commitment_id,json=commitmentId,proto3" json:"commitment_id,omitempty"` // hijack_flag is true if the amendment rule was executed and the new_owner chose to flag // the previous_owner as a potential object hijacker HijackFlag bool `protobuf:"varint,7,opt,name=hijack_flag,json=hijackFlag,proto3" json:"hijack_flag,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *AmendmentEvent) Reset() { *x = AmendmentEvent{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_registration_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AmendmentEvent) String() string { return protoimpl.X.MessageStringOf(x) } func (*AmendmentEvent) ProtoMessage() {} // Deprecated: Use AmendmentEvent.ProtoReflect.Descriptor instead. func (*AmendmentEvent) Descriptor() ([]byte, []int) { return file_sourcehub_acp_registration_proto_rawDescGZIP(), []int{0} } func (x *AmendmentEvent) GetId() uint64 { if x != nil { return x.Id } return 0 } func (x *AmendmentEvent) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *AmendmentEvent) GetObject() *types.Object { if x != nil { return x.Object } return nil } func (x *AmendmentEvent) GetNewOwner() *types.Actor { if x != nil { return x.NewOwner } return nil } func (x *AmendmentEvent) GetPreviousOwner() *types.Actor { if x != nil { return x.PreviousOwner } return nil } func (x *AmendmentEvent) GetCommitmentId() uint64 { if x != nil { return x.CommitmentId } return 0 } func (x *AmendmentEvent) GetHijackFlag() bool { if x != nil { return x.HijackFlag } return false } func (x *AmendmentEvent) GetMetadata() *RecordMetadata { if x != nil { return x.Metadata } return nil } var File_sourcehub_acp_registration_proto protoreflect.FileDescriptor var file_sourcehub_acp_registration_proto_rawDesc = []byte{ 0x0a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x02, 0x0a, 0x0e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x39, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_registration_proto_rawDescOnce sync.Once file_sourcehub_acp_registration_proto_rawDescData = file_sourcehub_acp_registration_proto_rawDesc ) func file_sourcehub_acp_registration_proto_rawDescGZIP() []byte { file_sourcehub_acp_registration_proto_rawDescOnce.Do(func() { file_sourcehub_acp_registration_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_registration_proto_rawDescData) }) return file_sourcehub_acp_registration_proto_rawDescData } var file_sourcehub_acp_registration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_acp_registration_proto_goTypes = []interface{}{ (*AmendmentEvent)(nil), // 0: sourcehub.acp.AmendmentEvent (*types.Object)(nil), // 1: sourcenetwork.acp_core.Object (*types.Actor)(nil), // 2: sourcenetwork.acp_core.Actor (*RecordMetadata)(nil), // 3: sourcehub.acp.RecordMetadata } var file_sourcehub_acp_registration_proto_depIdxs = []int32{ 1, // 0: sourcehub.acp.AmendmentEvent.object:type_name -> sourcenetwork.acp_core.Object 2, // 1: sourcehub.acp.AmendmentEvent.new_owner:type_name -> sourcenetwork.acp_core.Actor 2, // 2: sourcehub.acp.AmendmentEvent.previous_owner:type_name -> sourcenetwork.acp_core.Actor 3, // 3: sourcehub.acp.AmendmentEvent.metadata:type_name -> sourcehub.acp.RecordMetadata 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_sourcehub_acp_registration_proto_init() } func file_sourcehub_acp_registration_proto_init() { if File_sourcehub_acp_registration_proto != nil { return } file_sourcehub_acp_record_proto_init() file_sourcehub_acp_time_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_registration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AmendmentEvent); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_registration_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_registration_proto_goTypes, DependencyIndexes: file_sourcehub_acp_registration_proto_depIdxs, MessageInfos: file_sourcehub_acp_registration_proto_msgTypes, }.Build() File_sourcehub_acp_registration_proto = out.File file_sourcehub_acp_registration_proto_rawDesc = nil file_sourcehub_acp_registration_proto_goTypes = nil file_sourcehub_acp_registration_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/signed_policy_cmd.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/sourcenetwork/acp_core/pkg/pulsar/types" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_SignedPolicyCmd protoreflect.MessageDescriptor fd_SignedPolicyCmd_payload protoreflect.FieldDescriptor fd_SignedPolicyCmd_signature protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_signed_policy_cmd_proto_init() md_SignedPolicyCmd = File_sourcehub_acp_signed_policy_cmd_proto.Messages().ByName("SignedPolicyCmd") fd_SignedPolicyCmd_payload = md_SignedPolicyCmd.Fields().ByName("payload") fd_SignedPolicyCmd_signature = md_SignedPolicyCmd.Fields().ByName("signature") } var _ protoreflect.Message = (*fastReflection_SignedPolicyCmd)(nil) type fastReflection_SignedPolicyCmd SignedPolicyCmd func (x *SignedPolicyCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_SignedPolicyCmd)(x) } func (x *SignedPolicyCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_signed_policy_cmd_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SignedPolicyCmd_messageType fastReflection_SignedPolicyCmd_messageType var _ protoreflect.MessageType = fastReflection_SignedPolicyCmd_messageType{} type fastReflection_SignedPolicyCmd_messageType struct{} func (x fastReflection_SignedPolicyCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_SignedPolicyCmd)(nil) } func (x fastReflection_SignedPolicyCmd_messageType) New() protoreflect.Message { return new(fastReflection_SignedPolicyCmd) } func (x fastReflection_SignedPolicyCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SignedPolicyCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SignedPolicyCmd) Descriptor() protoreflect.MessageDescriptor { return md_SignedPolicyCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SignedPolicyCmd) Type() protoreflect.MessageType { return _fastReflection_SignedPolicyCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SignedPolicyCmd) New() protoreflect.Message { return new(fastReflection_SignedPolicyCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SignedPolicyCmd) Interface() protoreflect.ProtoMessage { return (*SignedPolicyCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SignedPolicyCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Payload != nil { value := protoreflect.ValueOfMessage(x.Payload.ProtoReflect()) if !f(fd_SignedPolicyCmd_payload, value) { return } } if len(x.Signature) != 0 { value := protoreflect.ValueOfBytes(x.Signature) if !f(fd_SignedPolicyCmd_signature, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SignedPolicyCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmd.payload": return x.Payload != nil case "sourcehub.acp.SignedPolicyCmd.signature": return len(x.Signature) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmd.payload": x.Payload = nil case "sourcehub.acp.SignedPolicyCmd.signature": x.Signature = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SignedPolicyCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.SignedPolicyCmd.payload": value := x.Payload return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.SignedPolicyCmd.signature": value := x.Signature return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmd.payload": x.Payload = value.Message().Interface().(*SignedPolicyCmdPayload) case "sourcehub.acp.SignedPolicyCmd.signature": x.Signature = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmd.payload": if x.Payload == nil { x.Payload = new(SignedPolicyCmdPayload) } return protoreflect.ValueOfMessage(x.Payload.ProtoReflect()) case "sourcehub.acp.SignedPolicyCmd.signature": panic(fmt.Errorf("field signature of message sourcehub.acp.SignedPolicyCmd is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SignedPolicyCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmd.payload": m := new(SignedPolicyCmdPayload) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.SignedPolicyCmd.signature": return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SignedPolicyCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.SignedPolicyCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SignedPolicyCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SignedPolicyCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SignedPolicyCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SignedPolicyCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Payload != nil { l = options.Size(x.Payload) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Signature) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SignedPolicyCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Signature) > 0 { i -= len(x.Signature) copy(dAtA[i:], x.Signature) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) i-- dAtA[i] = 0x12 } if x.Payload != nil { encoded, err := options.Marshal(x.Payload) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SignedPolicyCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignedPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignedPolicyCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Payload == nil { x.Payload = &SignedPolicyCmdPayload{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Payload); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) if x.Signature == nil { x.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SignedPolicyCmdPayload protoreflect.MessageDescriptor fd_SignedPolicyCmdPayload_actor protoreflect.FieldDescriptor fd_SignedPolicyCmdPayload_issued_height protoreflect.FieldDescriptor fd_SignedPolicyCmdPayload_issued_at protoreflect.FieldDescriptor fd_SignedPolicyCmdPayload_expiration_delta protoreflect.FieldDescriptor fd_SignedPolicyCmdPayload_policy_id protoreflect.FieldDescriptor fd_SignedPolicyCmdPayload_cmd protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_signed_policy_cmd_proto_init() md_SignedPolicyCmdPayload = File_sourcehub_acp_signed_policy_cmd_proto.Messages().ByName("SignedPolicyCmdPayload") fd_SignedPolicyCmdPayload_actor = md_SignedPolicyCmdPayload.Fields().ByName("actor") fd_SignedPolicyCmdPayload_issued_height = md_SignedPolicyCmdPayload.Fields().ByName("issued_height") fd_SignedPolicyCmdPayload_issued_at = md_SignedPolicyCmdPayload.Fields().ByName("issued_at") fd_SignedPolicyCmdPayload_expiration_delta = md_SignedPolicyCmdPayload.Fields().ByName("expiration_delta") fd_SignedPolicyCmdPayload_policy_id = md_SignedPolicyCmdPayload.Fields().ByName("policy_id") fd_SignedPolicyCmdPayload_cmd = md_SignedPolicyCmdPayload.Fields().ByName("cmd") } var _ protoreflect.Message = (*fastReflection_SignedPolicyCmdPayload)(nil) type fastReflection_SignedPolicyCmdPayload SignedPolicyCmdPayload func (x *SignedPolicyCmdPayload) ProtoReflect() protoreflect.Message { return (*fastReflection_SignedPolicyCmdPayload)(x) } func (x *SignedPolicyCmdPayload) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_signed_policy_cmd_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SignedPolicyCmdPayload_messageType fastReflection_SignedPolicyCmdPayload_messageType var _ protoreflect.MessageType = fastReflection_SignedPolicyCmdPayload_messageType{} type fastReflection_SignedPolicyCmdPayload_messageType struct{} func (x fastReflection_SignedPolicyCmdPayload_messageType) Zero() protoreflect.Message { return (*fastReflection_SignedPolicyCmdPayload)(nil) } func (x fastReflection_SignedPolicyCmdPayload_messageType) New() protoreflect.Message { return new(fastReflection_SignedPolicyCmdPayload) } func (x fastReflection_SignedPolicyCmdPayload_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SignedPolicyCmdPayload } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SignedPolicyCmdPayload) Descriptor() protoreflect.MessageDescriptor { return md_SignedPolicyCmdPayload } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SignedPolicyCmdPayload) Type() protoreflect.MessageType { return _fastReflection_SignedPolicyCmdPayload_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SignedPolicyCmdPayload) New() protoreflect.Message { return new(fastReflection_SignedPolicyCmdPayload) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SignedPolicyCmdPayload) Interface() protoreflect.ProtoMessage { return (*SignedPolicyCmdPayload)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SignedPolicyCmdPayload) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Actor != "" { value := protoreflect.ValueOfString(x.Actor) if !f(fd_SignedPolicyCmdPayload_actor, value) { return } } if x.IssuedHeight != uint64(0) { value := protoreflect.ValueOfUint64(x.IssuedHeight) if !f(fd_SignedPolicyCmdPayload_issued_height, value) { return } } if x.IssuedAt != nil { value := protoreflect.ValueOfMessage(x.IssuedAt.ProtoReflect()) if !f(fd_SignedPolicyCmdPayload_issued_at, value) { return } } if x.ExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.ExpirationDelta) if !f(fd_SignedPolicyCmdPayload_expiration_delta, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_SignedPolicyCmdPayload_policy_id, value) { return } } if x.Cmd != nil { value := protoreflect.ValueOfMessage(x.Cmd.ProtoReflect()) if !f(fd_SignedPolicyCmdPayload_cmd, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SignedPolicyCmdPayload) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmdPayload.actor": return x.Actor != "" case "sourcehub.acp.SignedPolicyCmdPayload.issued_height": return x.IssuedHeight != uint64(0) case "sourcehub.acp.SignedPolicyCmdPayload.issued_at": return x.IssuedAt != nil case "sourcehub.acp.SignedPolicyCmdPayload.expiration_delta": return x.ExpirationDelta != uint64(0) case "sourcehub.acp.SignedPolicyCmdPayload.policy_id": return x.PolicyId != "" case "sourcehub.acp.SignedPolicyCmdPayload.cmd": return x.Cmd != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmdPayload")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmdPayload does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmdPayload) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmdPayload.actor": x.Actor = "" case "sourcehub.acp.SignedPolicyCmdPayload.issued_height": x.IssuedHeight = uint64(0) case "sourcehub.acp.SignedPolicyCmdPayload.issued_at": x.IssuedAt = nil case "sourcehub.acp.SignedPolicyCmdPayload.expiration_delta": x.ExpirationDelta = uint64(0) case "sourcehub.acp.SignedPolicyCmdPayload.policy_id": x.PolicyId = "" case "sourcehub.acp.SignedPolicyCmdPayload.cmd": x.Cmd = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmdPayload")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmdPayload does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SignedPolicyCmdPayload) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.SignedPolicyCmdPayload.actor": value := x.Actor return protoreflect.ValueOfString(value) case "sourcehub.acp.SignedPolicyCmdPayload.issued_height": value := x.IssuedHeight return protoreflect.ValueOfUint64(value) case "sourcehub.acp.SignedPolicyCmdPayload.issued_at": value := x.IssuedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.SignedPolicyCmdPayload.expiration_delta": value := x.ExpirationDelta return protoreflect.ValueOfUint64(value) case "sourcehub.acp.SignedPolicyCmdPayload.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.SignedPolicyCmdPayload.cmd": value := x.Cmd return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmdPayload")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmdPayload does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmdPayload) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmdPayload.actor": x.Actor = value.Interface().(string) case "sourcehub.acp.SignedPolicyCmdPayload.issued_height": x.IssuedHeight = value.Uint() case "sourcehub.acp.SignedPolicyCmdPayload.issued_at": x.IssuedAt = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.acp.SignedPolicyCmdPayload.expiration_delta": x.ExpirationDelta = value.Uint() case "sourcehub.acp.SignedPolicyCmdPayload.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.SignedPolicyCmdPayload.cmd": x.Cmd = value.Message().Interface().(*PolicyCmd) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmdPayload")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmdPayload does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmdPayload) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmdPayload.issued_at": if x.IssuedAt == nil { x.IssuedAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.IssuedAt.ProtoReflect()) case "sourcehub.acp.SignedPolicyCmdPayload.cmd": if x.Cmd == nil { x.Cmd = new(PolicyCmd) } return protoreflect.ValueOfMessage(x.Cmd.ProtoReflect()) case "sourcehub.acp.SignedPolicyCmdPayload.actor": panic(fmt.Errorf("field actor of message sourcehub.acp.SignedPolicyCmdPayload is not mutable")) case "sourcehub.acp.SignedPolicyCmdPayload.issued_height": panic(fmt.Errorf("field issued_height of message sourcehub.acp.SignedPolicyCmdPayload is not mutable")) case "sourcehub.acp.SignedPolicyCmdPayload.expiration_delta": panic(fmt.Errorf("field expiration_delta of message sourcehub.acp.SignedPolicyCmdPayload is not mutable")) case "sourcehub.acp.SignedPolicyCmdPayload.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.SignedPolicyCmdPayload is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmdPayload")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmdPayload does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SignedPolicyCmdPayload) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.SignedPolicyCmdPayload.actor": return protoreflect.ValueOfString("") case "sourcehub.acp.SignedPolicyCmdPayload.issued_height": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.SignedPolicyCmdPayload.issued_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.SignedPolicyCmdPayload.expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.SignedPolicyCmdPayload.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.SignedPolicyCmdPayload.cmd": m := new(PolicyCmd) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.SignedPolicyCmdPayload")) } panic(fmt.Errorf("message sourcehub.acp.SignedPolicyCmdPayload does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SignedPolicyCmdPayload) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.SignedPolicyCmdPayload", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SignedPolicyCmdPayload) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignedPolicyCmdPayload) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SignedPolicyCmdPayload) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SignedPolicyCmdPayload) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SignedPolicyCmdPayload) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Actor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.IssuedHeight != 0 { n += 1 + runtime.Sov(uint64(x.IssuedHeight)) } if x.IssuedAt != nil { l = options.Size(x.IssuedAt) n += 1 + l + runtime.Sov(uint64(l)) } if x.ExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.ExpirationDelta)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Cmd != nil { l = options.Size(x.Cmd) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SignedPolicyCmdPayload) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Cmd != nil { encoded, err := options.Marshal(x.Cmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x2a } if x.ExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpirationDelta)) i-- dAtA[i] = 0x20 } if x.IssuedAt != nil { encoded, err := options.Marshal(x.IssuedAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.IssuedHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.IssuedHeight)) i-- dAtA[i] = 0x10 } if len(x.Actor) > 0 { i -= len(x.Actor) copy(dAtA[i:], x.Actor) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Actor))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SignedPolicyCmdPayload) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignedPolicyCmdPayload: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignedPolicyCmdPayload: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IssuedHeight", wireType) } x.IssuedHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.IssuedHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IssuedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.IssuedAt == nil { x.IssuedAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.IssuedAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpirationDelta", wireType) } x.ExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.ExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Cmd == nil { x.Cmd = &PolicyCmd{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Cmd); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/signed_policy_cmd.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // SignedPolicyCmd represents a Command issued by an Actor in the context of a Policy // The command represents an instruction to be executed // The message type contains a signature which is used to authenticate the Command's Actor type SignedPolicyCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // payload contains the command context Payload *SignedPolicyCmdPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // signature is a signature of the payload. // The signature is generated using the VerificationMethod / Authorization fields // specificied by the DID document of the Actor. Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` } func (x *SignedPolicyCmd) Reset() { *x = SignedPolicyCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_signed_policy_cmd_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SignedPolicyCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*SignedPolicyCmd) ProtoMessage() {} // Deprecated: Use SignedPolicyCmd.ProtoReflect.Descriptor instead. func (*SignedPolicyCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_signed_policy_cmd_proto_rawDescGZIP(), []int{0} } func (x *SignedPolicyCmd) GetPayload() *SignedPolicyCmdPayload { if x != nil { return x.Payload } return nil } func (x *SignedPolicyCmd) GetSignature() []byte { if x != nil { return x.Signature } return nil } // SignedPolicyCmdPayload represents the payload containing the context of the issued command type SignedPolicyCmdPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // actor is a did string representing the actor which issued the command Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` // issued_height is the SourceHub block height of when the Payload was created IssuedHeight uint64 `protobuf:"varint,2,opt,name=issued_height,json=issuedHeight,proto3" json:"issued_height,omitempty"` // issued_at contains a client generated timestamp for the creation of the command. // This is used only as metadata and isn't trusted IssuedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"` // expiration_delta specifies the maximum number of blocks from the issued height during which the Command Payload will be accepted. // This field is mandatory and is used to prevent replay attacks ExpirationDelta uint64 `protobuf:"varint,4,opt,name=expiration_delta,json=expirationDelta,proto3" json:"expiration_delta,omitempty"` // policy_id is the ID of the policy under which the Command will be executed PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Cmd *PolicyCmd `protobuf:"bytes,6,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (x *SignedPolicyCmdPayload) Reset() { *x = SignedPolicyCmdPayload{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_signed_policy_cmd_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SignedPolicyCmdPayload) String() string { return protoimpl.X.MessageStringOf(x) } func (*SignedPolicyCmdPayload) ProtoMessage() {} // Deprecated: Use SignedPolicyCmdPayload.ProtoReflect.Descriptor instead. func (*SignedPolicyCmdPayload) Descriptor() ([]byte, []int) { return file_sourcehub_acp_signed_policy_cmd_proto_rawDescGZIP(), []int{1} } func (x *SignedPolicyCmdPayload) GetActor() string { if x != nil { return x.Actor } return "" } func (x *SignedPolicyCmdPayload) GetIssuedHeight() uint64 { if x != nil { return x.IssuedHeight } return 0 } func (x *SignedPolicyCmdPayload) GetIssuedAt() *timestamppb.Timestamp { if x != nil { return x.IssuedAt } return nil } func (x *SignedPolicyCmdPayload) GetExpirationDelta() uint64 { if x != nil { return x.ExpirationDelta } return 0 } func (x *SignedPolicyCmdPayload) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *SignedPolicyCmdPayload) GetCmd() *PolicyCmd { if x != nil { return x.Cmd } return nil } var File_sourcehub_acp_signed_policy_cmd_proto protoreflect.FileDescriptor var file_sourcehub_acp_signed_policy_cmd_proto_rawDesc = []byte{ 0x0a, 0x25, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x3f, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x80, 0x02, 0x0a, 0x16, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x42, 0x9e, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x14, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_signed_policy_cmd_proto_rawDescOnce sync.Once file_sourcehub_acp_signed_policy_cmd_proto_rawDescData = file_sourcehub_acp_signed_policy_cmd_proto_rawDesc ) func file_sourcehub_acp_signed_policy_cmd_proto_rawDescGZIP() []byte { file_sourcehub_acp_signed_policy_cmd_proto_rawDescOnce.Do(func() { file_sourcehub_acp_signed_policy_cmd_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_signed_policy_cmd_proto_rawDescData) }) return file_sourcehub_acp_signed_policy_cmd_proto_rawDescData } var file_sourcehub_acp_signed_policy_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_acp_signed_policy_cmd_proto_goTypes = []interface{}{ (*SignedPolicyCmd)(nil), // 0: sourcehub.acp.SignedPolicyCmd (*SignedPolicyCmdPayload)(nil), // 1: sourcehub.acp.SignedPolicyCmdPayload (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp (*PolicyCmd)(nil), // 3: sourcehub.acp.PolicyCmd } var file_sourcehub_acp_signed_policy_cmd_proto_depIdxs = []int32{ 1, // 0: sourcehub.acp.SignedPolicyCmd.payload:type_name -> sourcehub.acp.SignedPolicyCmdPayload 2, // 1: sourcehub.acp.SignedPolicyCmdPayload.issued_at:type_name -> google.protobuf.Timestamp 3, // 2: sourcehub.acp.SignedPolicyCmdPayload.cmd:type_name -> sourcehub.acp.PolicyCmd 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_sourcehub_acp_signed_policy_cmd_proto_init() } func file_sourcehub_acp_signed_policy_cmd_proto_init() { if File_sourcehub_acp_signed_policy_cmd_proto != nil { return } file_sourcehub_acp_commitment_proto_init() file_sourcehub_acp_policy_cmd_proto_init() file_sourcehub_acp_record_proto_init() file_sourcehub_acp_registration_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_signed_policy_cmd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedPolicyCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_signed_policy_cmd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedPolicyCmdPayload); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_signed_policy_cmd_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_signed_policy_cmd_proto_goTypes, DependencyIndexes: file_sourcehub_acp_signed_policy_cmd_proto_depIdxs, MessageInfos: file_sourcehub_acp_signed_policy_cmd_proto_msgTypes, }.Build() File_sourcehub_acp_signed_policy_cmd_proto = out.File file_sourcehub_acp_signed_policy_cmd_proto_rawDesc = nil file_sourcehub_acp_signed_policy_cmd_proto_goTypes = nil file_sourcehub_acp_signed_policy_cmd_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/time.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_Duration protoreflect.MessageDescriptor fd_Duration_proto_duration protoreflect.FieldDescriptor fd_Duration_block_count protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_time_proto_init() md_Duration = File_sourcehub_acp_time_proto.Messages().ByName("Duration") fd_Duration_proto_duration = md_Duration.Fields().ByName("proto_duration") fd_Duration_block_count = md_Duration.Fields().ByName("block_count") } var _ protoreflect.Message = (*fastReflection_Duration)(nil) type fastReflection_Duration Duration func (x *Duration) ProtoReflect() protoreflect.Message { return (*fastReflection_Duration)(x) } func (x *Duration) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_time_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Duration_messageType fastReflection_Duration_messageType var _ protoreflect.MessageType = fastReflection_Duration_messageType{} type fastReflection_Duration_messageType struct{} func (x fastReflection_Duration_messageType) Zero() protoreflect.Message { return (*fastReflection_Duration)(nil) } func (x fastReflection_Duration_messageType) New() protoreflect.Message { return new(fastReflection_Duration) } func (x fastReflection_Duration_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Duration } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Duration) Descriptor() protoreflect.MessageDescriptor { return md_Duration } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Duration) Type() protoreflect.MessageType { return _fastReflection_Duration_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Duration) New() protoreflect.Message { return new(fastReflection_Duration) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Duration) Interface() protoreflect.ProtoMessage { return (*Duration)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Duration) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Duration != nil { switch o := x.Duration.(type) { case *Duration_ProtoDuration: v := o.ProtoDuration value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_Duration_proto_duration, value) { return } case *Duration_BlockCount: v := o.BlockCount value := protoreflect.ValueOfUint64(v) if !f(fd_Duration_block_count, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Duration) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.Duration.proto_duration": if x.Duration == nil { return false } else if _, ok := x.Duration.(*Duration_ProtoDuration); ok { return true } else { return false } case "sourcehub.acp.Duration.block_count": if x.Duration == nil { return false } else if _, ok := x.Duration.(*Duration_BlockCount); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Duration")) } panic(fmt.Errorf("message sourcehub.acp.Duration does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Duration) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.Duration.proto_duration": x.Duration = nil case "sourcehub.acp.Duration.block_count": x.Duration = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Duration")) } panic(fmt.Errorf("message sourcehub.acp.Duration does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Duration) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.Duration.proto_duration": if x.Duration == nil { return protoreflect.ValueOfMessage((*durationpb.Duration)(nil).ProtoReflect()) } else if v, ok := x.Duration.(*Duration_ProtoDuration); ok { return protoreflect.ValueOfMessage(v.ProtoDuration.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*durationpb.Duration)(nil).ProtoReflect()) } case "sourcehub.acp.Duration.block_count": if x.Duration == nil { return protoreflect.ValueOfUint64(uint64(0)) } else if v, ok := x.Duration.(*Duration_BlockCount); ok { return protoreflect.ValueOfUint64(v.BlockCount) } else { return protoreflect.ValueOfUint64(uint64(0)) } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Duration")) } panic(fmt.Errorf("message sourcehub.acp.Duration does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Duration) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.Duration.proto_duration": cv := value.Message().Interface().(*durationpb.Duration) x.Duration = &Duration_ProtoDuration{ProtoDuration: cv} case "sourcehub.acp.Duration.block_count": cv := value.Uint() x.Duration = &Duration_BlockCount{BlockCount: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Duration")) } panic(fmt.Errorf("message sourcehub.acp.Duration does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Duration) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.Duration.proto_duration": if x.Duration == nil { value := &durationpb.Duration{} oneofValue := &Duration_ProtoDuration{ProtoDuration: value} x.Duration = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Duration.(type) { case *Duration_ProtoDuration: return protoreflect.ValueOfMessage(m.ProtoDuration.ProtoReflect()) default: value := &durationpb.Duration{} oneofValue := &Duration_ProtoDuration{ProtoDuration: value} x.Duration = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcehub.acp.Duration.block_count": panic(fmt.Errorf("field block_count of message sourcehub.acp.Duration is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Duration")) } panic(fmt.Errorf("message sourcehub.acp.Duration does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Duration) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.Duration.proto_duration": value := &durationpb.Duration{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.Duration.block_count": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Duration")) } panic(fmt.Errorf("message sourcehub.acp.Duration does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Duration) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcehub.acp.Duration.duration": if x.Duration == nil { return nil } switch x.Duration.(type) { case *Duration_ProtoDuration: return x.Descriptor().Fields().ByName("proto_duration") case *Duration_BlockCount: return x.Descriptor().Fields().ByName("block_count") } default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.Duration", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Duration) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Duration) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Duration) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Duration) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Duration) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Duration.(type) { case *Duration_ProtoDuration: if x == nil { break } l = options.Size(x.ProtoDuration) n += 1 + l + runtime.Sov(uint64(l)) case *Duration_BlockCount: if x == nil { break } n += 1 + runtime.Sov(uint64(x.BlockCount)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Duration) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Duration.(type) { case *Duration_ProtoDuration: encoded, err := options.Marshal(x.ProtoDuration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa case *Duration_BlockCount: i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockCount)) i-- dAtA[i] = 0x10 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Duration) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Duration: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProtoDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &durationpb.Duration{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Duration = &Duration_ProtoDuration{v} iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockCount", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } x.Duration = &Duration_BlockCount{v} default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Timestamp protoreflect.MessageDescriptor fd_Timestamp_proto_ts protoreflect.FieldDescriptor fd_Timestamp_block_height protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_time_proto_init() md_Timestamp = File_sourcehub_acp_time_proto.Messages().ByName("Timestamp") fd_Timestamp_proto_ts = md_Timestamp.Fields().ByName("proto_ts") fd_Timestamp_block_height = md_Timestamp.Fields().ByName("block_height") } var _ protoreflect.Message = (*fastReflection_Timestamp)(nil) type fastReflection_Timestamp Timestamp func (x *Timestamp) ProtoReflect() protoreflect.Message { return (*fastReflection_Timestamp)(x) } func (x *Timestamp) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_time_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Timestamp_messageType fastReflection_Timestamp_messageType var _ protoreflect.MessageType = fastReflection_Timestamp_messageType{} type fastReflection_Timestamp_messageType struct{} func (x fastReflection_Timestamp_messageType) Zero() protoreflect.Message { return (*fastReflection_Timestamp)(nil) } func (x fastReflection_Timestamp_messageType) New() protoreflect.Message { return new(fastReflection_Timestamp) } func (x fastReflection_Timestamp_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Timestamp } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Timestamp) Descriptor() protoreflect.MessageDescriptor { return md_Timestamp } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Timestamp) Type() protoreflect.MessageType { return _fastReflection_Timestamp_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Timestamp) New() protoreflect.Message { return new(fastReflection_Timestamp) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Timestamp) Interface() protoreflect.ProtoMessage { return (*Timestamp)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Timestamp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.ProtoTs != nil { value := protoreflect.ValueOfMessage(x.ProtoTs.ProtoReflect()) if !f(fd_Timestamp_proto_ts, value) { return } } if x.BlockHeight != uint64(0) { value := protoreflect.ValueOfUint64(x.BlockHeight) if !f(fd_Timestamp_block_height, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Timestamp) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.Timestamp.proto_ts": return x.ProtoTs != nil case "sourcehub.acp.Timestamp.block_height": return x.BlockHeight != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Timestamp")) } panic(fmt.Errorf("message sourcehub.acp.Timestamp does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Timestamp) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.Timestamp.proto_ts": x.ProtoTs = nil case "sourcehub.acp.Timestamp.block_height": x.BlockHeight = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Timestamp")) } panic(fmt.Errorf("message sourcehub.acp.Timestamp does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Timestamp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.Timestamp.proto_ts": value := x.ProtoTs return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.acp.Timestamp.block_height": value := x.BlockHeight return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Timestamp")) } panic(fmt.Errorf("message sourcehub.acp.Timestamp does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Timestamp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.Timestamp.proto_ts": x.ProtoTs = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.acp.Timestamp.block_height": x.BlockHeight = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Timestamp")) } panic(fmt.Errorf("message sourcehub.acp.Timestamp does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Timestamp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.Timestamp.proto_ts": if x.ProtoTs == nil { x.ProtoTs = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.ProtoTs.ProtoReflect()) case "sourcehub.acp.Timestamp.block_height": panic(fmt.Errorf("field block_height of message sourcehub.acp.Timestamp is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Timestamp")) } panic(fmt.Errorf("message sourcehub.acp.Timestamp does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Timestamp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.Timestamp.proto_ts": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.acp.Timestamp.block_height": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.Timestamp")) } panic(fmt.Errorf("message sourcehub.acp.Timestamp does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Timestamp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.Timestamp", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Timestamp) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Timestamp) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Timestamp) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Timestamp) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Timestamp) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.ProtoTs != nil { l = options.Size(x.ProtoTs) n += 1 + l + runtime.Sov(uint64(l)) } if x.BlockHeight != 0 { n += 1 + runtime.Sov(uint64(x.BlockHeight)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Timestamp) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.BlockHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) i-- dAtA[i] = 0x10 } if x.ProtoTs != nil { encoded, err := options.Marshal(x.ProtoTs) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Timestamp) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Timestamp: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProtoTs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.ProtoTs == nil { x.ProtoTs = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProtoTs); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } x.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.BlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/time.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Duration models a time interval expressed either as a wallclock // Duration interval or a number of blocks type Duration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Duration: // // *Duration_ProtoDuration // *Duration_BlockCount Duration isDuration_Duration `protobuf_oneof:"duration"` } func (x *Duration) Reset() { *x = Duration{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_time_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Duration) String() string { return protoimpl.X.MessageStringOf(x) } func (*Duration) ProtoMessage() {} // Deprecated: Use Duration.ProtoReflect.Descriptor instead. func (*Duration) Descriptor() ([]byte, []int) { return file_sourcehub_acp_time_proto_rawDescGZIP(), []int{0} } func (x *Duration) GetDuration() isDuration_Duration { if x != nil { return x.Duration } return nil } func (x *Duration) GetProtoDuration() *durationpb.Duration { if x, ok := x.GetDuration().(*Duration_ProtoDuration); ok { return x.ProtoDuration } return nil } func (x *Duration) GetBlockCount() uint64 { if x, ok := x.GetDuration().(*Duration_BlockCount); ok { return x.BlockCount } return 0 } type isDuration_Duration interface { isDuration_Duration() } type Duration_ProtoDuration struct { ProtoDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=proto_duration,json=protoDuration,proto3,oneof"` } type Duration_BlockCount struct { BlockCount uint64 `protobuf:"varint,2,opt,name=block_count,json=blockCount,proto3,oneof"` } func (*Duration_ProtoDuration) isDuration_Duration() {} func (*Duration_BlockCount) isDuration_Duration() {} // Timestamp models an instant in time expressed as a wallclock // Timestamp and a block height type Timestamp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ProtoTs *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=proto_ts,json=protoTs,proto3" json:"proto_ts,omitempty"` BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` } func (x *Timestamp) Reset() { *x = Timestamp{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_time_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Timestamp) String() string { return protoimpl.X.MessageStringOf(x) } func (*Timestamp) ProtoMessage() {} // Deprecated: Use Timestamp.ProtoReflect.Descriptor instead. func (*Timestamp) Descriptor() ([]byte, []int) { return file_sourcehub_acp_time_proto_rawDescGZIP(), []int{1} } func (x *Timestamp) GetProtoTs() *timestamppb.Timestamp { if x != nil { return x.ProtoTs } return nil } func (x *Timestamp) GetBlockHeight() uint64 { if x != nil { return x.BlockHeight } return 0 } var File_sourcehub_acp_time_proto protoreflect.FileDescriptor var file_sourcehub_acp_time_proto_rawDesc = []byte{ 0x0a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x01, 0x0a, 0x08, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x13, 0xb2, 0xe7, 0xb0, 0x2a, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x10, 0xb2, 0xe7, 0xb0, 0x2a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x93, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_time_proto_rawDescOnce sync.Once file_sourcehub_acp_time_proto_rawDescData = file_sourcehub_acp_time_proto_rawDesc ) func file_sourcehub_acp_time_proto_rawDescGZIP() []byte { file_sourcehub_acp_time_proto_rawDescOnce.Do(func() { file_sourcehub_acp_time_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_time_proto_rawDescData) }) return file_sourcehub_acp_time_proto_rawDescData } var file_sourcehub_acp_time_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_acp_time_proto_goTypes = []interface{}{ (*Duration)(nil), // 0: sourcehub.acp.Duration (*Timestamp)(nil), // 1: sourcehub.acp.Timestamp (*durationpb.Duration)(nil), // 2: google.protobuf.Duration (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_sourcehub_acp_time_proto_depIdxs = []int32{ 2, // 0: sourcehub.acp.Duration.proto_duration:type_name -> google.protobuf.Duration 3, // 1: sourcehub.acp.Timestamp.proto_ts:type_name -> google.protobuf.Timestamp 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcehub_acp_time_proto_init() } func file_sourcehub_acp_time_proto_init() { if File_sourcehub_acp_time_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_acp_time_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Duration); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_time_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Timestamp); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_sourcehub_acp_time_proto_msgTypes[0].OneofWrappers = []interface{}{ (*Duration_ProtoDuration)(nil), (*Duration_BlockCount)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_time_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_acp_time_proto_goTypes, DependencyIndexes: file_sourcehub_acp_time_proto_depIdxs, MessageInfos: file_sourcehub_acp_time_proto_msgTypes, }.Build() File_sourcehub_acp_time_proto = out.File file_sourcehub_acp_time_proto_rawDesc = nil file_sourcehub_acp_time_proto_goTypes = nil file_sourcehub_acp_time_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/tx.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp import ( _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" types "github.com/sourcenetwork/acp_core/pkg/pulsar/types" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_authority protoreflect.FieldDescriptor fd_MsgUpdateParams_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgUpdateParams = File_sourcehub_acp_tx_proto.Messages().ByName("MsgUpdateParams") fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) type fastReflection_MsgUpdateParams MsgUpdateParams func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(x) } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} type fastReflection_MsgUpdateParams_messageType struct{} func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(nil) } func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParams_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParams)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_MsgUpdateParams_authority, value) { return } } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_MsgUpdateParams_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgUpdateParams.authority": return x.Authority != "" case "sourcehub.acp.MsgUpdateParams.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgUpdateParams.authority": x.Authority = "" case "sourcehub.acp.MsgUpdateParams.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgUpdateParams.authority": value := x.Authority return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgUpdateParams.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgUpdateParams.authority": x.Authority = value.Interface().(string) case "sourcehub.acp.MsgUpdateParams.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgUpdateParams.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.acp.MsgUpdateParams.authority": panic(fmt.Errorf("field authority of message sourcehub.acp.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParams does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgUpdateParams.authority": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgUpdateParams.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParams does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgUpdateParams", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParams) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateParamsResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgUpdateParamsResponse = File_sourcehub_acp_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(x) } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} type fastReflection_MsgUpdateParamsResponse_messageType struct{} func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(nil) } func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCreatePolicy protoreflect.MessageDescriptor fd_MsgCreatePolicy_creator protoreflect.FieldDescriptor fd_MsgCreatePolicy_policy protoreflect.FieldDescriptor fd_MsgCreatePolicy_marshal_type protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgCreatePolicy = File_sourcehub_acp_tx_proto.Messages().ByName("MsgCreatePolicy") fd_MsgCreatePolicy_creator = md_MsgCreatePolicy.Fields().ByName("creator") fd_MsgCreatePolicy_policy = md_MsgCreatePolicy.Fields().ByName("policy") fd_MsgCreatePolicy_marshal_type = md_MsgCreatePolicy.Fields().ByName("marshal_type") } var _ protoreflect.Message = (*fastReflection_MsgCreatePolicy)(nil) type fastReflection_MsgCreatePolicy MsgCreatePolicy func (x *MsgCreatePolicy) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCreatePolicy)(x) } func (x *MsgCreatePolicy) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCreatePolicy_messageType fastReflection_MsgCreatePolicy_messageType var _ protoreflect.MessageType = fastReflection_MsgCreatePolicy_messageType{} type fastReflection_MsgCreatePolicy_messageType struct{} func (x fastReflection_MsgCreatePolicy_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCreatePolicy)(nil) } func (x fastReflection_MsgCreatePolicy_messageType) New() protoreflect.Message { return new(fastReflection_MsgCreatePolicy) } func (x fastReflection_MsgCreatePolicy_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePolicy } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCreatePolicy) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePolicy } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCreatePolicy) Type() protoreflect.MessageType { return _fastReflection_MsgCreatePolicy_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCreatePolicy) New() protoreflect.Message { return new(fastReflection_MsgCreatePolicy) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCreatePolicy) Interface() protoreflect.ProtoMessage { return (*MsgCreatePolicy)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCreatePolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgCreatePolicy_creator, value) { return } } if x.Policy != "" { value := protoreflect.ValueOfString(x.Policy) if !f(fd_MsgCreatePolicy_policy, value) { return } } if x.MarshalType != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MarshalType)) if !f(fd_MsgCreatePolicy_marshal_type, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreatePolicy) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicy.creator": return x.Creator != "" case "sourcehub.acp.MsgCreatePolicy.policy": return x.Policy != "" case "sourcehub.acp.MsgCreatePolicy.marshal_type": return x.MarshalType != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicy does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicy) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicy.creator": x.Creator = "" case "sourcehub.acp.MsgCreatePolicy.policy": x.Policy = "" case "sourcehub.acp.MsgCreatePolicy.marshal_type": x.MarshalType = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicy does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreatePolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgCreatePolicy.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgCreatePolicy.policy": value := x.Policy return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgCreatePolicy.marshal_type": value := x.MarshalType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicy does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicy.creator": x.Creator = value.Interface().(string) case "sourcehub.acp.MsgCreatePolicy.policy": x.Policy = value.Interface().(string) case "sourcehub.acp.MsgCreatePolicy.marshal_type": x.MarshalType = (types.PolicyMarshalingType)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicy does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicy.creator": panic(fmt.Errorf("field creator of message sourcehub.acp.MsgCreatePolicy is not mutable")) case "sourcehub.acp.MsgCreatePolicy.policy": panic(fmt.Errorf("field policy of message sourcehub.acp.MsgCreatePolicy is not mutable")) case "sourcehub.acp.MsgCreatePolicy.marshal_type": panic(fmt.Errorf("field marshal_type of message sourcehub.acp.MsgCreatePolicy is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicy does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreatePolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicy.creator": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgCreatePolicy.policy": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgCreatePolicy.marshal_type": return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicy does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCreatePolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgCreatePolicy", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCreatePolicy) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicy) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCreatePolicy) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCreatePolicy) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCreatePolicy) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Policy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.MarshalType != 0 { n += 1 + runtime.Sov(uint64(x.MarshalType)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePolicy) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.MarshalType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MarshalType)) i-- dAtA[i] = 0x18 } if len(x.Policy) > 0 { i -= len(x.Policy) copy(dAtA[i:], x.Policy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Policy))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePolicy) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePolicy: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } x.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCreatePolicyResponse protoreflect.MessageDescriptor fd_MsgCreatePolicyResponse_record protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgCreatePolicyResponse = File_sourcehub_acp_tx_proto.Messages().ByName("MsgCreatePolicyResponse") fd_MsgCreatePolicyResponse_record = md_MsgCreatePolicyResponse.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_MsgCreatePolicyResponse)(nil) type fastReflection_MsgCreatePolicyResponse MsgCreatePolicyResponse func (x *MsgCreatePolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCreatePolicyResponse)(x) } func (x *MsgCreatePolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCreatePolicyResponse_messageType fastReflection_MsgCreatePolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgCreatePolicyResponse_messageType{} type fastReflection_MsgCreatePolicyResponse_messageType struct{} func (x fastReflection_MsgCreatePolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCreatePolicyResponse)(nil) } func (x fastReflection_MsgCreatePolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgCreatePolicyResponse) } func (x fastReflection_MsgCreatePolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCreatePolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCreatePolicyResponse) Type() protoreflect.MessageType { return _fastReflection_MsgCreatePolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCreatePolicyResponse) New() protoreflect.Message { return new(fastReflection_MsgCreatePolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCreatePolicyResponse) Interface() protoreflect.ProtoMessage { return (*MsgCreatePolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCreatePolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_MsgCreatePolicyResponse_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreatePolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicyResponse.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicyResponse.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreatePolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgCreatePolicyResponse.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicyResponse.record": x.Record = value.Message().Interface().(*PolicyRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicyResponse.record": if x.Record == nil { x.Record = new(PolicyRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreatePolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCreatePolicyResponse.record": m := new(PolicyRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCreatePolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCreatePolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCreatePolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgCreatePolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCreatePolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCreatePolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCreatePolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCreatePolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &PolicyRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgEditPolicy protoreflect.MessageDescriptor fd_MsgEditPolicy_creator protoreflect.FieldDescriptor fd_MsgEditPolicy_policy_id protoreflect.FieldDescriptor fd_MsgEditPolicy_policy protoreflect.FieldDescriptor fd_MsgEditPolicy_marshal_type protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgEditPolicy = File_sourcehub_acp_tx_proto.Messages().ByName("MsgEditPolicy") fd_MsgEditPolicy_creator = md_MsgEditPolicy.Fields().ByName("creator") fd_MsgEditPolicy_policy_id = md_MsgEditPolicy.Fields().ByName("policy_id") fd_MsgEditPolicy_policy = md_MsgEditPolicy.Fields().ByName("policy") fd_MsgEditPolicy_marshal_type = md_MsgEditPolicy.Fields().ByName("marshal_type") } var _ protoreflect.Message = (*fastReflection_MsgEditPolicy)(nil) type fastReflection_MsgEditPolicy MsgEditPolicy func (x *MsgEditPolicy) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgEditPolicy)(x) } func (x *MsgEditPolicy) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgEditPolicy_messageType fastReflection_MsgEditPolicy_messageType var _ protoreflect.MessageType = fastReflection_MsgEditPolicy_messageType{} type fastReflection_MsgEditPolicy_messageType struct{} func (x fastReflection_MsgEditPolicy_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgEditPolicy)(nil) } func (x fastReflection_MsgEditPolicy_messageType) New() protoreflect.Message { return new(fastReflection_MsgEditPolicy) } func (x fastReflection_MsgEditPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgEditPolicy } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgEditPolicy) Descriptor() protoreflect.MessageDescriptor { return md_MsgEditPolicy } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgEditPolicy) Type() protoreflect.MessageType { return _fastReflection_MsgEditPolicy_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgEditPolicy) New() protoreflect.Message { return new(fastReflection_MsgEditPolicy) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgEditPolicy) Interface() protoreflect.ProtoMessage { return (*MsgEditPolicy)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgEditPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgEditPolicy_creator, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_MsgEditPolicy_policy_id, value) { return } } if x.Policy != "" { value := protoreflect.ValueOfString(x.Policy) if !f(fd_MsgEditPolicy_policy, value) { return } } if x.MarshalType != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MarshalType)) if !f(fd_MsgEditPolicy_marshal_type, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgEditPolicy) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicy.creator": return x.Creator != "" case "sourcehub.acp.MsgEditPolicy.policy_id": return x.PolicyId != "" case "sourcehub.acp.MsgEditPolicy.policy": return x.Policy != "" case "sourcehub.acp.MsgEditPolicy.marshal_type": return x.MarshalType != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicy does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicy) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicy.creator": x.Creator = "" case "sourcehub.acp.MsgEditPolicy.policy_id": x.PolicyId = "" case "sourcehub.acp.MsgEditPolicy.policy": x.Policy = "" case "sourcehub.acp.MsgEditPolicy.marshal_type": x.MarshalType = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicy does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgEditPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgEditPolicy.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgEditPolicy.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgEditPolicy.policy": value := x.Policy return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgEditPolicy.marshal_type": value := x.MarshalType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicy does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicy.creator": x.Creator = value.Interface().(string) case "sourcehub.acp.MsgEditPolicy.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.MsgEditPolicy.policy": x.Policy = value.Interface().(string) case "sourcehub.acp.MsgEditPolicy.marshal_type": x.MarshalType = (types.PolicyMarshalingType)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicy does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicy.creator": panic(fmt.Errorf("field creator of message sourcehub.acp.MsgEditPolicy is not mutable")) case "sourcehub.acp.MsgEditPolicy.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.MsgEditPolicy is not mutable")) case "sourcehub.acp.MsgEditPolicy.policy": panic(fmt.Errorf("field policy of message sourcehub.acp.MsgEditPolicy is not mutable")) case "sourcehub.acp.MsgEditPolicy.marshal_type": panic(fmt.Errorf("field marshal_type of message sourcehub.acp.MsgEditPolicy is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicy does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgEditPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicy.creator": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgEditPolicy.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgEditPolicy.policy": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgEditPolicy.marshal_type": return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicy")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicy does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgEditPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgEditPolicy", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgEditPolicy) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicy) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgEditPolicy) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgEditPolicy) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgEditPolicy) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Policy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.MarshalType != 0 { n += 1 + runtime.Sov(uint64(x.MarshalType)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgEditPolicy) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.MarshalType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MarshalType)) i-- dAtA[i] = 0x20 } if len(x.Policy) > 0 { i -= len(x.Policy) copy(dAtA[i:], x.Policy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Policy))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgEditPolicy) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditPolicy: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } x.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgEditPolicyResponse protoreflect.MessageDescriptor fd_MsgEditPolicyResponse_relationships_removed protoreflect.FieldDescriptor fd_MsgEditPolicyResponse_record protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgEditPolicyResponse = File_sourcehub_acp_tx_proto.Messages().ByName("MsgEditPolicyResponse") fd_MsgEditPolicyResponse_relationships_removed = md_MsgEditPolicyResponse.Fields().ByName("relationships_removed") fd_MsgEditPolicyResponse_record = md_MsgEditPolicyResponse.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_MsgEditPolicyResponse)(nil) type fastReflection_MsgEditPolicyResponse MsgEditPolicyResponse func (x *MsgEditPolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgEditPolicyResponse)(x) } func (x *MsgEditPolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgEditPolicyResponse_messageType fastReflection_MsgEditPolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgEditPolicyResponse_messageType{} type fastReflection_MsgEditPolicyResponse_messageType struct{} func (x fastReflection_MsgEditPolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgEditPolicyResponse)(nil) } func (x fastReflection_MsgEditPolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgEditPolicyResponse) } func (x fastReflection_MsgEditPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgEditPolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgEditPolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgEditPolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgEditPolicyResponse) Type() protoreflect.MessageType { return _fastReflection_MsgEditPolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgEditPolicyResponse) New() protoreflect.Message { return new(fastReflection_MsgEditPolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgEditPolicyResponse) Interface() protoreflect.ProtoMessage { return (*MsgEditPolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgEditPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RelationshipsRemoved != uint64(0) { value := protoreflect.ValueOfUint64(x.RelationshipsRemoved) if !f(fd_MsgEditPolicyResponse_relationships_removed, value) { return } } if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_MsgEditPolicyResponse_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgEditPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicyResponse.relationships_removed": return x.RelationshipsRemoved != uint64(0) case "sourcehub.acp.MsgEditPolicyResponse.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicyResponse.relationships_removed": x.RelationshipsRemoved = uint64(0) case "sourcehub.acp.MsgEditPolicyResponse.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgEditPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgEditPolicyResponse.relationships_removed": value := x.RelationshipsRemoved return protoreflect.ValueOfUint64(value) case "sourcehub.acp.MsgEditPolicyResponse.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicyResponse.relationships_removed": x.RelationshipsRemoved = value.Uint() case "sourcehub.acp.MsgEditPolicyResponse.record": x.Record = value.Message().Interface().(*PolicyRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicyResponse.record": if x.Record == nil { x.Record = new(PolicyRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) case "sourcehub.acp.MsgEditPolicyResponse.relationships_removed": panic(fmt.Errorf("field relationships_removed of message sourcehub.acp.MsgEditPolicyResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgEditPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgEditPolicyResponse.relationships_removed": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.acp.MsgEditPolicyResponse.record": m := new(PolicyRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgEditPolicyResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgEditPolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgEditPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgEditPolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgEditPolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditPolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgEditPolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgEditPolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgEditPolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RelationshipsRemoved != 0 { n += 1 + runtime.Sov(uint64(x.RelationshipsRemoved)) } if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgEditPolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.RelationshipsRemoved != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.RelationshipsRemoved)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgEditPolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelationshipsRemoved", wireType) } x.RelationshipsRemoved = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.RelationshipsRemoved |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &PolicyRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCheckAccess protoreflect.MessageDescriptor fd_MsgCheckAccess_creator protoreflect.FieldDescriptor fd_MsgCheckAccess_policy_id protoreflect.FieldDescriptor fd_MsgCheckAccess_access_request protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgCheckAccess = File_sourcehub_acp_tx_proto.Messages().ByName("MsgCheckAccess") fd_MsgCheckAccess_creator = md_MsgCheckAccess.Fields().ByName("creator") fd_MsgCheckAccess_policy_id = md_MsgCheckAccess.Fields().ByName("policy_id") fd_MsgCheckAccess_access_request = md_MsgCheckAccess.Fields().ByName("access_request") } var _ protoreflect.Message = (*fastReflection_MsgCheckAccess)(nil) type fastReflection_MsgCheckAccess MsgCheckAccess func (x *MsgCheckAccess) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCheckAccess)(x) } func (x *MsgCheckAccess) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCheckAccess_messageType fastReflection_MsgCheckAccess_messageType var _ protoreflect.MessageType = fastReflection_MsgCheckAccess_messageType{} type fastReflection_MsgCheckAccess_messageType struct{} func (x fastReflection_MsgCheckAccess_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCheckAccess)(nil) } func (x fastReflection_MsgCheckAccess_messageType) New() protoreflect.Message { return new(fastReflection_MsgCheckAccess) } func (x fastReflection_MsgCheckAccess_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCheckAccess } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCheckAccess) Descriptor() protoreflect.MessageDescriptor { return md_MsgCheckAccess } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCheckAccess) Type() protoreflect.MessageType { return _fastReflection_MsgCheckAccess_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCheckAccess) New() protoreflect.Message { return new(fastReflection_MsgCheckAccess) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCheckAccess) Interface() protoreflect.ProtoMessage { return (*MsgCheckAccess)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCheckAccess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgCheckAccess_creator, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_MsgCheckAccess_policy_id, value) { return } } if x.AccessRequest != nil { value := protoreflect.ValueOfMessage(x.AccessRequest.ProtoReflect()) if !f(fd_MsgCheckAccess_access_request, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCheckAccess) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccess.creator": return x.Creator != "" case "sourcehub.acp.MsgCheckAccess.policy_id": return x.PolicyId != "" case "sourcehub.acp.MsgCheckAccess.access_request": return x.AccessRequest != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccess")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccess does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccess) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccess.creator": x.Creator = "" case "sourcehub.acp.MsgCheckAccess.policy_id": x.PolicyId = "" case "sourcehub.acp.MsgCheckAccess.access_request": x.AccessRequest = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccess")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccess does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCheckAccess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgCheckAccess.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgCheckAccess.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgCheckAccess.access_request": value := x.AccessRequest return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccess")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccess does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccess.creator": x.Creator = value.Interface().(string) case "sourcehub.acp.MsgCheckAccess.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.MsgCheckAccess.access_request": x.AccessRequest = value.Message().Interface().(*types.AccessRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccess")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccess does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccess.access_request": if x.AccessRequest == nil { x.AccessRequest = new(types.AccessRequest) } return protoreflect.ValueOfMessage(x.AccessRequest.ProtoReflect()) case "sourcehub.acp.MsgCheckAccess.creator": panic(fmt.Errorf("field creator of message sourcehub.acp.MsgCheckAccess is not mutable")) case "sourcehub.acp.MsgCheckAccess.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.MsgCheckAccess is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccess")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccess does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCheckAccess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccess.creator": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgCheckAccess.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgCheckAccess.access_request": m := new(types.AccessRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccess")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccess does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCheckAccess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgCheckAccess", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCheckAccess) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccess) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCheckAccess) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCheckAccess) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCheckAccess) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AccessRequest != nil { l = options.Size(x.AccessRequest) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCheckAccess) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.AccessRequest != nil { encoded, err := options.Marshal(x.AccessRequest) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCheckAccess) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCheckAccess: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCheckAccess: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccessRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AccessRequest == nil { x.AccessRequest = &types.AccessRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AccessRequest); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCheckAccessResponse protoreflect.MessageDescriptor fd_MsgCheckAccessResponse_decision protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgCheckAccessResponse = File_sourcehub_acp_tx_proto.Messages().ByName("MsgCheckAccessResponse") fd_MsgCheckAccessResponse_decision = md_MsgCheckAccessResponse.Fields().ByName("decision") } var _ protoreflect.Message = (*fastReflection_MsgCheckAccessResponse)(nil) type fastReflection_MsgCheckAccessResponse MsgCheckAccessResponse func (x *MsgCheckAccessResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCheckAccessResponse)(x) } func (x *MsgCheckAccessResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCheckAccessResponse_messageType fastReflection_MsgCheckAccessResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgCheckAccessResponse_messageType{} type fastReflection_MsgCheckAccessResponse_messageType struct{} func (x fastReflection_MsgCheckAccessResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCheckAccessResponse)(nil) } func (x fastReflection_MsgCheckAccessResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgCheckAccessResponse) } func (x fastReflection_MsgCheckAccessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCheckAccessResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCheckAccessResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgCheckAccessResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCheckAccessResponse) Type() protoreflect.MessageType { return _fastReflection_MsgCheckAccessResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCheckAccessResponse) New() protoreflect.Message { return new(fastReflection_MsgCheckAccessResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCheckAccessResponse) Interface() protoreflect.ProtoMessage { return (*MsgCheckAccessResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCheckAccessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Decision != nil { value := protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) if !f(fd_MsgCheckAccessResponse_decision, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCheckAccessResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccessResponse.decision": return x.Decision != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccessResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccessResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccessResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccessResponse.decision": x.Decision = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccessResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccessResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCheckAccessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgCheckAccessResponse.decision": value := x.Decision return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccessResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccessResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccessResponse.decision": x.Decision = value.Message().Interface().(*AccessDecision) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccessResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccessResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccessResponse.decision": if x.Decision == nil { x.Decision = new(AccessDecision) } return protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccessResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccessResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCheckAccessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgCheckAccessResponse.decision": m := new(AccessDecision) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgCheckAccessResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgCheckAccessResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCheckAccessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgCheckAccessResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCheckAccessResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCheckAccessResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCheckAccessResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCheckAccessResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCheckAccessResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Decision != nil { l = options.Size(x.Decision) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCheckAccessResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Decision != nil { encoded, err := options.Marshal(x.Decision) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCheckAccessResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCheckAccessResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCheckAccessResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decision", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Decision == nil { x.Decision = &AccessDecision{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Decision); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgSignedPolicyCmd protoreflect.MessageDescriptor fd_MsgSignedPolicyCmd_creator protoreflect.FieldDescriptor fd_MsgSignedPolicyCmd_payload protoreflect.FieldDescriptor fd_MsgSignedPolicyCmd_type protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgSignedPolicyCmd = File_sourcehub_acp_tx_proto.Messages().ByName("MsgSignedPolicyCmd") fd_MsgSignedPolicyCmd_creator = md_MsgSignedPolicyCmd.Fields().ByName("creator") fd_MsgSignedPolicyCmd_payload = md_MsgSignedPolicyCmd.Fields().ByName("payload") fd_MsgSignedPolicyCmd_type = md_MsgSignedPolicyCmd.Fields().ByName("type") } var _ protoreflect.Message = (*fastReflection_MsgSignedPolicyCmd)(nil) type fastReflection_MsgSignedPolicyCmd MsgSignedPolicyCmd func (x *MsgSignedPolicyCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgSignedPolicyCmd)(x) } func (x *MsgSignedPolicyCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgSignedPolicyCmd_messageType fastReflection_MsgSignedPolicyCmd_messageType var _ protoreflect.MessageType = fastReflection_MsgSignedPolicyCmd_messageType{} type fastReflection_MsgSignedPolicyCmd_messageType struct{} func (x fastReflection_MsgSignedPolicyCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgSignedPolicyCmd)(nil) } func (x fastReflection_MsgSignedPolicyCmd_messageType) New() protoreflect.Message { return new(fastReflection_MsgSignedPolicyCmd) } func (x fastReflection_MsgSignedPolicyCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgSignedPolicyCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgSignedPolicyCmd) Descriptor() protoreflect.MessageDescriptor { return md_MsgSignedPolicyCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgSignedPolicyCmd) Type() protoreflect.MessageType { return _fastReflection_MsgSignedPolicyCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgSignedPolicyCmd) New() protoreflect.Message { return new(fastReflection_MsgSignedPolicyCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgSignedPolicyCmd) Interface() protoreflect.ProtoMessage { return (*MsgSignedPolicyCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgSignedPolicyCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgSignedPolicyCmd_creator, value) { return } } if x.Payload != "" { value := protoreflect.ValueOfString(x.Payload) if !f(fd_MsgSignedPolicyCmd_payload, value) { return } } if x.Type_ != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) if !f(fd_MsgSignedPolicyCmd_type, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgSignedPolicyCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmd.creator": return x.Creator != "" case "sourcehub.acp.MsgSignedPolicyCmd.payload": return x.Payload != "" case "sourcehub.acp.MsgSignedPolicyCmd.type": return x.Type_ != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmd.creator": x.Creator = "" case "sourcehub.acp.MsgSignedPolicyCmd.payload": x.Payload = "" case "sourcehub.acp.MsgSignedPolicyCmd.type": x.Type_ = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgSignedPolicyCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgSignedPolicyCmd.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgSignedPolicyCmd.payload": value := x.Payload return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgSignedPolicyCmd.type": value := x.Type_ return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmd.creator": x.Creator = value.Interface().(string) case "sourcehub.acp.MsgSignedPolicyCmd.payload": x.Payload = value.Interface().(string) case "sourcehub.acp.MsgSignedPolicyCmd.type": x.Type_ = (MsgSignedPolicyCmd_ContentType)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmd.creator": panic(fmt.Errorf("field creator of message sourcehub.acp.MsgSignedPolicyCmd is not mutable")) case "sourcehub.acp.MsgSignedPolicyCmd.payload": panic(fmt.Errorf("field payload of message sourcehub.acp.MsgSignedPolicyCmd is not mutable")) case "sourcehub.acp.MsgSignedPolicyCmd.type": panic(fmt.Errorf("field type of message sourcehub.acp.MsgSignedPolicyCmd is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgSignedPolicyCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmd.creator": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgSignedPolicyCmd.payload": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgSignedPolicyCmd.type": return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgSignedPolicyCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgSignedPolicyCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgSignedPolicyCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgSignedPolicyCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgSignedPolicyCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgSignedPolicyCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Payload) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Type_ != 0 { n += 1 + runtime.Sov(uint64(x.Type_)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgSignedPolicyCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Type_ != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) i-- dAtA[i] = 0x18 } if len(x.Payload) > 0 { i -= len(x.Payload) copy(dAtA[i:], x.Payload) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgSignedPolicyCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSignedPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSignedPolicyCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Payload = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) } x.Type_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Type_ |= MsgSignedPolicyCmd_ContentType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgSignedPolicyCmdResponse protoreflect.MessageDescriptor fd_MsgSignedPolicyCmdResponse_result protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgSignedPolicyCmdResponse = File_sourcehub_acp_tx_proto.Messages().ByName("MsgSignedPolicyCmdResponse") fd_MsgSignedPolicyCmdResponse_result = md_MsgSignedPolicyCmdResponse.Fields().ByName("result") } var _ protoreflect.Message = (*fastReflection_MsgSignedPolicyCmdResponse)(nil) type fastReflection_MsgSignedPolicyCmdResponse MsgSignedPolicyCmdResponse func (x *MsgSignedPolicyCmdResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgSignedPolicyCmdResponse)(x) } func (x *MsgSignedPolicyCmdResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgSignedPolicyCmdResponse_messageType fastReflection_MsgSignedPolicyCmdResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgSignedPolicyCmdResponse_messageType{} type fastReflection_MsgSignedPolicyCmdResponse_messageType struct{} func (x fastReflection_MsgSignedPolicyCmdResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgSignedPolicyCmdResponse)(nil) } func (x fastReflection_MsgSignedPolicyCmdResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgSignedPolicyCmdResponse) } func (x fastReflection_MsgSignedPolicyCmdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgSignedPolicyCmdResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgSignedPolicyCmdResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgSignedPolicyCmdResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgSignedPolicyCmdResponse) Type() protoreflect.MessageType { return _fastReflection_MsgSignedPolicyCmdResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgSignedPolicyCmdResponse) New() protoreflect.Message { return new(fastReflection_MsgSignedPolicyCmdResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgSignedPolicyCmdResponse) Interface() protoreflect.ProtoMessage { return (*MsgSignedPolicyCmdResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgSignedPolicyCmdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Result != nil { value := protoreflect.ValueOfMessage(x.Result.ProtoReflect()) if !f(fd_MsgSignedPolicyCmdResponse_result, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgSignedPolicyCmdResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmdResponse.result": return x.Result != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmdResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmdResponse.result": x.Result = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgSignedPolicyCmdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgSignedPolicyCmdResponse.result": value := x.Result return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmdResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmdResponse.result": x.Result = value.Message().Interface().(*PolicyCmdResult) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmdResponse.result": if x.Result == nil { x.Result = new(PolicyCmdResult) } return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmdResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgSignedPolicyCmdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgSignedPolicyCmdResponse.result": m := new(PolicyCmdResult) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgSignedPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgSignedPolicyCmdResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgSignedPolicyCmdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgSignedPolicyCmdResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgSignedPolicyCmdResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSignedPolicyCmdResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgSignedPolicyCmdResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgSignedPolicyCmdResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgSignedPolicyCmdResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Result != nil { l = options.Size(x.Result) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgSignedPolicyCmdResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Result != nil { encoded, err := options.Marshal(x.Result) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgSignedPolicyCmdResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSignedPolicyCmdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSignedPolicyCmdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Result == nil { x.Result = &PolicyCmdResult{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Result); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgBearerPolicyCmd protoreflect.MessageDescriptor fd_MsgBearerPolicyCmd_creator protoreflect.FieldDescriptor fd_MsgBearerPolicyCmd_bearer_token protoreflect.FieldDescriptor fd_MsgBearerPolicyCmd_policy_id protoreflect.FieldDescriptor fd_MsgBearerPolicyCmd_cmd protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgBearerPolicyCmd = File_sourcehub_acp_tx_proto.Messages().ByName("MsgBearerPolicyCmd") fd_MsgBearerPolicyCmd_creator = md_MsgBearerPolicyCmd.Fields().ByName("creator") fd_MsgBearerPolicyCmd_bearer_token = md_MsgBearerPolicyCmd.Fields().ByName("bearer_token") fd_MsgBearerPolicyCmd_policy_id = md_MsgBearerPolicyCmd.Fields().ByName("policy_id") fd_MsgBearerPolicyCmd_cmd = md_MsgBearerPolicyCmd.Fields().ByName("cmd") } var _ protoreflect.Message = (*fastReflection_MsgBearerPolicyCmd)(nil) type fastReflection_MsgBearerPolicyCmd MsgBearerPolicyCmd func (x *MsgBearerPolicyCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgBearerPolicyCmd)(x) } func (x *MsgBearerPolicyCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgBearerPolicyCmd_messageType fastReflection_MsgBearerPolicyCmd_messageType var _ protoreflect.MessageType = fastReflection_MsgBearerPolicyCmd_messageType{} type fastReflection_MsgBearerPolicyCmd_messageType struct{} func (x fastReflection_MsgBearerPolicyCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgBearerPolicyCmd)(nil) } func (x fastReflection_MsgBearerPolicyCmd_messageType) New() protoreflect.Message { return new(fastReflection_MsgBearerPolicyCmd) } func (x fastReflection_MsgBearerPolicyCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgBearerPolicyCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgBearerPolicyCmd) Descriptor() protoreflect.MessageDescriptor { return md_MsgBearerPolicyCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgBearerPolicyCmd) Type() protoreflect.MessageType { return _fastReflection_MsgBearerPolicyCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgBearerPolicyCmd) New() protoreflect.Message { return new(fastReflection_MsgBearerPolicyCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgBearerPolicyCmd) Interface() protoreflect.ProtoMessage { return (*MsgBearerPolicyCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgBearerPolicyCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgBearerPolicyCmd_creator, value) { return } } if x.BearerToken != "" { value := protoreflect.ValueOfString(x.BearerToken) if !f(fd_MsgBearerPolicyCmd_bearer_token, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_MsgBearerPolicyCmd_policy_id, value) { return } } if x.Cmd != nil { value := protoreflect.ValueOfMessage(x.Cmd.ProtoReflect()) if !f(fd_MsgBearerPolicyCmd_cmd, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgBearerPolicyCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmd.creator": return x.Creator != "" case "sourcehub.acp.MsgBearerPolicyCmd.bearer_token": return x.BearerToken != "" case "sourcehub.acp.MsgBearerPolicyCmd.policy_id": return x.PolicyId != "" case "sourcehub.acp.MsgBearerPolicyCmd.cmd": return x.Cmd != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmd.creator": x.Creator = "" case "sourcehub.acp.MsgBearerPolicyCmd.bearer_token": x.BearerToken = "" case "sourcehub.acp.MsgBearerPolicyCmd.policy_id": x.PolicyId = "" case "sourcehub.acp.MsgBearerPolicyCmd.cmd": x.Cmd = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgBearerPolicyCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgBearerPolicyCmd.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgBearerPolicyCmd.bearer_token": value := x.BearerToken return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgBearerPolicyCmd.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgBearerPolicyCmd.cmd": value := x.Cmd return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmd.creator": x.Creator = value.Interface().(string) case "sourcehub.acp.MsgBearerPolicyCmd.bearer_token": x.BearerToken = value.Interface().(string) case "sourcehub.acp.MsgBearerPolicyCmd.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.MsgBearerPolicyCmd.cmd": x.Cmd = value.Message().Interface().(*PolicyCmd) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmd.cmd": if x.Cmd == nil { x.Cmd = new(PolicyCmd) } return protoreflect.ValueOfMessage(x.Cmd.ProtoReflect()) case "sourcehub.acp.MsgBearerPolicyCmd.creator": panic(fmt.Errorf("field creator of message sourcehub.acp.MsgBearerPolicyCmd is not mutable")) case "sourcehub.acp.MsgBearerPolicyCmd.bearer_token": panic(fmt.Errorf("field bearer_token of message sourcehub.acp.MsgBearerPolicyCmd is not mutable")) case "sourcehub.acp.MsgBearerPolicyCmd.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.MsgBearerPolicyCmd is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgBearerPolicyCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmd.creator": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgBearerPolicyCmd.bearer_token": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgBearerPolicyCmd.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgBearerPolicyCmd.cmd": m := new(PolicyCmd) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgBearerPolicyCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgBearerPolicyCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgBearerPolicyCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgBearerPolicyCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgBearerPolicyCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgBearerPolicyCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.BearerToken) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Cmd != nil { l = options.Size(x.Cmd) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgBearerPolicyCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Cmd != nil { encoded, err := options.Marshal(x.Cmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x1a } if len(x.BearerToken) > 0 { i -= len(x.BearerToken) copy(dAtA[i:], x.BearerToken) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BearerToken))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgBearerPolicyCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBearerPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBearerPolicyCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BearerToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.BearerToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Cmd == nil { x.Cmd = &PolicyCmd{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Cmd); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgBearerPolicyCmdResponse protoreflect.MessageDescriptor fd_MsgBearerPolicyCmdResponse_result protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgBearerPolicyCmdResponse = File_sourcehub_acp_tx_proto.Messages().ByName("MsgBearerPolicyCmdResponse") fd_MsgBearerPolicyCmdResponse_result = md_MsgBearerPolicyCmdResponse.Fields().ByName("result") } var _ protoreflect.Message = (*fastReflection_MsgBearerPolicyCmdResponse)(nil) type fastReflection_MsgBearerPolicyCmdResponse MsgBearerPolicyCmdResponse func (x *MsgBearerPolicyCmdResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgBearerPolicyCmdResponse)(x) } func (x *MsgBearerPolicyCmdResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgBearerPolicyCmdResponse_messageType fastReflection_MsgBearerPolicyCmdResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgBearerPolicyCmdResponse_messageType{} type fastReflection_MsgBearerPolicyCmdResponse_messageType struct{} func (x fastReflection_MsgBearerPolicyCmdResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgBearerPolicyCmdResponse)(nil) } func (x fastReflection_MsgBearerPolicyCmdResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgBearerPolicyCmdResponse) } func (x fastReflection_MsgBearerPolicyCmdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgBearerPolicyCmdResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgBearerPolicyCmdResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgBearerPolicyCmdResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgBearerPolicyCmdResponse) Type() protoreflect.MessageType { return _fastReflection_MsgBearerPolicyCmdResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgBearerPolicyCmdResponse) New() protoreflect.Message { return new(fastReflection_MsgBearerPolicyCmdResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgBearerPolicyCmdResponse) Interface() protoreflect.ProtoMessage { return (*MsgBearerPolicyCmdResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgBearerPolicyCmdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Result != nil { value := protoreflect.ValueOfMessage(x.Result.ProtoReflect()) if !f(fd_MsgBearerPolicyCmdResponse_result, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgBearerPolicyCmdResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmdResponse.result": return x.Result != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmdResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmdResponse.result": x.Result = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgBearerPolicyCmdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgBearerPolicyCmdResponse.result": value := x.Result return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmdResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmdResponse.result": x.Result = value.Message().Interface().(*PolicyCmdResult) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmdResponse.result": if x.Result == nil { x.Result = new(PolicyCmdResult) } return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmdResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgBearerPolicyCmdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgBearerPolicyCmdResponse.result": m := new(PolicyCmdResult) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgBearerPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgBearerPolicyCmdResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgBearerPolicyCmdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgBearerPolicyCmdResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgBearerPolicyCmdResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgBearerPolicyCmdResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgBearerPolicyCmdResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgBearerPolicyCmdResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgBearerPolicyCmdResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Result != nil { l = options.Size(x.Result) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgBearerPolicyCmdResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Result != nil { encoded, err := options.Marshal(x.Result) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgBearerPolicyCmdResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBearerPolicyCmdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBearerPolicyCmdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Result == nil { x.Result = &PolicyCmdResult{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Result); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgDirectPolicyCmd protoreflect.MessageDescriptor fd_MsgDirectPolicyCmd_creator protoreflect.FieldDescriptor fd_MsgDirectPolicyCmd_policy_id protoreflect.FieldDescriptor fd_MsgDirectPolicyCmd_cmd protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgDirectPolicyCmd = File_sourcehub_acp_tx_proto.Messages().ByName("MsgDirectPolicyCmd") fd_MsgDirectPolicyCmd_creator = md_MsgDirectPolicyCmd.Fields().ByName("creator") fd_MsgDirectPolicyCmd_policy_id = md_MsgDirectPolicyCmd.Fields().ByName("policy_id") fd_MsgDirectPolicyCmd_cmd = md_MsgDirectPolicyCmd.Fields().ByName("cmd") } var _ protoreflect.Message = (*fastReflection_MsgDirectPolicyCmd)(nil) type fastReflection_MsgDirectPolicyCmd MsgDirectPolicyCmd func (x *MsgDirectPolicyCmd) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgDirectPolicyCmd)(x) } func (x *MsgDirectPolicyCmd) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgDirectPolicyCmd_messageType fastReflection_MsgDirectPolicyCmd_messageType var _ protoreflect.MessageType = fastReflection_MsgDirectPolicyCmd_messageType{} type fastReflection_MsgDirectPolicyCmd_messageType struct{} func (x fastReflection_MsgDirectPolicyCmd_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgDirectPolicyCmd)(nil) } func (x fastReflection_MsgDirectPolicyCmd_messageType) New() protoreflect.Message { return new(fastReflection_MsgDirectPolicyCmd) } func (x fastReflection_MsgDirectPolicyCmd_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgDirectPolicyCmd } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgDirectPolicyCmd) Descriptor() protoreflect.MessageDescriptor { return md_MsgDirectPolicyCmd } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgDirectPolicyCmd) Type() protoreflect.MessageType { return _fastReflection_MsgDirectPolicyCmd_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgDirectPolicyCmd) New() protoreflect.Message { return new(fastReflection_MsgDirectPolicyCmd) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgDirectPolicyCmd) Interface() protoreflect.ProtoMessage { return (*MsgDirectPolicyCmd)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgDirectPolicyCmd) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgDirectPolicyCmd_creator, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_MsgDirectPolicyCmd_policy_id, value) { return } } if x.Cmd != nil { value := protoreflect.ValueOfMessage(x.Cmd.ProtoReflect()) if !f(fd_MsgDirectPolicyCmd_cmd, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgDirectPolicyCmd) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmd.creator": return x.Creator != "" case "sourcehub.acp.MsgDirectPolicyCmd.policy_id": return x.PolicyId != "" case "sourcehub.acp.MsgDirectPolicyCmd.cmd": return x.Cmd != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmd does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmd) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmd.creator": x.Creator = "" case "sourcehub.acp.MsgDirectPolicyCmd.policy_id": x.PolicyId = "" case "sourcehub.acp.MsgDirectPolicyCmd.cmd": x.Cmd = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmd does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgDirectPolicyCmd) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgDirectPolicyCmd.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgDirectPolicyCmd.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.acp.MsgDirectPolicyCmd.cmd": value := x.Cmd return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmd does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmd) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmd.creator": x.Creator = value.Interface().(string) case "sourcehub.acp.MsgDirectPolicyCmd.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.acp.MsgDirectPolicyCmd.cmd": x.Cmd = value.Message().Interface().(*PolicyCmd) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmd does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmd) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmd.cmd": if x.Cmd == nil { x.Cmd = new(PolicyCmd) } return protoreflect.ValueOfMessage(x.Cmd.ProtoReflect()) case "sourcehub.acp.MsgDirectPolicyCmd.creator": panic(fmt.Errorf("field creator of message sourcehub.acp.MsgDirectPolicyCmd is not mutable")) case "sourcehub.acp.MsgDirectPolicyCmd.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.acp.MsgDirectPolicyCmd is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmd does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgDirectPolicyCmd) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmd.creator": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgDirectPolicyCmd.policy_id": return protoreflect.ValueOfString("") case "sourcehub.acp.MsgDirectPolicyCmd.cmd": m := new(PolicyCmd) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmd")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmd does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgDirectPolicyCmd) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgDirectPolicyCmd", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgDirectPolicyCmd) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmd) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgDirectPolicyCmd) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgDirectPolicyCmd) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgDirectPolicyCmd) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Cmd != nil { l = options.Size(x.Cmd) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgDirectPolicyCmd) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Cmd != nil { encoded, err := options.Marshal(x.Cmd) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgDirectPolicyCmd) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDirectPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDirectPolicyCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Cmd == nil { x.Cmd = &PolicyCmd{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Cmd); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgDirectPolicyCmdResponse protoreflect.MessageDescriptor fd_MsgDirectPolicyCmdResponse_result protoreflect.FieldDescriptor ) func init() { file_sourcehub_acp_tx_proto_init() md_MsgDirectPolicyCmdResponse = File_sourcehub_acp_tx_proto.Messages().ByName("MsgDirectPolicyCmdResponse") fd_MsgDirectPolicyCmdResponse_result = md_MsgDirectPolicyCmdResponse.Fields().ByName("result") } var _ protoreflect.Message = (*fastReflection_MsgDirectPolicyCmdResponse)(nil) type fastReflection_MsgDirectPolicyCmdResponse MsgDirectPolicyCmdResponse func (x *MsgDirectPolicyCmdResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgDirectPolicyCmdResponse)(x) } func (x *MsgDirectPolicyCmdResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_acp_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgDirectPolicyCmdResponse_messageType fastReflection_MsgDirectPolicyCmdResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgDirectPolicyCmdResponse_messageType{} type fastReflection_MsgDirectPolicyCmdResponse_messageType struct{} func (x fastReflection_MsgDirectPolicyCmdResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgDirectPolicyCmdResponse)(nil) } func (x fastReflection_MsgDirectPolicyCmdResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgDirectPolicyCmdResponse) } func (x fastReflection_MsgDirectPolicyCmdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgDirectPolicyCmdResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgDirectPolicyCmdResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgDirectPolicyCmdResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgDirectPolicyCmdResponse) Type() protoreflect.MessageType { return _fastReflection_MsgDirectPolicyCmdResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgDirectPolicyCmdResponse) New() protoreflect.Message { return new(fastReflection_MsgDirectPolicyCmdResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgDirectPolicyCmdResponse) Interface() protoreflect.ProtoMessage { return (*MsgDirectPolicyCmdResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgDirectPolicyCmdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Result != nil { value := protoreflect.ValueOfMessage(x.Result.ProtoReflect()) if !f(fd_MsgDirectPolicyCmdResponse_result, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgDirectPolicyCmdResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmdResponse.result": return x.Result != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmdResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmdResponse.result": x.Result = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgDirectPolicyCmdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.acp.MsgDirectPolicyCmdResponse.result": value := x.Result return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmdResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmdResponse.result": x.Result = value.Message().Interface().(*PolicyCmdResult) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmdResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmdResponse.result": if x.Result == nil { x.Result = new(PolicyCmdResult) } return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmdResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgDirectPolicyCmdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.acp.MsgDirectPolicyCmdResponse.result": m := new(PolicyCmdResult) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.acp.MsgDirectPolicyCmdResponse")) } panic(fmt.Errorf("message sourcehub.acp.MsgDirectPolicyCmdResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgDirectPolicyCmdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.acp.MsgDirectPolicyCmdResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgDirectPolicyCmdResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDirectPolicyCmdResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgDirectPolicyCmdResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgDirectPolicyCmdResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgDirectPolicyCmdResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Result != nil { l = options.Size(x.Result) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgDirectPolicyCmdResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Result != nil { encoded, err := options.Marshal(x.Result) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgDirectPolicyCmdResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDirectPolicyCmdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDirectPolicyCmdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Result == nil { x.Result = &PolicyCmdResult{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Result); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/acp/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type MsgSignedPolicyCmd_ContentType int32 const ( MsgSignedPolicyCmd_UNKNOWN MsgSignedPolicyCmd_ContentType = 0 MsgSignedPolicyCmd_JWS MsgSignedPolicyCmd_ContentType = 1 ) // Enum value maps for MsgSignedPolicyCmd_ContentType. var ( MsgSignedPolicyCmd_ContentType_name = map[int32]string{ 0: "UNKNOWN", 1: "JWS", } MsgSignedPolicyCmd_ContentType_value = map[string]int32{ "UNKNOWN": 0, "JWS": 1, } ) func (x MsgSignedPolicyCmd_ContentType) Enum() *MsgSignedPolicyCmd_ContentType { p := new(MsgSignedPolicyCmd_ContentType) *p = x return p } func (x MsgSignedPolicyCmd_ContentType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MsgSignedPolicyCmd_ContentType) Descriptor() protoreflect.EnumDescriptor { return file_sourcehub_acp_tx_proto_enumTypes[0].Descriptor() } func (MsgSignedPolicyCmd_ContentType) Type() protoreflect.EnumType { return &file_sourcehub_acp_tx_proto_enumTypes[0] } func (x MsgSignedPolicyCmd_ContentType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use MsgSignedPolicyCmd_ContentType.Descriptor instead. func (MsgSignedPolicyCmd_ContentType) EnumDescriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{8, 0} } // MsgUpdateParams is the Msg/UpdateParams request type. type MsgUpdateParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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"` // NOTE: All parameters must be supplied. Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgUpdateParams) GetAuthority() string { if x != nil { return x.Authority } return "" } func (x *MsgUpdateParams) GetParams() *Params { if x != nil { return x.Params } return nil } // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. type MsgUpdateParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{1} } type MsgCreatePolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Policy string `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType types.PolicyMarshalingType `protobuf:"varint,3,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (x *MsgCreatePolicy) Reset() { *x = MsgCreatePolicy{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCreatePolicy) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCreatePolicy) ProtoMessage() {} // Deprecated: Use MsgCreatePolicy.ProtoReflect.Descriptor instead. func (*MsgCreatePolicy) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgCreatePolicy) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgCreatePolicy) GetPolicy() string { if x != nil { return x.Policy } return "" } func (x *MsgCreatePolicy) GetMarshalType() types.PolicyMarshalingType { if x != nil { return x.MarshalType } return types.PolicyMarshalingType(0) } type MsgCreatePolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Record *PolicyRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (x *MsgCreatePolicyResponse) Reset() { *x = MsgCreatePolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCreatePolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCreatePolicyResponse) ProtoMessage() {} // Deprecated: Use MsgCreatePolicyResponse.ProtoReflect.Descriptor instead. func (*MsgCreatePolicyResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{3} } func (x *MsgCreatePolicyResponse) GetRecord() *PolicyRecord { if x != nil { return x.Record } return nil } type MsgEditPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Policy string `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType types.PolicyMarshalingType `protobuf:"varint,4,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (x *MsgEditPolicy) Reset() { *x = MsgEditPolicy{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgEditPolicy) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgEditPolicy) ProtoMessage() {} // Deprecated: Use MsgEditPolicy.ProtoReflect.Descriptor instead. func (*MsgEditPolicy) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgEditPolicy) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgEditPolicy) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *MsgEditPolicy) GetPolicy() string { if x != nil { return x.Policy } return "" } func (x *MsgEditPolicy) GetMarshalType() types.PolicyMarshalingType { if x != nil { return x.MarshalType } return types.PolicyMarshalingType(0) } type MsgEditPolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RelationshipsRemoved uint64 `protobuf:"varint,1,opt,name=relationships_removed,json=relationshipsRemoved,proto3" json:"relationships_removed,omitempty"` Record *PolicyRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (x *MsgEditPolicyResponse) Reset() { *x = MsgEditPolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgEditPolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgEditPolicyResponse) ProtoMessage() {} // Deprecated: Use MsgEditPolicyResponse.ProtoReflect.Descriptor instead. func (*MsgEditPolicyResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{5} } func (x *MsgEditPolicyResponse) GetRelationshipsRemoved() uint64 { if x != nil { return x.RelationshipsRemoved } return 0 } func (x *MsgEditPolicyResponse) GetRecord() *PolicyRecord { if x != nil { return x.Record } return nil } type MsgCheckAccess struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` AccessRequest *types.AccessRequest `protobuf:"bytes,3,opt,name=access_request,json=accessRequest,proto3" json:"access_request,omitempty"` } func (x *MsgCheckAccess) Reset() { *x = MsgCheckAccess{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCheckAccess) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCheckAccess) ProtoMessage() {} // Deprecated: Use MsgCheckAccess.ProtoReflect.Descriptor instead. func (*MsgCheckAccess) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgCheckAccess) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgCheckAccess) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *MsgCheckAccess) GetAccessRequest() *types.AccessRequest { if x != nil { return x.AccessRequest } return nil } type MsgCheckAccessResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Decision *AccessDecision `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` } func (x *MsgCheckAccessResponse) Reset() { *x = MsgCheckAccessResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCheckAccessResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCheckAccessResponse) ProtoMessage() {} // Deprecated: Use MsgCheckAccessResponse.ProtoReflect.Descriptor instead. func (*MsgCheckAccessResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{7} } func (x *MsgCheckAccessResponse) GetDecision() *AccessDecision { if x != nil { return x.Decision } return nil } type MsgSignedPolicyCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Type_ MsgSignedPolicyCmd_ContentType `protobuf:"varint,3,opt,name=type,proto3,enum=sourcehub.acp.MsgSignedPolicyCmd_ContentType" json:"type,omitempty"` } func (x *MsgSignedPolicyCmd) Reset() { *x = MsgSignedPolicyCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgSignedPolicyCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgSignedPolicyCmd) ProtoMessage() {} // Deprecated: Use MsgSignedPolicyCmd.ProtoReflect.Descriptor instead. func (*MsgSignedPolicyCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgSignedPolicyCmd) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgSignedPolicyCmd) GetPayload() string { if x != nil { return x.Payload } return "" } func (x *MsgSignedPolicyCmd) GetType_() MsgSignedPolicyCmd_ContentType { if x != nil { return x.Type_ } return MsgSignedPolicyCmd_UNKNOWN } type MsgSignedPolicyCmdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result *PolicyCmdResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (x *MsgSignedPolicyCmdResponse) Reset() { *x = MsgSignedPolicyCmdResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgSignedPolicyCmdResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgSignedPolicyCmdResponse) ProtoMessage() {} // Deprecated: Use MsgSignedPolicyCmdResponse.ProtoReflect.Descriptor instead. func (*MsgSignedPolicyCmdResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{9} } func (x *MsgSignedPolicyCmdResponse) GetResult() *PolicyCmdResult { if x != nil { return x.Result } return nil } type MsgBearerPolicyCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` BearerToken string `protobuf:"bytes,2,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` PolicyId string `protobuf:"bytes,3,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Cmd *PolicyCmd `protobuf:"bytes,4,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (x *MsgBearerPolicyCmd) Reset() { *x = MsgBearerPolicyCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgBearerPolicyCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgBearerPolicyCmd) ProtoMessage() {} // Deprecated: Use MsgBearerPolicyCmd.ProtoReflect.Descriptor instead. func (*MsgBearerPolicyCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{10} } func (x *MsgBearerPolicyCmd) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgBearerPolicyCmd) GetBearerToken() string { if x != nil { return x.BearerToken } return "" } func (x *MsgBearerPolicyCmd) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *MsgBearerPolicyCmd) GetCmd() *PolicyCmd { if x != nil { return x.Cmd } return nil } type MsgBearerPolicyCmdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result *PolicyCmdResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (x *MsgBearerPolicyCmdResponse) Reset() { *x = MsgBearerPolicyCmdResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgBearerPolicyCmdResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgBearerPolicyCmdResponse) ProtoMessage() {} // Deprecated: Use MsgBearerPolicyCmdResponse.ProtoReflect.Descriptor instead. func (*MsgBearerPolicyCmdResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{11} } func (x *MsgBearerPolicyCmdResponse) GetResult() *PolicyCmdResult { if x != nil { return x.Result } return nil } type MsgDirectPolicyCmd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Cmd *PolicyCmd `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (x *MsgDirectPolicyCmd) Reset() { *x = MsgDirectPolicyCmd{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgDirectPolicyCmd) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgDirectPolicyCmd) ProtoMessage() {} // Deprecated: Use MsgDirectPolicyCmd.ProtoReflect.Descriptor instead. func (*MsgDirectPolicyCmd) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgDirectPolicyCmd) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgDirectPolicyCmd) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *MsgDirectPolicyCmd) GetCmd() *PolicyCmd { if x != nil { return x.Cmd } return nil } type MsgDirectPolicyCmdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result *PolicyCmdResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (x *MsgDirectPolicyCmdResponse) Reset() { *x = MsgDirectPolicyCmdResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_acp_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgDirectPolicyCmdResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgDirectPolicyCmdResponse) ProtoMessage() {} // Deprecated: Use MsgDirectPolicyCmdResponse.ProtoReflect.Descriptor instead. func (*MsgDirectPolicyCmdResponse) Descriptor() ([]byte, []int) { return file_sourcehub_acp_tx_proto_rawDescGZIP(), []int{13} } func (x *MsgDirectPolicyCmdResponse) GetResult() *PolicyCmdResult { if x != nil { return x.Result } return nil } var File_sourcehub_acp_tx_proto protoreflect.FileDescriptor var file_sourcehub_acp_tx_proto_rawDesc = []byte{ 0x0a, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x61, 0x63, 0x70, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4e, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0xbd, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x81, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x53, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x57, 0x53, 0x10, 0x01, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa8, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0x86, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x45, 0x64, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x91, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x63, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x63, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x63, 0x70, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x63, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_acp_tx_proto_rawDescOnce sync.Once file_sourcehub_acp_tx_proto_rawDescData = file_sourcehub_acp_tx_proto_rawDesc ) func file_sourcehub_acp_tx_proto_rawDescGZIP() []byte { file_sourcehub_acp_tx_proto_rawDescOnce.Do(func() { file_sourcehub_acp_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_acp_tx_proto_rawDescData) }) return file_sourcehub_acp_tx_proto_rawDescData } var file_sourcehub_acp_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sourcehub_acp_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_sourcehub_acp_tx_proto_goTypes = []interface{}{ (MsgSignedPolicyCmd_ContentType)(0), // 0: sourcehub.acp.MsgSignedPolicyCmd.ContentType (*MsgUpdateParams)(nil), // 1: sourcehub.acp.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 2: sourcehub.acp.MsgUpdateParamsResponse (*MsgCreatePolicy)(nil), // 3: sourcehub.acp.MsgCreatePolicy (*MsgCreatePolicyResponse)(nil), // 4: sourcehub.acp.MsgCreatePolicyResponse (*MsgEditPolicy)(nil), // 5: sourcehub.acp.MsgEditPolicy (*MsgEditPolicyResponse)(nil), // 6: sourcehub.acp.MsgEditPolicyResponse (*MsgCheckAccess)(nil), // 7: sourcehub.acp.MsgCheckAccess (*MsgCheckAccessResponse)(nil), // 8: sourcehub.acp.MsgCheckAccessResponse (*MsgSignedPolicyCmd)(nil), // 9: sourcehub.acp.MsgSignedPolicyCmd (*MsgSignedPolicyCmdResponse)(nil), // 10: sourcehub.acp.MsgSignedPolicyCmdResponse (*MsgBearerPolicyCmd)(nil), // 11: sourcehub.acp.MsgBearerPolicyCmd (*MsgBearerPolicyCmdResponse)(nil), // 12: sourcehub.acp.MsgBearerPolicyCmdResponse (*MsgDirectPolicyCmd)(nil), // 13: sourcehub.acp.MsgDirectPolicyCmd (*MsgDirectPolicyCmdResponse)(nil), // 14: sourcehub.acp.MsgDirectPolicyCmdResponse (*Params)(nil), // 15: sourcehub.acp.Params (types.PolicyMarshalingType)(0), // 16: sourcenetwork.acp_core.PolicyMarshalingType (*PolicyRecord)(nil), // 17: sourcehub.acp.PolicyRecord (*types.AccessRequest)(nil), // 18: sourcenetwork.acp_core.AccessRequest (*AccessDecision)(nil), // 19: sourcehub.acp.AccessDecision (*PolicyCmdResult)(nil), // 20: sourcehub.acp.PolicyCmdResult (*PolicyCmd)(nil), // 21: sourcehub.acp.PolicyCmd } var file_sourcehub_acp_tx_proto_depIdxs = []int32{ 15, // 0: sourcehub.acp.MsgUpdateParams.params:type_name -> sourcehub.acp.Params 16, // 1: sourcehub.acp.MsgCreatePolicy.marshal_type:type_name -> sourcenetwork.acp_core.PolicyMarshalingType 17, // 2: sourcehub.acp.MsgCreatePolicyResponse.record:type_name -> sourcehub.acp.PolicyRecord 16, // 3: sourcehub.acp.MsgEditPolicy.marshal_type:type_name -> sourcenetwork.acp_core.PolicyMarshalingType 17, // 4: sourcehub.acp.MsgEditPolicyResponse.record:type_name -> sourcehub.acp.PolicyRecord 18, // 5: sourcehub.acp.MsgCheckAccess.access_request:type_name -> sourcenetwork.acp_core.AccessRequest 19, // 6: sourcehub.acp.MsgCheckAccessResponse.decision:type_name -> sourcehub.acp.AccessDecision 0, // 7: sourcehub.acp.MsgSignedPolicyCmd.type:type_name -> sourcehub.acp.MsgSignedPolicyCmd.ContentType 20, // 8: sourcehub.acp.MsgSignedPolicyCmdResponse.result:type_name -> sourcehub.acp.PolicyCmdResult 21, // 9: sourcehub.acp.MsgBearerPolicyCmd.cmd:type_name -> sourcehub.acp.PolicyCmd 20, // 10: sourcehub.acp.MsgBearerPolicyCmdResponse.result:type_name -> sourcehub.acp.PolicyCmdResult 21, // 11: sourcehub.acp.MsgDirectPolicyCmd.cmd:type_name -> sourcehub.acp.PolicyCmd 20, // 12: sourcehub.acp.MsgDirectPolicyCmdResponse.result:type_name -> sourcehub.acp.PolicyCmdResult 1, // 13: sourcehub.acp.Msg.UpdateParams:input_type -> sourcehub.acp.MsgUpdateParams 3, // 14: sourcehub.acp.Msg.CreatePolicy:input_type -> sourcehub.acp.MsgCreatePolicy 5, // 15: sourcehub.acp.Msg.EditPolicy:input_type -> sourcehub.acp.MsgEditPolicy 7, // 16: sourcehub.acp.Msg.CheckAccess:input_type -> sourcehub.acp.MsgCheckAccess 9, // 17: sourcehub.acp.Msg.SignedPolicyCmd:input_type -> sourcehub.acp.MsgSignedPolicyCmd 11, // 18: sourcehub.acp.Msg.BearerPolicyCmd:input_type -> sourcehub.acp.MsgBearerPolicyCmd 13, // 19: sourcehub.acp.Msg.DirectPolicyCmd:input_type -> sourcehub.acp.MsgDirectPolicyCmd 2, // 20: sourcehub.acp.Msg.UpdateParams:output_type -> sourcehub.acp.MsgUpdateParamsResponse 4, // 21: sourcehub.acp.Msg.CreatePolicy:output_type -> sourcehub.acp.MsgCreatePolicyResponse 6, // 22: sourcehub.acp.Msg.EditPolicy:output_type -> sourcehub.acp.MsgEditPolicyResponse 8, // 23: sourcehub.acp.Msg.CheckAccess:output_type -> sourcehub.acp.MsgCheckAccessResponse 10, // 24: sourcehub.acp.Msg.SignedPolicyCmd:output_type -> sourcehub.acp.MsgSignedPolicyCmdResponse 12, // 25: sourcehub.acp.Msg.BearerPolicyCmd:output_type -> sourcehub.acp.MsgBearerPolicyCmdResponse 14, // 26: sourcehub.acp.Msg.DirectPolicyCmd:output_type -> sourcehub.acp.MsgDirectPolicyCmdResponse 20, // [20:27] is the sub-list for method output_type 13, // [13:20] is the sub-list for method input_type 13, // [13:13] is the sub-list for extension type_name 13, // [13:13] is the sub-list for extension extendee 0, // [0:13] is the sub-list for field type_name } func init() { file_sourcehub_acp_tx_proto_init() } func file_sourcehub_acp_tx_proto_init() { if File_sourcehub_acp_tx_proto != nil { return } file_sourcehub_acp_access_decision_proto_init() file_sourcehub_acp_params_proto_init() file_sourcehub_acp_policy_cmd_proto_init() file_sourcehub_acp_record_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_acp_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreatePolicy); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreatePolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgEditPolicy); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgEditPolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCheckAccess); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCheckAccessResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgSignedPolicyCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgSignedPolicyCmdResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgBearerPolicyCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgBearerPolicyCmdResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgDirectPolicyCmd); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_acp_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgDirectPolicyCmdResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_acp_tx_proto_rawDesc, NumEnums: 1, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_acp_tx_proto_goTypes, DependencyIndexes: file_sourcehub_acp_tx_proto_depIdxs, EnumInfos: file_sourcehub_acp_tx_proto_enumTypes, MessageInfos: file_sourcehub_acp_tx_proto_msgTypes, }.Build() File_sourcehub_acp_tx_proto = out.File file_sourcehub_acp_tx_proto_rawDesc = nil file_sourcehub_acp_tx_proto_goTypes = nil file_sourcehub_acp_tx_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/acp/tx_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/acp/tx.proto package acp import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Msg_UpdateParams_FullMethodName = "/sourcehub.acp.Msg/UpdateParams" Msg_CreatePolicy_FullMethodName = "/sourcehub.acp.Msg/CreatePolicy" Msg_EditPolicy_FullMethodName = "/sourcehub.acp.Msg/EditPolicy" Msg_CheckAccess_FullMethodName = "/sourcehub.acp.Msg/CheckAccess" Msg_SignedPolicyCmd_FullMethodName = "/sourcehub.acp.Msg/SignedPolicyCmd" Msg_BearerPolicyCmd_FullMethodName = "/sourcehub.acp.Msg/BearerPolicyCmd" Msg_DirectPolicyCmd_FullMethodName = "/sourcehub.acp.Msg/DirectPolicyCmd" ) // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Msg defines the Msg service. 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) // CreatePolicy adds a new Policy to SourceHub. // The Policy models an aplication's high level access control rules. CreatePolicy(ctx context.Context, in *MsgCreatePolicy, opts ...grpc.CallOption) (*MsgCreatePolicyResponse, error) // EditPolicy mutates the rules defined by a Policy. // // Relations may be added and removed to resources (if they are not required), // new resources may be added, but resources may not be removed. // // # Removing a relation removes all relationships that reference the removed relation // // A few other invariants are enforced such as: // - the name of the actor resource may not be mutated // - resources cannot be removed // - the specification of a policy cannot be mutated // Violations of these constraints will return an error. EditPolicy(ctx context.Context, in *MsgEditPolicy, opts ...grpc.CallOption) (*MsgEditPolicyResponse, error) // CheckAccess executes an Access Request for an User and stores the result of the evaluation in SourceHub. // The resulting evaluation is used to generate a cryptographic proof that the given Access Request // was valid at a particular block height. CheckAccess(ctx context.Context, in *MsgCheckAccess, opts ...grpc.CallOption) (*MsgCheckAccessResponse, error) // SignedPolicyCmd is a wrapper for a Command which is executed within the Context of a Policy. // The Command is signed by the Actor issuing it. SignedPolicyCmd(ctx context.Context, in *MsgSignedPolicyCmd, opts ...grpc.CallOption) (*MsgSignedPolicyCmdResponse, error) // The Msg authenticates the actor initiating the command through a Bearer token. // This token MUST be issued and signed by some DID Actor, the verification of the signature // is used as authentication proof. // Lastly, the Bearer token MUST be bound to some SourceHub account. BearerPolicyCmd(ctx context.Context, in *MsgBearerPolicyCmd, opts ...grpc.CallOption) (*MsgBearerPolicyCmdResponse, error) DirectPolicyCmd(ctx context.Context, in *MsgDirectPolicyCmd, opts ...grpc.CallOption) (*MsgDirectPolicyCmdResponse, error) } type msgClient struct { cc grpc.ClientConnInterface } func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CreatePolicy(ctx context.Context, in *MsgCreatePolicy, opts ...grpc.CallOption) (*MsgCreatePolicyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgCreatePolicyResponse) err := c.cc.Invoke(ctx, Msg_CreatePolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) EditPolicy(ctx context.Context, in *MsgEditPolicy, opts ...grpc.CallOption) (*MsgEditPolicyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgEditPolicyResponse) err := c.cc.Invoke(ctx, Msg_EditPolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CheckAccess(ctx context.Context, in *MsgCheckAccess, opts ...grpc.CallOption) (*MsgCheckAccessResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgCheckAccessResponse) err := c.cc.Invoke(ctx, Msg_CheckAccess_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) SignedPolicyCmd(ctx context.Context, in *MsgSignedPolicyCmd, opts ...grpc.CallOption) (*MsgSignedPolicyCmdResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgSignedPolicyCmdResponse) err := c.cc.Invoke(ctx, Msg_SignedPolicyCmd_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) BearerPolicyCmd(ctx context.Context, in *MsgBearerPolicyCmd, opts ...grpc.CallOption) (*MsgBearerPolicyCmdResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgBearerPolicyCmdResponse) err := c.cc.Invoke(ctx, Msg_BearerPolicyCmd_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) DirectPolicyCmd(ctx context.Context, in *MsgDirectPolicyCmd, opts ...grpc.CallOption) (*MsgDirectPolicyCmdResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgDirectPolicyCmdResponse) err := c.cc.Invoke(ctx, Msg_DirectPolicyCmd_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility. // // Msg defines the 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) // CreatePolicy adds a new Policy to SourceHub. // The Policy models an aplication's high level access control rules. CreatePolicy(context.Context, *MsgCreatePolicy) (*MsgCreatePolicyResponse, error) // EditPolicy mutates the rules defined by a Policy. // // Relations may be added and removed to resources (if they are not required), // new resources may be added, but resources may not be removed. // // # Removing a relation removes all relationships that reference the removed relation // // A few other invariants are enforced such as: // - the name of the actor resource may not be mutated // - resources cannot be removed // - the specification of a policy cannot be mutated // Violations of these constraints will return an error. EditPolicy(context.Context, *MsgEditPolicy) (*MsgEditPolicyResponse, error) // CheckAccess executes an Access Request for an User and stores the result of the evaluation in SourceHub. // The resulting evaluation is used to generate a cryptographic proof that the given Access Request // was valid at a particular block height. CheckAccess(context.Context, *MsgCheckAccess) (*MsgCheckAccessResponse, error) // SignedPolicyCmd is a wrapper for a Command which is executed within the Context of a Policy. // The Command is signed by the Actor issuing it. SignedPolicyCmd(context.Context, *MsgSignedPolicyCmd) (*MsgSignedPolicyCmdResponse, error) // The Msg authenticates the actor initiating the command through a Bearer token. // This token MUST be issued and signed by some DID Actor, the verification of the signature // is used as authentication proof. // Lastly, the Bearer token MUST be bound to some SourceHub account. BearerPolicyCmd(context.Context, *MsgBearerPolicyCmd) (*MsgBearerPolicyCmdResponse, error) DirectPolicyCmd(context.Context, *MsgDirectPolicyCmd) (*MsgDirectPolicyCmdResponse, error) mustEmbedUnimplementedMsgServer() } // UnimplementedMsgServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMsgServer struct{} func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } func (UnimplementedMsgServer) CreatePolicy(context.Context, *MsgCreatePolicy) (*MsgCreatePolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePolicy not implemented") } func (UnimplementedMsgServer) EditPolicy(context.Context, *MsgEditPolicy) (*MsgEditPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EditPolicy not implemented") } func (UnimplementedMsgServer) CheckAccess(context.Context, *MsgCheckAccess) (*MsgCheckAccessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckAccess not implemented") } func (UnimplementedMsgServer) SignedPolicyCmd(context.Context, *MsgSignedPolicyCmd) (*MsgSignedPolicyCmdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SignedPolicyCmd not implemented") } func (UnimplementedMsgServer) BearerPolicyCmd(context.Context, *MsgBearerPolicyCmd) (*MsgBearerPolicyCmdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BearerPolicyCmd not implemented") } func (UnimplementedMsgServer) DirectPolicyCmd(context.Context, *MsgDirectPolicyCmd) (*MsgDirectPolicyCmdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DirectPolicyCmd not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will // result in compilation errors. type UnsafeMsgServer interface { mustEmbedUnimplementedMsgServer() } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { // If the following call pancis, it indicates UnimplementedMsgServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Msg_UpdateParams_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_CreatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreatePolicy) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CreatePolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_CreatePolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreatePolicy(ctx, req.(*MsgCreatePolicy)) } return interceptor(ctx, in, info, handler) } func _Msg_EditPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgEditPolicy) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).EditPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_EditPolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).EditPolicy(ctx, req.(*MsgEditPolicy)) } return interceptor(ctx, in, info, handler) } func _Msg_CheckAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCheckAccess) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CheckAccess(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_CheckAccess_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CheckAccess(ctx, req.(*MsgCheckAccess)) } return interceptor(ctx, in, info, handler) } func _Msg_SignedPolicyCmd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgSignedPolicyCmd) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).SignedPolicyCmd(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_SignedPolicyCmd_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SignedPolicyCmd(ctx, req.(*MsgSignedPolicyCmd)) } return interceptor(ctx, in, info, handler) } func _Msg_BearerPolicyCmd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgBearerPolicyCmd) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).BearerPolicyCmd(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_BearerPolicyCmd_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).BearerPolicyCmd(ctx, req.(*MsgBearerPolicyCmd)) } return interceptor(ctx, in, info, handler) } func _Msg_DirectPolicyCmd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgDirectPolicyCmd) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).DirectPolicyCmd(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_DirectPolicyCmd_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).DirectPolicyCmd(ctx, req.(*MsgDirectPolicyCmd)) } return interceptor(ctx, in, info, handler) } // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.acp.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "CreatePolicy", Handler: _Msg_CreatePolicy_Handler, }, { MethodName: "EditPolicy", Handler: _Msg_EditPolicy_Handler, }, { MethodName: "CheckAccess", Handler: _Msg_CheckAccess_Handler, }, { MethodName: "SignedPolicyCmd", Handler: _Msg_SignedPolicyCmd_Handler, }, { MethodName: "BearerPolicyCmd", Handler: _Msg_BearerPolicyCmd_Handler, }, { MethodName: "DirectPolicyCmd", Handler: _Msg_DirectPolicyCmd_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/acp/tx.proto", } ================================================ FILE: api/sourcehub/ante/jws_extension.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package ante import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_JWSExtensionOption protoreflect.MessageDescriptor fd_JWSExtensionOption_bearer_token protoreflect.FieldDescriptor ) func init() { file_sourcehub_ante_jws_extension_proto_init() md_JWSExtensionOption = File_sourcehub_ante_jws_extension_proto.Messages().ByName("JWSExtensionOption") fd_JWSExtensionOption_bearer_token = md_JWSExtensionOption.Fields().ByName("bearer_token") } var _ protoreflect.Message = (*fastReflection_JWSExtensionOption)(nil) type fastReflection_JWSExtensionOption JWSExtensionOption func (x *JWSExtensionOption) ProtoReflect() protoreflect.Message { return (*fastReflection_JWSExtensionOption)(x) } func (x *JWSExtensionOption) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_ante_jws_extension_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_JWSExtensionOption_messageType fastReflection_JWSExtensionOption_messageType var _ protoreflect.MessageType = fastReflection_JWSExtensionOption_messageType{} type fastReflection_JWSExtensionOption_messageType struct{} func (x fastReflection_JWSExtensionOption_messageType) Zero() protoreflect.Message { return (*fastReflection_JWSExtensionOption)(nil) } func (x fastReflection_JWSExtensionOption_messageType) New() protoreflect.Message { return new(fastReflection_JWSExtensionOption) } func (x fastReflection_JWSExtensionOption_messageType) Descriptor() protoreflect.MessageDescriptor { return md_JWSExtensionOption } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_JWSExtensionOption) Descriptor() protoreflect.MessageDescriptor { return md_JWSExtensionOption } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_JWSExtensionOption) Type() protoreflect.MessageType { return _fastReflection_JWSExtensionOption_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_JWSExtensionOption) New() protoreflect.Message { return new(fastReflection_JWSExtensionOption) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_JWSExtensionOption) Interface() protoreflect.ProtoMessage { return (*JWSExtensionOption)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_JWSExtensionOption) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.BearerToken != "" { value := protoreflect.ValueOfString(x.BearerToken) if !f(fd_JWSExtensionOption_bearer_token, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_JWSExtensionOption) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.ante.JWSExtensionOption.bearer_token": return x.BearerToken != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.ante.JWSExtensionOption")) } panic(fmt.Errorf("message sourcehub.ante.JWSExtensionOption does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSExtensionOption) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.ante.JWSExtensionOption.bearer_token": x.BearerToken = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.ante.JWSExtensionOption")) } panic(fmt.Errorf("message sourcehub.ante.JWSExtensionOption does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_JWSExtensionOption) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.ante.JWSExtensionOption.bearer_token": value := x.BearerToken return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.ante.JWSExtensionOption")) } panic(fmt.Errorf("message sourcehub.ante.JWSExtensionOption does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSExtensionOption) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.ante.JWSExtensionOption.bearer_token": x.BearerToken = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.ante.JWSExtensionOption")) } panic(fmt.Errorf("message sourcehub.ante.JWSExtensionOption does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSExtensionOption) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.ante.JWSExtensionOption.bearer_token": panic(fmt.Errorf("field bearer_token of message sourcehub.ante.JWSExtensionOption is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.ante.JWSExtensionOption")) } panic(fmt.Errorf("message sourcehub.ante.JWSExtensionOption does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_JWSExtensionOption) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.ante.JWSExtensionOption.bearer_token": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.ante.JWSExtensionOption")) } panic(fmt.Errorf("message sourcehub.ante.JWSExtensionOption does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_JWSExtensionOption) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.ante.JWSExtensionOption", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_JWSExtensionOption) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSExtensionOption) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_JWSExtensionOption) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_JWSExtensionOption) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*JWSExtensionOption) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.BearerToken) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*JWSExtensionOption) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.BearerToken) > 0 { i -= len(x.BearerToken) copy(dAtA[i:], x.BearerToken) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BearerToken))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*JWSExtensionOption) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: JWSExtensionOption: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: JWSExtensionOption: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BearerToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.BearerToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/ante/jws_extension.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // JWSExtensionOption represents a transaction extension option with a bearer token. // The bearer token is a JWS containing issuer DID, authorized account, issued at, and expiration time claims. type JWSExtensionOption struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BearerToken string `protobuf:"bytes,1,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` } func (x *JWSExtensionOption) Reset() { *x = JWSExtensionOption{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_ante_jws_extension_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *JWSExtensionOption) String() string { return protoimpl.X.MessageStringOf(x) } func (*JWSExtensionOption) ProtoMessage() {} // Deprecated: Use JWSExtensionOption.ProtoReflect.Descriptor instead. func (*JWSExtensionOption) Descriptor() ([]byte, []int) { return file_sourcehub_ante_jws_extension_proto_rawDescGZIP(), []int{0} } func (x *JWSExtensionOption) GetBearerToken() string { if x != nil { return x.BearerToken } return "" } var File_sourcehub_ante_jws_extension_proto protoreflect.FileDescriptor var file_sourcehub_ante_jws_extension_proto_rawDesc = []byte{ 0x0a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x6e, 0x74, 0x65, 0x2f, 0x6a, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x6e, 0x74, 0x65, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x12, 0x4a, 0x57, 0x53, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0xa1, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x61, 0x6e, 0x74, 0x65, 0x42, 0x11, 0x4a, 0x77, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x6e, 0x74, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x41, 0x6e, 0x74, 0x65, 0xca, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x6e, 0x74, 0x65, 0xe2, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x41, 0x6e, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x41, 0x6e, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_ante_jws_extension_proto_rawDescOnce sync.Once file_sourcehub_ante_jws_extension_proto_rawDescData = file_sourcehub_ante_jws_extension_proto_rawDesc ) func file_sourcehub_ante_jws_extension_proto_rawDescGZIP() []byte { file_sourcehub_ante_jws_extension_proto_rawDescOnce.Do(func() { file_sourcehub_ante_jws_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_ante_jws_extension_proto_rawDescData) }) return file_sourcehub_ante_jws_extension_proto_rawDescData } var file_sourcehub_ante_jws_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_ante_jws_extension_proto_goTypes = []interface{}{ (*JWSExtensionOption)(nil), // 0: sourcehub.ante.JWSExtensionOption } var file_sourcehub_ante_jws_extension_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_ante_jws_extension_proto_init() } func file_sourcehub_ante_jws_extension_proto_init() { if File_sourcehub_ante_jws_extension_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_ante_jws_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWSExtensionOption); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_ante_jws_extension_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_ante_jws_extension_proto_goTypes, DependencyIndexes: file_sourcehub_ante_jws_extension_proto_depIdxs, MessageInfos: file_sourcehub_ante_jws_extension_proto_msgTypes, }.Build() File_sourcehub_ante_jws_extension_proto = out.File file_sourcehub_ante_jws_extension_proto_rawDesc = nil file_sourcehub_ante_jws_extension_proto_goTypes = nil file_sourcehub_ante_jws_extension_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/collaborator.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Collaborator protoreflect.MessageDescriptor fd_Collaborator_address protoreflect.FieldDescriptor fd_Collaborator_did protoreflect.FieldDescriptor fd_Collaborator_namespace protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_collaborator_proto_init() md_Collaborator = File_sourcehub_bulletin_collaborator_proto.Messages().ByName("Collaborator") fd_Collaborator_address = md_Collaborator.Fields().ByName("address") fd_Collaborator_did = md_Collaborator.Fields().ByName("did") fd_Collaborator_namespace = md_Collaborator.Fields().ByName("namespace") } var _ protoreflect.Message = (*fastReflection_Collaborator)(nil) type fastReflection_Collaborator Collaborator func (x *Collaborator) ProtoReflect() protoreflect.Message { return (*fastReflection_Collaborator)(x) } func (x *Collaborator) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_collaborator_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Collaborator_messageType fastReflection_Collaborator_messageType var _ protoreflect.MessageType = fastReflection_Collaborator_messageType{} type fastReflection_Collaborator_messageType struct{} func (x fastReflection_Collaborator_messageType) Zero() protoreflect.Message { return (*fastReflection_Collaborator)(nil) } func (x fastReflection_Collaborator_messageType) New() protoreflect.Message { return new(fastReflection_Collaborator) } func (x fastReflection_Collaborator_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Collaborator } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Collaborator) Descriptor() protoreflect.MessageDescriptor { return md_Collaborator } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Collaborator) Type() protoreflect.MessageType { return _fastReflection_Collaborator_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Collaborator) New() protoreflect.Message { return new(fastReflection_Collaborator) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Collaborator) Interface() protoreflect.ProtoMessage { return (*Collaborator)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Collaborator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_Collaborator_address, value) { return } } if x.Did != "" { value := protoreflect.ValueOfString(x.Did) if !f(fd_Collaborator_did, value) { return } } if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_Collaborator_namespace, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Collaborator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.Collaborator.address": return x.Address != "" case "sourcehub.bulletin.Collaborator.did": return x.Did != "" case "sourcehub.bulletin.Collaborator.namespace": return x.Namespace != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Collaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.Collaborator does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Collaborator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.Collaborator.address": x.Address = "" case "sourcehub.bulletin.Collaborator.did": x.Did = "" case "sourcehub.bulletin.Collaborator.namespace": x.Namespace = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Collaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.Collaborator does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Collaborator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.Collaborator.address": value := x.Address return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Collaborator.did": value := x.Did return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Collaborator.namespace": value := x.Namespace return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Collaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.Collaborator does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Collaborator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.Collaborator.address": x.Address = value.Interface().(string) case "sourcehub.bulletin.Collaborator.did": x.Did = value.Interface().(string) case "sourcehub.bulletin.Collaborator.namespace": x.Namespace = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Collaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.Collaborator does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Collaborator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.Collaborator.address": panic(fmt.Errorf("field address of message sourcehub.bulletin.Collaborator is not mutable")) case "sourcehub.bulletin.Collaborator.did": panic(fmt.Errorf("field did of message sourcehub.bulletin.Collaborator is not mutable")) case "sourcehub.bulletin.Collaborator.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.Collaborator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Collaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.Collaborator does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Collaborator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.Collaborator.address": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Collaborator.did": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Collaborator.namespace": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Collaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.Collaborator does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Collaborator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.Collaborator", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Collaborator) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Collaborator) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Collaborator) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Collaborator) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Collaborator) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Did) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Collaborator) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0x1a } if len(x.Did) > 0 { i -= len(x.Did) copy(dAtA[i:], x.Did) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) i-- dAtA[i] = 0x12 } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Collaborator) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Collaborator: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Collaborator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/collaborator.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Collaborator represents an actor with collaborator permissions in a namespace. type Collaborator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (x *Collaborator) Reset() { *x = Collaborator{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_collaborator_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Collaborator) String() string { return protoimpl.X.MessageStringOf(x) } func (*Collaborator) ProtoMessage() {} // Deprecated: Use Collaborator.ProtoReflect.Descriptor instead. func (*Collaborator) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_collaborator_proto_rawDescGZIP(), []int{0} } func (x *Collaborator) GetAddress() string { if x != nil { return x.Address } return "" } func (x *Collaborator) GetDid() string { if x != nil { return x.Did } return "" } func (x *Collaborator) GetNamespace() string { if x != nil { return x.Namespace } return "" } var File_sourcehub_bulletin_collaborator_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_collaborator_proto_rawDesc = []byte{ 0x0a, 0x25, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x22, 0x58, 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0xb9, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x11, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_collaborator_proto_rawDescOnce sync.Once file_sourcehub_bulletin_collaborator_proto_rawDescData = file_sourcehub_bulletin_collaborator_proto_rawDesc ) func file_sourcehub_bulletin_collaborator_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_collaborator_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_collaborator_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_collaborator_proto_rawDescData) }) return file_sourcehub_bulletin_collaborator_proto_rawDescData } var file_sourcehub_bulletin_collaborator_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_bulletin_collaborator_proto_goTypes = []interface{}{ (*Collaborator)(nil), // 0: sourcehub.bulletin.Collaborator } var file_sourcehub_bulletin_collaborator_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_collaborator_proto_init() } func file_sourcehub_bulletin_collaborator_proto_init() { if File_sourcehub_bulletin_collaborator_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_collaborator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Collaborator); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_collaborator_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_bulletin_collaborator_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_collaborator_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_collaborator_proto_msgTypes, }.Build() File_sourcehub_bulletin_collaborator_proto = out.File file_sourcehub_bulletin_collaborator_proto_rawDesc = nil file_sourcehub_bulletin_collaborator_proto_goTypes = nil file_sourcehub_bulletin_collaborator_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/events.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_EventNamespaceRegistered protoreflect.MessageDescriptor fd_EventNamespaceRegistered_namespace_id protoreflect.FieldDescriptor fd_EventNamespaceRegistered_owner_did protoreflect.FieldDescriptor fd_EventNamespaceRegistered_created_at protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_events_proto_init() md_EventNamespaceRegistered = File_sourcehub_bulletin_events_proto.Messages().ByName("EventNamespaceRegistered") fd_EventNamespaceRegistered_namespace_id = md_EventNamespaceRegistered.Fields().ByName("namespace_id") fd_EventNamespaceRegistered_owner_did = md_EventNamespaceRegistered.Fields().ByName("owner_did") fd_EventNamespaceRegistered_created_at = md_EventNamespaceRegistered.Fields().ByName("created_at") } var _ protoreflect.Message = (*fastReflection_EventNamespaceRegistered)(nil) type fastReflection_EventNamespaceRegistered EventNamespaceRegistered func (x *EventNamespaceRegistered) ProtoReflect() protoreflect.Message { return (*fastReflection_EventNamespaceRegistered)(x) } func (x *EventNamespaceRegistered) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_events_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventNamespaceRegistered_messageType fastReflection_EventNamespaceRegistered_messageType var _ protoreflect.MessageType = fastReflection_EventNamespaceRegistered_messageType{} type fastReflection_EventNamespaceRegistered_messageType struct{} func (x fastReflection_EventNamespaceRegistered_messageType) Zero() protoreflect.Message { return (*fastReflection_EventNamespaceRegistered)(nil) } func (x fastReflection_EventNamespaceRegistered_messageType) New() protoreflect.Message { return new(fastReflection_EventNamespaceRegistered) } func (x fastReflection_EventNamespaceRegistered_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventNamespaceRegistered } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventNamespaceRegistered) Descriptor() protoreflect.MessageDescriptor { return md_EventNamespaceRegistered } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventNamespaceRegistered) Type() protoreflect.MessageType { return _fastReflection_EventNamespaceRegistered_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventNamespaceRegistered) New() protoreflect.Message { return new(fastReflection_EventNamespaceRegistered) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventNamespaceRegistered) Interface() protoreflect.ProtoMessage { return (*EventNamespaceRegistered)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventNamespaceRegistered) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.NamespaceId != "" { value := protoreflect.ValueOfString(x.NamespaceId) if !f(fd_EventNamespaceRegistered_namespace_id, value) { return } } if x.OwnerDid != "" { value := protoreflect.ValueOfString(x.OwnerDid) if !f(fd_EventNamespaceRegistered_owner_did, value) { return } } if x.CreatedAt != nil { value := protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) if !f(fd_EventNamespaceRegistered_created_at, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventNamespaceRegistered) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.EventNamespaceRegistered.namespace_id": return x.NamespaceId != "" case "sourcehub.bulletin.EventNamespaceRegistered.owner_did": return x.OwnerDid != "" case "sourcehub.bulletin.EventNamespaceRegistered.created_at": return x.CreatedAt != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventNamespaceRegistered")) } panic(fmt.Errorf("message sourcehub.bulletin.EventNamespaceRegistered does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventNamespaceRegistered) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.EventNamespaceRegistered.namespace_id": x.NamespaceId = "" case "sourcehub.bulletin.EventNamespaceRegistered.owner_did": x.OwnerDid = "" case "sourcehub.bulletin.EventNamespaceRegistered.created_at": x.CreatedAt = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventNamespaceRegistered")) } panic(fmt.Errorf("message sourcehub.bulletin.EventNamespaceRegistered does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventNamespaceRegistered) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.EventNamespaceRegistered.namespace_id": value := x.NamespaceId return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventNamespaceRegistered.owner_did": value := x.OwnerDid return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventNamespaceRegistered.created_at": value := x.CreatedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventNamespaceRegistered")) } panic(fmt.Errorf("message sourcehub.bulletin.EventNamespaceRegistered does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventNamespaceRegistered) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.EventNamespaceRegistered.namespace_id": x.NamespaceId = value.Interface().(string) case "sourcehub.bulletin.EventNamespaceRegistered.owner_did": x.OwnerDid = value.Interface().(string) case "sourcehub.bulletin.EventNamespaceRegistered.created_at": x.CreatedAt = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventNamespaceRegistered")) } panic(fmt.Errorf("message sourcehub.bulletin.EventNamespaceRegistered does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventNamespaceRegistered) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventNamespaceRegistered.created_at": if x.CreatedAt == nil { x.CreatedAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) case "sourcehub.bulletin.EventNamespaceRegistered.namespace_id": panic(fmt.Errorf("field namespace_id of message sourcehub.bulletin.EventNamespaceRegistered is not mutable")) case "sourcehub.bulletin.EventNamespaceRegistered.owner_did": panic(fmt.Errorf("field owner_did of message sourcehub.bulletin.EventNamespaceRegistered is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventNamespaceRegistered")) } panic(fmt.Errorf("message sourcehub.bulletin.EventNamespaceRegistered does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventNamespaceRegistered) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventNamespaceRegistered.namespace_id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventNamespaceRegistered.owner_did": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventNamespaceRegistered.created_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventNamespaceRegistered")) } panic(fmt.Errorf("message sourcehub.bulletin.EventNamespaceRegistered does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventNamespaceRegistered) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.EventNamespaceRegistered", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventNamespaceRegistered) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventNamespaceRegistered) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventNamespaceRegistered) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventNamespaceRegistered) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventNamespaceRegistered) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.NamespaceId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.OwnerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreatedAt != nil { l = options.Size(x.CreatedAt) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventNamespaceRegistered) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.CreatedAt != nil { encoded, err := options.Marshal(x.CreatedAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.OwnerDid) > 0 { i -= len(x.OwnerDid) copy(dAtA[i:], x.OwnerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerDid))) i-- dAtA[i] = 0x12 } if len(x.NamespaceId) > 0 { i -= len(x.NamespaceId) copy(dAtA[i:], x.NamespaceId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NamespaceId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventNamespaceRegistered) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventNamespaceRegistered: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventNamespaceRegistered: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.OwnerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreatedAt == nil { x.CreatedAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreatedAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventPostCreated protoreflect.MessageDescriptor fd_EventPostCreated_namespace_id protoreflect.FieldDescriptor fd_EventPostCreated_post_id protoreflect.FieldDescriptor fd_EventPostCreated_creator_did protoreflect.FieldDescriptor fd_EventPostCreated_payload protoreflect.FieldDescriptor fd_EventPostCreated_artifact protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_events_proto_init() md_EventPostCreated = File_sourcehub_bulletin_events_proto.Messages().ByName("EventPostCreated") fd_EventPostCreated_namespace_id = md_EventPostCreated.Fields().ByName("namespace_id") fd_EventPostCreated_post_id = md_EventPostCreated.Fields().ByName("post_id") fd_EventPostCreated_creator_did = md_EventPostCreated.Fields().ByName("creator_did") fd_EventPostCreated_payload = md_EventPostCreated.Fields().ByName("payload") fd_EventPostCreated_artifact = md_EventPostCreated.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_EventPostCreated)(nil) type fastReflection_EventPostCreated EventPostCreated func (x *EventPostCreated) ProtoReflect() protoreflect.Message { return (*fastReflection_EventPostCreated)(x) } func (x *EventPostCreated) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_events_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventPostCreated_messageType fastReflection_EventPostCreated_messageType var _ protoreflect.MessageType = fastReflection_EventPostCreated_messageType{} type fastReflection_EventPostCreated_messageType struct{} func (x fastReflection_EventPostCreated_messageType) Zero() protoreflect.Message { return (*fastReflection_EventPostCreated)(nil) } func (x fastReflection_EventPostCreated_messageType) New() protoreflect.Message { return new(fastReflection_EventPostCreated) } func (x fastReflection_EventPostCreated_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventPostCreated } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventPostCreated) Descriptor() protoreflect.MessageDescriptor { return md_EventPostCreated } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventPostCreated) Type() protoreflect.MessageType { return _fastReflection_EventPostCreated_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventPostCreated) New() protoreflect.Message { return new(fastReflection_EventPostCreated) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventPostCreated) Interface() protoreflect.ProtoMessage { return (*EventPostCreated)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventPostCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.NamespaceId != "" { value := protoreflect.ValueOfString(x.NamespaceId) if !f(fd_EventPostCreated_namespace_id, value) { return } } if x.PostId != "" { value := protoreflect.ValueOfString(x.PostId) if !f(fd_EventPostCreated_post_id, value) { return } } if x.CreatorDid != "" { value := protoreflect.ValueOfString(x.CreatorDid) if !f(fd_EventPostCreated_creator_did, value) { return } } if x.Payload != "" { value := protoreflect.ValueOfString(x.Payload) if !f(fd_EventPostCreated_payload, value) { return } } if x.Artifact != "" { value := protoreflect.ValueOfString(x.Artifact) if !f(fd_EventPostCreated_artifact, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventPostCreated) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.EventPostCreated.namespace_id": return x.NamespaceId != "" case "sourcehub.bulletin.EventPostCreated.post_id": return x.PostId != "" case "sourcehub.bulletin.EventPostCreated.creator_did": return x.CreatorDid != "" case "sourcehub.bulletin.EventPostCreated.payload": return x.Payload != "" case "sourcehub.bulletin.EventPostCreated.artifact": return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventPostCreated")) } panic(fmt.Errorf("message sourcehub.bulletin.EventPostCreated does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPostCreated) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.EventPostCreated.namespace_id": x.NamespaceId = "" case "sourcehub.bulletin.EventPostCreated.post_id": x.PostId = "" case "sourcehub.bulletin.EventPostCreated.creator_did": x.CreatorDid = "" case "sourcehub.bulletin.EventPostCreated.payload": x.Payload = "" case "sourcehub.bulletin.EventPostCreated.artifact": x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventPostCreated")) } panic(fmt.Errorf("message sourcehub.bulletin.EventPostCreated does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventPostCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.EventPostCreated.namespace_id": value := x.NamespaceId return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventPostCreated.post_id": value := x.PostId return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventPostCreated.creator_did": value := x.CreatorDid return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventPostCreated.payload": value := x.Payload return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventPostCreated.artifact": value := x.Artifact return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventPostCreated")) } panic(fmt.Errorf("message sourcehub.bulletin.EventPostCreated does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPostCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.EventPostCreated.namespace_id": x.NamespaceId = value.Interface().(string) case "sourcehub.bulletin.EventPostCreated.post_id": x.PostId = value.Interface().(string) case "sourcehub.bulletin.EventPostCreated.creator_did": x.CreatorDid = value.Interface().(string) case "sourcehub.bulletin.EventPostCreated.payload": x.Payload = value.Interface().(string) case "sourcehub.bulletin.EventPostCreated.artifact": x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventPostCreated")) } panic(fmt.Errorf("message sourcehub.bulletin.EventPostCreated does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPostCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventPostCreated.namespace_id": panic(fmt.Errorf("field namespace_id of message sourcehub.bulletin.EventPostCreated is not mutable")) case "sourcehub.bulletin.EventPostCreated.post_id": panic(fmt.Errorf("field post_id of message sourcehub.bulletin.EventPostCreated is not mutable")) case "sourcehub.bulletin.EventPostCreated.creator_did": panic(fmt.Errorf("field creator_did of message sourcehub.bulletin.EventPostCreated is not mutable")) case "sourcehub.bulletin.EventPostCreated.payload": panic(fmt.Errorf("field payload of message sourcehub.bulletin.EventPostCreated is not mutable")) case "sourcehub.bulletin.EventPostCreated.artifact": panic(fmt.Errorf("field artifact of message sourcehub.bulletin.EventPostCreated is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventPostCreated")) } panic(fmt.Errorf("message sourcehub.bulletin.EventPostCreated does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventPostCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventPostCreated.namespace_id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventPostCreated.post_id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventPostCreated.creator_did": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventPostCreated.payload": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventPostCreated.artifact": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventPostCreated")) } panic(fmt.Errorf("message sourcehub.bulletin.EventPostCreated does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventPostCreated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.EventPostCreated", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventPostCreated) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPostCreated) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventPostCreated) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventPostCreated) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventPostCreated) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.NamespaceId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PostId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.CreatorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Payload) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Artifact) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventPostCreated) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Artifact) > 0 { i -= len(x.Artifact) copy(dAtA[i:], x.Artifact) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) i-- dAtA[i] = 0x2a } if len(x.Payload) > 0 { i -= len(x.Payload) copy(dAtA[i:], x.Payload) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) i-- dAtA[i] = 0x22 } if len(x.CreatorDid) > 0 { i -= len(x.CreatorDid) copy(dAtA[i:], x.CreatorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) i-- dAtA[i] = 0x1a } if len(x.PostId) > 0 { i -= len(x.PostId) copy(dAtA[i:], x.PostId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PostId))) i-- dAtA[i] = 0x12 } if len(x.NamespaceId) > 0 { i -= len(x.NamespaceId) copy(dAtA[i:], x.NamespaceId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NamespaceId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventPostCreated) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventPostCreated: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventPostCreated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PostId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PostId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Payload = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Artifact = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventCollaboratorAdded protoreflect.MessageDescriptor fd_EventCollaboratorAdded_namespace_id protoreflect.FieldDescriptor fd_EventCollaboratorAdded_collaborator_did protoreflect.FieldDescriptor fd_EventCollaboratorAdded_added_by protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_events_proto_init() md_EventCollaboratorAdded = File_sourcehub_bulletin_events_proto.Messages().ByName("EventCollaboratorAdded") fd_EventCollaboratorAdded_namespace_id = md_EventCollaboratorAdded.Fields().ByName("namespace_id") fd_EventCollaboratorAdded_collaborator_did = md_EventCollaboratorAdded.Fields().ByName("collaborator_did") fd_EventCollaboratorAdded_added_by = md_EventCollaboratorAdded.Fields().ByName("added_by") } var _ protoreflect.Message = (*fastReflection_EventCollaboratorAdded)(nil) type fastReflection_EventCollaboratorAdded EventCollaboratorAdded func (x *EventCollaboratorAdded) ProtoReflect() protoreflect.Message { return (*fastReflection_EventCollaboratorAdded)(x) } func (x *EventCollaboratorAdded) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_events_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventCollaboratorAdded_messageType fastReflection_EventCollaboratorAdded_messageType var _ protoreflect.MessageType = fastReflection_EventCollaboratorAdded_messageType{} type fastReflection_EventCollaboratorAdded_messageType struct{} func (x fastReflection_EventCollaboratorAdded_messageType) Zero() protoreflect.Message { return (*fastReflection_EventCollaboratorAdded)(nil) } func (x fastReflection_EventCollaboratorAdded_messageType) New() protoreflect.Message { return new(fastReflection_EventCollaboratorAdded) } func (x fastReflection_EventCollaboratorAdded_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventCollaboratorAdded } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventCollaboratorAdded) Descriptor() protoreflect.MessageDescriptor { return md_EventCollaboratorAdded } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventCollaboratorAdded) Type() protoreflect.MessageType { return _fastReflection_EventCollaboratorAdded_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventCollaboratorAdded) New() protoreflect.Message { return new(fastReflection_EventCollaboratorAdded) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventCollaboratorAdded) Interface() protoreflect.ProtoMessage { return (*EventCollaboratorAdded)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventCollaboratorAdded) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.NamespaceId != "" { value := protoreflect.ValueOfString(x.NamespaceId) if !f(fd_EventCollaboratorAdded_namespace_id, value) { return } } if x.CollaboratorDid != "" { value := protoreflect.ValueOfString(x.CollaboratorDid) if !f(fd_EventCollaboratorAdded_collaborator_did, value) { return } } if x.AddedBy != "" { value := protoreflect.ValueOfString(x.AddedBy) if !f(fd_EventCollaboratorAdded_added_by, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventCollaboratorAdded) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorAdded.namespace_id": return x.NamespaceId != "" case "sourcehub.bulletin.EventCollaboratorAdded.collaborator_did": return x.CollaboratorDid != "" case "sourcehub.bulletin.EventCollaboratorAdded.added_by": return x.AddedBy != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorAdded")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorAdded does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorAdded) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorAdded.namespace_id": x.NamespaceId = "" case "sourcehub.bulletin.EventCollaboratorAdded.collaborator_did": x.CollaboratorDid = "" case "sourcehub.bulletin.EventCollaboratorAdded.added_by": x.AddedBy = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorAdded")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorAdded does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventCollaboratorAdded) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.EventCollaboratorAdded.namespace_id": value := x.NamespaceId return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventCollaboratorAdded.collaborator_did": value := x.CollaboratorDid return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventCollaboratorAdded.added_by": value := x.AddedBy return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorAdded")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorAdded does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorAdded) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorAdded.namespace_id": x.NamespaceId = value.Interface().(string) case "sourcehub.bulletin.EventCollaboratorAdded.collaborator_did": x.CollaboratorDid = value.Interface().(string) case "sourcehub.bulletin.EventCollaboratorAdded.added_by": x.AddedBy = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorAdded")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorAdded does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorAdded) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorAdded.namespace_id": panic(fmt.Errorf("field namespace_id of message sourcehub.bulletin.EventCollaboratorAdded is not mutable")) case "sourcehub.bulletin.EventCollaboratorAdded.collaborator_did": panic(fmt.Errorf("field collaborator_did of message sourcehub.bulletin.EventCollaboratorAdded is not mutable")) case "sourcehub.bulletin.EventCollaboratorAdded.added_by": panic(fmt.Errorf("field added_by of message sourcehub.bulletin.EventCollaboratorAdded is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorAdded")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorAdded does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventCollaboratorAdded) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorAdded.namespace_id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventCollaboratorAdded.collaborator_did": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventCollaboratorAdded.added_by": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorAdded")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorAdded does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventCollaboratorAdded) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.EventCollaboratorAdded", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventCollaboratorAdded) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorAdded) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventCollaboratorAdded) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventCollaboratorAdded) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventCollaboratorAdded) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.NamespaceId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.CollaboratorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.AddedBy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventCollaboratorAdded) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.AddedBy) > 0 { i -= len(x.AddedBy) copy(dAtA[i:], x.AddedBy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddedBy))) i-- dAtA[i] = 0x1a } if len(x.CollaboratorDid) > 0 { i -= len(x.CollaboratorDid) copy(dAtA[i:], x.CollaboratorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CollaboratorDid))) i-- dAtA[i] = 0x12 } if len(x.NamespaceId) > 0 { i -= len(x.NamespaceId) copy(dAtA[i:], x.NamespaceId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NamespaceId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventCollaboratorAdded) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventCollaboratorAdded: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventCollaboratorAdded: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.CollaboratorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddedBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.AddedBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventCollaboratorRemoved protoreflect.MessageDescriptor fd_EventCollaboratorRemoved_namespace_id protoreflect.FieldDescriptor fd_EventCollaboratorRemoved_collaborator_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_events_proto_init() md_EventCollaboratorRemoved = File_sourcehub_bulletin_events_proto.Messages().ByName("EventCollaboratorRemoved") fd_EventCollaboratorRemoved_namespace_id = md_EventCollaboratorRemoved.Fields().ByName("namespace_id") fd_EventCollaboratorRemoved_collaborator_did = md_EventCollaboratorRemoved.Fields().ByName("collaborator_did") } var _ protoreflect.Message = (*fastReflection_EventCollaboratorRemoved)(nil) type fastReflection_EventCollaboratorRemoved EventCollaboratorRemoved func (x *EventCollaboratorRemoved) ProtoReflect() protoreflect.Message { return (*fastReflection_EventCollaboratorRemoved)(x) } func (x *EventCollaboratorRemoved) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_events_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventCollaboratorRemoved_messageType fastReflection_EventCollaboratorRemoved_messageType var _ protoreflect.MessageType = fastReflection_EventCollaboratorRemoved_messageType{} type fastReflection_EventCollaboratorRemoved_messageType struct{} func (x fastReflection_EventCollaboratorRemoved_messageType) Zero() protoreflect.Message { return (*fastReflection_EventCollaboratorRemoved)(nil) } func (x fastReflection_EventCollaboratorRemoved_messageType) New() protoreflect.Message { return new(fastReflection_EventCollaboratorRemoved) } func (x fastReflection_EventCollaboratorRemoved_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventCollaboratorRemoved } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventCollaboratorRemoved) Descriptor() protoreflect.MessageDescriptor { return md_EventCollaboratorRemoved } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventCollaboratorRemoved) Type() protoreflect.MessageType { return _fastReflection_EventCollaboratorRemoved_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventCollaboratorRemoved) New() protoreflect.Message { return new(fastReflection_EventCollaboratorRemoved) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventCollaboratorRemoved) Interface() protoreflect.ProtoMessage { return (*EventCollaboratorRemoved)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventCollaboratorRemoved) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.NamespaceId != "" { value := protoreflect.ValueOfString(x.NamespaceId) if !f(fd_EventCollaboratorRemoved_namespace_id, value) { return } } if x.CollaboratorDid != "" { value := protoreflect.ValueOfString(x.CollaboratorDid) if !f(fd_EventCollaboratorRemoved_collaborator_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventCollaboratorRemoved) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorRemoved.namespace_id": return x.NamespaceId != "" case "sourcehub.bulletin.EventCollaboratorRemoved.collaborator_did": return x.CollaboratorDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorRemoved")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorRemoved does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorRemoved) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorRemoved.namespace_id": x.NamespaceId = "" case "sourcehub.bulletin.EventCollaboratorRemoved.collaborator_did": x.CollaboratorDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorRemoved")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorRemoved does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventCollaboratorRemoved) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.EventCollaboratorRemoved.namespace_id": value := x.NamespaceId return protoreflect.ValueOfString(value) case "sourcehub.bulletin.EventCollaboratorRemoved.collaborator_did": value := x.CollaboratorDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorRemoved")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorRemoved does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorRemoved) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorRemoved.namespace_id": x.NamespaceId = value.Interface().(string) case "sourcehub.bulletin.EventCollaboratorRemoved.collaborator_did": x.CollaboratorDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorRemoved")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorRemoved does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorRemoved) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorRemoved.namespace_id": panic(fmt.Errorf("field namespace_id of message sourcehub.bulletin.EventCollaboratorRemoved is not mutable")) case "sourcehub.bulletin.EventCollaboratorRemoved.collaborator_did": panic(fmt.Errorf("field collaborator_did of message sourcehub.bulletin.EventCollaboratorRemoved is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorRemoved")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorRemoved does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventCollaboratorRemoved) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.EventCollaboratorRemoved.namespace_id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.EventCollaboratorRemoved.collaborator_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.EventCollaboratorRemoved")) } panic(fmt.Errorf("message sourcehub.bulletin.EventCollaboratorRemoved does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventCollaboratorRemoved) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.EventCollaboratorRemoved", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventCollaboratorRemoved) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventCollaboratorRemoved) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventCollaboratorRemoved) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventCollaboratorRemoved) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventCollaboratorRemoved) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.NamespaceId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.CollaboratorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventCollaboratorRemoved) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.CollaboratorDid) > 0 { i -= len(x.CollaboratorDid) copy(dAtA[i:], x.CollaboratorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CollaboratorDid))) i-- dAtA[i] = 0x12 } if len(x.NamespaceId) > 0 { i -= len(x.NamespaceId) copy(dAtA[i:], x.NamespaceId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NamespaceId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventCollaboratorRemoved) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventCollaboratorRemoved: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventCollaboratorRemoved: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.CollaboratorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/events.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // EventNamespaceRegistered is emitted when a namespace is registered. type EventNamespaceRegistered struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // namespace_id is the unique identifier of the namespace. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // owner_did is the DID of the namespace owner. OwnerDid string `protobuf:"bytes,2,opt,name=owner_did,json=ownerDid,proto3" json:"owner_did,omitempty"` // created_at is the timestamp when the namespace was created. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (x *EventNamespaceRegistered) Reset() { *x = EventNamespaceRegistered{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_events_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventNamespaceRegistered) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventNamespaceRegistered) ProtoMessage() {} // Deprecated: Use EventNamespaceRegistered.ProtoReflect.Descriptor instead. func (*EventNamespaceRegistered) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_events_proto_rawDescGZIP(), []int{0} } func (x *EventNamespaceRegistered) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } func (x *EventNamespaceRegistered) GetOwnerDid() string { if x != nil { return x.OwnerDid } return "" } func (x *EventNamespaceRegistered) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } // EventPostCreated is emitted when a post is created. type EventPostCreated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // namespace_id is the namespace the post belongs to. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // post_id is the unique identifier of the post. PostId string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` // creator_did is the DID of the post creator. CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` // payload is the base64-encoded content of the post. Payload string `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // artifact is sent with a post call for tracking purposes Artifact string `protobuf:"bytes,5,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *EventPostCreated) Reset() { *x = EventPostCreated{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_events_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventPostCreated) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventPostCreated) ProtoMessage() {} // Deprecated: Use EventPostCreated.ProtoReflect.Descriptor instead. func (*EventPostCreated) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_events_proto_rawDescGZIP(), []int{1} } func (x *EventPostCreated) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } func (x *EventPostCreated) GetPostId() string { if x != nil { return x.PostId } return "" } func (x *EventPostCreated) GetCreatorDid() string { if x != nil { return x.CreatorDid } return "" } func (x *EventPostCreated) GetPayload() string { if x != nil { return x.Payload } return "" } func (x *EventPostCreated) GetArtifact() string { if x != nil { return x.Artifact } return "" } // EventCollaboratorAdded is emitted when a collaborator is added to a namespace. type EventCollaboratorAdded struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // namespace_id is the namespace the collaborator was added to. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // collaborator_did is the DID of the collaborator. CollaboratorDid string `protobuf:"bytes,2,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` // added_by is the DID of the user who added the collaborator. AddedBy string `protobuf:"bytes,3,opt,name=added_by,json=addedBy,proto3" json:"added_by,omitempty"` } func (x *EventCollaboratorAdded) Reset() { *x = EventCollaboratorAdded{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_events_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventCollaboratorAdded) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventCollaboratorAdded) ProtoMessage() {} // Deprecated: Use EventCollaboratorAdded.ProtoReflect.Descriptor instead. func (*EventCollaboratorAdded) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_events_proto_rawDescGZIP(), []int{2} } func (x *EventCollaboratorAdded) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } func (x *EventCollaboratorAdded) GetCollaboratorDid() string { if x != nil { return x.CollaboratorDid } return "" } func (x *EventCollaboratorAdded) GetAddedBy() string { if x != nil { return x.AddedBy } return "" } // EventCollaboratorRemoved is emitted when a collaborator is removed from a namespace. type EventCollaboratorRemoved struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // namespace_id is the namespace the collaborator was removed from. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // collaborator_did is the DID of the collaborator. CollaboratorDid string `protobuf:"bytes,2,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` } func (x *EventCollaboratorRemoved) Reset() { *x = EventCollaboratorRemoved{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_events_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventCollaboratorRemoved) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventCollaboratorRemoved) ProtoMessage() {} // Deprecated: Use EventCollaboratorRemoved.ProtoReflect.Descriptor instead. func (*EventCollaboratorRemoved) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_events_proto_rawDescGZIP(), []int{3} } func (x *EventCollaboratorRemoved) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } func (x *EventCollaboratorRemoved) GetCollaboratorDid() string { if x != nil { return x.CollaboratorDid } return "" } var File_sourcehub_bulletin_events_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_events_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa5, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x16, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x65, 0x64, 0x42, 0x79, 0x22, 0x68, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x42, 0xb3, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_events_proto_rawDescOnce sync.Once file_sourcehub_bulletin_events_proto_rawDescData = file_sourcehub_bulletin_events_proto_rawDesc ) func file_sourcehub_bulletin_events_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_events_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_events_proto_rawDescData) }) return file_sourcehub_bulletin_events_proto_rawDescData } var file_sourcehub_bulletin_events_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_sourcehub_bulletin_events_proto_goTypes = []interface{}{ (*EventNamespaceRegistered)(nil), // 0: sourcehub.bulletin.EventNamespaceRegistered (*EventPostCreated)(nil), // 1: sourcehub.bulletin.EventPostCreated (*EventCollaboratorAdded)(nil), // 2: sourcehub.bulletin.EventCollaboratorAdded (*EventCollaboratorRemoved)(nil), // 3: sourcehub.bulletin.EventCollaboratorRemoved (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp } var file_sourcehub_bulletin_events_proto_depIdxs = []int32{ 4, // 0: sourcehub.bulletin.EventNamespaceRegistered.created_at:type_name -> google.protobuf.Timestamp 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_events_proto_init() } func file_sourcehub_bulletin_events_proto_init() { if File_sourcehub_bulletin_events_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventNamespaceRegistered); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventPostCreated); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventCollaboratorAdded); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventCollaboratorRemoved); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_events_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_bulletin_events_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_events_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_events_proto_msgTypes, }.Build() File_sourcehub_bulletin_events_proto = out.File file_sourcehub_bulletin_events_proto_rawDesc = nil file_sourcehub_bulletin_events_proto_goTypes = nil file_sourcehub_bulletin_events_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/genesis.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_GenesisState_3_list)(nil) type _GenesisState_3_list struct { list *[]*Namespace } func (x *_GenesisState_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Namespace) (*x.list)[i] = concreteValue } func (x *_GenesisState_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Namespace) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { v := new(Namespace) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_3_list) NewElement() protoreflect.Value { v := new(Namespace) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_3_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_4_list)(nil) type _GenesisState_4_list struct { list *[]*Collaborator } func (x *_GenesisState_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Collaborator) (*x.list)[i] = concreteValue } func (x *_GenesisState_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Collaborator) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { v := new(Collaborator) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_4_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_4_list) NewElement() protoreflect.Value { v := new(Collaborator) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_4_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_5_list)(nil) type _GenesisState_5_list struct { list *[]*Post } func (x *_GenesisState_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) (*x.list)[i] = concreteValue } func (x *_GenesisState_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { v := new(Post) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_5_list) NewElement() protoreflect.Value { v := new(Post) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_5_list) IsValid() bool { return x.list != nil } var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor fd_GenesisState_policy_id protoreflect.FieldDescriptor fd_GenesisState_namespaces protoreflect.FieldDescriptor fd_GenesisState_collaborators protoreflect.FieldDescriptor fd_GenesisState_posts protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_genesis_proto_init() md_GenesisState = File_sourcehub_bulletin_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_policy_id = md_GenesisState.Fields().ByName("policy_id") fd_GenesisState_namespaces = md_GenesisState.Fields().ByName("namespaces") fd_GenesisState_collaborators = md_GenesisState.Fields().ByName("collaborators") fd_GenesisState_posts = md_GenesisState.Fields().ByName("posts") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) type fastReflection_GenesisState GenesisState func (x *GenesisState) ProtoReflect() protoreflect.Message { return (*fastReflection_GenesisState)(x) } func (x *GenesisState) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} type fastReflection_GenesisState_messageType struct{} func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { return (*fastReflection_GenesisState)(nil) } func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { return new(fastReflection_GenesisState) } func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { return _fastReflection_GenesisState_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GenesisState) New() protoreflect.Message { return new(fastReflection_GenesisState) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { return (*GenesisState)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_GenesisState_params, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_GenesisState_policy_id, value) { return } } if len(x.Namespaces) != 0 { value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Namespaces}) if !f(fd_GenesisState_namespaces, value) { return } } if len(x.Collaborators) != 0 { value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.Collaborators}) if !f(fd_GenesisState_collaborators, value) { return } } if len(x.Posts) != 0 { value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.Posts}) if !f(fd_GenesisState_posts, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.GenesisState.params": return x.Params != nil case "sourcehub.bulletin.GenesisState.policy_id": return x.PolicyId != "" case "sourcehub.bulletin.GenesisState.namespaces": return len(x.Namespaces) != 0 case "sourcehub.bulletin.GenesisState.collaborators": return len(x.Collaborators) != 0 case "sourcehub.bulletin.GenesisState.posts": return len(x.Posts) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.GenesisState")) } panic(fmt.Errorf("message sourcehub.bulletin.GenesisState does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.GenesisState.params": x.Params = nil case "sourcehub.bulletin.GenesisState.policy_id": x.PolicyId = "" case "sourcehub.bulletin.GenesisState.namespaces": x.Namespaces = nil case "sourcehub.bulletin.GenesisState.collaborators": x.Collaborators = nil case "sourcehub.bulletin.GenesisState.posts": x.Posts = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.GenesisState")) } panic(fmt.Errorf("message sourcehub.bulletin.GenesisState does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.bulletin.GenesisState.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcehub.bulletin.GenesisState.namespaces": if len(x.Namespaces) == 0 { return protoreflect.ValueOfList(&_GenesisState_3_list{}) } listValue := &_GenesisState_3_list{list: &x.Namespaces} return protoreflect.ValueOfList(listValue) case "sourcehub.bulletin.GenesisState.collaborators": if len(x.Collaborators) == 0 { return protoreflect.ValueOfList(&_GenesisState_4_list{}) } listValue := &_GenesisState_4_list{list: &x.Collaborators} return protoreflect.ValueOfList(listValue) case "sourcehub.bulletin.GenesisState.posts": if len(x.Posts) == 0 { return protoreflect.ValueOfList(&_GenesisState_5_list{}) } listValue := &_GenesisState_5_list{list: &x.Posts} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.GenesisState")) } panic(fmt.Errorf("message sourcehub.bulletin.GenesisState does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.GenesisState.params": x.Params = value.Message().Interface().(*Params) case "sourcehub.bulletin.GenesisState.policy_id": x.PolicyId = value.Interface().(string) case "sourcehub.bulletin.GenesisState.namespaces": lv := value.List() clv := lv.(*_GenesisState_3_list) x.Namespaces = *clv.list case "sourcehub.bulletin.GenesisState.collaborators": lv := value.List() clv := lv.(*_GenesisState_4_list) x.Collaborators = *clv.list case "sourcehub.bulletin.GenesisState.posts": lv := value.List() clv := lv.(*_GenesisState_5_list) x.Posts = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.GenesisState")) } panic(fmt.Errorf("message sourcehub.bulletin.GenesisState does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.GenesisState.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.bulletin.GenesisState.namespaces": if x.Namespaces == nil { x.Namespaces = []*Namespace{} } value := &_GenesisState_3_list{list: &x.Namespaces} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.GenesisState.collaborators": if x.Collaborators == nil { x.Collaborators = []*Collaborator{} } value := &_GenesisState_4_list{list: &x.Collaborators} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.GenesisState.posts": if x.Posts == nil { x.Posts = []*Post{} } value := &_GenesisState_5_list{list: &x.Posts} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.GenesisState.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.bulletin.GenesisState is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.GenesisState")) } panic(fmt.Errorf("message sourcehub.bulletin.GenesisState does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.bulletin.GenesisState.policy_id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.GenesisState.namespaces": list := []*Namespace{} return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) case "sourcehub.bulletin.GenesisState.collaborators": list := []*Collaborator{} return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) case "sourcehub.bulletin.GenesisState.posts": list := []*Post{} return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.GenesisState")) } panic(fmt.Errorf("message sourcehub.bulletin.GenesisState does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.GenesisState", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GenesisState) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Namespaces) > 0 { for _, e := range x.Namespaces { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.Collaborators) > 0 { for _, e := range x.Collaborators { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.Posts) > 0 { for _, e := range x.Posts { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Posts) > 0 { for iNdEx := len(x.Posts) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Posts[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } } if len(x.Collaborators) > 0 { for iNdEx := len(x.Collaborators) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Collaborators[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } } if len(x.Namespaces) > 0 { for iNdEx := len(x.Namespaces) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Namespaces[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespaces = append(x.Namespaces, &Namespace{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Namespaces[len(x.Namespaces)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Collaborators", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Collaborators = append(x.Collaborators, &Collaborator{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Collaborators[len(x.Collaborators)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Posts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Posts = append(x.Posts, &Post{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Posts[len(x.Posts)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // GenesisState defines the bulletin module's genesis state. type GenesisState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Namespaces []*Namespace `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"` Collaborators []*Collaborator `protobuf:"bytes,4,rep,name=collaborators,proto3" json:"collaborators,omitempty"` Posts []*Post `protobuf:"bytes,5,rep,name=posts,proto3" json:"posts,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenesisState) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetParams() *Params { if x != nil { return x.Params } return nil } func (x *GenesisState) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *GenesisState) GetNamespaces() []*Namespace { if x != nil { return x.Namespaces } return nil } func (x *GenesisState) GetCollaborators() []*Collaborator { if x != nil { return x.Collaborators } return nil } func (x *GenesisState) GetPosts() []*Post { if x != nil { return x.Posts } return nil } var File_sourcehub_bulletin_genesis_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_genesis_proto_rawDesc = []byte{ 0x0a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x42, 0xb4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_genesis_proto_rawDescOnce sync.Once file_sourcehub_bulletin_genesis_proto_rawDescData = file_sourcehub_bulletin_genesis_proto_rawDesc ) func file_sourcehub_bulletin_genesis_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_genesis_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_genesis_proto_rawDescData) }) return file_sourcehub_bulletin_genesis_proto_rawDescData } var file_sourcehub_bulletin_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_bulletin_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: sourcehub.bulletin.GenesisState (*Params)(nil), // 1: sourcehub.bulletin.Params (*Namespace)(nil), // 2: sourcehub.bulletin.Namespace (*Collaborator)(nil), // 3: sourcehub.bulletin.Collaborator (*Post)(nil), // 4: sourcehub.bulletin.Post } var file_sourcehub_bulletin_genesis_proto_depIdxs = []int32{ 1, // 0: sourcehub.bulletin.GenesisState.params:type_name -> sourcehub.bulletin.Params 2, // 1: sourcehub.bulletin.GenesisState.namespaces:type_name -> sourcehub.bulletin.Namespace 3, // 2: sourcehub.bulletin.GenesisState.collaborators:type_name -> sourcehub.bulletin.Collaborator 4, // 3: sourcehub.bulletin.GenesisState.posts:type_name -> sourcehub.bulletin.Post 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_genesis_proto_init() } func file_sourcehub_bulletin_genesis_proto_init() { if File_sourcehub_bulletin_genesis_proto != nil { return } file_sourcehub_bulletin_params_proto_init() file_sourcehub_bulletin_namespace_proto_init() file_sourcehub_bulletin_collaborator_proto_init() file_sourcehub_bulletin_post_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_bulletin_genesis_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_genesis_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_genesis_proto_msgTypes, }.Build() File_sourcehub_bulletin_genesis_proto = out.File file_sourcehub_bulletin_genesis_proto_rawDesc = nil file_sourcehub_bulletin_genesis_proto_goTypes = nil file_sourcehub_bulletin_genesis_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/module/module.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package module import ( _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Module protoreflect.MessageDescriptor fd_Module_authority protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_module_module_proto_init() md_Module = File_sourcehub_bulletin_module_module_proto.Messages().ByName("Module") fd_Module_authority = md_Module.Fields().ByName("authority") } var _ protoreflect.Message = (*fastReflection_Module)(nil) type fastReflection_Module Module func (x *Module) ProtoReflect() protoreflect.Message { return (*fastReflection_Module)(x) } func (x *Module) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_module_module_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Module_messageType fastReflection_Module_messageType var _ protoreflect.MessageType = fastReflection_Module_messageType{} type fastReflection_Module_messageType struct{} func (x fastReflection_Module_messageType) Zero() protoreflect.Message { return (*fastReflection_Module)(nil) } func (x fastReflection_Module_messageType) New() protoreflect.Message { return new(fastReflection_Module) } func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Module) Type() protoreflect.MessageType { return _fastReflection_Module_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Module) New() protoreflect.Message { return new(fastReflection_Module) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { return (*Module)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_Module_authority, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.module.Module.authority": return x.Authority != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.module.Module")) } panic(fmt.Errorf("message sourcehub.bulletin.module.Module does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.module.Module.authority": x.Authority = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.module.Module")) } panic(fmt.Errorf("message sourcehub.bulletin.module.Module does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.module.Module.authority": value := x.Authority return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.module.Module")) } panic(fmt.Errorf("message sourcehub.bulletin.module.Module does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.module.Module.authority": x.Authority = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.module.Module")) } panic(fmt.Errorf("message sourcehub.bulletin.module.Module does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.module.Module.authority": panic(fmt.Errorf("field authority of message sourcehub.bulletin.module.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.module.Module")) } panic(fmt.Errorf("message sourcehub.bulletin.module.Module does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.module.Module.authority": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.module.Module")) } panic(fmt.Errorf("message sourcehub.bulletin.module.Module does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.module.Module", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Module) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Module) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/module/module.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Module is the config object for the module. type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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 (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_module_module_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Module) String() string { return protoimpl.X.MessageStringOf(x) } func (*Module) ProtoMessage() {} // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_module_module_proto_rawDescGZIP(), []int{0} } func (x *Module) GetAuthority() string { if x != nil { return x.Authority } return "" } var File_sourcehub_bulletin_module_module_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_module_module_proto_rawDesc = []byte{ 0x0a, 0x26, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x35, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2f, 0x0a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0xde, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x4d, 0xaa, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xca, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xe2, 0x02, 0x25, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_module_module_proto_rawDescOnce sync.Once file_sourcehub_bulletin_module_module_proto_rawDescData = file_sourcehub_bulletin_module_module_proto_rawDesc ) func file_sourcehub_bulletin_module_module_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_module_module_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_module_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_module_module_proto_rawDescData) }) return file_sourcehub_bulletin_module_module_proto_rawDescData } var file_sourcehub_bulletin_module_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_bulletin_module_module_proto_goTypes = []interface{}{ (*Module)(nil), // 0: sourcehub.bulletin.module.Module } var file_sourcehub_bulletin_module_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_module_module_proto_init() } func file_sourcehub_bulletin_module_module_proto_init() { if File_sourcehub_bulletin_module_module_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_module_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_module_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_bulletin_module_module_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_module_module_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_module_module_proto_msgTypes, }.Build() File_sourcehub_bulletin_module_module_proto = out.File file_sourcehub_bulletin_module_module_proto_rawDesc = nil file_sourcehub_bulletin_module_module_proto_goTypes = nil file_sourcehub_bulletin_module_module_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/namespace.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_Namespace protoreflect.MessageDescriptor fd_Namespace_id protoreflect.FieldDescriptor fd_Namespace_creator protoreflect.FieldDescriptor fd_Namespace_owner_did protoreflect.FieldDescriptor fd_Namespace_created_at protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_namespace_proto_init() md_Namespace = File_sourcehub_bulletin_namespace_proto.Messages().ByName("Namespace") fd_Namespace_id = md_Namespace.Fields().ByName("id") fd_Namespace_creator = md_Namespace.Fields().ByName("creator") fd_Namespace_owner_did = md_Namespace.Fields().ByName("owner_did") fd_Namespace_created_at = md_Namespace.Fields().ByName("created_at") } var _ protoreflect.Message = (*fastReflection_Namespace)(nil) type fastReflection_Namespace Namespace func (x *Namespace) ProtoReflect() protoreflect.Message { return (*fastReflection_Namespace)(x) } func (x *Namespace) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_namespace_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Namespace_messageType fastReflection_Namespace_messageType var _ protoreflect.MessageType = fastReflection_Namespace_messageType{} type fastReflection_Namespace_messageType struct{} func (x fastReflection_Namespace_messageType) Zero() protoreflect.Message { return (*fastReflection_Namespace)(nil) } func (x fastReflection_Namespace_messageType) New() protoreflect.Message { return new(fastReflection_Namespace) } func (x fastReflection_Namespace_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Namespace } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Namespace) Descriptor() protoreflect.MessageDescriptor { return md_Namespace } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Namespace) Type() protoreflect.MessageType { return _fastReflection_Namespace_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Namespace) New() protoreflect.Message { return new(fastReflection_Namespace) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Namespace) Interface() protoreflect.ProtoMessage { return (*Namespace)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Namespace) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_Namespace_id, value) { return } } if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_Namespace_creator, value) { return } } if x.OwnerDid != "" { value := protoreflect.ValueOfString(x.OwnerDid) if !f(fd_Namespace_owner_did, value) { return } } if x.CreatedAt != nil { value := protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) if !f(fd_Namespace_created_at, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Namespace) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.Namespace.id": return x.Id != "" case "sourcehub.bulletin.Namespace.creator": return x.Creator != "" case "sourcehub.bulletin.Namespace.owner_did": return x.OwnerDid != "" case "sourcehub.bulletin.Namespace.created_at": return x.CreatedAt != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Namespace")) } panic(fmt.Errorf("message sourcehub.bulletin.Namespace does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Namespace) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.Namespace.id": x.Id = "" case "sourcehub.bulletin.Namespace.creator": x.Creator = "" case "sourcehub.bulletin.Namespace.owner_did": x.OwnerDid = "" case "sourcehub.bulletin.Namespace.created_at": x.CreatedAt = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Namespace")) } panic(fmt.Errorf("message sourcehub.bulletin.Namespace does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Namespace) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.Namespace.id": value := x.Id return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Namespace.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Namespace.owner_did": value := x.OwnerDid return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Namespace.created_at": value := x.CreatedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Namespace")) } panic(fmt.Errorf("message sourcehub.bulletin.Namespace does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Namespace) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.Namespace.id": x.Id = value.Interface().(string) case "sourcehub.bulletin.Namespace.creator": x.Creator = value.Interface().(string) case "sourcehub.bulletin.Namespace.owner_did": x.OwnerDid = value.Interface().(string) case "sourcehub.bulletin.Namespace.created_at": x.CreatedAt = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Namespace")) } panic(fmt.Errorf("message sourcehub.bulletin.Namespace does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Namespace) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.Namespace.created_at": if x.CreatedAt == nil { x.CreatedAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) case "sourcehub.bulletin.Namespace.id": panic(fmt.Errorf("field id of message sourcehub.bulletin.Namespace is not mutable")) case "sourcehub.bulletin.Namespace.creator": panic(fmt.Errorf("field creator of message sourcehub.bulletin.Namespace is not mutable")) case "sourcehub.bulletin.Namespace.owner_did": panic(fmt.Errorf("field owner_did of message sourcehub.bulletin.Namespace is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Namespace")) } panic(fmt.Errorf("message sourcehub.bulletin.Namespace does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Namespace) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.Namespace.id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Namespace.creator": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Namespace.owner_did": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Namespace.created_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Namespace")) } panic(fmt.Errorf("message sourcehub.bulletin.Namespace does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Namespace) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.Namespace", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Namespace) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Namespace) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Namespace) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Namespace) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Namespace) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.OwnerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreatedAt != nil { l = options.Size(x.CreatedAt) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Namespace) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.CreatedAt != nil { encoded, err := options.Marshal(x.CreatedAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if len(x.OwnerDid) > 0 { i -= len(x.OwnerDid) copy(dAtA[i:], x.OwnerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerDid))) i-- dAtA[i] = 0x1a } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Namespace) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Namespace: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.OwnerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreatedAt == nil { x.CreatedAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreatedAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/namespace.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Namespace represents a logical bulletin space used to group posts. type Namespace struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` OwnerDid string `protobuf:"bytes,3,opt,name=owner_did,json=ownerDid,proto3" json:"owner_did,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (x *Namespace) Reset() { *x = Namespace{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_namespace_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Namespace) String() string { return protoimpl.X.MessageStringOf(x) } func (*Namespace) ProtoMessage() {} // Deprecated: Use Namespace.ProtoReflect.Descriptor instead. func (*Namespace) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_namespace_proto_rawDescGZIP(), []int{0} } func (x *Namespace) GetId() string { if x != nil { return x.Id } return "" } func (x *Namespace) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *Namespace) GetOwnerDid() string { if x != nil { return x.OwnerDid } return "" } func (x *Namespace) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } var File_sourcehub_bulletin_namespace_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_namespace_proto_rawDesc = []byte{ 0x0a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0xb6, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x0e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_namespace_proto_rawDescOnce sync.Once file_sourcehub_bulletin_namespace_proto_rawDescData = file_sourcehub_bulletin_namespace_proto_rawDesc ) func file_sourcehub_bulletin_namespace_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_namespace_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_namespace_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_namespace_proto_rawDescData) }) return file_sourcehub_bulletin_namespace_proto_rawDescData } var file_sourcehub_bulletin_namespace_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_bulletin_namespace_proto_goTypes = []interface{}{ (*Namespace)(nil), // 0: sourcehub.bulletin.Namespace (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } var file_sourcehub_bulletin_namespace_proto_depIdxs = []int32{ 1, // 0: sourcehub.bulletin.Namespace.created_at:type_name -> google.protobuf.Timestamp 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_namespace_proto_init() } func file_sourcehub_bulletin_namespace_proto_init() { if File_sourcehub_bulletin_namespace_proto != nil { return } file_sourcehub_bulletin_post_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_namespace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Namespace); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_namespace_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_bulletin_namespace_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_namespace_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_namespace_proto_msgTypes, }.Build() File_sourcehub_bulletin_namespace_proto = out.File file_sourcehub_bulletin_namespace_proto_rawDesc = nil file_sourcehub_bulletin_namespace_proto_goTypes = nil file_sourcehub_bulletin_namespace_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/params.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Params protoreflect.MessageDescriptor ) func init() { file_sourcehub_bulletin_params_proto_init() md_Params = File_sourcehub_bulletin_params_proto.Messages().ByName("Params") } var _ protoreflect.Message = (*fastReflection_Params)(nil) type fastReflection_Params Params func (x *Params) ProtoReflect() protoreflect.Message { return (*fastReflection_Params)(x) } func (x *Params) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Params_messageType fastReflection_Params_messageType var _ protoreflect.MessageType = fastReflection_Params_messageType{} type fastReflection_Params_messageType struct{} func (x fastReflection_Params_messageType) Zero() protoreflect.Message { return (*fastReflection_Params)(nil) } func (x fastReflection_Params_messageType) New() protoreflect.Message { return new(fastReflection_Params) } func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Params) Type() protoreflect.MessageType { return _fastReflection_Params_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Params) New() protoreflect.Message { return new(fastReflection_Params) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { return (*Params)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Params")) } panic(fmt.Errorf("message sourcehub.bulletin.Params does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Params")) } panic(fmt.Errorf("message sourcehub.bulletin.Params does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Params")) } panic(fmt.Errorf("message sourcehub.bulletin.Params does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Params")) } panic(fmt.Errorf("message sourcehub.bulletin.Params does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Params")) } panic(fmt.Errorf("message sourcehub.bulletin.Params does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Params")) } panic(fmt.Errorf("message sourcehub.bulletin.Params does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.Params", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Params) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Params) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/params.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Params defines the parameters for the module. type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Params) String() string { return protoimpl.X.MessageStringOf(x) } func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_params_proto_rawDescGZIP(), []int{0} } var File_sourcehub_bulletin_params_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_params_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xb3, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_params_proto_rawDescOnce sync.Once file_sourcehub_bulletin_params_proto_rawDescData = file_sourcehub_bulletin_params_proto_rawDesc ) func file_sourcehub_bulletin_params_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_params_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_params_proto_rawDescData) }) return file_sourcehub_bulletin_params_proto_rawDescData } var file_sourcehub_bulletin_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_bulletin_params_proto_goTypes = []interface{}{ (*Params)(nil), // 0: sourcehub.bulletin.Params } var file_sourcehub_bulletin_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_params_proto_init() } func file_sourcehub_bulletin_params_proto_init() { if File_sourcehub_bulletin_params_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_params_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_bulletin_params_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_params_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_params_proto_msgTypes, }.Build() File_sourcehub_bulletin_params_proto = out.File file_sourcehub_bulletin_params_proto_rawDesc = nil file_sourcehub_bulletin_params_proto_goTypes = nil file_sourcehub_bulletin_params_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/post.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Post protoreflect.MessageDescriptor fd_Post_id protoreflect.FieldDescriptor fd_Post_namespace protoreflect.FieldDescriptor fd_Post_creator_did protoreflect.FieldDescriptor fd_Post_payload protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_post_proto_init() md_Post = File_sourcehub_bulletin_post_proto.Messages().ByName("Post") fd_Post_id = md_Post.Fields().ByName("id") fd_Post_namespace = md_Post.Fields().ByName("namespace") fd_Post_creator_did = md_Post.Fields().ByName("creator_did") fd_Post_payload = md_Post.Fields().ByName("payload") } var _ protoreflect.Message = (*fastReflection_Post)(nil) type fastReflection_Post Post func (x *Post) ProtoReflect() protoreflect.Message { return (*fastReflection_Post)(x) } func (x *Post) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_post_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Post_messageType fastReflection_Post_messageType var _ protoreflect.MessageType = fastReflection_Post_messageType{} type fastReflection_Post_messageType struct{} func (x fastReflection_Post_messageType) Zero() protoreflect.Message { return (*fastReflection_Post)(nil) } func (x fastReflection_Post_messageType) New() protoreflect.Message { return new(fastReflection_Post) } func (x fastReflection_Post_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Post } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Post) Descriptor() protoreflect.MessageDescriptor { return md_Post } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Post) Type() protoreflect.MessageType { return _fastReflection_Post_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Post) New() protoreflect.Message { return new(fastReflection_Post) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Post) Interface() protoreflect.ProtoMessage { return (*Post)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Post) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_Post_id, value) { return } } if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_Post_namespace, value) { return } } if x.CreatorDid != "" { value := protoreflect.ValueOfString(x.CreatorDid) if !f(fd_Post_creator_did, value) { return } } if len(x.Payload) != 0 { value := protoreflect.ValueOfBytes(x.Payload) if !f(fd_Post_payload, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Post) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.Post.id": return x.Id != "" case "sourcehub.bulletin.Post.namespace": return x.Namespace != "" case "sourcehub.bulletin.Post.creator_did": return x.CreatorDid != "" case "sourcehub.bulletin.Post.payload": return len(x.Payload) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Post")) } panic(fmt.Errorf("message sourcehub.bulletin.Post does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Post) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.Post.id": x.Id = "" case "sourcehub.bulletin.Post.namespace": x.Namespace = "" case "sourcehub.bulletin.Post.creator_did": x.CreatorDid = "" case "sourcehub.bulletin.Post.payload": x.Payload = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Post")) } panic(fmt.Errorf("message sourcehub.bulletin.Post does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Post) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.Post.id": value := x.Id return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Post.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Post.creator_did": value := x.CreatorDid return protoreflect.ValueOfString(value) case "sourcehub.bulletin.Post.payload": value := x.Payload return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Post")) } panic(fmt.Errorf("message sourcehub.bulletin.Post does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Post) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.Post.id": x.Id = value.Interface().(string) case "sourcehub.bulletin.Post.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.Post.creator_did": x.CreatorDid = value.Interface().(string) case "sourcehub.bulletin.Post.payload": x.Payload = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Post")) } panic(fmt.Errorf("message sourcehub.bulletin.Post does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Post) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.Post.id": panic(fmt.Errorf("field id of message sourcehub.bulletin.Post is not mutable")) case "sourcehub.bulletin.Post.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.Post is not mutable")) case "sourcehub.bulletin.Post.creator_did": panic(fmt.Errorf("field creator_did of message sourcehub.bulletin.Post is not mutable")) case "sourcehub.bulletin.Post.payload": panic(fmt.Errorf("field payload of message sourcehub.bulletin.Post is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Post")) } panic(fmt.Errorf("message sourcehub.bulletin.Post does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Post) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.Post.id": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Post.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Post.creator_did": return protoreflect.ValueOfString("") case "sourcehub.bulletin.Post.payload": return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.Post")) } panic(fmt.Errorf("message sourcehub.bulletin.Post does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Post) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.Post", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Post) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Post) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Post) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Post) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Post) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.CreatorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Payload) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Post) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Payload) > 0 { i -= len(x.Payload) copy(dAtA[i:], x.Payload) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) i-- dAtA[i] = 0x22 } if len(x.CreatorDid) > 0 { i -= len(x.CreatorDid) copy(dAtA[i:], x.CreatorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreatorDid))) i-- dAtA[i] = 0x1a } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Post) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Post: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Post: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Payload = append(x.Payload[:0], dAtA[iNdEx:postIndex]...) if x.Payload == nil { x.Payload = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/post.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Post represents a bulletin entry created within a specific namespace. type Post struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` } func (x *Post) Reset() { *x = Post{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_post_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Post) String() string { return protoimpl.X.MessageStringOf(x) } func (*Post) ProtoMessage() {} // Deprecated: Use Post.ProtoReflect.Descriptor instead. func (*Post) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_post_proto_rawDescGZIP(), []int{0} } func (x *Post) GetId() string { if x != nil { return x.Id } return "" } func (x *Post) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *Post) GetCreatorDid() string { if x != nil { return x.CreatorDid } return "" } func (x *Post) GetPayload() []byte { if x != nil { return x.Payload } return nil } var File_sourcehub_bulletin_post_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_post_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x22, 0x6f, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0xb1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_post_proto_rawDescOnce sync.Once file_sourcehub_bulletin_post_proto_rawDescData = file_sourcehub_bulletin_post_proto_rawDesc ) func file_sourcehub_bulletin_post_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_post_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_post_proto_rawDescData) }) return file_sourcehub_bulletin_post_proto_rawDescData } var file_sourcehub_bulletin_post_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_bulletin_post_proto_goTypes = []interface{}{ (*Post)(nil), // 0: sourcehub.bulletin.Post } var file_sourcehub_bulletin_post_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_post_proto_init() } func file_sourcehub_bulletin_post_proto_init() { if File_sourcehub_bulletin_post_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Post); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_post_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_bulletin_post_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_post_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_post_proto_msgTypes, }.Build() File_sourcehub_bulletin_post_proto = out.File file_sourcehub_bulletin_post_proto_rawDesc = nil file_sourcehub_bulletin_post_proto_goTypes = nil file_sourcehub_bulletin_post_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/query.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryParamsRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryParamsRequest") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) type fastReflection_QueryParamsRequest QueryParamsRequest func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(x) } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} type fastReflection_QueryParamsRequest_messageType struct{} func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(nil) } func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryParamsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { return (*QueryParamsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryParamsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryParamsResponse protoreflect.MessageDescriptor fd_QueryParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryParamsResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryParamsResponse") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) type fastReflection_QueryParamsResponse QueryParamsResponse func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(x) } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} type fastReflection_QueryParamsResponse_messageType struct{} func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(nil) } func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { return (*QueryParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_QueryParamsResponse_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryParamsResponse.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryParamsResponse.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryParamsResponse.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryNamespaceRequest protoreflect.MessageDescriptor fd_QueryNamespaceRequest_namespace protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespaceRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespaceRequest") fd_QueryNamespaceRequest_namespace = md_QueryNamespaceRequest.Fields().ByName("namespace") } var _ protoreflect.Message = (*fastReflection_QueryNamespaceRequest)(nil) type fastReflection_QueryNamespaceRequest QueryNamespaceRequest func (x *QueryNamespaceRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespaceRequest)(x) } func (x *QueryNamespaceRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespaceRequest_messageType fastReflection_QueryNamespaceRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespaceRequest_messageType{} type fastReflection_QueryNamespaceRequest_messageType struct{} func (x fastReflection_QueryNamespaceRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespaceRequest)(nil) } func (x fastReflection_QueryNamespaceRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespaceRequest) } func (x fastReflection_QueryNamespaceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespaceRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespaceRequest) Type() protoreflect.MessageType { return _fastReflection_QueryNamespaceRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespaceRequest) New() protoreflect.Message { return new(fastReflection_QueryNamespaceRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespaceRequest) Interface() protoreflect.ProtoMessage { return (*QueryNamespaceRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespaceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_QueryNamespaceRequest_namespace, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespaceRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceRequest.namespace": return x.Namespace != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceRequest.namespace": x.Namespace = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespaceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespaceRequest.namespace": value := x.Namespace return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceRequest.namespace": x.Namespace = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceRequest.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.QueryNamespaceRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespaceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceRequest.namespace": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespaceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespaceRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespaceRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespaceRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespaceRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespaceRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryNamespaceResponse protoreflect.MessageDescriptor fd_QueryNamespaceResponse_namespace protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespaceResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespaceResponse") fd_QueryNamespaceResponse_namespace = md_QueryNamespaceResponse.Fields().ByName("namespace") } var _ protoreflect.Message = (*fastReflection_QueryNamespaceResponse)(nil) type fastReflection_QueryNamespaceResponse QueryNamespaceResponse func (x *QueryNamespaceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespaceResponse)(x) } func (x *QueryNamespaceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespaceResponse_messageType fastReflection_QueryNamespaceResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespaceResponse_messageType{} type fastReflection_QueryNamespaceResponse_messageType struct{} func (x fastReflection_QueryNamespaceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespaceResponse)(nil) } func (x fastReflection_QueryNamespaceResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespaceResponse) } func (x fastReflection_QueryNamespaceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespaceResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespaceResponse) Type() protoreflect.MessageType { return _fastReflection_QueryNamespaceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespaceResponse) New() protoreflect.Message { return new(fastReflection_QueryNamespaceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespaceResponse) Interface() protoreflect.ProtoMessage { return (*QueryNamespaceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespaceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Namespace != nil { value := protoreflect.ValueOfMessage(x.Namespace.ProtoReflect()) if !f(fd_QueryNamespaceResponse_namespace, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespaceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceResponse.namespace": return x.Namespace != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceResponse.namespace": x.Namespace = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespaceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespaceResponse.namespace": value := x.Namespace return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceResponse.namespace": x.Namespace = value.Message().Interface().(*Namespace) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceResponse.namespace": if x.Namespace == nil { x.Namespace = new(Namespace) } return protoreflect.ValueOfMessage(x.Namespace.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespaceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceResponse.namespace": m := new(Namespace) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespaceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespaceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespaceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespaceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespaceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespaceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Namespace != nil { l = options.Size(x.Namespace) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Namespace != nil { encoded, err := options.Marshal(x.Namespace) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Namespace == nil { x.Namespace = &Namespace{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Namespace); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryNamespacesRequest protoreflect.MessageDescriptor fd_QueryNamespacesRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespacesRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespacesRequest") fd_QueryNamespacesRequest_pagination = md_QueryNamespacesRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryNamespacesRequest)(nil) type fastReflection_QueryNamespacesRequest QueryNamespacesRequest func (x *QueryNamespacesRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespacesRequest)(x) } func (x *QueryNamespacesRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespacesRequest_messageType fastReflection_QueryNamespacesRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespacesRequest_messageType{} type fastReflection_QueryNamespacesRequest_messageType struct{} func (x fastReflection_QueryNamespacesRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespacesRequest)(nil) } func (x fastReflection_QueryNamespacesRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespacesRequest) } func (x fastReflection_QueryNamespacesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacesRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespacesRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacesRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespacesRequest) Type() protoreflect.MessageType { return _fastReflection_QueryNamespacesRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespacesRequest) New() protoreflect.Message { return new(fastReflection_QueryNamespacesRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespacesRequest) Interface() protoreflect.ProtoMessage { return (*QueryNamespacesRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespacesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryNamespacesRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespacesRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespacesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespacesRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespacesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespacesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespacesRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespacesRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespacesRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespacesRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespacesRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacesRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacesRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryNamespacesResponse_1_list)(nil) type _QueryNamespacesResponse_1_list struct { list *[]*Namespace } func (x *_QueryNamespacesResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryNamespacesResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryNamespacesResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Namespace) (*x.list)[i] = concreteValue } func (x *_QueryNamespacesResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Namespace) *x.list = append(*x.list, concreteValue) } func (x *_QueryNamespacesResponse_1_list) AppendMutable() protoreflect.Value { v := new(Namespace) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryNamespacesResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryNamespacesResponse_1_list) NewElement() protoreflect.Value { v := new(Namespace) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryNamespacesResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryNamespacesResponse protoreflect.MessageDescriptor fd_QueryNamespacesResponse_namespaces protoreflect.FieldDescriptor fd_QueryNamespacesResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespacesResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespacesResponse") fd_QueryNamespacesResponse_namespaces = md_QueryNamespacesResponse.Fields().ByName("namespaces") fd_QueryNamespacesResponse_pagination = md_QueryNamespacesResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryNamespacesResponse)(nil) type fastReflection_QueryNamespacesResponse QueryNamespacesResponse func (x *QueryNamespacesResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespacesResponse)(x) } func (x *QueryNamespacesResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespacesResponse_messageType fastReflection_QueryNamespacesResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespacesResponse_messageType{} type fastReflection_QueryNamespacesResponse_messageType struct{} func (x fastReflection_QueryNamespacesResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespacesResponse)(nil) } func (x fastReflection_QueryNamespacesResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespacesResponse) } func (x fastReflection_QueryNamespacesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacesResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespacesResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacesResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespacesResponse) Type() protoreflect.MessageType { return _fastReflection_QueryNamespacesResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespacesResponse) New() protoreflect.Message { return new(fastReflection_QueryNamespacesResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespacesResponse) Interface() protoreflect.ProtoMessage { return (*QueryNamespacesResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespacesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Namespaces) != 0 { value := protoreflect.ValueOfList(&_QueryNamespacesResponse_1_list{list: &x.Namespaces}) if !f(fd_QueryNamespacesResponse_namespaces, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryNamespacesResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespacesResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesResponse.namespaces": return len(x.Namespaces) != 0 case "sourcehub.bulletin.QueryNamespacesResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesResponse.namespaces": x.Namespaces = nil case "sourcehub.bulletin.QueryNamespacesResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespacesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespacesResponse.namespaces": if len(x.Namespaces) == 0 { return protoreflect.ValueOfList(&_QueryNamespacesResponse_1_list{}) } listValue := &_QueryNamespacesResponse_1_list{list: &x.Namespaces} return protoreflect.ValueOfList(listValue) case "sourcehub.bulletin.QueryNamespacesResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesResponse.namespaces": lv := value.List() clv := lv.(*_QueryNamespacesResponse_1_list) x.Namespaces = *clv.list case "sourcehub.bulletin.QueryNamespacesResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesResponse.namespaces": if x.Namespaces == nil { x.Namespaces = []*Namespace{} } value := &_QueryNamespacesResponse_1_list{list: &x.Namespaces} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.QueryNamespacesResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespacesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacesResponse.namespaces": list := []*Namespace{} return protoreflect.ValueOfList(&_QueryNamespacesResponse_1_list{list: &list}) case "sourcehub.bulletin.QueryNamespacesResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacesResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacesResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespacesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespacesResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespacesResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacesResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespacesResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespacesResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespacesResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Namespaces) > 0 { for _, e := range x.Namespaces { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacesResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Namespaces) > 0 { for iNdEx := len(x.Namespaces) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Namespaces[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacesResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespaces = append(x.Namespaces, &Namespace{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Namespaces[len(x.Namespaces)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryNamespaceCollaboratorsRequest protoreflect.MessageDescriptor fd_QueryNamespaceCollaboratorsRequest_namespace protoreflect.FieldDescriptor fd_QueryNamespaceCollaboratorsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespaceCollaboratorsRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespaceCollaboratorsRequest") fd_QueryNamespaceCollaboratorsRequest_namespace = md_QueryNamespaceCollaboratorsRequest.Fields().ByName("namespace") fd_QueryNamespaceCollaboratorsRequest_pagination = md_QueryNamespaceCollaboratorsRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryNamespaceCollaboratorsRequest)(nil) type fastReflection_QueryNamespaceCollaboratorsRequest QueryNamespaceCollaboratorsRequest func (x *QueryNamespaceCollaboratorsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespaceCollaboratorsRequest)(x) } func (x *QueryNamespaceCollaboratorsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespaceCollaboratorsRequest_messageType fastReflection_QueryNamespaceCollaboratorsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespaceCollaboratorsRequest_messageType{} type fastReflection_QueryNamespaceCollaboratorsRequest_messageType struct{} func (x fastReflection_QueryNamespaceCollaboratorsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespaceCollaboratorsRequest)(nil) } func (x fastReflection_QueryNamespaceCollaboratorsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespaceCollaboratorsRequest) } func (x fastReflection_QueryNamespaceCollaboratorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceCollaboratorsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceCollaboratorsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryNamespaceCollaboratorsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) New() protoreflect.Message { return new(fastReflection_QueryNamespaceCollaboratorsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Interface() protoreflect.ProtoMessage { return (*QueryNamespaceCollaboratorsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_QueryNamespaceCollaboratorsRequest_namespace, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryNamespaceCollaboratorsRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.namespace": return x.Namespace != "" case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.namespace": x.Namespace = "" case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.QueryNamespaceCollaboratorsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespaceCollaboratorsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespaceCollaboratorsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespaceCollaboratorsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceCollaboratorsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceCollaboratorsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceCollaboratorsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceCollaboratorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryNamespaceCollaboratorsResponse_1_list)(nil) type _QueryNamespaceCollaboratorsResponse_1_list struct { list *[]*Collaborator } func (x *_QueryNamespaceCollaboratorsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryNamespaceCollaboratorsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryNamespaceCollaboratorsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Collaborator) (*x.list)[i] = concreteValue } func (x *_QueryNamespaceCollaboratorsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Collaborator) *x.list = append(*x.list, concreteValue) } func (x *_QueryNamespaceCollaboratorsResponse_1_list) AppendMutable() protoreflect.Value { v := new(Collaborator) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryNamespaceCollaboratorsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryNamespaceCollaboratorsResponse_1_list) NewElement() protoreflect.Value { v := new(Collaborator) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryNamespaceCollaboratorsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryNamespaceCollaboratorsResponse protoreflect.MessageDescriptor fd_QueryNamespaceCollaboratorsResponse_collaborators protoreflect.FieldDescriptor fd_QueryNamespaceCollaboratorsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespaceCollaboratorsResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespaceCollaboratorsResponse") fd_QueryNamespaceCollaboratorsResponse_collaborators = md_QueryNamespaceCollaboratorsResponse.Fields().ByName("collaborators") fd_QueryNamespaceCollaboratorsResponse_pagination = md_QueryNamespaceCollaboratorsResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryNamespaceCollaboratorsResponse)(nil) type fastReflection_QueryNamespaceCollaboratorsResponse QueryNamespaceCollaboratorsResponse func (x *QueryNamespaceCollaboratorsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespaceCollaboratorsResponse)(x) } func (x *QueryNamespaceCollaboratorsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespaceCollaboratorsResponse_messageType fastReflection_QueryNamespaceCollaboratorsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespaceCollaboratorsResponse_messageType{} type fastReflection_QueryNamespaceCollaboratorsResponse_messageType struct{} func (x fastReflection_QueryNamespaceCollaboratorsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespaceCollaboratorsResponse)(nil) } func (x fastReflection_QueryNamespaceCollaboratorsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespaceCollaboratorsResponse) } func (x fastReflection_QueryNamespaceCollaboratorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceCollaboratorsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespaceCollaboratorsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryNamespaceCollaboratorsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) New() protoreflect.Message { return new(fastReflection_QueryNamespaceCollaboratorsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Interface() protoreflect.ProtoMessage { return (*QueryNamespaceCollaboratorsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Collaborators) != 0 { value := protoreflect.ValueOfList(&_QueryNamespaceCollaboratorsResponse_1_list{list: &x.Collaborators}) if !f(fd_QueryNamespaceCollaboratorsResponse_collaborators, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryNamespaceCollaboratorsResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.collaborators": return len(x.Collaborators) != 0 case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.collaborators": x.Collaborators = nil case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.collaborators": if len(x.Collaborators) == 0 { return protoreflect.ValueOfList(&_QueryNamespaceCollaboratorsResponse_1_list{}) } listValue := &_QueryNamespaceCollaboratorsResponse_1_list{list: &x.Collaborators} return protoreflect.ValueOfList(listValue) case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.collaborators": lv := value.List() clv := lv.(*_QueryNamespaceCollaboratorsResponse_1_list) x.Collaborators = *clv.list case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.collaborators": if x.Collaborators == nil { x.Collaborators = []*Collaborator{} } value := &_QueryNamespaceCollaboratorsResponse_1_list{list: &x.Collaborators} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.collaborators": list := []*Collaborator{} return protoreflect.ValueOfList(&_QueryNamespaceCollaboratorsResponse_1_list{list: &list}) case "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespaceCollaboratorsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespaceCollaboratorsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespaceCollaboratorsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespaceCollaboratorsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Collaborators) > 0 { for _, e := range x.Collaborators { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceCollaboratorsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Collaborators) > 0 { for iNdEx := len(x.Collaborators) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Collaborators[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespaceCollaboratorsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceCollaboratorsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespaceCollaboratorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Collaborators", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Collaborators = append(x.Collaborators, &Collaborator{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Collaborators[len(x.Collaborators)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryNamespacePostsRequest protoreflect.MessageDescriptor fd_QueryNamespacePostsRequest_namespace protoreflect.FieldDescriptor fd_QueryNamespacePostsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespacePostsRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespacePostsRequest") fd_QueryNamespacePostsRequest_namespace = md_QueryNamespacePostsRequest.Fields().ByName("namespace") fd_QueryNamespacePostsRequest_pagination = md_QueryNamespacePostsRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryNamespacePostsRequest)(nil) type fastReflection_QueryNamespacePostsRequest QueryNamespacePostsRequest func (x *QueryNamespacePostsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespacePostsRequest)(x) } func (x *QueryNamespacePostsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespacePostsRequest_messageType fastReflection_QueryNamespacePostsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespacePostsRequest_messageType{} type fastReflection_QueryNamespacePostsRequest_messageType struct{} func (x fastReflection_QueryNamespacePostsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespacePostsRequest)(nil) } func (x fastReflection_QueryNamespacePostsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespacePostsRequest) } func (x fastReflection_QueryNamespacePostsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacePostsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespacePostsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacePostsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespacePostsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryNamespacePostsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespacePostsRequest) New() protoreflect.Message { return new(fastReflection_QueryNamespacePostsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespacePostsRequest) Interface() protoreflect.ProtoMessage { return (*QueryNamespacePostsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespacePostsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_QueryNamespacePostsRequest_namespace, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryNamespacePostsRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespacePostsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsRequest.namespace": return x.Namespace != "" case "sourcehub.bulletin.QueryNamespacePostsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsRequest.namespace": x.Namespace = "" case "sourcehub.bulletin.QueryNamespacePostsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespacePostsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespacePostsRequest.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.QueryNamespacePostsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsRequest.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.QueryNamespacePostsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.bulletin.QueryNamespacePostsRequest.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.QueryNamespacePostsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespacePostsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsRequest.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.QueryNamespacePostsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespacePostsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespacePostsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespacePostsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespacePostsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespacePostsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespacePostsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacePostsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacePostsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacePostsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacePostsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryNamespacePostsResponse_1_list)(nil) type _QueryNamespacePostsResponse_1_list struct { list *[]*Post } func (x *_QueryNamespacePostsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryNamespacePostsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryNamespacePostsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) (*x.list)[i] = concreteValue } func (x *_QueryNamespacePostsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) *x.list = append(*x.list, concreteValue) } func (x *_QueryNamespacePostsResponse_1_list) AppendMutable() protoreflect.Value { v := new(Post) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryNamespacePostsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryNamespacePostsResponse_1_list) NewElement() protoreflect.Value { v := new(Post) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryNamespacePostsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryNamespacePostsResponse protoreflect.MessageDescriptor fd_QueryNamespacePostsResponse_posts protoreflect.FieldDescriptor fd_QueryNamespacePostsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryNamespacePostsResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryNamespacePostsResponse") fd_QueryNamespacePostsResponse_posts = md_QueryNamespacePostsResponse.Fields().ByName("posts") fd_QueryNamespacePostsResponse_pagination = md_QueryNamespacePostsResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryNamespacePostsResponse)(nil) type fastReflection_QueryNamespacePostsResponse QueryNamespacePostsResponse func (x *QueryNamespacePostsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryNamespacePostsResponse)(x) } func (x *QueryNamespacePostsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryNamespacePostsResponse_messageType fastReflection_QueryNamespacePostsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryNamespacePostsResponse_messageType{} type fastReflection_QueryNamespacePostsResponse_messageType struct{} func (x fastReflection_QueryNamespacePostsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryNamespacePostsResponse)(nil) } func (x fastReflection_QueryNamespacePostsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryNamespacePostsResponse) } func (x fastReflection_QueryNamespacePostsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacePostsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryNamespacePostsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryNamespacePostsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryNamespacePostsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryNamespacePostsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryNamespacePostsResponse) New() protoreflect.Message { return new(fastReflection_QueryNamespacePostsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryNamespacePostsResponse) Interface() protoreflect.ProtoMessage { return (*QueryNamespacePostsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryNamespacePostsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Posts) != 0 { value := protoreflect.ValueOfList(&_QueryNamespacePostsResponse_1_list{list: &x.Posts}) if !f(fd_QueryNamespacePostsResponse_posts, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryNamespacePostsResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryNamespacePostsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsResponse.posts": return len(x.Posts) != 0 case "sourcehub.bulletin.QueryNamespacePostsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsResponse.posts": x.Posts = nil case "sourcehub.bulletin.QueryNamespacePostsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryNamespacePostsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryNamespacePostsResponse.posts": if len(x.Posts) == 0 { return protoreflect.ValueOfList(&_QueryNamespacePostsResponse_1_list{}) } listValue := &_QueryNamespacePostsResponse_1_list{list: &x.Posts} return protoreflect.ValueOfList(listValue) case "sourcehub.bulletin.QueryNamespacePostsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsResponse.posts": lv := value.List() clv := lv.(*_QueryNamespacePostsResponse_1_list) x.Posts = *clv.list case "sourcehub.bulletin.QueryNamespacePostsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsResponse.posts": if x.Posts == nil { x.Posts = []*Post{} } value := &_QueryNamespacePostsResponse_1_list{list: &x.Posts} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.QueryNamespacePostsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryNamespacePostsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryNamespacePostsResponse.posts": list := []*Post{} return protoreflect.ValueOfList(&_QueryNamespacePostsResponse_1_list{list: &list}) case "sourcehub.bulletin.QueryNamespacePostsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryNamespacePostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryNamespacePostsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryNamespacePostsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryNamespacePostsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryNamespacePostsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryNamespacePostsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryNamespacePostsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryNamespacePostsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryNamespacePostsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Posts) > 0 { for _, e := range x.Posts { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacePostsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Posts) > 0 { for iNdEx := len(x.Posts) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Posts[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryNamespacePostsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacePostsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNamespacePostsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Posts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Posts = append(x.Posts, &Post{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Posts[len(x.Posts)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryPostRequest protoreflect.MessageDescriptor fd_QueryPostRequest_namespace protoreflect.FieldDescriptor fd_QueryPostRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryPostRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryPostRequest") fd_QueryPostRequest_namespace = md_QueryPostRequest.Fields().ByName("namespace") fd_QueryPostRequest_id = md_QueryPostRequest.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_QueryPostRequest)(nil) type fastReflection_QueryPostRequest QueryPostRequest func (x *QueryPostRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPostRequest)(x) } func (x *QueryPostRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPostRequest_messageType fastReflection_QueryPostRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryPostRequest_messageType{} type fastReflection_QueryPostRequest_messageType struct{} func (x fastReflection_QueryPostRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPostRequest)(nil) } func (x fastReflection_QueryPostRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryPostRequest) } func (x fastReflection_QueryPostRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPostRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPostRequest) Type() protoreflect.MessageType { return _fastReflection_QueryPostRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPostRequest) New() protoreflect.Message { return new(fastReflection_QueryPostRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPostRequest) Interface() protoreflect.ProtoMessage { return (*QueryPostRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPostRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_QueryPostRequest_namespace, value) { return } } if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_QueryPostRequest_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPostRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryPostRequest.namespace": return x.Namespace != "" case "sourcehub.bulletin.QueryPostRequest.id": return x.Id != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostRequest.namespace": x.Namespace = "" case "sourcehub.bulletin.QueryPostRequest.id": x.Id = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPostRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryPostRequest.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.QueryPostRequest.id": value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostRequest.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.QueryPostRequest.id": x.Id = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostRequest.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.QueryPostRequest is not mutable")) case "sourcehub.bulletin.QueryPostRequest.id": panic(fmt.Errorf("field id of message sourcehub.bulletin.QueryPostRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPostRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostRequest.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.QueryPostRequest.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPostRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryPostRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPostRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPostRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPostRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPostRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPostRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0x12 } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPostRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryPostResponse protoreflect.MessageDescriptor fd_QueryPostResponse_post protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryPostResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryPostResponse") fd_QueryPostResponse_post = md_QueryPostResponse.Fields().ByName("post") } var _ protoreflect.Message = (*fastReflection_QueryPostResponse)(nil) type fastReflection_QueryPostResponse QueryPostResponse func (x *QueryPostResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPostResponse)(x) } func (x *QueryPostResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPostResponse_messageType fastReflection_QueryPostResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryPostResponse_messageType{} type fastReflection_QueryPostResponse_messageType struct{} func (x fastReflection_QueryPostResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPostResponse)(nil) } func (x fastReflection_QueryPostResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryPostResponse) } func (x fastReflection_QueryPostResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPostResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPostResponse) Type() protoreflect.MessageType { return _fastReflection_QueryPostResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPostResponse) New() protoreflect.Message { return new(fastReflection_QueryPostResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPostResponse) Interface() protoreflect.ProtoMessage { return (*QueryPostResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPostResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Post != nil { value := protoreflect.ValueOfMessage(x.Post.ProtoReflect()) if !f(fd_QueryPostResponse_post, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPostResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryPostResponse.post": return x.Post != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostResponse.post": x.Post = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPostResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryPostResponse.post": value := x.Post return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostResponse.post": x.Post = value.Message().Interface().(*Post) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostResponse.post": if x.Post == nil { x.Post = new(Post) } return protoreflect.ValueOfMessage(x.Post.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPostResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostResponse.post": m := new(Post) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPostResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryPostResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPostResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPostResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPostResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPostResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Post != nil { l = options.Size(x.Post) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPostResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Post != nil { encoded, err := options.Marshal(x.Post) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPostResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Post", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Post == nil { x.Post = &Post{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Post); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryPostsRequest protoreflect.MessageDescriptor fd_QueryPostsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryPostsRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryPostsRequest") fd_QueryPostsRequest_pagination = md_QueryPostsRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryPostsRequest)(nil) type fastReflection_QueryPostsRequest QueryPostsRequest func (x *QueryPostsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPostsRequest)(x) } func (x *QueryPostsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPostsRequest_messageType fastReflection_QueryPostsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryPostsRequest_messageType{} type fastReflection_QueryPostsRequest_messageType struct{} func (x fastReflection_QueryPostsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPostsRequest)(nil) } func (x fastReflection_QueryPostsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryPostsRequest) } func (x fastReflection_QueryPostsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPostsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPostsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryPostsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPostsRequest) New() protoreflect.Message { return new(fastReflection_QueryPostsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPostsRequest) Interface() protoreflect.ProtoMessage { return (*QueryPostsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPostsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryPostsRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPostsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPostsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryPostsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPostsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPostsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryPostsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPostsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPostsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPostsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPostsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPostsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPostsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryPostsResponse_1_list)(nil) type _QueryPostsResponse_1_list struct { list *[]*Post } func (x *_QueryPostsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryPostsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryPostsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) (*x.list)[i] = concreteValue } func (x *_QueryPostsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) *x.list = append(*x.list, concreteValue) } func (x *_QueryPostsResponse_1_list) AppendMutable() protoreflect.Value { v := new(Post) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryPostsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryPostsResponse_1_list) NewElement() protoreflect.Value { v := new(Post) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryPostsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryPostsResponse protoreflect.MessageDescriptor fd_QueryPostsResponse_posts protoreflect.FieldDescriptor fd_QueryPostsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryPostsResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryPostsResponse") fd_QueryPostsResponse_posts = md_QueryPostsResponse.Fields().ByName("posts") fd_QueryPostsResponse_pagination = md_QueryPostsResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryPostsResponse)(nil) type fastReflection_QueryPostsResponse QueryPostsResponse func (x *QueryPostsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryPostsResponse)(x) } func (x *QueryPostsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryPostsResponse_messageType fastReflection_QueryPostsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryPostsResponse_messageType{} type fastReflection_QueryPostsResponse_messageType struct{} func (x fastReflection_QueryPostsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryPostsResponse)(nil) } func (x fastReflection_QueryPostsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryPostsResponse) } func (x fastReflection_QueryPostsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryPostsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryPostsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryPostsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryPostsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryPostsResponse) New() protoreflect.Message { return new(fastReflection_QueryPostsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryPostsResponse) Interface() protoreflect.ProtoMessage { return (*QueryPostsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryPostsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Posts) != 0 { value := protoreflect.ValueOfList(&_QueryPostsResponse_1_list{list: &x.Posts}) if !f(fd_QueryPostsResponse_posts, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryPostsResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPostsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsResponse.posts": return len(x.Posts) != 0 case "sourcehub.bulletin.QueryPostsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsResponse.posts": x.Posts = nil case "sourcehub.bulletin.QueryPostsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPostsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryPostsResponse.posts": if len(x.Posts) == 0 { return protoreflect.ValueOfList(&_QueryPostsResponse_1_list{}) } listValue := &_QueryPostsResponse_1_list{list: &x.Posts} return protoreflect.ValueOfList(listValue) case "sourcehub.bulletin.QueryPostsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsResponse.posts": lv := value.List() clv := lv.(*_QueryPostsResponse_1_list) x.Posts = *clv.list case "sourcehub.bulletin.QueryPostsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsResponse.posts": if x.Posts == nil { x.Posts = []*Post{} } value := &_QueryPostsResponse_1_list{list: &x.Posts} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.QueryPostsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPostsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryPostsResponse.posts": list := []*Post{} return protoreflect.ValueOfList(&_QueryPostsResponse_1_list{list: &list}) case "sourcehub.bulletin.QueryPostsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryPostsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryPostsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryPostsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryPostsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryPostsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPostsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryPostsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryPostsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryPostsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Posts) > 0 { for _, e := range x.Posts { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryPostsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Posts) > 0 { for iNdEx := len(x.Posts) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Posts[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryPostsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPostsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Posts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Posts = append(x.Posts, &Post{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Posts[len(x.Posts)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryBulletinPolicyIdRequest protoreflect.MessageDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryBulletinPolicyIdRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryBulletinPolicyIdRequest") } var _ protoreflect.Message = (*fastReflection_QueryBulletinPolicyIdRequest)(nil) type fastReflection_QueryBulletinPolicyIdRequest QueryBulletinPolicyIdRequest func (x *QueryBulletinPolicyIdRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryBulletinPolicyIdRequest)(x) } func (x *QueryBulletinPolicyIdRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryBulletinPolicyIdRequest_messageType fastReflection_QueryBulletinPolicyIdRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryBulletinPolicyIdRequest_messageType{} type fastReflection_QueryBulletinPolicyIdRequest_messageType struct{} func (x fastReflection_QueryBulletinPolicyIdRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryBulletinPolicyIdRequest)(nil) } func (x fastReflection_QueryBulletinPolicyIdRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryBulletinPolicyIdRequest) } func (x fastReflection_QueryBulletinPolicyIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryBulletinPolicyIdRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryBulletinPolicyIdRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryBulletinPolicyIdRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryBulletinPolicyIdRequest) Type() protoreflect.MessageType { return _fastReflection_QueryBulletinPolicyIdRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryBulletinPolicyIdRequest) New() protoreflect.Message { return new(fastReflection_QueryBulletinPolicyIdRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryBulletinPolicyIdRequest) Interface() protoreflect.ProtoMessage { return (*QueryBulletinPolicyIdRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryBulletinPolicyIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryBulletinPolicyIdRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryBulletinPolicyIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryBulletinPolicyIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryBulletinPolicyIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryBulletinPolicyIdRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryBulletinPolicyIdRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryBulletinPolicyIdRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryBulletinPolicyIdRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryBulletinPolicyIdRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryBulletinPolicyIdRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryBulletinPolicyIdRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBulletinPolicyIdRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBulletinPolicyIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryBulletinPolicyIdResponse protoreflect.MessageDescriptor fd_QueryBulletinPolicyIdResponse_policy_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryBulletinPolicyIdResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryBulletinPolicyIdResponse") fd_QueryBulletinPolicyIdResponse_policy_id = md_QueryBulletinPolicyIdResponse.Fields().ByName("policy_id") } var _ protoreflect.Message = (*fastReflection_QueryBulletinPolicyIdResponse)(nil) type fastReflection_QueryBulletinPolicyIdResponse QueryBulletinPolicyIdResponse func (x *QueryBulletinPolicyIdResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryBulletinPolicyIdResponse)(x) } func (x *QueryBulletinPolicyIdResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryBulletinPolicyIdResponse_messageType fastReflection_QueryBulletinPolicyIdResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryBulletinPolicyIdResponse_messageType{} type fastReflection_QueryBulletinPolicyIdResponse_messageType struct{} func (x fastReflection_QueryBulletinPolicyIdResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryBulletinPolicyIdResponse)(nil) } func (x fastReflection_QueryBulletinPolicyIdResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryBulletinPolicyIdResponse) } func (x fastReflection_QueryBulletinPolicyIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryBulletinPolicyIdResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryBulletinPolicyIdResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryBulletinPolicyIdResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryBulletinPolicyIdResponse) Type() protoreflect.MessageType { return _fastReflection_QueryBulletinPolicyIdResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryBulletinPolicyIdResponse) New() protoreflect.Message { return new(fastReflection_QueryBulletinPolicyIdResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryBulletinPolicyIdResponse) Interface() protoreflect.ProtoMessage { return (*QueryBulletinPolicyIdResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryBulletinPolicyIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_QueryBulletinPolicyIdResponse_policy_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryBulletinPolicyIdResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryBulletinPolicyIdResponse.policy_id": return x.PolicyId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryBulletinPolicyIdResponse.policy_id": x.PolicyId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryBulletinPolicyIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryBulletinPolicyIdResponse.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryBulletinPolicyIdResponse.policy_id": x.PolicyId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryBulletinPolicyIdResponse.policy_id": panic(fmt.Errorf("field policy_id of message sourcehub.bulletin.QueryBulletinPolicyIdResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryBulletinPolicyIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryBulletinPolicyIdResponse.policy_id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryBulletinPolicyIdResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryBulletinPolicyIdResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryBulletinPolicyIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryBulletinPolicyIdResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryBulletinPolicyIdResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryBulletinPolicyIdResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryBulletinPolicyIdResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryBulletinPolicyIdResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryBulletinPolicyIdResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryBulletinPolicyIdResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryBulletinPolicyIdResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBulletinPolicyIdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBulletinPolicyIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryIterateGlobRequest protoreflect.MessageDescriptor fd_QueryIterateGlobRequest_namespace protoreflect.FieldDescriptor fd_QueryIterateGlobRequest_glob protoreflect.FieldDescriptor fd_QueryIterateGlobRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryIterateGlobRequest = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryIterateGlobRequest") fd_QueryIterateGlobRequest_namespace = md_QueryIterateGlobRequest.Fields().ByName("namespace") fd_QueryIterateGlobRequest_glob = md_QueryIterateGlobRequest.Fields().ByName("glob") fd_QueryIterateGlobRequest_pagination = md_QueryIterateGlobRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryIterateGlobRequest)(nil) type fastReflection_QueryIterateGlobRequest QueryIterateGlobRequest func (x *QueryIterateGlobRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryIterateGlobRequest)(x) } func (x *QueryIterateGlobRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryIterateGlobRequest_messageType fastReflection_QueryIterateGlobRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryIterateGlobRequest_messageType{} type fastReflection_QueryIterateGlobRequest_messageType struct{} func (x fastReflection_QueryIterateGlobRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryIterateGlobRequest)(nil) } func (x fastReflection_QueryIterateGlobRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryIterateGlobRequest) } func (x fastReflection_QueryIterateGlobRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryIterateGlobRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryIterateGlobRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryIterateGlobRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryIterateGlobRequest) Type() protoreflect.MessageType { return _fastReflection_QueryIterateGlobRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryIterateGlobRequest) New() protoreflect.Message { return new(fastReflection_QueryIterateGlobRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryIterateGlobRequest) Interface() protoreflect.ProtoMessage { return (*QueryIterateGlobRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryIterateGlobRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_QueryIterateGlobRequest_namespace, value) { return } } if x.Glob != "" { value := protoreflect.ValueOfString(x.Glob) if !f(fd_QueryIterateGlobRequest_glob, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryIterateGlobRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryIterateGlobRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobRequest.namespace": return x.Namespace != "" case "sourcehub.bulletin.QueryIterateGlobRequest.glob": return x.Glob != "" case "sourcehub.bulletin.QueryIterateGlobRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobRequest.namespace": x.Namespace = "" case "sourcehub.bulletin.QueryIterateGlobRequest.glob": x.Glob = "" case "sourcehub.bulletin.QueryIterateGlobRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryIterateGlobRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryIterateGlobRequest.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.QueryIterateGlobRequest.glob": value := x.Glob return protoreflect.ValueOfString(value) case "sourcehub.bulletin.QueryIterateGlobRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobRequest.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.QueryIterateGlobRequest.glob": x.Glob = value.Interface().(string) case "sourcehub.bulletin.QueryIterateGlobRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.bulletin.QueryIterateGlobRequest.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.QueryIterateGlobRequest is not mutable")) case "sourcehub.bulletin.QueryIterateGlobRequest.glob": panic(fmt.Errorf("field glob of message sourcehub.bulletin.QueryIterateGlobRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryIterateGlobRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobRequest.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.QueryIterateGlobRequest.glob": return protoreflect.ValueOfString("") case "sourcehub.bulletin.QueryIterateGlobRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobRequest")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryIterateGlobRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryIterateGlobRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryIterateGlobRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryIterateGlobRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryIterateGlobRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryIterateGlobRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Glob) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryIterateGlobRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.Glob) > 0 { i -= len(x.Glob) copy(dAtA[i:], x.Glob) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Glob))) i-- dAtA[i] = 0x12 } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryIterateGlobRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIterateGlobRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIterateGlobRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Glob", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Glob = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryIterateGlobResponse_1_list)(nil) type _QueryIterateGlobResponse_1_list struct { list *[]*Post } func (x *_QueryIterateGlobResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryIterateGlobResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryIterateGlobResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) (*x.list)[i] = concreteValue } func (x *_QueryIterateGlobResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Post) *x.list = append(*x.list, concreteValue) } func (x *_QueryIterateGlobResponse_1_list) AppendMutable() protoreflect.Value { v := new(Post) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryIterateGlobResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryIterateGlobResponse_1_list) NewElement() protoreflect.Value { v := new(Post) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryIterateGlobResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryIterateGlobResponse protoreflect.MessageDescriptor fd_QueryIterateGlobResponse_posts protoreflect.FieldDescriptor fd_QueryIterateGlobResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_query_proto_init() md_QueryIterateGlobResponse = File_sourcehub_bulletin_query_proto.Messages().ByName("QueryIterateGlobResponse") fd_QueryIterateGlobResponse_posts = md_QueryIterateGlobResponse.Fields().ByName("posts") fd_QueryIterateGlobResponse_pagination = md_QueryIterateGlobResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryIterateGlobResponse)(nil) type fastReflection_QueryIterateGlobResponse QueryIterateGlobResponse func (x *QueryIterateGlobResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryIterateGlobResponse)(x) } func (x *QueryIterateGlobResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_query_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryIterateGlobResponse_messageType fastReflection_QueryIterateGlobResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryIterateGlobResponse_messageType{} type fastReflection_QueryIterateGlobResponse_messageType struct{} func (x fastReflection_QueryIterateGlobResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryIterateGlobResponse)(nil) } func (x fastReflection_QueryIterateGlobResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryIterateGlobResponse) } func (x fastReflection_QueryIterateGlobResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryIterateGlobResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryIterateGlobResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryIterateGlobResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryIterateGlobResponse) Type() protoreflect.MessageType { return _fastReflection_QueryIterateGlobResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryIterateGlobResponse) New() protoreflect.Message { return new(fastReflection_QueryIterateGlobResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryIterateGlobResponse) Interface() protoreflect.ProtoMessage { return (*QueryIterateGlobResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryIterateGlobResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Posts) != 0 { value := protoreflect.ValueOfList(&_QueryIterateGlobResponse_1_list{list: &x.Posts}) if !f(fd_QueryIterateGlobResponse_posts, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryIterateGlobResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryIterateGlobResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobResponse.posts": return len(x.Posts) != 0 case "sourcehub.bulletin.QueryIterateGlobResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobResponse.posts": x.Posts = nil case "sourcehub.bulletin.QueryIterateGlobResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryIterateGlobResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.QueryIterateGlobResponse.posts": if len(x.Posts) == 0 { return protoreflect.ValueOfList(&_QueryIterateGlobResponse_1_list{}) } listValue := &_QueryIterateGlobResponse_1_list{list: &x.Posts} return protoreflect.ValueOfList(listValue) case "sourcehub.bulletin.QueryIterateGlobResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobResponse.posts": lv := value.List() clv := lv.(*_QueryIterateGlobResponse_1_list) x.Posts = *clv.list case "sourcehub.bulletin.QueryIterateGlobResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobResponse.posts": if x.Posts == nil { x.Posts = []*Post{} } value := &_QueryIterateGlobResponse_1_list{list: &x.Posts} return protoreflect.ValueOfList(value) case "sourcehub.bulletin.QueryIterateGlobResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryIterateGlobResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.QueryIterateGlobResponse.posts": list := []*Post{} return protoreflect.ValueOfList(&_QueryIterateGlobResponse_1_list{list: &list}) case "sourcehub.bulletin.QueryIterateGlobResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.QueryIterateGlobResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.QueryIterateGlobResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryIterateGlobResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.QueryIterateGlobResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryIterateGlobResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIterateGlobResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryIterateGlobResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryIterateGlobResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryIterateGlobResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Posts) > 0 { for _, e := range x.Posts { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryIterateGlobResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Posts) > 0 { for iNdEx := len(x.Posts) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Posts[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryIterateGlobResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIterateGlobResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIterateGlobResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Posts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Posts = append(x.Posts, &Post{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Posts[len(x.Posts)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/query.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{0} } // QueryParamsResponse is response type for the Query/Params RPC method. type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params holds all the parameters of this module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{1} } func (x *QueryParamsResponse) GetParams() *Params { if x != nil { return x.Params } return nil } type QueryNamespaceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (x *QueryNamespaceRequest) Reset() { *x = QueryNamespaceRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespaceRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespaceRequest) ProtoMessage() {} // Deprecated: Use QueryNamespaceRequest.ProtoReflect.Descriptor instead. func (*QueryNamespaceRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{2} } func (x *QueryNamespaceRequest) GetNamespace() string { if x != nil { return x.Namespace } return "" } type QueryNamespaceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (x *QueryNamespaceResponse) Reset() { *x = QueryNamespaceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespaceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespaceResponse) ProtoMessage() {} // Deprecated: Use QueryNamespaceResponse.ProtoReflect.Descriptor instead. func (*QueryNamespaceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{3} } func (x *QueryNamespaceResponse) GetNamespace() *Namespace { if x != nil { return x.Namespace } return nil } type QueryNamespacesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryNamespacesRequest) Reset() { *x = QueryNamespacesRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespacesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespacesRequest) ProtoMessage() {} // Deprecated: Use QueryNamespacesRequest.ProtoReflect.Descriptor instead. func (*QueryNamespacesRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{4} } func (x *QueryNamespacesRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } type QueryNamespacesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryNamespacesResponse) Reset() { *x = QueryNamespacesResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespacesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespacesResponse) ProtoMessage() {} // Deprecated: Use QueryNamespacesResponse.ProtoReflect.Descriptor instead. func (*QueryNamespacesResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{5} } func (x *QueryNamespacesResponse) GetNamespaces() []*Namespace { if x != nil { return x.Namespaces } return nil } func (x *QueryNamespacesResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } type QueryNamespaceCollaboratorsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryNamespaceCollaboratorsRequest) Reset() { *x = QueryNamespaceCollaboratorsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespaceCollaboratorsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespaceCollaboratorsRequest) ProtoMessage() {} // Deprecated: Use QueryNamespaceCollaboratorsRequest.ProtoReflect.Descriptor instead. func (*QueryNamespaceCollaboratorsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{6} } func (x *QueryNamespaceCollaboratorsRequest) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *QueryNamespaceCollaboratorsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } type QueryNamespaceCollaboratorsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Collaborators []*Collaborator `protobuf:"bytes,1,rep,name=collaborators,proto3" json:"collaborators,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryNamespaceCollaboratorsResponse) Reset() { *x = QueryNamespaceCollaboratorsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespaceCollaboratorsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespaceCollaboratorsResponse) ProtoMessage() {} // Deprecated: Use QueryNamespaceCollaboratorsResponse.ProtoReflect.Descriptor instead. func (*QueryNamespaceCollaboratorsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{7} } func (x *QueryNamespaceCollaboratorsResponse) GetCollaborators() []*Collaborator { if x != nil { return x.Collaborators } return nil } func (x *QueryNamespaceCollaboratorsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } type QueryNamespacePostsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryNamespacePostsRequest) Reset() { *x = QueryNamespacePostsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespacePostsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespacePostsRequest) ProtoMessage() {} // Deprecated: Use QueryNamespacePostsRequest.ProtoReflect.Descriptor instead. func (*QueryNamespacePostsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{8} } func (x *QueryNamespacePostsRequest) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *QueryNamespacePostsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } type QueryNamespacePostsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryNamespacePostsResponse) Reset() { *x = QueryNamespacePostsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryNamespacePostsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryNamespacePostsResponse) ProtoMessage() {} // Deprecated: Use QueryNamespacePostsResponse.ProtoReflect.Descriptor instead. func (*QueryNamespacePostsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{9} } func (x *QueryNamespacePostsResponse) GetPosts() []*Post { if x != nil { return x.Posts } return nil } func (x *QueryNamespacePostsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } type QueryPostRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } func (x *QueryPostRequest) Reset() { *x = QueryPostRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPostRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPostRequest) ProtoMessage() {} // Deprecated: Use QueryPostRequest.ProtoReflect.Descriptor instead. func (*QueryPostRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{10} } func (x *QueryPostRequest) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *QueryPostRequest) GetId() string { if x != nil { return x.Id } return "" } type QueryPostResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` } func (x *QueryPostResponse) Reset() { *x = QueryPostResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPostResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPostResponse) ProtoMessage() {} // Deprecated: Use QueryPostResponse.ProtoReflect.Descriptor instead. func (*QueryPostResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{11} } func (x *QueryPostResponse) GetPost() *Post { if x != nil { return x.Post } return nil } type QueryPostsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryPostsRequest) Reset() { *x = QueryPostsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPostsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPostsRequest) ProtoMessage() {} // Deprecated: Use QueryPostsRequest.ProtoReflect.Descriptor instead. func (*QueryPostsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{12} } func (x *QueryPostsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } type QueryPostsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryPostsResponse) Reset() { *x = QueryPostsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryPostsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryPostsResponse) ProtoMessage() {} // Deprecated: Use QueryPostsResponse.ProtoReflect.Descriptor instead. func (*QueryPostsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{13} } func (x *QueryPostsResponse) GetPosts() []*Post { if x != nil { return x.Posts } return nil } func (x *QueryPostsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } // QueryBulletinPolicyIdRequest is request type for the Query/BulletinPolicyId RPC method. type QueryBulletinPolicyIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *QueryBulletinPolicyIdRequest) Reset() { *x = QueryBulletinPolicyIdRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryBulletinPolicyIdRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryBulletinPolicyIdRequest) ProtoMessage() {} // Deprecated: Use QueryBulletinPolicyIdRequest.ProtoReflect.Descriptor instead. func (*QueryBulletinPolicyIdRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{14} } // QueryBulletinPolicyIdResponse is response type for the Query/BulletinPolicyId RPC method. type QueryBulletinPolicyIdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` } func (x *QueryBulletinPolicyIdResponse) Reset() { *x = QueryBulletinPolicyIdResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryBulletinPolicyIdResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryBulletinPolicyIdResponse) ProtoMessage() {} // Deprecated: Use QueryBulletinPolicyIdResponse.ProtoReflect.Descriptor instead. func (*QueryBulletinPolicyIdResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{15} } func (x *QueryBulletinPolicyIdResponse) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } // QueryIterateGlobRequest type QueryIterateGlobRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Glob string `protobuf:"bytes,2,opt,name=glob,proto3" json:"glob,omitempty"` // pagination defines an optional pagination for the request. Pagination *v1beta1.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryIterateGlobRequest) Reset() { *x = QueryIterateGlobRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryIterateGlobRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryIterateGlobRequest) ProtoMessage() {} // Deprecated: Use QueryIterateGlobRequest.ProtoReflect.Descriptor instead. func (*QueryIterateGlobRequest) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{16} } func (x *QueryIterateGlobRequest) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *QueryIterateGlobRequest) GetGlob() string { if x != nil { return x.Glob } return "" } func (x *QueryIterateGlobRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // QueryIterateGlobResponse type QueryIterateGlobResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryIterateGlobResponse) Reset() { *x = QueryIterateGlobResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_query_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryIterateGlobResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryIterateGlobResponse) ProtoMessage() {} // Deprecated: Use QueryIterateGlobResponse.ProtoReflect.Descriptor instead. func (*QueryIterateGlobResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_query_proto_rawDescGZIP(), []int{17} } func (x *QueryIterateGlobResponse) GetPosts() []*Post { if x != nil { return x.Posts } return nil } func (x *QueryIterateGlobResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } var File_sourcehub_bulletin_query_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_query_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x54, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x35, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x60, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xac, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc1, 0x01, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x40, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x41, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6c, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x67, 0x6c, 0x6f, 0x62, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xce, 0x0b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8b, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0a, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0xce, 0x01, 0x0a, 0x16, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x36, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x0e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x12, 0xac, 0x01, 0x0a, 0x10, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x42, 0xb2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_query_proto_rawDescOnce sync.Once file_sourcehub_bulletin_query_proto_rawDescData = file_sourcehub_bulletin_query_proto_rawDesc ) func file_sourcehub_bulletin_query_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_query_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_query_proto_rawDescData) }) return file_sourcehub_bulletin_query_proto_rawDescData } var file_sourcehub_bulletin_query_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_sourcehub_bulletin_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: sourcehub.bulletin.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: sourcehub.bulletin.QueryParamsResponse (*QueryNamespaceRequest)(nil), // 2: sourcehub.bulletin.QueryNamespaceRequest (*QueryNamespaceResponse)(nil), // 3: sourcehub.bulletin.QueryNamespaceResponse (*QueryNamespacesRequest)(nil), // 4: sourcehub.bulletin.QueryNamespacesRequest (*QueryNamespacesResponse)(nil), // 5: sourcehub.bulletin.QueryNamespacesResponse (*QueryNamespaceCollaboratorsRequest)(nil), // 6: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest (*QueryNamespaceCollaboratorsResponse)(nil), // 7: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse (*QueryNamespacePostsRequest)(nil), // 8: sourcehub.bulletin.QueryNamespacePostsRequest (*QueryNamespacePostsResponse)(nil), // 9: sourcehub.bulletin.QueryNamespacePostsResponse (*QueryPostRequest)(nil), // 10: sourcehub.bulletin.QueryPostRequest (*QueryPostResponse)(nil), // 11: sourcehub.bulletin.QueryPostResponse (*QueryPostsRequest)(nil), // 12: sourcehub.bulletin.QueryPostsRequest (*QueryPostsResponse)(nil), // 13: sourcehub.bulletin.QueryPostsResponse (*QueryBulletinPolicyIdRequest)(nil), // 14: sourcehub.bulletin.QueryBulletinPolicyIdRequest (*QueryBulletinPolicyIdResponse)(nil), // 15: sourcehub.bulletin.QueryBulletinPolicyIdResponse (*QueryIterateGlobRequest)(nil), // 16: sourcehub.bulletin.QueryIterateGlobRequest (*QueryIterateGlobResponse)(nil), // 17: sourcehub.bulletin.QueryIterateGlobResponse (*Params)(nil), // 18: sourcehub.bulletin.Params (*Namespace)(nil), // 19: sourcehub.bulletin.Namespace (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest (*v1beta1.PageResponse)(nil), // 21: cosmos.base.query.v1beta1.PageResponse (*Collaborator)(nil), // 22: sourcehub.bulletin.Collaborator (*Post)(nil), // 23: sourcehub.bulletin.Post } var file_sourcehub_bulletin_query_proto_depIdxs = []int32{ 18, // 0: sourcehub.bulletin.QueryParamsResponse.params:type_name -> sourcehub.bulletin.Params 19, // 1: sourcehub.bulletin.QueryNamespaceResponse.namespace:type_name -> sourcehub.bulletin.Namespace 20, // 2: sourcehub.bulletin.QueryNamespacesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 19, // 3: sourcehub.bulletin.QueryNamespacesResponse.namespaces:type_name -> sourcehub.bulletin.Namespace 21, // 4: sourcehub.bulletin.QueryNamespacesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 20, // 5: sourcehub.bulletin.QueryNamespaceCollaboratorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 22, // 6: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.collaborators:type_name -> sourcehub.bulletin.Collaborator 21, // 7: sourcehub.bulletin.QueryNamespaceCollaboratorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 20, // 8: sourcehub.bulletin.QueryNamespacePostsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 23, // 9: sourcehub.bulletin.QueryNamespacePostsResponse.posts:type_name -> sourcehub.bulletin.Post 21, // 10: sourcehub.bulletin.QueryNamespacePostsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 23, // 11: sourcehub.bulletin.QueryPostResponse.post:type_name -> sourcehub.bulletin.Post 20, // 12: sourcehub.bulletin.QueryPostsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 23, // 13: sourcehub.bulletin.QueryPostsResponse.posts:type_name -> sourcehub.bulletin.Post 21, // 14: sourcehub.bulletin.QueryPostsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 20, // 15: sourcehub.bulletin.QueryIterateGlobRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 23, // 16: sourcehub.bulletin.QueryIterateGlobResponse.posts:type_name -> sourcehub.bulletin.Post 21, // 17: sourcehub.bulletin.QueryIterateGlobResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 0, // 18: sourcehub.bulletin.Query.Params:input_type -> sourcehub.bulletin.QueryParamsRequest 2, // 19: sourcehub.bulletin.Query.Namespace:input_type -> sourcehub.bulletin.QueryNamespaceRequest 4, // 20: sourcehub.bulletin.Query.Namespaces:input_type -> sourcehub.bulletin.QueryNamespacesRequest 6, // 21: sourcehub.bulletin.Query.NamespaceCollaborators:input_type -> sourcehub.bulletin.QueryNamespaceCollaboratorsRequest 8, // 22: sourcehub.bulletin.Query.NamespacePosts:input_type -> sourcehub.bulletin.QueryNamespacePostsRequest 10, // 23: sourcehub.bulletin.Query.Post:input_type -> sourcehub.bulletin.QueryPostRequest 12, // 24: sourcehub.bulletin.Query.Posts:input_type -> sourcehub.bulletin.QueryPostsRequest 16, // 25: sourcehub.bulletin.Query.IterateGlob:input_type -> sourcehub.bulletin.QueryIterateGlobRequest 14, // 26: sourcehub.bulletin.Query.BulletinPolicyId:input_type -> sourcehub.bulletin.QueryBulletinPolicyIdRequest 1, // 27: sourcehub.bulletin.Query.Params:output_type -> sourcehub.bulletin.QueryParamsResponse 3, // 28: sourcehub.bulletin.Query.Namespace:output_type -> sourcehub.bulletin.QueryNamespaceResponse 5, // 29: sourcehub.bulletin.Query.Namespaces:output_type -> sourcehub.bulletin.QueryNamespacesResponse 7, // 30: sourcehub.bulletin.Query.NamespaceCollaborators:output_type -> sourcehub.bulletin.QueryNamespaceCollaboratorsResponse 9, // 31: sourcehub.bulletin.Query.NamespacePosts:output_type -> sourcehub.bulletin.QueryNamespacePostsResponse 11, // 32: sourcehub.bulletin.Query.Post:output_type -> sourcehub.bulletin.QueryPostResponse 13, // 33: sourcehub.bulletin.Query.Posts:output_type -> sourcehub.bulletin.QueryPostsResponse 17, // 34: sourcehub.bulletin.Query.IterateGlob:output_type -> sourcehub.bulletin.QueryIterateGlobResponse 15, // 35: sourcehub.bulletin.Query.BulletinPolicyId:output_type -> sourcehub.bulletin.QueryBulletinPolicyIdResponse 27, // [27:36] is the sub-list for method output_type 18, // [18:27] is the sub-list for method input_type 18, // [18:18] is the sub-list for extension type_name 18, // [18:18] is the sub-list for extension extendee 0, // [0:18] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_query_proto_init() } func file_sourcehub_bulletin_query_proto_init() { if File_sourcehub_bulletin_query_proto != nil { return } file_sourcehub_bulletin_params_proto_init() file_sourcehub_bulletin_namespace_proto_init() file_sourcehub_bulletin_collaborator_proto_init() file_sourcehub_bulletin_post_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespaceRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespaceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespacesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespacesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespaceCollaboratorsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespaceCollaboratorsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespacePostsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryNamespacePostsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPostRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPostResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPostsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPostsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryBulletinPolicyIdRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryBulletinPolicyIdResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryIterateGlobRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryIterateGlobResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_query_proto_rawDesc, NumEnums: 0, NumMessages: 18, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_bulletin_query_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_query_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_query_proto_msgTypes, }.Build() File_sourcehub_bulletin_query_proto = out.File file_sourcehub_bulletin_query_proto_rawDesc = nil file_sourcehub_bulletin_query_proto_goTypes = nil file_sourcehub_bulletin_query_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/query_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/bulletin/query.proto package bulletin import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Query_Params_FullMethodName = "/sourcehub.bulletin.Query/Params" Query_Namespace_FullMethodName = "/sourcehub.bulletin.Query/Namespace" Query_Namespaces_FullMethodName = "/sourcehub.bulletin.Query/Namespaces" Query_NamespaceCollaborators_FullMethodName = "/sourcehub.bulletin.Query/NamespaceCollaborators" Query_NamespacePosts_FullMethodName = "/sourcehub.bulletin.Query/NamespacePosts" Query_Post_FullMethodName = "/sourcehub.bulletin.Query/Post" Query_Posts_FullMethodName = "/sourcehub.bulletin.Query/Posts" Query_IterateGlob_FullMethodName = "/sourcehub.bulletin.Query/IterateGlob" Query_BulletinPolicyId_FullMethodName = "/sourcehub.bulletin.Query/BulletinPolicyId" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Query defines the gRPC querier service. type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries a namespace based on the specified namespace id. Namespace(ctx context.Context, in *QueryNamespaceRequest, opts ...grpc.CallOption) (*QueryNamespaceResponse, error) // Queries all namespaces. Namespaces(ctx context.Context, in *QueryNamespacesRequest, opts ...grpc.CallOption) (*QueryNamespacesResponse, error) // Queries all namespace collaborators. NamespaceCollaborators(ctx context.Context, in *QueryNamespaceCollaboratorsRequest, opts ...grpc.CallOption) (*QueryNamespaceCollaboratorsResponse, error) // Queries all namespace posts. NamespacePosts(ctx context.Context, in *QueryNamespacePostsRequest, opts ...grpc.CallOption) (*QueryNamespacePostsResponse, error) // Queries a post based on the specified namespace and post id. Post(ctx context.Context, in *QueryPostRequest, opts ...grpc.CallOption) (*QueryPostResponse, error) // Queries all posts. Posts(ctx context.Context, in *QueryPostsRequest, opts ...grpc.CallOption) (*QueryPostsResponse, error) // Glob iteration over a namespace IterateGlob(ctx context.Context, in *QueryIterateGlobRequest, opts ...grpc.CallOption) (*QueryIterateGlobResponse, error) // Queries the bulletin module policy id. BulletinPolicyId(ctx context.Context, in *QueryBulletinPolicyIdRequest, opts ...grpc.CallOption) (*QueryBulletinPolicyIdResponse, error) } type queryClient struct { cc grpc.ClientConnInterface } func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Namespace(ctx context.Context, in *QueryNamespaceRequest, opts ...grpc.CallOption) (*QueryNamespaceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryNamespaceResponse) err := c.cc.Invoke(ctx, Query_Namespace_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Namespaces(ctx context.Context, in *QueryNamespacesRequest, opts ...grpc.CallOption) (*QueryNamespacesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryNamespacesResponse) err := c.cc.Invoke(ctx, Query_Namespaces_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) NamespaceCollaborators(ctx context.Context, in *QueryNamespaceCollaboratorsRequest, opts ...grpc.CallOption) (*QueryNamespaceCollaboratorsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryNamespaceCollaboratorsResponse) err := c.cc.Invoke(ctx, Query_NamespaceCollaborators_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) NamespacePosts(ctx context.Context, in *QueryNamespacePostsRequest, opts ...grpc.CallOption) (*QueryNamespacePostsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryNamespacePostsResponse) err := c.cc.Invoke(ctx, Query_NamespacePosts_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Post(ctx context.Context, in *QueryPostRequest, opts ...grpc.CallOption) (*QueryPostResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryPostResponse) err := c.cc.Invoke(ctx, Query_Post_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Posts(ctx context.Context, in *QueryPostsRequest, opts ...grpc.CallOption) (*QueryPostsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryPostsResponse) err := c.cc.Invoke(ctx, Query_Posts_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) IterateGlob(ctx context.Context, in *QueryIterateGlobRequest, opts ...grpc.CallOption) (*QueryIterateGlobResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryIterateGlobResponse) err := c.cc.Invoke(ctx, Query_IterateGlob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) BulletinPolicyId(ctx context.Context, in *QueryBulletinPolicyIdRequest, opts ...grpc.CallOption) (*QueryBulletinPolicyIdResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryBulletinPolicyIdResponse) err := c.cc.Invoke(ctx, Query_BulletinPolicyId_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility. // // Query defines the gRPC querier service. type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries a namespace based on the specified namespace id. Namespace(context.Context, *QueryNamespaceRequest) (*QueryNamespaceResponse, error) // Queries all namespaces. Namespaces(context.Context, *QueryNamespacesRequest) (*QueryNamespacesResponse, error) // Queries all namespace collaborators. NamespaceCollaborators(context.Context, *QueryNamespaceCollaboratorsRequest) (*QueryNamespaceCollaboratorsResponse, error) // Queries all namespace posts. NamespacePosts(context.Context, *QueryNamespacePostsRequest) (*QueryNamespacePostsResponse, error) // Queries a post based on the specified namespace and post id. Post(context.Context, *QueryPostRequest) (*QueryPostResponse, error) // Queries all posts. Posts(context.Context, *QueryPostsRequest) (*QueryPostsResponse, error) // Glob iteration over a namespace IterateGlob(context.Context, *QueryIterateGlobRequest) (*QueryIterateGlobResponse, error) // Queries the bulletin module policy id. BulletinPolicyId(context.Context, *QueryBulletinPolicyIdRequest) (*QueryBulletinPolicyIdResponse, error) mustEmbedUnimplementedQueryServer() } // UnimplementedQueryServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } func (UnimplementedQueryServer) Namespace(context.Context, *QueryNamespaceRequest) (*QueryNamespaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Namespace not implemented") } func (UnimplementedQueryServer) Namespaces(context.Context, *QueryNamespacesRequest) (*QueryNamespacesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Namespaces not implemented") } func (UnimplementedQueryServer) NamespaceCollaborators(context.Context, *QueryNamespaceCollaboratorsRequest) (*QueryNamespaceCollaboratorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NamespaceCollaborators not implemented") } func (UnimplementedQueryServer) NamespacePosts(context.Context, *QueryNamespacePostsRequest) (*QueryNamespacePostsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NamespacePosts not implemented") } func (UnimplementedQueryServer) Post(context.Context, *QueryPostRequest) (*QueryPostResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Post not implemented") } func (UnimplementedQueryServer) Posts(context.Context, *QueryPostsRequest) (*QueryPostsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Posts not implemented") } func (UnimplementedQueryServer) IterateGlob(context.Context, *QueryIterateGlobRequest) (*QueryIterateGlobResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IterateGlob not implemented") } func (UnimplementedQueryServer) BulletinPolicyId(context.Context, *QueryBulletinPolicyIdRequest) (*QueryBulletinPolicyIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BulletinPolicyId not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will // result in compilation errors. type UnsafeQueryServer interface { mustEmbedUnimplementedQueryServer() } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { // If the following call pancis, it indicates UnimplementedQueryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Query_Params_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Namespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespaceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Namespace(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Namespace_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Namespace(ctx, req.(*QueryNamespaceRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Namespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespacesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Namespaces(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Namespaces_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Namespaces(ctx, req.(*QueryNamespacesRequest)) } return interceptor(ctx, in, info, handler) } func _Query_NamespaceCollaborators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespaceCollaboratorsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).NamespaceCollaborators(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_NamespaceCollaborators_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).NamespaceCollaborators(ctx, req.(*QueryNamespaceCollaboratorsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_NamespacePosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespacePostsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).NamespacePosts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_NamespacePosts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).NamespacePosts(ctx, req.(*QueryNamespacePostsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Post_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPostRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Post(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Post_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Post(ctx, req.(*QueryPostRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Posts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPostsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Posts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Posts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Posts(ctx, req.(*QueryPostsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_IterateGlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryIterateGlobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).IterateGlob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_IterateGlob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).IterateGlob(ctx, req.(*QueryIterateGlobRequest)) } return interceptor(ctx, in, info, handler) } func _Query_BulletinPolicyId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryBulletinPolicyIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).BulletinPolicyId(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_BulletinPolicyId_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).BulletinPolicyId(ctx, req.(*QueryBulletinPolicyIdRequest)) } return interceptor(ctx, in, info, handler) } // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.bulletin.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, { MethodName: "Namespace", Handler: _Query_Namespace_Handler, }, { MethodName: "Namespaces", Handler: _Query_Namespaces_Handler, }, { MethodName: "NamespaceCollaborators", Handler: _Query_NamespaceCollaborators_Handler, }, { MethodName: "NamespacePosts", Handler: _Query_NamespacePosts_Handler, }, { MethodName: "Post", Handler: _Query_Post_Handler, }, { MethodName: "Posts", Handler: _Query_Posts_Handler, }, { MethodName: "IterateGlob", Handler: _Query_IterateGlob_Handler, }, { MethodName: "BulletinPolicyId", Handler: _Query_BulletinPolicyId_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/bulletin/query.proto", } ================================================ FILE: api/sourcehub/bulletin/tx.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package bulletin import ( _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_authority protoreflect.FieldDescriptor fd_MsgUpdateParams_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgUpdateParams = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgUpdateParams") fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) type fastReflection_MsgUpdateParams MsgUpdateParams func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(x) } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} type fastReflection_MsgUpdateParams_messageType struct{} func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(nil) } func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParams_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParams)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_MsgUpdateParams_authority, value) { return } } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_MsgUpdateParams_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgUpdateParams.authority": return x.Authority != "" case "sourcehub.bulletin.MsgUpdateParams.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgUpdateParams.authority": x.Authority = "" case "sourcehub.bulletin.MsgUpdateParams.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgUpdateParams.authority": value := x.Authority return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgUpdateParams.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgUpdateParams.authority": x.Authority = value.Interface().(string) case "sourcehub.bulletin.MsgUpdateParams.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgUpdateParams.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.bulletin.MsgUpdateParams.authority": panic(fmt.Errorf("field authority of message sourcehub.bulletin.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParams does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgUpdateParams.authority": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgUpdateParams.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParams does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgUpdateParams", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParams) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateParamsResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgUpdateParamsResponse = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(x) } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} type fastReflection_MsgUpdateParamsResponse_messageType struct{} func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(nil) } func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCreatePost protoreflect.MessageDescriptor fd_MsgCreatePost_creator protoreflect.FieldDescriptor fd_MsgCreatePost_namespace protoreflect.FieldDescriptor fd_MsgCreatePost_payload protoreflect.FieldDescriptor fd_MsgCreatePost_artifact protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgCreatePost = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgCreatePost") fd_MsgCreatePost_creator = md_MsgCreatePost.Fields().ByName("creator") fd_MsgCreatePost_namespace = md_MsgCreatePost.Fields().ByName("namespace") fd_MsgCreatePost_payload = md_MsgCreatePost.Fields().ByName("payload") fd_MsgCreatePost_artifact = md_MsgCreatePost.Fields().ByName("artifact") } var _ protoreflect.Message = (*fastReflection_MsgCreatePost)(nil) type fastReflection_MsgCreatePost MsgCreatePost func (x *MsgCreatePost) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCreatePost)(x) } func (x *MsgCreatePost) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCreatePost_messageType fastReflection_MsgCreatePost_messageType var _ protoreflect.MessageType = fastReflection_MsgCreatePost_messageType{} type fastReflection_MsgCreatePost_messageType struct{} func (x fastReflection_MsgCreatePost_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCreatePost)(nil) } func (x fastReflection_MsgCreatePost_messageType) New() protoreflect.Message { return new(fastReflection_MsgCreatePost) } func (x fastReflection_MsgCreatePost_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePost } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCreatePost) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePost } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCreatePost) Type() protoreflect.MessageType { return _fastReflection_MsgCreatePost_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCreatePost) New() protoreflect.Message { return new(fastReflection_MsgCreatePost) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCreatePost) Interface() protoreflect.ProtoMessage { return (*MsgCreatePost)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCreatePost) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgCreatePost_creator, value) { return } } if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_MsgCreatePost_namespace, value) { return } } if len(x.Payload) != 0 { value := protoreflect.ValueOfBytes(x.Payload) if !f(fd_MsgCreatePost_payload, value) { return } } if x.Artifact != "" { value := protoreflect.ValueOfString(x.Artifact) if !f(fd_MsgCreatePost_artifact, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreatePost) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgCreatePost.creator": return x.Creator != "" case "sourcehub.bulletin.MsgCreatePost.namespace": return x.Namespace != "" case "sourcehub.bulletin.MsgCreatePost.payload": return len(x.Payload) != 0 case "sourcehub.bulletin.MsgCreatePost.artifact": return x.Artifact != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePost")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePost does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePost) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgCreatePost.creator": x.Creator = "" case "sourcehub.bulletin.MsgCreatePost.namespace": x.Namespace = "" case "sourcehub.bulletin.MsgCreatePost.payload": x.Payload = nil case "sourcehub.bulletin.MsgCreatePost.artifact": x.Artifact = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePost")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePost does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreatePost) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgCreatePost.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgCreatePost.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgCreatePost.payload": value := x.Payload return protoreflect.ValueOfBytes(value) case "sourcehub.bulletin.MsgCreatePost.artifact": value := x.Artifact return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePost")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePost does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePost) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgCreatePost.creator": x.Creator = value.Interface().(string) case "sourcehub.bulletin.MsgCreatePost.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.MsgCreatePost.payload": x.Payload = value.Bytes() case "sourcehub.bulletin.MsgCreatePost.artifact": x.Artifact = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePost")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePost does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePost) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgCreatePost.creator": panic(fmt.Errorf("field creator of message sourcehub.bulletin.MsgCreatePost is not mutable")) case "sourcehub.bulletin.MsgCreatePost.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.MsgCreatePost is not mutable")) case "sourcehub.bulletin.MsgCreatePost.payload": panic(fmt.Errorf("field payload of message sourcehub.bulletin.MsgCreatePost is not mutable")) case "sourcehub.bulletin.MsgCreatePost.artifact": panic(fmt.Errorf("field artifact of message sourcehub.bulletin.MsgCreatePost is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePost")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePost does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreatePost) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgCreatePost.creator": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgCreatePost.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgCreatePost.payload": return protoreflect.ValueOfBytes(nil) case "sourcehub.bulletin.MsgCreatePost.artifact": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePost")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePost does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCreatePost) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgCreatePost", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCreatePost) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePost) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCreatePost) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCreatePost) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCreatePost) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Payload) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Artifact) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePost) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Artifact) > 0 { i -= len(x.Artifact) copy(dAtA[i:], x.Artifact) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Artifact))) i-- dAtA[i] = 0x2a } if len(x.Payload) > 0 { i -= len(x.Payload) copy(dAtA[i:], x.Payload) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) i-- dAtA[i] = 0x1a } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePost) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePost: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePost: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Payload = append(x.Payload[:0], dAtA[iNdEx:postIndex]...) if x.Payload == nil { x.Payload = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Artifact = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCreatePostResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgCreatePostResponse = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgCreatePostResponse") } var _ protoreflect.Message = (*fastReflection_MsgCreatePostResponse)(nil) type fastReflection_MsgCreatePostResponse MsgCreatePostResponse func (x *MsgCreatePostResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCreatePostResponse)(x) } func (x *MsgCreatePostResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCreatePostResponse_messageType fastReflection_MsgCreatePostResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgCreatePostResponse_messageType{} type fastReflection_MsgCreatePostResponse_messageType struct{} func (x fastReflection_MsgCreatePostResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCreatePostResponse)(nil) } func (x fastReflection_MsgCreatePostResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgCreatePostResponse) } func (x fastReflection_MsgCreatePostResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePostResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCreatePostResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreatePostResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCreatePostResponse) Type() protoreflect.MessageType { return _fastReflection_MsgCreatePostResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCreatePostResponse) New() protoreflect.Message { return new(fastReflection_MsgCreatePostResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCreatePostResponse) Interface() protoreflect.ProtoMessage { return (*MsgCreatePostResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCreatePostResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreatePostResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePostResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePostResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePostResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreatePostResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePostResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePostResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePostResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePostResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePostResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreatePostResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgCreatePostResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgCreatePostResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCreatePostResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgCreatePostResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCreatePostResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreatePostResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCreatePostResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCreatePostResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCreatePostResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePostResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCreatePostResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePostResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePostResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRegisterNamespace protoreflect.MessageDescriptor fd_MsgRegisterNamespace_creator protoreflect.FieldDescriptor fd_MsgRegisterNamespace_namespace protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgRegisterNamespace = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgRegisterNamespace") fd_MsgRegisterNamespace_creator = md_MsgRegisterNamespace.Fields().ByName("creator") fd_MsgRegisterNamespace_namespace = md_MsgRegisterNamespace.Fields().ByName("namespace") } var _ protoreflect.Message = (*fastReflection_MsgRegisterNamespace)(nil) type fastReflection_MsgRegisterNamespace MsgRegisterNamespace func (x *MsgRegisterNamespace) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRegisterNamespace)(x) } func (x *MsgRegisterNamespace) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRegisterNamespace_messageType fastReflection_MsgRegisterNamespace_messageType var _ protoreflect.MessageType = fastReflection_MsgRegisterNamespace_messageType{} type fastReflection_MsgRegisterNamespace_messageType struct{} func (x fastReflection_MsgRegisterNamespace_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRegisterNamespace)(nil) } func (x fastReflection_MsgRegisterNamespace_messageType) New() protoreflect.Message { return new(fastReflection_MsgRegisterNamespace) } func (x fastReflection_MsgRegisterNamespace_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRegisterNamespace } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRegisterNamespace) Descriptor() protoreflect.MessageDescriptor { return md_MsgRegisterNamespace } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRegisterNamespace) Type() protoreflect.MessageType { return _fastReflection_MsgRegisterNamespace_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRegisterNamespace) New() protoreflect.Message { return new(fastReflection_MsgRegisterNamespace) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRegisterNamespace) Interface() protoreflect.ProtoMessage { return (*MsgRegisterNamespace)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRegisterNamespace) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgRegisterNamespace_creator, value) { return } } if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_MsgRegisterNamespace_namespace, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRegisterNamespace) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespace.creator": return x.Creator != "" case "sourcehub.bulletin.MsgRegisterNamespace.namespace": return x.Namespace != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespace")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespace does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespace) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespace.creator": x.Creator = "" case "sourcehub.bulletin.MsgRegisterNamespace.namespace": x.Namespace = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespace")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespace does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRegisterNamespace) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgRegisterNamespace.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgRegisterNamespace.namespace": value := x.Namespace return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespace")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespace does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespace) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespace.creator": x.Creator = value.Interface().(string) case "sourcehub.bulletin.MsgRegisterNamespace.namespace": x.Namespace = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespace")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespace does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespace) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespace.creator": panic(fmt.Errorf("field creator of message sourcehub.bulletin.MsgRegisterNamespace is not mutable")) case "sourcehub.bulletin.MsgRegisterNamespace.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.MsgRegisterNamespace is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespace")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespace does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRegisterNamespace) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespace.creator": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgRegisterNamespace.namespace": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespace")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespace does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRegisterNamespace) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgRegisterNamespace", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRegisterNamespace) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespace) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRegisterNamespace) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRegisterNamespace) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRegisterNamespace) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRegisterNamespace) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRegisterNamespace) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterNamespace: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterNamespace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRegisterNamespaceResponse protoreflect.MessageDescriptor fd_MsgRegisterNamespaceResponse_namespace protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgRegisterNamespaceResponse = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgRegisterNamespaceResponse") fd_MsgRegisterNamespaceResponse_namespace = md_MsgRegisterNamespaceResponse.Fields().ByName("namespace") } var _ protoreflect.Message = (*fastReflection_MsgRegisterNamespaceResponse)(nil) type fastReflection_MsgRegisterNamespaceResponse MsgRegisterNamespaceResponse func (x *MsgRegisterNamespaceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRegisterNamespaceResponse)(x) } func (x *MsgRegisterNamespaceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRegisterNamespaceResponse_messageType fastReflection_MsgRegisterNamespaceResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgRegisterNamespaceResponse_messageType{} type fastReflection_MsgRegisterNamespaceResponse_messageType struct{} func (x fastReflection_MsgRegisterNamespaceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRegisterNamespaceResponse)(nil) } func (x fastReflection_MsgRegisterNamespaceResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgRegisterNamespaceResponse) } func (x fastReflection_MsgRegisterNamespaceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRegisterNamespaceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRegisterNamespaceResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgRegisterNamespaceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRegisterNamespaceResponse) Type() protoreflect.MessageType { return _fastReflection_MsgRegisterNamespaceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRegisterNamespaceResponse) New() protoreflect.Message { return new(fastReflection_MsgRegisterNamespaceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRegisterNamespaceResponse) Interface() protoreflect.ProtoMessage { return (*MsgRegisterNamespaceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRegisterNamespaceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Namespace != nil { value := protoreflect.ValueOfMessage(x.Namespace.ProtoReflect()) if !f(fd_MsgRegisterNamespaceResponse_namespace, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRegisterNamespaceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace": return x.Namespace != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespaceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespaceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace": x.Namespace = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespaceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRegisterNamespaceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace": value := x.Namespace return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespaceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespaceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace": x.Namespace = value.Message().Interface().(*Namespace) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespaceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespaceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace": if x.Namespace == nil { x.Namespace = new(Namespace) } return protoreflect.ValueOfMessage(x.Namespace.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespaceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRegisterNamespaceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace": m := new(Namespace) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRegisterNamespaceResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRegisterNamespaceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRegisterNamespaceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgRegisterNamespaceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRegisterNamespaceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterNamespaceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRegisterNamespaceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRegisterNamespaceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRegisterNamespaceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Namespace != nil { l = options.Size(x.Namespace) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRegisterNamespaceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Namespace != nil { encoded, err := options.Marshal(x.Namespace) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRegisterNamespaceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Namespace == nil { x.Namespace = &Namespace{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Namespace); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgAddCollaborator protoreflect.MessageDescriptor fd_MsgAddCollaborator_creator protoreflect.FieldDescriptor fd_MsgAddCollaborator_namespace protoreflect.FieldDescriptor fd_MsgAddCollaborator_collaborator protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgAddCollaborator = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgAddCollaborator") fd_MsgAddCollaborator_creator = md_MsgAddCollaborator.Fields().ByName("creator") fd_MsgAddCollaborator_namespace = md_MsgAddCollaborator.Fields().ByName("namespace") fd_MsgAddCollaborator_collaborator = md_MsgAddCollaborator.Fields().ByName("collaborator") } var _ protoreflect.Message = (*fastReflection_MsgAddCollaborator)(nil) type fastReflection_MsgAddCollaborator MsgAddCollaborator func (x *MsgAddCollaborator) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgAddCollaborator)(x) } func (x *MsgAddCollaborator) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgAddCollaborator_messageType fastReflection_MsgAddCollaborator_messageType var _ protoreflect.MessageType = fastReflection_MsgAddCollaborator_messageType{} type fastReflection_MsgAddCollaborator_messageType struct{} func (x fastReflection_MsgAddCollaborator_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgAddCollaborator)(nil) } func (x fastReflection_MsgAddCollaborator_messageType) New() protoreflect.Message { return new(fastReflection_MsgAddCollaborator) } func (x fastReflection_MsgAddCollaborator_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddCollaborator } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgAddCollaborator) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddCollaborator } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgAddCollaborator) Type() protoreflect.MessageType { return _fastReflection_MsgAddCollaborator_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgAddCollaborator) New() protoreflect.Message { return new(fastReflection_MsgAddCollaborator) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgAddCollaborator) Interface() protoreflect.ProtoMessage { return (*MsgAddCollaborator)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgAddCollaborator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgAddCollaborator_creator, value) { return } } if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_MsgAddCollaborator_namespace, value) { return } } if x.Collaborator != "" { value := protoreflect.ValueOfString(x.Collaborator) if !f(fd_MsgAddCollaborator_collaborator, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgAddCollaborator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaborator.creator": return x.Creator != "" case "sourcehub.bulletin.MsgAddCollaborator.namespace": return x.Namespace != "" case "sourcehub.bulletin.MsgAddCollaborator.collaborator": return x.Collaborator != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaborator does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaborator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaborator.creator": x.Creator = "" case "sourcehub.bulletin.MsgAddCollaborator.namespace": x.Namespace = "" case "sourcehub.bulletin.MsgAddCollaborator.collaborator": x.Collaborator = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaborator does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgAddCollaborator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgAddCollaborator.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgAddCollaborator.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgAddCollaborator.collaborator": value := x.Collaborator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaborator does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaborator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaborator.creator": x.Creator = value.Interface().(string) case "sourcehub.bulletin.MsgAddCollaborator.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.MsgAddCollaborator.collaborator": x.Collaborator = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaborator does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaborator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaborator.creator": panic(fmt.Errorf("field creator of message sourcehub.bulletin.MsgAddCollaborator is not mutable")) case "sourcehub.bulletin.MsgAddCollaborator.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.MsgAddCollaborator is not mutable")) case "sourcehub.bulletin.MsgAddCollaborator.collaborator": panic(fmt.Errorf("field collaborator of message sourcehub.bulletin.MsgAddCollaborator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaborator does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgAddCollaborator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaborator.creator": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgAddCollaborator.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgAddCollaborator.collaborator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaborator does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgAddCollaborator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgAddCollaborator", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgAddCollaborator) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaborator) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgAddCollaborator) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgAddCollaborator) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgAddCollaborator) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Collaborator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgAddCollaborator) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Collaborator) > 0 { i -= len(x.Collaborator) copy(dAtA[i:], x.Collaborator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Collaborator))) i-- dAtA[i] = 0x1a } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgAddCollaborator) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddCollaborator: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddCollaborator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Collaborator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Collaborator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgAddCollaboratorResponse protoreflect.MessageDescriptor fd_MsgAddCollaboratorResponse_collaborator_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgAddCollaboratorResponse = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgAddCollaboratorResponse") fd_MsgAddCollaboratorResponse_collaborator_did = md_MsgAddCollaboratorResponse.Fields().ByName("collaborator_did") } var _ protoreflect.Message = (*fastReflection_MsgAddCollaboratorResponse)(nil) type fastReflection_MsgAddCollaboratorResponse MsgAddCollaboratorResponse func (x *MsgAddCollaboratorResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgAddCollaboratorResponse)(x) } func (x *MsgAddCollaboratorResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgAddCollaboratorResponse_messageType fastReflection_MsgAddCollaboratorResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgAddCollaboratorResponse_messageType{} type fastReflection_MsgAddCollaboratorResponse_messageType struct{} func (x fastReflection_MsgAddCollaboratorResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgAddCollaboratorResponse)(nil) } func (x fastReflection_MsgAddCollaboratorResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgAddCollaboratorResponse) } func (x fastReflection_MsgAddCollaboratorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddCollaboratorResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgAddCollaboratorResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddCollaboratorResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgAddCollaboratorResponse) Type() protoreflect.MessageType { return _fastReflection_MsgAddCollaboratorResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgAddCollaboratorResponse) New() protoreflect.Message { return new(fastReflection_MsgAddCollaboratorResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgAddCollaboratorResponse) Interface() protoreflect.ProtoMessage { return (*MsgAddCollaboratorResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgAddCollaboratorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.CollaboratorDid != "" { value := protoreflect.ValueOfString(x.CollaboratorDid) if !f(fd_MsgAddCollaboratorResponse_collaborator_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgAddCollaboratorResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaboratorResponse.collaborator_did": return x.CollaboratorDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaboratorResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaboratorResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaboratorResponse.collaborator_did": x.CollaboratorDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaboratorResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgAddCollaboratorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgAddCollaboratorResponse.collaborator_did": value := x.CollaboratorDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaboratorResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaboratorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaboratorResponse.collaborator_did": x.CollaboratorDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaboratorResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaboratorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaboratorResponse.collaborator_did": panic(fmt.Errorf("field collaborator_did of message sourcehub.bulletin.MsgAddCollaboratorResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaboratorResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgAddCollaboratorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgAddCollaboratorResponse.collaborator_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgAddCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgAddCollaboratorResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgAddCollaboratorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgAddCollaboratorResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgAddCollaboratorResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddCollaboratorResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgAddCollaboratorResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgAddCollaboratorResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgAddCollaboratorResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.CollaboratorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgAddCollaboratorResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.CollaboratorDid) > 0 { i -= len(x.CollaboratorDid) copy(dAtA[i:], x.CollaboratorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CollaboratorDid))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgAddCollaboratorResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddCollaboratorResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddCollaboratorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.CollaboratorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRemoveCollaborator protoreflect.MessageDescriptor fd_MsgRemoveCollaborator_creator protoreflect.FieldDescriptor fd_MsgRemoveCollaborator_namespace protoreflect.FieldDescriptor fd_MsgRemoveCollaborator_collaborator protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgRemoveCollaborator = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgRemoveCollaborator") fd_MsgRemoveCollaborator_creator = md_MsgRemoveCollaborator.Fields().ByName("creator") fd_MsgRemoveCollaborator_namespace = md_MsgRemoveCollaborator.Fields().ByName("namespace") fd_MsgRemoveCollaborator_collaborator = md_MsgRemoveCollaborator.Fields().ByName("collaborator") } var _ protoreflect.Message = (*fastReflection_MsgRemoveCollaborator)(nil) type fastReflection_MsgRemoveCollaborator MsgRemoveCollaborator func (x *MsgRemoveCollaborator) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRemoveCollaborator)(x) } func (x *MsgRemoveCollaborator) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRemoveCollaborator_messageType fastReflection_MsgRemoveCollaborator_messageType var _ protoreflect.MessageType = fastReflection_MsgRemoveCollaborator_messageType{} type fastReflection_MsgRemoveCollaborator_messageType struct{} func (x fastReflection_MsgRemoveCollaborator_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRemoveCollaborator)(nil) } func (x fastReflection_MsgRemoveCollaborator_messageType) New() protoreflect.Message { return new(fastReflection_MsgRemoveCollaborator) } func (x fastReflection_MsgRemoveCollaborator_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveCollaborator } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRemoveCollaborator) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveCollaborator } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRemoveCollaborator) Type() protoreflect.MessageType { return _fastReflection_MsgRemoveCollaborator_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRemoveCollaborator) New() protoreflect.Message { return new(fastReflection_MsgRemoveCollaborator) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRemoveCollaborator) Interface() protoreflect.ProtoMessage { return (*MsgRemoveCollaborator)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRemoveCollaborator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgRemoveCollaborator_creator, value) { return } } if x.Namespace != "" { value := protoreflect.ValueOfString(x.Namespace) if !f(fd_MsgRemoveCollaborator_namespace, value) { return } } if x.Collaborator != "" { value := protoreflect.ValueOfString(x.Collaborator) if !f(fd_MsgRemoveCollaborator_collaborator, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRemoveCollaborator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaborator.creator": return x.Creator != "" case "sourcehub.bulletin.MsgRemoveCollaborator.namespace": return x.Namespace != "" case "sourcehub.bulletin.MsgRemoveCollaborator.collaborator": return x.Collaborator != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaborator does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaborator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaborator.creator": x.Creator = "" case "sourcehub.bulletin.MsgRemoveCollaborator.namespace": x.Namespace = "" case "sourcehub.bulletin.MsgRemoveCollaborator.collaborator": x.Collaborator = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaborator does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRemoveCollaborator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgRemoveCollaborator.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgRemoveCollaborator.namespace": value := x.Namespace return protoreflect.ValueOfString(value) case "sourcehub.bulletin.MsgRemoveCollaborator.collaborator": value := x.Collaborator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaborator does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaborator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaborator.creator": x.Creator = value.Interface().(string) case "sourcehub.bulletin.MsgRemoveCollaborator.namespace": x.Namespace = value.Interface().(string) case "sourcehub.bulletin.MsgRemoveCollaborator.collaborator": x.Collaborator = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaborator does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaborator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaborator.creator": panic(fmt.Errorf("field creator of message sourcehub.bulletin.MsgRemoveCollaborator is not mutable")) case "sourcehub.bulletin.MsgRemoveCollaborator.namespace": panic(fmt.Errorf("field namespace of message sourcehub.bulletin.MsgRemoveCollaborator is not mutable")) case "sourcehub.bulletin.MsgRemoveCollaborator.collaborator": panic(fmt.Errorf("field collaborator of message sourcehub.bulletin.MsgRemoveCollaborator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaborator does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRemoveCollaborator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaborator.creator": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgRemoveCollaborator.namespace": return protoreflect.ValueOfString("") case "sourcehub.bulletin.MsgRemoveCollaborator.collaborator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaborator")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaborator does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRemoveCollaborator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgRemoveCollaborator", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRemoveCollaborator) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaborator) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRemoveCollaborator) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRemoveCollaborator) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRemoveCollaborator) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Namespace) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Collaborator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveCollaborator) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Collaborator) > 0 { i -= len(x.Collaborator) copy(dAtA[i:], x.Collaborator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Collaborator))) i-- dAtA[i] = 0x1a } if len(x.Namespace) > 0 { i -= len(x.Namespace) copy(dAtA[i:], x.Namespace) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Namespace))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveCollaborator) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveCollaborator: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveCollaborator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Collaborator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Collaborator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRemoveCollaboratorResponse protoreflect.MessageDescriptor fd_MsgRemoveCollaboratorResponse_collaborator_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_bulletin_tx_proto_init() md_MsgRemoveCollaboratorResponse = File_sourcehub_bulletin_tx_proto.Messages().ByName("MsgRemoveCollaboratorResponse") fd_MsgRemoveCollaboratorResponse_collaborator_did = md_MsgRemoveCollaboratorResponse.Fields().ByName("collaborator_did") } var _ protoreflect.Message = (*fastReflection_MsgRemoveCollaboratorResponse)(nil) type fastReflection_MsgRemoveCollaboratorResponse MsgRemoveCollaboratorResponse func (x *MsgRemoveCollaboratorResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRemoveCollaboratorResponse)(x) } func (x *MsgRemoveCollaboratorResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRemoveCollaboratorResponse_messageType fastReflection_MsgRemoveCollaboratorResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgRemoveCollaboratorResponse_messageType{} type fastReflection_MsgRemoveCollaboratorResponse_messageType struct{} func (x fastReflection_MsgRemoveCollaboratorResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRemoveCollaboratorResponse)(nil) } func (x fastReflection_MsgRemoveCollaboratorResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgRemoveCollaboratorResponse) } func (x fastReflection_MsgRemoveCollaboratorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveCollaboratorResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRemoveCollaboratorResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveCollaboratorResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRemoveCollaboratorResponse) Type() protoreflect.MessageType { return _fastReflection_MsgRemoveCollaboratorResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRemoveCollaboratorResponse) New() protoreflect.Message { return new(fastReflection_MsgRemoveCollaboratorResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRemoveCollaboratorResponse) Interface() protoreflect.ProtoMessage { return (*MsgRemoveCollaboratorResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRemoveCollaboratorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.CollaboratorDid != "" { value := protoreflect.ValueOfString(x.CollaboratorDid) if !f(fd_MsgRemoveCollaboratorResponse_collaborator_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRemoveCollaboratorResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaboratorResponse.collaborator_did": return x.CollaboratorDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaboratorResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaboratorResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaboratorResponse.collaborator_did": x.CollaboratorDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaboratorResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRemoveCollaboratorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.bulletin.MsgRemoveCollaboratorResponse.collaborator_did": value := x.CollaboratorDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaboratorResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaboratorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaboratorResponse.collaborator_did": x.CollaboratorDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaboratorResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaboratorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaboratorResponse.collaborator_did": panic(fmt.Errorf("field collaborator_did of message sourcehub.bulletin.MsgRemoveCollaboratorResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaboratorResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRemoveCollaboratorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.bulletin.MsgRemoveCollaboratorResponse.collaborator_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.bulletin.MsgRemoveCollaboratorResponse")) } panic(fmt.Errorf("message sourcehub.bulletin.MsgRemoveCollaboratorResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRemoveCollaboratorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.bulletin.MsgRemoveCollaboratorResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRemoveCollaboratorResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveCollaboratorResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRemoveCollaboratorResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRemoveCollaboratorResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRemoveCollaboratorResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.CollaboratorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveCollaboratorResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.CollaboratorDid) > 0 { i -= len(x.CollaboratorDid) copy(dAtA[i:], x.CollaboratorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CollaboratorDid))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveCollaboratorResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveCollaboratorResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveCollaboratorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.CollaboratorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/bulletin/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // MsgUpdateParams is the Msg/UpdateParams request type. type MsgUpdateParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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"` // NOTE: All parameters must be supplied. Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgUpdateParams) GetAuthority() string { if x != nil { return x.Authority } return "" } func (x *MsgUpdateParams) GetParams() *Params { if x != nil { return x.Params } return nil } // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. type MsgUpdateParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{1} } type MsgCreatePost struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` Artifact string `protobuf:"bytes,5,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (x *MsgCreatePost) Reset() { *x = MsgCreatePost{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCreatePost) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCreatePost) ProtoMessage() {} // Deprecated: Use MsgCreatePost.ProtoReflect.Descriptor instead. func (*MsgCreatePost) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgCreatePost) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgCreatePost) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *MsgCreatePost) GetPayload() []byte { if x != nil { return x.Payload } return nil } func (x *MsgCreatePost) GetArtifact() string { if x != nil { return x.Artifact } return "" } type MsgCreatePostResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgCreatePostResponse) Reset() { *x = MsgCreatePostResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCreatePostResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCreatePostResponse) ProtoMessage() {} // Deprecated: Use MsgCreatePostResponse.ProtoReflect.Descriptor instead. func (*MsgCreatePostResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{3} } type MsgRegisterNamespace struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (x *MsgRegisterNamespace) Reset() { *x = MsgRegisterNamespace{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRegisterNamespace) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRegisterNamespace) ProtoMessage() {} // Deprecated: Use MsgRegisterNamespace.ProtoReflect.Descriptor instead. func (*MsgRegisterNamespace) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgRegisterNamespace) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgRegisterNamespace) GetNamespace() string { if x != nil { return x.Namespace } return "" } type MsgRegisterNamespaceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (x *MsgRegisterNamespaceResponse) Reset() { *x = MsgRegisterNamespaceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRegisterNamespaceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRegisterNamespaceResponse) ProtoMessage() {} // Deprecated: Use MsgRegisterNamespaceResponse.ProtoReflect.Descriptor instead. func (*MsgRegisterNamespaceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{5} } func (x *MsgRegisterNamespaceResponse) GetNamespace() *Namespace { if x != nil { return x.Namespace } return nil } type MsgAddCollaborator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Collaborator string `protobuf:"bytes,3,opt,name=collaborator,proto3" json:"collaborator,omitempty"` } func (x *MsgAddCollaborator) Reset() { *x = MsgAddCollaborator{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgAddCollaborator) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgAddCollaborator) ProtoMessage() {} // Deprecated: Use MsgAddCollaborator.ProtoReflect.Descriptor instead. func (*MsgAddCollaborator) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgAddCollaborator) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgAddCollaborator) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *MsgAddCollaborator) GetCollaborator() string { if x != nil { return x.Collaborator } return "" } type MsgAddCollaboratorResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollaboratorDid string `protobuf:"bytes,1,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` } func (x *MsgAddCollaboratorResponse) Reset() { *x = MsgAddCollaboratorResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgAddCollaboratorResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgAddCollaboratorResponse) ProtoMessage() {} // Deprecated: Use MsgAddCollaboratorResponse.ProtoReflect.Descriptor instead. func (*MsgAddCollaboratorResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{7} } func (x *MsgAddCollaboratorResponse) GetCollaboratorDid() string { if x != nil { return x.CollaboratorDid } return "" } type MsgRemoveCollaborator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Collaborator string `protobuf:"bytes,3,opt,name=collaborator,proto3" json:"collaborator,omitempty"` } func (x *MsgRemoveCollaborator) Reset() { *x = MsgRemoveCollaborator{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRemoveCollaborator) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRemoveCollaborator) ProtoMessage() {} // Deprecated: Use MsgRemoveCollaborator.ProtoReflect.Descriptor instead. func (*MsgRemoveCollaborator) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgRemoveCollaborator) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgRemoveCollaborator) GetNamespace() string { if x != nil { return x.Namespace } return "" } func (x *MsgRemoveCollaborator) GetCollaborator() string { if x != nil { return x.Collaborator } return "" } type MsgRemoveCollaboratorResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollaboratorDid string `protobuf:"bytes,1,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` } func (x *MsgRemoveCollaboratorResponse) Reset() { *x = MsgRemoveCollaboratorResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_bulletin_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRemoveCollaboratorResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRemoveCollaboratorResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveCollaboratorResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveCollaboratorResponse) Descriptor() ([]byte, []int) { return file_sourcehub_bulletin_tx_proto_rawDescGZIP(), []int{9} } func (x *MsgRemoveCollaboratorResponse) GetCollaboratorDid() string { if x != nil { return x.CollaboratorDid } return "" } var File_sourcehub_bulletin_tx_proto protoreflect.FileDescriptor var file_sourcehub_bulletin_tx_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x37, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x5b, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x7e, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4a, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x32, 0x9a, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x60, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x53, 0x42, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xca, 0x02, 0x12, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0xe2, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_bulletin_tx_proto_rawDescOnce sync.Once file_sourcehub_bulletin_tx_proto_rawDescData = file_sourcehub_bulletin_tx_proto_rawDesc ) func file_sourcehub_bulletin_tx_proto_rawDescGZIP() []byte { file_sourcehub_bulletin_tx_proto_rawDescOnce.Do(func() { file_sourcehub_bulletin_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_bulletin_tx_proto_rawDescData) }) return file_sourcehub_bulletin_tx_proto_rawDescData } var file_sourcehub_bulletin_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_sourcehub_bulletin_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: sourcehub.bulletin.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.bulletin.MsgUpdateParamsResponse (*MsgCreatePost)(nil), // 2: sourcehub.bulletin.MsgCreatePost (*MsgCreatePostResponse)(nil), // 3: sourcehub.bulletin.MsgCreatePostResponse (*MsgRegisterNamespace)(nil), // 4: sourcehub.bulletin.MsgRegisterNamespace (*MsgRegisterNamespaceResponse)(nil), // 5: sourcehub.bulletin.MsgRegisterNamespaceResponse (*MsgAddCollaborator)(nil), // 6: sourcehub.bulletin.MsgAddCollaborator (*MsgAddCollaboratorResponse)(nil), // 7: sourcehub.bulletin.MsgAddCollaboratorResponse (*MsgRemoveCollaborator)(nil), // 8: sourcehub.bulletin.MsgRemoveCollaborator (*MsgRemoveCollaboratorResponse)(nil), // 9: sourcehub.bulletin.MsgRemoveCollaboratorResponse (*Params)(nil), // 10: sourcehub.bulletin.Params (*Namespace)(nil), // 11: sourcehub.bulletin.Namespace } var file_sourcehub_bulletin_tx_proto_depIdxs = []int32{ 10, // 0: sourcehub.bulletin.MsgUpdateParams.params:type_name -> sourcehub.bulletin.Params 11, // 1: sourcehub.bulletin.MsgRegisterNamespaceResponse.namespace:type_name -> sourcehub.bulletin.Namespace 0, // 2: sourcehub.bulletin.Msg.UpdateParams:input_type -> sourcehub.bulletin.MsgUpdateParams 2, // 3: sourcehub.bulletin.Msg.CreatePost:input_type -> sourcehub.bulletin.MsgCreatePost 4, // 4: sourcehub.bulletin.Msg.RegisterNamespace:input_type -> sourcehub.bulletin.MsgRegisterNamespace 6, // 5: sourcehub.bulletin.Msg.AddCollaborator:input_type -> sourcehub.bulletin.MsgAddCollaborator 8, // 6: sourcehub.bulletin.Msg.RemoveCollaborator:input_type -> sourcehub.bulletin.MsgRemoveCollaborator 1, // 7: sourcehub.bulletin.Msg.UpdateParams:output_type -> sourcehub.bulletin.MsgUpdateParamsResponse 3, // 8: sourcehub.bulletin.Msg.CreatePost:output_type -> sourcehub.bulletin.MsgCreatePostResponse 5, // 9: sourcehub.bulletin.Msg.RegisterNamespace:output_type -> sourcehub.bulletin.MsgRegisterNamespaceResponse 7, // 10: sourcehub.bulletin.Msg.AddCollaborator:output_type -> sourcehub.bulletin.MsgAddCollaboratorResponse 9, // 11: sourcehub.bulletin.Msg.RemoveCollaborator:output_type -> sourcehub.bulletin.MsgRemoveCollaboratorResponse 7, // [7:12] is the sub-list for method output_type 2, // [2:7] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcehub_bulletin_tx_proto_init() } func file_sourcehub_bulletin_tx_proto_init() { if File_sourcehub_bulletin_tx_proto != nil { return } file_sourcehub_bulletin_params_proto_init() file_sourcehub_bulletin_namespace_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_bulletin_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreatePost); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreatePostResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterNamespace); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterNamespaceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAddCollaborator); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAddCollaboratorResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveCollaborator); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_bulletin_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveCollaboratorResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_bulletin_tx_proto_rawDesc, NumEnums: 0, NumMessages: 10, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_bulletin_tx_proto_goTypes, DependencyIndexes: file_sourcehub_bulletin_tx_proto_depIdxs, MessageInfos: file_sourcehub_bulletin_tx_proto_msgTypes, }.Build() File_sourcehub_bulletin_tx_proto = out.File file_sourcehub_bulletin_tx_proto_rawDesc = nil file_sourcehub_bulletin_tx_proto_goTypes = nil file_sourcehub_bulletin_tx_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/bulletin/tx_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/bulletin/tx.proto package bulletin import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Msg_UpdateParams_FullMethodName = "/sourcehub.bulletin.Msg/UpdateParams" Msg_CreatePost_FullMethodName = "/sourcehub.bulletin.Msg/CreatePost" Msg_RegisterNamespace_FullMethodName = "/sourcehub.bulletin.Msg/RegisterNamespace" Msg_AddCollaborator_FullMethodName = "/sourcehub.bulletin.Msg/AddCollaborator" Msg_RemoveCollaborator_FullMethodName = "/sourcehub.bulletin.Msg/RemoveCollaborator" ) // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Msg defines the Msg service. 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) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, error) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(ctx context.Context, in *MsgRemoveCollaborator, opts ...grpc.CallOption) (*MsgRemoveCollaboratorResponse, error) } type msgClient struct { cc grpc.ClientConnInterface } func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgCreatePostResponse) err := c.cc.Invoke(ctx, Msg_CreatePost_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgRegisterNamespaceResponse) err := c.cc.Invoke(ctx, Msg_RegisterNamespace_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgAddCollaboratorResponse) err := c.cc.Invoke(ctx, Msg_AddCollaborator_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RemoveCollaborator(ctx context.Context, in *MsgRemoveCollaborator, opts ...grpc.CallOption) (*MsgRemoveCollaboratorResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgRemoveCollaboratorResponse) err := c.cc.Invoke(ctx, Msg_RemoveCollaborator_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility. // // Msg defines the 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) CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error) RegisterNamespace(context.Context, *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) AddCollaborator(context.Context, *MsgAddCollaborator) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(context.Context, *MsgRemoveCollaborator) (*MsgRemoveCollaboratorResponse, error) mustEmbedUnimplementedMsgServer() } // UnimplementedMsgServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMsgServer struct{} func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } func (UnimplementedMsgServer) CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePost not implemented") } func (UnimplementedMsgServer) RegisterNamespace(context.Context, *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNamespace not implemented") } func (UnimplementedMsgServer) AddCollaborator(context.Context, *MsgAddCollaborator) (*MsgAddCollaboratorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddCollaborator not implemented") } func (UnimplementedMsgServer) RemoveCollaborator(context.Context, *MsgRemoveCollaborator) (*MsgRemoveCollaboratorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveCollaborator not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will // result in compilation errors. type UnsafeMsgServer interface { mustEmbedUnimplementedMsgServer() } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { // If the following call pancis, it indicates UnimplementedMsgServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Msg_UpdateParams_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_CreatePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreatePost) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CreatePost(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_CreatePost_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreatePost(ctx, req.(*MsgCreatePost)) } return interceptor(ctx, in, info, handler) } func _Msg_RegisterNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRegisterNamespace) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RegisterNamespace(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_RegisterNamespace_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RegisterNamespace(ctx, req.(*MsgRegisterNamespace)) } return interceptor(ctx, in, info, handler) } func _Msg_AddCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAddCollaborator) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).AddCollaborator(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_AddCollaborator_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AddCollaborator(ctx, req.(*MsgAddCollaborator)) } return interceptor(ctx, in, info, handler) } func _Msg_RemoveCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveCollaborator) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RemoveCollaborator(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_RemoveCollaborator_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RemoveCollaborator(ctx, req.(*MsgRemoveCollaborator)) } return interceptor(ctx, in, info, handler) } // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.bulletin.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "CreatePost", Handler: _Msg_CreatePost_Handler, }, { MethodName: "RegisterNamespace", Handler: _Msg_RegisterNamespace_Handler, }, { MethodName: "AddCollaborator", Handler: _Msg_AddCollaborator_Handler, }, { MethodName: "RemoveCollaborator", Handler: _Msg_RemoveCollaborator_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/bulletin/tx.proto", } ================================================ FILE: api/sourcehub/faucet/faucet.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package faucet import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_FaucetRequestRecord protoreflect.MessageDescriptor fd_FaucetRequestRecord_address protoreflect.FieldDescriptor fd_FaucetRequestRecord_amount protoreflect.FieldDescriptor fd_FaucetRequestRecord_tx_hash protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_FaucetRequestRecord = File_sourcehub_faucet_faucet_proto.Messages().ByName("FaucetRequestRecord") fd_FaucetRequestRecord_address = md_FaucetRequestRecord.Fields().ByName("address") fd_FaucetRequestRecord_amount = md_FaucetRequestRecord.Fields().ByName("amount") fd_FaucetRequestRecord_tx_hash = md_FaucetRequestRecord.Fields().ByName("tx_hash") } var _ protoreflect.Message = (*fastReflection_FaucetRequestRecord)(nil) type fastReflection_FaucetRequestRecord FaucetRequestRecord func (x *FaucetRequestRecord) ProtoReflect() protoreflect.Message { return (*fastReflection_FaucetRequestRecord)(x) } func (x *FaucetRequestRecord) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FaucetRequestRecord_messageType fastReflection_FaucetRequestRecord_messageType var _ protoreflect.MessageType = fastReflection_FaucetRequestRecord_messageType{} type fastReflection_FaucetRequestRecord_messageType struct{} func (x fastReflection_FaucetRequestRecord_messageType) Zero() protoreflect.Message { return (*fastReflection_FaucetRequestRecord)(nil) } func (x fastReflection_FaucetRequestRecord_messageType) New() protoreflect.Message { return new(fastReflection_FaucetRequestRecord) } func (x fastReflection_FaucetRequestRecord_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FaucetRequestRecord } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FaucetRequestRecord) Descriptor() protoreflect.MessageDescriptor { return md_FaucetRequestRecord } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FaucetRequestRecord) Type() protoreflect.MessageType { return _fastReflection_FaucetRequestRecord_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FaucetRequestRecord) New() protoreflect.Message { return new(fastReflection_FaucetRequestRecord) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FaucetRequestRecord) Interface() protoreflect.ProtoMessage { return (*FaucetRequestRecord)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FaucetRequestRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_FaucetRequestRecord_address, value) { return } } if x.Amount != nil { value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) if !f(fd_FaucetRequestRecord_amount, value) { return } } if x.TxHash != "" { value := protoreflect.ValueOfString(x.TxHash) if !f(fd_FaucetRequestRecord_tx_hash, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FaucetRequestRecord) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.FaucetRequestRecord.address": return x.Address != "" case "sourcehub.faucet.FaucetRequestRecord.amount": return x.Amount != nil case "sourcehub.faucet.FaucetRequestRecord.tx_hash": return x.TxHash != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequestRecord")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequestRecord does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequestRecord) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.FaucetRequestRecord.address": x.Address = "" case "sourcehub.faucet.FaucetRequestRecord.amount": x.Amount = nil case "sourcehub.faucet.FaucetRequestRecord.tx_hash": x.TxHash = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequestRecord")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequestRecord does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FaucetRequestRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.FaucetRequestRecord.address": value := x.Address return protoreflect.ValueOfString(value) case "sourcehub.faucet.FaucetRequestRecord.amount": value := x.Amount return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.faucet.FaucetRequestRecord.tx_hash": value := x.TxHash return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequestRecord")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequestRecord does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequestRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.FaucetRequestRecord.address": x.Address = value.Interface().(string) case "sourcehub.faucet.FaucetRequestRecord.amount": x.Amount = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.faucet.FaucetRequestRecord.tx_hash": x.TxHash = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequestRecord")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequestRecord does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequestRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetRequestRecord.amount": if x.Amount == nil { x.Amount = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) case "sourcehub.faucet.FaucetRequestRecord.address": panic(fmt.Errorf("field address of message sourcehub.faucet.FaucetRequestRecord is not mutable")) case "sourcehub.faucet.FaucetRequestRecord.tx_hash": panic(fmt.Errorf("field tx_hash of message sourcehub.faucet.FaucetRequestRecord is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequestRecord")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequestRecord does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FaucetRequestRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetRequestRecord.address": return protoreflect.ValueOfString("") case "sourcehub.faucet.FaucetRequestRecord.amount": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.faucet.FaucetRequestRecord.tx_hash": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequestRecord")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequestRecord does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FaucetRequestRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.FaucetRequestRecord", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FaucetRequestRecord) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequestRecord) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FaucetRequestRecord) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FaucetRequestRecord) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FaucetRequestRecord) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Amount != nil { l = options.Size(x.Amount) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.TxHash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FaucetRequestRecord) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.TxHash) > 0 { i -= len(x.TxHash) copy(dAtA[i:], x.TxHash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) i-- dAtA[i] = 0x1a } if x.Amount != nil { encoded, err := options.Marshal(x.Amount) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FaucetRequestRecord) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetRequestRecord: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetRequestRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Amount == nil { x.Amount = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_FaucetRequest protoreflect.MessageDescriptor fd_FaucetRequest_address protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_FaucetRequest = File_sourcehub_faucet_faucet_proto.Messages().ByName("FaucetRequest") fd_FaucetRequest_address = md_FaucetRequest.Fields().ByName("address") } var _ protoreflect.Message = (*fastReflection_FaucetRequest)(nil) type fastReflection_FaucetRequest FaucetRequest func (x *FaucetRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_FaucetRequest)(x) } func (x *FaucetRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FaucetRequest_messageType fastReflection_FaucetRequest_messageType var _ protoreflect.MessageType = fastReflection_FaucetRequest_messageType{} type fastReflection_FaucetRequest_messageType struct{} func (x fastReflection_FaucetRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_FaucetRequest)(nil) } func (x fastReflection_FaucetRequest_messageType) New() protoreflect.Message { return new(fastReflection_FaucetRequest) } func (x fastReflection_FaucetRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FaucetRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FaucetRequest) Descriptor() protoreflect.MessageDescriptor { return md_FaucetRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FaucetRequest) Type() protoreflect.MessageType { return _fastReflection_FaucetRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FaucetRequest) New() protoreflect.Message { return new(fastReflection_FaucetRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FaucetRequest) Interface() protoreflect.ProtoMessage { return (*FaucetRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FaucetRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_FaucetRequest_address, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FaucetRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.FaucetRequest.address": return x.Address != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequest")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.FaucetRequest.address": x.Address = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequest")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FaucetRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.FaucetRequest.address": value := x.Address return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequest")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.FaucetRequest.address": x.Address = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequest")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetRequest.address": panic(fmt.Errorf("field address of message sourcehub.faucet.FaucetRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequest")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FaucetRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetRequest.address": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetRequest")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FaucetRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.FaucetRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FaucetRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FaucetRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FaucetRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FaucetRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FaucetRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FaucetRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_FaucetResponse protoreflect.MessageDescriptor fd_FaucetResponse_txhash protoreflect.FieldDescriptor fd_FaucetResponse_code protoreflect.FieldDescriptor fd_FaucetResponse_raw_log protoreflect.FieldDescriptor fd_FaucetResponse_address protoreflect.FieldDescriptor fd_FaucetResponse_amount protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_FaucetResponse = File_sourcehub_faucet_faucet_proto.Messages().ByName("FaucetResponse") fd_FaucetResponse_txhash = md_FaucetResponse.Fields().ByName("txhash") fd_FaucetResponse_code = md_FaucetResponse.Fields().ByName("code") fd_FaucetResponse_raw_log = md_FaucetResponse.Fields().ByName("raw_log") fd_FaucetResponse_address = md_FaucetResponse.Fields().ByName("address") fd_FaucetResponse_amount = md_FaucetResponse.Fields().ByName("amount") } var _ protoreflect.Message = (*fastReflection_FaucetResponse)(nil) type fastReflection_FaucetResponse FaucetResponse func (x *FaucetResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_FaucetResponse)(x) } func (x *FaucetResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FaucetResponse_messageType fastReflection_FaucetResponse_messageType var _ protoreflect.MessageType = fastReflection_FaucetResponse_messageType{} type fastReflection_FaucetResponse_messageType struct{} func (x fastReflection_FaucetResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_FaucetResponse)(nil) } func (x fastReflection_FaucetResponse_messageType) New() protoreflect.Message { return new(fastReflection_FaucetResponse) } func (x fastReflection_FaucetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FaucetResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FaucetResponse) Descriptor() protoreflect.MessageDescriptor { return md_FaucetResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FaucetResponse) Type() protoreflect.MessageType { return _fastReflection_FaucetResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FaucetResponse) New() protoreflect.Message { return new(fastReflection_FaucetResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FaucetResponse) Interface() protoreflect.ProtoMessage { return (*FaucetResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FaucetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Txhash != "" { value := protoreflect.ValueOfString(x.Txhash) if !f(fd_FaucetResponse_txhash, value) { return } } if x.Code != uint32(0) { value := protoreflect.ValueOfUint32(x.Code) if !f(fd_FaucetResponse_code, value) { return } } if x.RawLog != "" { value := protoreflect.ValueOfString(x.RawLog) if !f(fd_FaucetResponse_raw_log, value) { return } } if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_FaucetResponse_address, value) { return } } if x.Amount != nil { value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) if !f(fd_FaucetResponse_amount, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FaucetResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.FaucetResponse.txhash": return x.Txhash != "" case "sourcehub.faucet.FaucetResponse.code": return x.Code != uint32(0) case "sourcehub.faucet.FaucetResponse.raw_log": return x.RawLog != "" case "sourcehub.faucet.FaucetResponse.address": return x.Address != "" case "sourcehub.faucet.FaucetResponse.amount": return x.Amount != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.FaucetResponse.txhash": x.Txhash = "" case "sourcehub.faucet.FaucetResponse.code": x.Code = uint32(0) case "sourcehub.faucet.FaucetResponse.raw_log": x.RawLog = "" case "sourcehub.faucet.FaucetResponse.address": x.Address = "" case "sourcehub.faucet.FaucetResponse.amount": x.Amount = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FaucetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.FaucetResponse.txhash": value := x.Txhash return protoreflect.ValueOfString(value) case "sourcehub.faucet.FaucetResponse.code": value := x.Code return protoreflect.ValueOfUint32(value) case "sourcehub.faucet.FaucetResponse.raw_log": value := x.RawLog return protoreflect.ValueOfString(value) case "sourcehub.faucet.FaucetResponse.address": value := x.Address return protoreflect.ValueOfString(value) case "sourcehub.faucet.FaucetResponse.amount": value := x.Amount return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.FaucetResponse.txhash": x.Txhash = value.Interface().(string) case "sourcehub.faucet.FaucetResponse.code": x.Code = uint32(value.Uint()) case "sourcehub.faucet.FaucetResponse.raw_log": x.RawLog = value.Interface().(string) case "sourcehub.faucet.FaucetResponse.address": x.Address = value.Interface().(string) case "sourcehub.faucet.FaucetResponse.amount": x.Amount = value.Message().Interface().(*v1beta1.Coin) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetResponse.amount": if x.Amount == nil { x.Amount = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) case "sourcehub.faucet.FaucetResponse.txhash": panic(fmt.Errorf("field txhash of message sourcehub.faucet.FaucetResponse is not mutable")) case "sourcehub.faucet.FaucetResponse.code": panic(fmt.Errorf("field code of message sourcehub.faucet.FaucetResponse is not mutable")) case "sourcehub.faucet.FaucetResponse.raw_log": panic(fmt.Errorf("field raw_log of message sourcehub.faucet.FaucetResponse is not mutable")) case "sourcehub.faucet.FaucetResponse.address": panic(fmt.Errorf("field address of message sourcehub.faucet.FaucetResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FaucetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetResponse.txhash": return protoreflect.ValueOfString("") case "sourcehub.faucet.FaucetResponse.code": return protoreflect.ValueOfUint32(uint32(0)) case "sourcehub.faucet.FaucetResponse.raw_log": return protoreflect.ValueOfString("") case "sourcehub.faucet.FaucetResponse.address": return protoreflect.ValueOfString("") case "sourcehub.faucet.FaucetResponse.amount": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FaucetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.FaucetResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FaucetResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FaucetResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FaucetResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FaucetResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Txhash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Code != 0 { n += 1 + runtime.Sov(uint64(x.Code)) } l = len(x.RawLog) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Amount != nil { l = options.Size(x.Amount) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FaucetResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Amount != nil { encoded, err := options.Marshal(x.Amount) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0x22 } if len(x.RawLog) > 0 { i -= len(x.RawLog) copy(dAtA[i:], x.RawLog) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RawLog))) i-- dAtA[i] = 0x1a } if x.Code != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) i-- dAtA[i] = 0x10 } if len(x.Txhash) > 0 { i -= len(x.Txhash) copy(dAtA[i:], x.Txhash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txhash))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FaucetResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } x.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Amount == nil { x.Amount = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_InitAccountRequest protoreflect.MessageDescriptor fd_InitAccountRequest_address protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_InitAccountRequest = File_sourcehub_faucet_faucet_proto.Messages().ByName("InitAccountRequest") fd_InitAccountRequest_address = md_InitAccountRequest.Fields().ByName("address") } var _ protoreflect.Message = (*fastReflection_InitAccountRequest)(nil) type fastReflection_InitAccountRequest InitAccountRequest func (x *InitAccountRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_InitAccountRequest)(x) } func (x *InitAccountRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_InitAccountRequest_messageType fastReflection_InitAccountRequest_messageType var _ protoreflect.MessageType = fastReflection_InitAccountRequest_messageType{} type fastReflection_InitAccountRequest_messageType struct{} func (x fastReflection_InitAccountRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_InitAccountRequest)(nil) } func (x fastReflection_InitAccountRequest_messageType) New() protoreflect.Message { return new(fastReflection_InitAccountRequest) } func (x fastReflection_InitAccountRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_InitAccountRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_InitAccountRequest) Descriptor() protoreflect.MessageDescriptor { return md_InitAccountRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_InitAccountRequest) Type() protoreflect.MessageType { return _fastReflection_InitAccountRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_InitAccountRequest) New() protoreflect.Message { return new(fastReflection_InitAccountRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_InitAccountRequest) Interface() protoreflect.ProtoMessage { return (*InitAccountRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_InitAccountRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_InitAccountRequest_address, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_InitAccountRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.InitAccountRequest.address": return x.Address != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountRequest")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.InitAccountRequest.address": x.Address = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountRequest")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_InitAccountRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.InitAccountRequest.address": value := x.Address return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountRequest")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.InitAccountRequest.address": x.Address = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountRequest")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.InitAccountRequest.address": panic(fmt.Errorf("field address of message sourcehub.faucet.InitAccountRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountRequest")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_InitAccountRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.InitAccountRequest.address": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountRequest")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_InitAccountRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.InitAccountRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_InitAccountRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_InitAccountRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_InitAccountRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*InitAccountRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*InitAccountRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*InitAccountRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InitAccountRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InitAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_InitAccountResponse protoreflect.MessageDescriptor fd_InitAccountResponse_message protoreflect.FieldDescriptor fd_InitAccountResponse_txhash protoreflect.FieldDescriptor fd_InitAccountResponse_code protoreflect.FieldDescriptor fd_InitAccountResponse_raw_log protoreflect.FieldDescriptor fd_InitAccountResponse_address protoreflect.FieldDescriptor fd_InitAccountResponse_amount protoreflect.FieldDescriptor fd_InitAccountResponse_exists protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_InitAccountResponse = File_sourcehub_faucet_faucet_proto.Messages().ByName("InitAccountResponse") fd_InitAccountResponse_message = md_InitAccountResponse.Fields().ByName("message") fd_InitAccountResponse_txhash = md_InitAccountResponse.Fields().ByName("txhash") fd_InitAccountResponse_code = md_InitAccountResponse.Fields().ByName("code") fd_InitAccountResponse_raw_log = md_InitAccountResponse.Fields().ByName("raw_log") fd_InitAccountResponse_address = md_InitAccountResponse.Fields().ByName("address") fd_InitAccountResponse_amount = md_InitAccountResponse.Fields().ByName("amount") fd_InitAccountResponse_exists = md_InitAccountResponse.Fields().ByName("exists") } var _ protoreflect.Message = (*fastReflection_InitAccountResponse)(nil) type fastReflection_InitAccountResponse InitAccountResponse func (x *InitAccountResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_InitAccountResponse)(x) } func (x *InitAccountResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_InitAccountResponse_messageType fastReflection_InitAccountResponse_messageType var _ protoreflect.MessageType = fastReflection_InitAccountResponse_messageType{} type fastReflection_InitAccountResponse_messageType struct{} func (x fastReflection_InitAccountResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_InitAccountResponse)(nil) } func (x fastReflection_InitAccountResponse_messageType) New() protoreflect.Message { return new(fastReflection_InitAccountResponse) } func (x fastReflection_InitAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_InitAccountResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_InitAccountResponse) Descriptor() protoreflect.MessageDescriptor { return md_InitAccountResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_InitAccountResponse) Type() protoreflect.MessageType { return _fastReflection_InitAccountResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_InitAccountResponse) New() protoreflect.Message { return new(fastReflection_InitAccountResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_InitAccountResponse) Interface() protoreflect.ProtoMessage { return (*InitAccountResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_InitAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Message != "" { value := protoreflect.ValueOfString(x.Message) if !f(fd_InitAccountResponse_message, value) { return } } if x.Txhash != "" { value := protoreflect.ValueOfString(x.Txhash) if !f(fd_InitAccountResponse_txhash, value) { return } } if x.Code != uint32(0) { value := protoreflect.ValueOfUint32(x.Code) if !f(fd_InitAccountResponse_code, value) { return } } if x.RawLog != "" { value := protoreflect.ValueOfString(x.RawLog) if !f(fd_InitAccountResponse_raw_log, value) { return } } if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_InitAccountResponse_address, value) { return } } if x.Amount != nil { value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) if !f(fd_InitAccountResponse_amount, value) { return } } if x.Exists != false { value := protoreflect.ValueOfBool(x.Exists) if !f(fd_InitAccountResponse_exists, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_InitAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.InitAccountResponse.message": return x.Message != "" case "sourcehub.faucet.InitAccountResponse.txhash": return x.Txhash != "" case "sourcehub.faucet.InitAccountResponse.code": return x.Code != uint32(0) case "sourcehub.faucet.InitAccountResponse.raw_log": return x.RawLog != "" case "sourcehub.faucet.InitAccountResponse.address": return x.Address != "" case "sourcehub.faucet.InitAccountResponse.amount": return x.Amount != nil case "sourcehub.faucet.InitAccountResponse.exists": return x.Exists != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountResponse")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.InitAccountResponse.message": x.Message = "" case "sourcehub.faucet.InitAccountResponse.txhash": x.Txhash = "" case "sourcehub.faucet.InitAccountResponse.code": x.Code = uint32(0) case "sourcehub.faucet.InitAccountResponse.raw_log": x.RawLog = "" case "sourcehub.faucet.InitAccountResponse.address": x.Address = "" case "sourcehub.faucet.InitAccountResponse.amount": x.Amount = nil case "sourcehub.faucet.InitAccountResponse.exists": x.Exists = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountResponse")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_InitAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.InitAccountResponse.message": value := x.Message return protoreflect.ValueOfString(value) case "sourcehub.faucet.InitAccountResponse.txhash": value := x.Txhash return protoreflect.ValueOfString(value) case "sourcehub.faucet.InitAccountResponse.code": value := x.Code return protoreflect.ValueOfUint32(value) case "sourcehub.faucet.InitAccountResponse.raw_log": value := x.RawLog return protoreflect.ValueOfString(value) case "sourcehub.faucet.InitAccountResponse.address": value := x.Address return protoreflect.ValueOfString(value) case "sourcehub.faucet.InitAccountResponse.amount": value := x.Amount return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.faucet.InitAccountResponse.exists": value := x.Exists return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountResponse")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.InitAccountResponse.message": x.Message = value.Interface().(string) case "sourcehub.faucet.InitAccountResponse.txhash": x.Txhash = value.Interface().(string) case "sourcehub.faucet.InitAccountResponse.code": x.Code = uint32(value.Uint()) case "sourcehub.faucet.InitAccountResponse.raw_log": x.RawLog = value.Interface().(string) case "sourcehub.faucet.InitAccountResponse.address": x.Address = value.Interface().(string) case "sourcehub.faucet.InitAccountResponse.amount": x.Amount = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.faucet.InitAccountResponse.exists": x.Exists = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountResponse")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.InitAccountResponse.amount": if x.Amount == nil { x.Amount = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) case "sourcehub.faucet.InitAccountResponse.message": panic(fmt.Errorf("field message of message sourcehub.faucet.InitAccountResponse is not mutable")) case "sourcehub.faucet.InitAccountResponse.txhash": panic(fmt.Errorf("field txhash of message sourcehub.faucet.InitAccountResponse is not mutable")) case "sourcehub.faucet.InitAccountResponse.code": panic(fmt.Errorf("field code of message sourcehub.faucet.InitAccountResponse is not mutable")) case "sourcehub.faucet.InitAccountResponse.raw_log": panic(fmt.Errorf("field raw_log of message sourcehub.faucet.InitAccountResponse is not mutable")) case "sourcehub.faucet.InitAccountResponse.address": panic(fmt.Errorf("field address of message sourcehub.faucet.InitAccountResponse is not mutable")) case "sourcehub.faucet.InitAccountResponse.exists": panic(fmt.Errorf("field exists of message sourcehub.faucet.InitAccountResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountResponse")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_InitAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.InitAccountResponse.message": return protoreflect.ValueOfString("") case "sourcehub.faucet.InitAccountResponse.txhash": return protoreflect.ValueOfString("") case "sourcehub.faucet.InitAccountResponse.code": return protoreflect.ValueOfUint32(uint32(0)) case "sourcehub.faucet.InitAccountResponse.raw_log": return protoreflect.ValueOfString("") case "sourcehub.faucet.InitAccountResponse.address": return protoreflect.ValueOfString("") case "sourcehub.faucet.InitAccountResponse.amount": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.faucet.InitAccountResponse.exists": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.InitAccountResponse")) } panic(fmt.Errorf("message sourcehub.faucet.InitAccountResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_InitAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.InitAccountResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_InitAccountResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_InitAccountResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_InitAccountResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_InitAccountResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*InitAccountResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Message) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Txhash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Code != 0 { n += 1 + runtime.Sov(uint64(x.Code)) } l = len(x.RawLog) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Amount != nil { l = options.Size(x.Amount) n += 1 + l + runtime.Sov(uint64(l)) } if x.Exists { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*InitAccountResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Exists { i-- if x.Exists { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x38 } if x.Amount != nil { encoded, err := options.Marshal(x.Amount) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0x2a } if len(x.RawLog) > 0 { i -= len(x.RawLog) copy(dAtA[i:], x.RawLog) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RawLog))) i-- dAtA[i] = 0x22 } if x.Code != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) i-- dAtA[i] = 0x18 } if len(x.Txhash) > 0 { i -= len(x.Txhash) copy(dAtA[i:], x.Txhash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txhash))) i-- dAtA[i] = 0x12 } if len(x.Message) > 0 { i -= len(x.Message) copy(dAtA[i:], x.Message) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*InitAccountResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InitAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InitAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } x.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Amount == nil { x.Amount = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 7: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Exists = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_FaucetInfoResponse protoreflect.MessageDescriptor fd_FaucetInfoResponse_address protoreflect.FieldDescriptor fd_FaucetInfoResponse_balance protoreflect.FieldDescriptor fd_FaucetInfoResponse_request_count protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_FaucetInfoResponse = File_sourcehub_faucet_faucet_proto.Messages().ByName("FaucetInfoResponse") fd_FaucetInfoResponse_address = md_FaucetInfoResponse.Fields().ByName("address") fd_FaucetInfoResponse_balance = md_FaucetInfoResponse.Fields().ByName("balance") fd_FaucetInfoResponse_request_count = md_FaucetInfoResponse.Fields().ByName("request_count") } var _ protoreflect.Message = (*fastReflection_FaucetInfoResponse)(nil) type fastReflection_FaucetInfoResponse FaucetInfoResponse func (x *FaucetInfoResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_FaucetInfoResponse)(x) } func (x *FaucetInfoResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FaucetInfoResponse_messageType fastReflection_FaucetInfoResponse_messageType var _ protoreflect.MessageType = fastReflection_FaucetInfoResponse_messageType{} type fastReflection_FaucetInfoResponse_messageType struct{} func (x fastReflection_FaucetInfoResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_FaucetInfoResponse)(nil) } func (x fastReflection_FaucetInfoResponse_messageType) New() protoreflect.Message { return new(fastReflection_FaucetInfoResponse) } func (x fastReflection_FaucetInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FaucetInfoResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FaucetInfoResponse) Descriptor() protoreflect.MessageDescriptor { return md_FaucetInfoResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FaucetInfoResponse) Type() protoreflect.MessageType { return _fastReflection_FaucetInfoResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FaucetInfoResponse) New() protoreflect.Message { return new(fastReflection_FaucetInfoResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FaucetInfoResponse) Interface() protoreflect.ProtoMessage { return (*FaucetInfoResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FaucetInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_FaucetInfoResponse_address, value) { return } } if x.Balance != nil { value := protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) if !f(fd_FaucetInfoResponse_balance, value) { return } } if x.RequestCount != int32(0) { value := protoreflect.ValueOfInt32(x.RequestCount) if !f(fd_FaucetInfoResponse_request_count, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FaucetInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.FaucetInfoResponse.address": return x.Address != "" case "sourcehub.faucet.FaucetInfoResponse.balance": return x.Balance != nil case "sourcehub.faucet.FaucetInfoResponse.request_count": return x.RequestCount != int32(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetInfoResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetInfoResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetInfoResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.FaucetInfoResponse.address": x.Address = "" case "sourcehub.faucet.FaucetInfoResponse.balance": x.Balance = nil case "sourcehub.faucet.FaucetInfoResponse.request_count": x.RequestCount = int32(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetInfoResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetInfoResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FaucetInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.FaucetInfoResponse.address": value := x.Address return protoreflect.ValueOfString(value) case "sourcehub.faucet.FaucetInfoResponse.balance": value := x.Balance return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.faucet.FaucetInfoResponse.request_count": value := x.RequestCount return protoreflect.ValueOfInt32(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetInfoResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetInfoResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.FaucetInfoResponse.address": x.Address = value.Interface().(string) case "sourcehub.faucet.FaucetInfoResponse.balance": x.Balance = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.faucet.FaucetInfoResponse.request_count": x.RequestCount = int32(value.Int()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetInfoResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetInfoResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetInfoResponse.balance": if x.Balance == nil { x.Balance = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) case "sourcehub.faucet.FaucetInfoResponse.address": panic(fmt.Errorf("field address of message sourcehub.faucet.FaucetInfoResponse is not mutable")) case "sourcehub.faucet.FaucetInfoResponse.request_count": panic(fmt.Errorf("field request_count of message sourcehub.faucet.FaucetInfoResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetInfoResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetInfoResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FaucetInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.FaucetInfoResponse.address": return protoreflect.ValueOfString("") case "sourcehub.faucet.FaucetInfoResponse.balance": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.faucet.FaucetInfoResponse.request_count": return protoreflect.ValueOfInt32(int32(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.FaucetInfoResponse")) } panic(fmt.Errorf("message sourcehub.faucet.FaucetInfoResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FaucetInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.FaucetInfoResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FaucetInfoResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FaucetInfoResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FaucetInfoResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FaucetInfoResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FaucetInfoResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Balance != nil { l = options.Size(x.Balance) n += 1 + l + runtime.Sov(uint64(l)) } if x.RequestCount != 0 { n += 1 + runtime.Sov(uint64(x.RequestCount)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FaucetInfoResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RequestCount != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.RequestCount)) i-- dAtA[i] = 0x18 } if x.Balance != nil { encoded, err := options.Marshal(x.Balance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FaucetInfoResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FaucetInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Balance == nil { x.Balance = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RequestCount", wireType) } x.RequestCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.RequestCount |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GrantAllowanceRequest protoreflect.MessageDescriptor fd_GrantAllowanceRequest_address protoreflect.FieldDescriptor fd_GrantAllowanceRequest_amount_limit protoreflect.FieldDescriptor fd_GrantAllowanceRequest_expiration protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_GrantAllowanceRequest = File_sourcehub_faucet_faucet_proto.Messages().ByName("GrantAllowanceRequest") fd_GrantAllowanceRequest_address = md_GrantAllowanceRequest.Fields().ByName("address") fd_GrantAllowanceRequest_amount_limit = md_GrantAllowanceRequest.Fields().ByName("amount_limit") fd_GrantAllowanceRequest_expiration = md_GrantAllowanceRequest.Fields().ByName("expiration") } var _ protoreflect.Message = (*fastReflection_GrantAllowanceRequest)(nil) type fastReflection_GrantAllowanceRequest GrantAllowanceRequest func (x *GrantAllowanceRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_GrantAllowanceRequest)(x) } func (x *GrantAllowanceRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GrantAllowanceRequest_messageType fastReflection_GrantAllowanceRequest_messageType var _ protoreflect.MessageType = fastReflection_GrantAllowanceRequest_messageType{} type fastReflection_GrantAllowanceRequest_messageType struct{} func (x fastReflection_GrantAllowanceRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_GrantAllowanceRequest)(nil) } func (x fastReflection_GrantAllowanceRequest_messageType) New() protoreflect.Message { return new(fastReflection_GrantAllowanceRequest) } func (x fastReflection_GrantAllowanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GrantAllowanceRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GrantAllowanceRequest) Descriptor() protoreflect.MessageDescriptor { return md_GrantAllowanceRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GrantAllowanceRequest) Type() protoreflect.MessageType { return _fastReflection_GrantAllowanceRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GrantAllowanceRequest) New() protoreflect.Message { return new(fastReflection_GrantAllowanceRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GrantAllowanceRequest) Interface() protoreflect.ProtoMessage { return (*GrantAllowanceRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GrantAllowanceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_GrantAllowanceRequest_address, value) { return } } if x.AmountLimit != nil { value := protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) if !f(fd_GrantAllowanceRequest_amount_limit, value) { return } } if x.Expiration != nil { value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) if !f(fd_GrantAllowanceRequest_expiration, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GrantAllowanceRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceRequest.address": return x.Address != "" case "sourcehub.faucet.GrantAllowanceRequest.amount_limit": return x.AmountLimit != nil case "sourcehub.faucet.GrantAllowanceRequest.expiration": return x.Expiration != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceRequest.address": x.Address = "" case "sourcehub.faucet.GrantAllowanceRequest.amount_limit": x.AmountLimit = nil case "sourcehub.faucet.GrantAllowanceRequest.expiration": x.Expiration = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GrantAllowanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.GrantAllowanceRequest.address": value := x.Address return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantAllowanceRequest.amount_limit": value := x.AmountLimit return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceRequest.expiration": value := x.Expiration return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceRequest.address": x.Address = value.Interface().(string) case "sourcehub.faucet.GrantAllowanceRequest.amount_limit": x.AmountLimit = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.faucet.GrantAllowanceRequest.expiration": x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceRequest.amount_limit": if x.AmountLimit == nil { x.AmountLimit = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceRequest.expiration": if x.Expiration == nil { x.Expiration = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceRequest.address": panic(fmt.Errorf("field address of message sourcehub.faucet.GrantAllowanceRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GrantAllowanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceRequest.address": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantAllowanceRequest.amount_limit": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceRequest.expiration": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GrantAllowanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.GrantAllowanceRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GrantAllowanceRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GrantAllowanceRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GrantAllowanceRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GrantAllowanceRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AmountLimit != nil { l = options.Size(x.AmountLimit) n += 1 + l + runtime.Sov(uint64(l)) } if x.Expiration != nil { l = options.Size(x.Expiration) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GrantAllowanceRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Expiration != nil { encoded, err := options.Marshal(x.Expiration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.AmountLimit != nil { encoded, err := options.Marshal(x.AmountLimit) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GrantAllowanceRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AmountLimit == nil { x.AmountLimit = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountLimit); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Expiration == nil { x.Expiration = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GrantAllowanceResponse protoreflect.MessageDescriptor fd_GrantAllowanceResponse_message protoreflect.FieldDescriptor fd_GrantAllowanceResponse_txhash protoreflect.FieldDescriptor fd_GrantAllowanceResponse_code protoreflect.FieldDescriptor fd_GrantAllowanceResponse_raw_log protoreflect.FieldDescriptor fd_GrantAllowanceResponse_granter protoreflect.FieldDescriptor fd_GrantAllowanceResponse_grantee protoreflect.FieldDescriptor fd_GrantAllowanceResponse_amount_limit protoreflect.FieldDescriptor fd_GrantAllowanceResponse_expiration protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_GrantAllowanceResponse = File_sourcehub_faucet_faucet_proto.Messages().ByName("GrantAllowanceResponse") fd_GrantAllowanceResponse_message = md_GrantAllowanceResponse.Fields().ByName("message") fd_GrantAllowanceResponse_txhash = md_GrantAllowanceResponse.Fields().ByName("txhash") fd_GrantAllowanceResponse_code = md_GrantAllowanceResponse.Fields().ByName("code") fd_GrantAllowanceResponse_raw_log = md_GrantAllowanceResponse.Fields().ByName("raw_log") fd_GrantAllowanceResponse_granter = md_GrantAllowanceResponse.Fields().ByName("granter") fd_GrantAllowanceResponse_grantee = md_GrantAllowanceResponse.Fields().ByName("grantee") fd_GrantAllowanceResponse_amount_limit = md_GrantAllowanceResponse.Fields().ByName("amount_limit") fd_GrantAllowanceResponse_expiration = md_GrantAllowanceResponse.Fields().ByName("expiration") } var _ protoreflect.Message = (*fastReflection_GrantAllowanceResponse)(nil) type fastReflection_GrantAllowanceResponse GrantAllowanceResponse func (x *GrantAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_GrantAllowanceResponse)(x) } func (x *GrantAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GrantAllowanceResponse_messageType fastReflection_GrantAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_GrantAllowanceResponse_messageType{} type fastReflection_GrantAllowanceResponse_messageType struct{} func (x fastReflection_GrantAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_GrantAllowanceResponse)(nil) } func (x fastReflection_GrantAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_GrantAllowanceResponse) } func (x fastReflection_GrantAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GrantAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GrantAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_GrantAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GrantAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_GrantAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GrantAllowanceResponse) New() protoreflect.Message { return new(fastReflection_GrantAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GrantAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*GrantAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GrantAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Message != "" { value := protoreflect.ValueOfString(x.Message) if !f(fd_GrantAllowanceResponse_message, value) { return } } if x.Txhash != "" { value := protoreflect.ValueOfString(x.Txhash) if !f(fd_GrantAllowanceResponse_txhash, value) { return } } if x.Code != uint32(0) { value := protoreflect.ValueOfUint32(x.Code) if !f(fd_GrantAllowanceResponse_code, value) { return } } if x.RawLog != "" { value := protoreflect.ValueOfString(x.RawLog) if !f(fd_GrantAllowanceResponse_raw_log, value) { return } } if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_GrantAllowanceResponse_granter, value) { return } } if x.Grantee != "" { value := protoreflect.ValueOfString(x.Grantee) if !f(fd_GrantAllowanceResponse_grantee, value) { return } } if x.AmountLimit != nil { value := protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) if !f(fd_GrantAllowanceResponse_amount_limit, value) { return } } if x.Expiration != nil { value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) if !f(fd_GrantAllowanceResponse_expiration, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GrantAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceResponse.message": return x.Message != "" case "sourcehub.faucet.GrantAllowanceResponse.txhash": return x.Txhash != "" case "sourcehub.faucet.GrantAllowanceResponse.code": return x.Code != uint32(0) case "sourcehub.faucet.GrantAllowanceResponse.raw_log": return x.RawLog != "" case "sourcehub.faucet.GrantAllowanceResponse.granter": return x.Granter != "" case "sourcehub.faucet.GrantAllowanceResponse.grantee": return x.Grantee != "" case "sourcehub.faucet.GrantAllowanceResponse.amount_limit": return x.AmountLimit != nil case "sourcehub.faucet.GrantAllowanceResponse.expiration": return x.Expiration != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceResponse.message": x.Message = "" case "sourcehub.faucet.GrantAllowanceResponse.txhash": x.Txhash = "" case "sourcehub.faucet.GrantAllowanceResponse.code": x.Code = uint32(0) case "sourcehub.faucet.GrantAllowanceResponse.raw_log": x.RawLog = "" case "sourcehub.faucet.GrantAllowanceResponse.granter": x.Granter = "" case "sourcehub.faucet.GrantAllowanceResponse.grantee": x.Grantee = "" case "sourcehub.faucet.GrantAllowanceResponse.amount_limit": x.AmountLimit = nil case "sourcehub.faucet.GrantAllowanceResponse.expiration": x.Expiration = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GrantAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.GrantAllowanceResponse.message": value := x.Message return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantAllowanceResponse.txhash": value := x.Txhash return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantAllowanceResponse.code": value := x.Code return protoreflect.ValueOfUint32(value) case "sourcehub.faucet.GrantAllowanceResponse.raw_log": value := x.RawLog return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantAllowanceResponse.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantAllowanceResponse.grantee": value := x.Grantee return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantAllowanceResponse.amount_limit": value := x.AmountLimit return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceResponse.expiration": value := x.Expiration return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceResponse.message": x.Message = value.Interface().(string) case "sourcehub.faucet.GrantAllowanceResponse.txhash": x.Txhash = value.Interface().(string) case "sourcehub.faucet.GrantAllowanceResponse.code": x.Code = uint32(value.Uint()) case "sourcehub.faucet.GrantAllowanceResponse.raw_log": x.RawLog = value.Interface().(string) case "sourcehub.faucet.GrantAllowanceResponse.granter": x.Granter = value.Interface().(string) case "sourcehub.faucet.GrantAllowanceResponse.grantee": x.Grantee = value.Interface().(string) case "sourcehub.faucet.GrantAllowanceResponse.amount_limit": x.AmountLimit = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.faucet.GrantAllowanceResponse.expiration": x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceResponse.amount_limit": if x.AmountLimit == nil { x.AmountLimit = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceResponse.expiration": if x.Expiration == nil { x.Expiration = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceResponse.message": panic(fmt.Errorf("field message of message sourcehub.faucet.GrantAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantAllowanceResponse.txhash": panic(fmt.Errorf("field txhash of message sourcehub.faucet.GrantAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantAllowanceResponse.code": panic(fmt.Errorf("field code of message sourcehub.faucet.GrantAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantAllowanceResponse.raw_log": panic(fmt.Errorf("field raw_log of message sourcehub.faucet.GrantAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantAllowanceResponse.granter": panic(fmt.Errorf("field granter of message sourcehub.faucet.GrantAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantAllowanceResponse.grantee": panic(fmt.Errorf("field grantee of message sourcehub.faucet.GrantAllowanceResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GrantAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantAllowanceResponse.message": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantAllowanceResponse.txhash": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantAllowanceResponse.code": return protoreflect.ValueOfUint32(uint32(0)) case "sourcehub.faucet.GrantAllowanceResponse.raw_log": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantAllowanceResponse.granter": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantAllowanceResponse.grantee": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantAllowanceResponse.amount_limit": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.faucet.GrantAllowanceResponse.expiration": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GrantAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.GrantAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GrantAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GrantAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GrantAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GrantAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Message) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Txhash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Code != 0 { n += 1 + runtime.Sov(uint64(x.Code)) } l = len(x.RawLog) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Grantee) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AmountLimit != nil { l = options.Size(x.AmountLimit) n += 1 + l + runtime.Sov(uint64(l)) } if x.Expiration != nil { l = options.Size(x.Expiration) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GrantAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Expiration != nil { encoded, err := options.Marshal(x.Expiration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if x.AmountLimit != nil { encoded, err := options.Marshal(x.AmountLimit) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a } if len(x.Grantee) > 0 { i -= len(x.Grantee) copy(dAtA[i:], x.Grantee) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) i-- dAtA[i] = 0x32 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0x2a } if len(x.RawLog) > 0 { i -= len(x.RawLog) copy(dAtA[i:], x.RawLog) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RawLog))) i-- dAtA[i] = 0x22 } if x.Code != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) i-- dAtA[i] = 0x18 } if len(x.Txhash) > 0 { i -= len(x.Txhash) copy(dAtA[i:], x.Txhash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txhash))) i-- dAtA[i] = 0x12 } if len(x.Message) > 0 { i -= len(x.Message) copy(dAtA[i:], x.Message) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GrantAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } x.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AmountLimit == nil { x.AmountLimit = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountLimit); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Expiration == nil { x.Expiration = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GrantDIDAllowanceRequest protoreflect.MessageDescriptor fd_GrantDIDAllowanceRequest_did protoreflect.FieldDescriptor fd_GrantDIDAllowanceRequest_amount_limit protoreflect.FieldDescriptor fd_GrantDIDAllowanceRequest_expiration protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_GrantDIDAllowanceRequest = File_sourcehub_faucet_faucet_proto.Messages().ByName("GrantDIDAllowanceRequest") fd_GrantDIDAllowanceRequest_did = md_GrantDIDAllowanceRequest.Fields().ByName("did") fd_GrantDIDAllowanceRequest_amount_limit = md_GrantDIDAllowanceRequest.Fields().ByName("amount_limit") fd_GrantDIDAllowanceRequest_expiration = md_GrantDIDAllowanceRequest.Fields().ByName("expiration") } var _ protoreflect.Message = (*fastReflection_GrantDIDAllowanceRequest)(nil) type fastReflection_GrantDIDAllowanceRequest GrantDIDAllowanceRequest func (x *GrantDIDAllowanceRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_GrantDIDAllowanceRequest)(x) } func (x *GrantDIDAllowanceRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GrantDIDAllowanceRequest_messageType fastReflection_GrantDIDAllowanceRequest_messageType var _ protoreflect.MessageType = fastReflection_GrantDIDAllowanceRequest_messageType{} type fastReflection_GrantDIDAllowanceRequest_messageType struct{} func (x fastReflection_GrantDIDAllowanceRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_GrantDIDAllowanceRequest)(nil) } func (x fastReflection_GrantDIDAllowanceRequest_messageType) New() protoreflect.Message { return new(fastReflection_GrantDIDAllowanceRequest) } func (x fastReflection_GrantDIDAllowanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GrantDIDAllowanceRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GrantDIDAllowanceRequest) Descriptor() protoreflect.MessageDescriptor { return md_GrantDIDAllowanceRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GrantDIDAllowanceRequest) Type() protoreflect.MessageType { return _fastReflection_GrantDIDAllowanceRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GrantDIDAllowanceRequest) New() protoreflect.Message { return new(fastReflection_GrantDIDAllowanceRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GrantDIDAllowanceRequest) Interface() protoreflect.ProtoMessage { return (*GrantDIDAllowanceRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GrantDIDAllowanceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Did != "" { value := protoreflect.ValueOfString(x.Did) if !f(fd_GrantDIDAllowanceRequest_did, value) { return } } if x.AmountLimit != nil { value := protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) if !f(fd_GrantDIDAllowanceRequest_amount_limit, value) { return } } if x.Expiration != nil { value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) if !f(fd_GrantDIDAllowanceRequest_expiration, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GrantDIDAllowanceRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceRequest.did": return x.Did != "" case "sourcehub.faucet.GrantDIDAllowanceRequest.amount_limit": return x.AmountLimit != nil case "sourcehub.faucet.GrantDIDAllowanceRequest.expiration": return x.Expiration != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceRequest.did": x.Did = "" case "sourcehub.faucet.GrantDIDAllowanceRequest.amount_limit": x.AmountLimit = nil case "sourcehub.faucet.GrantDIDAllowanceRequest.expiration": x.Expiration = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GrantDIDAllowanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.GrantDIDAllowanceRequest.did": value := x.Did return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantDIDAllowanceRequest.amount_limit": value := x.AmountLimit return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceRequest.expiration": value := x.Expiration return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceRequest.did": x.Did = value.Interface().(string) case "sourcehub.faucet.GrantDIDAllowanceRequest.amount_limit": x.AmountLimit = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.faucet.GrantDIDAllowanceRequest.expiration": x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceRequest.amount_limit": if x.AmountLimit == nil { x.AmountLimit = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceRequest.expiration": if x.Expiration == nil { x.Expiration = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceRequest.did": panic(fmt.Errorf("field did of message sourcehub.faucet.GrantDIDAllowanceRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GrantDIDAllowanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceRequest.did": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantDIDAllowanceRequest.amount_limit": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceRequest.expiration": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GrantDIDAllowanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.GrantDIDAllowanceRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GrantDIDAllowanceRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GrantDIDAllowanceRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GrantDIDAllowanceRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GrantDIDAllowanceRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Did) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AmountLimit != nil { l = options.Size(x.AmountLimit) n += 1 + l + runtime.Sov(uint64(l)) } if x.Expiration != nil { l = options.Size(x.Expiration) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GrantDIDAllowanceRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Expiration != nil { encoded, err := options.Marshal(x.Expiration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.AmountLimit != nil { encoded, err := options.Marshal(x.AmountLimit) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Did) > 0 { i -= len(x.Did) copy(dAtA[i:], x.Did) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GrantDIDAllowanceRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantDIDAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantDIDAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AmountLimit == nil { x.AmountLimit = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountLimit); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Expiration == nil { x.Expiration = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GrantDIDAllowanceResponse protoreflect.MessageDescriptor fd_GrantDIDAllowanceResponse_message protoreflect.FieldDescriptor fd_GrantDIDAllowanceResponse_txhash protoreflect.FieldDescriptor fd_GrantDIDAllowanceResponse_code protoreflect.FieldDescriptor fd_GrantDIDAllowanceResponse_raw_log protoreflect.FieldDescriptor fd_GrantDIDAllowanceResponse_granter protoreflect.FieldDescriptor fd_GrantDIDAllowanceResponse_grantee_did protoreflect.FieldDescriptor fd_GrantDIDAllowanceResponse_amount_limit protoreflect.FieldDescriptor fd_GrantDIDAllowanceResponse_expiration protoreflect.FieldDescriptor ) func init() { file_sourcehub_faucet_faucet_proto_init() md_GrantDIDAllowanceResponse = File_sourcehub_faucet_faucet_proto.Messages().ByName("GrantDIDAllowanceResponse") fd_GrantDIDAllowanceResponse_message = md_GrantDIDAllowanceResponse.Fields().ByName("message") fd_GrantDIDAllowanceResponse_txhash = md_GrantDIDAllowanceResponse.Fields().ByName("txhash") fd_GrantDIDAllowanceResponse_code = md_GrantDIDAllowanceResponse.Fields().ByName("code") fd_GrantDIDAllowanceResponse_raw_log = md_GrantDIDAllowanceResponse.Fields().ByName("raw_log") fd_GrantDIDAllowanceResponse_granter = md_GrantDIDAllowanceResponse.Fields().ByName("granter") fd_GrantDIDAllowanceResponse_grantee_did = md_GrantDIDAllowanceResponse.Fields().ByName("grantee_did") fd_GrantDIDAllowanceResponse_amount_limit = md_GrantDIDAllowanceResponse.Fields().ByName("amount_limit") fd_GrantDIDAllowanceResponse_expiration = md_GrantDIDAllowanceResponse.Fields().ByName("expiration") } var _ protoreflect.Message = (*fastReflection_GrantDIDAllowanceResponse)(nil) type fastReflection_GrantDIDAllowanceResponse GrantDIDAllowanceResponse func (x *GrantDIDAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_GrantDIDAllowanceResponse)(x) } func (x *GrantDIDAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GrantDIDAllowanceResponse_messageType fastReflection_GrantDIDAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_GrantDIDAllowanceResponse_messageType{} type fastReflection_GrantDIDAllowanceResponse_messageType struct{} func (x fastReflection_GrantDIDAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_GrantDIDAllowanceResponse)(nil) } func (x fastReflection_GrantDIDAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_GrantDIDAllowanceResponse) } func (x fastReflection_GrantDIDAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GrantDIDAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GrantDIDAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_GrantDIDAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GrantDIDAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_GrantDIDAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GrantDIDAllowanceResponse) New() protoreflect.Message { return new(fastReflection_GrantDIDAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GrantDIDAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*GrantDIDAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GrantDIDAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Message != "" { value := protoreflect.ValueOfString(x.Message) if !f(fd_GrantDIDAllowanceResponse_message, value) { return } } if x.Txhash != "" { value := protoreflect.ValueOfString(x.Txhash) if !f(fd_GrantDIDAllowanceResponse_txhash, value) { return } } if x.Code != uint32(0) { value := protoreflect.ValueOfUint32(x.Code) if !f(fd_GrantDIDAllowanceResponse_code, value) { return } } if x.RawLog != "" { value := protoreflect.ValueOfString(x.RawLog) if !f(fd_GrantDIDAllowanceResponse_raw_log, value) { return } } if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_GrantDIDAllowanceResponse_granter, value) { return } } if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_GrantDIDAllowanceResponse_grantee_did, value) { return } } if x.AmountLimit != nil { value := protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) if !f(fd_GrantDIDAllowanceResponse_amount_limit, value) { return } } if x.Expiration != nil { value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) if !f(fd_GrantDIDAllowanceResponse_expiration, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GrantDIDAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceResponse.message": return x.Message != "" case "sourcehub.faucet.GrantDIDAllowanceResponse.txhash": return x.Txhash != "" case "sourcehub.faucet.GrantDIDAllowanceResponse.code": return x.Code != uint32(0) case "sourcehub.faucet.GrantDIDAllowanceResponse.raw_log": return x.RawLog != "" case "sourcehub.faucet.GrantDIDAllowanceResponse.granter": return x.Granter != "" case "sourcehub.faucet.GrantDIDAllowanceResponse.grantee_did": return x.GranteeDid != "" case "sourcehub.faucet.GrantDIDAllowanceResponse.amount_limit": return x.AmountLimit != nil case "sourcehub.faucet.GrantDIDAllowanceResponse.expiration": return x.Expiration != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceResponse.message": x.Message = "" case "sourcehub.faucet.GrantDIDAllowanceResponse.txhash": x.Txhash = "" case "sourcehub.faucet.GrantDIDAllowanceResponse.code": x.Code = uint32(0) case "sourcehub.faucet.GrantDIDAllowanceResponse.raw_log": x.RawLog = "" case "sourcehub.faucet.GrantDIDAllowanceResponse.granter": x.Granter = "" case "sourcehub.faucet.GrantDIDAllowanceResponse.grantee_did": x.GranteeDid = "" case "sourcehub.faucet.GrantDIDAllowanceResponse.amount_limit": x.AmountLimit = nil case "sourcehub.faucet.GrantDIDAllowanceResponse.expiration": x.Expiration = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GrantDIDAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.faucet.GrantDIDAllowanceResponse.message": value := x.Message return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantDIDAllowanceResponse.txhash": value := x.Txhash return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantDIDAllowanceResponse.code": value := x.Code return protoreflect.ValueOfUint32(value) case "sourcehub.faucet.GrantDIDAllowanceResponse.raw_log": value := x.RawLog return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantDIDAllowanceResponse.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantDIDAllowanceResponse.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) case "sourcehub.faucet.GrantDIDAllowanceResponse.amount_limit": value := x.AmountLimit return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceResponse.expiration": value := x.Expiration return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceResponse.message": x.Message = value.Interface().(string) case "sourcehub.faucet.GrantDIDAllowanceResponse.txhash": x.Txhash = value.Interface().(string) case "sourcehub.faucet.GrantDIDAllowanceResponse.code": x.Code = uint32(value.Uint()) case "sourcehub.faucet.GrantDIDAllowanceResponse.raw_log": x.RawLog = value.Interface().(string) case "sourcehub.faucet.GrantDIDAllowanceResponse.granter": x.Granter = value.Interface().(string) case "sourcehub.faucet.GrantDIDAllowanceResponse.grantee_did": x.GranteeDid = value.Interface().(string) case "sourcehub.faucet.GrantDIDAllowanceResponse.amount_limit": x.AmountLimit = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.faucet.GrantDIDAllowanceResponse.expiration": x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceResponse.amount_limit": if x.AmountLimit == nil { x.AmountLimit = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.AmountLimit.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceResponse.expiration": if x.Expiration == nil { x.Expiration = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceResponse.message": panic(fmt.Errorf("field message of message sourcehub.faucet.GrantDIDAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantDIDAllowanceResponse.txhash": panic(fmt.Errorf("field txhash of message sourcehub.faucet.GrantDIDAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantDIDAllowanceResponse.code": panic(fmt.Errorf("field code of message sourcehub.faucet.GrantDIDAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantDIDAllowanceResponse.raw_log": panic(fmt.Errorf("field raw_log of message sourcehub.faucet.GrantDIDAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantDIDAllowanceResponse.granter": panic(fmt.Errorf("field granter of message sourcehub.faucet.GrantDIDAllowanceResponse is not mutable")) case "sourcehub.faucet.GrantDIDAllowanceResponse.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.faucet.GrantDIDAllowanceResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GrantDIDAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.faucet.GrantDIDAllowanceResponse.message": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantDIDAllowanceResponse.txhash": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantDIDAllowanceResponse.code": return protoreflect.ValueOfUint32(uint32(0)) case "sourcehub.faucet.GrantDIDAllowanceResponse.raw_log": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantDIDAllowanceResponse.granter": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantDIDAllowanceResponse.grantee_did": return protoreflect.ValueOfString("") case "sourcehub.faucet.GrantDIDAllowanceResponse.amount_limit": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.faucet.GrantDIDAllowanceResponse.expiration": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.faucet.GrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.faucet.GrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GrantDIDAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.faucet.GrantDIDAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GrantDIDAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GrantDIDAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GrantDIDAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GrantDIDAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GrantDIDAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Message) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Txhash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Code != 0 { n += 1 + runtime.Sov(uint64(x.Code)) } l = len(x.RawLog) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AmountLimit != nil { l = options.Size(x.AmountLimit) n += 1 + l + runtime.Sov(uint64(l)) } if x.Expiration != nil { l = options.Size(x.Expiration) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GrantDIDAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Expiration != nil { encoded, err := options.Marshal(x.Expiration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if x.AmountLimit != nil { encoded, err := options.Marshal(x.AmountLimit) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0x32 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0x2a } if len(x.RawLog) > 0 { i -= len(x.RawLog) copy(dAtA[i:], x.RawLog) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RawLog))) i-- dAtA[i] = 0x22 } if x.Code != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) i-- dAtA[i] = 0x18 } if len(x.Txhash) > 0 { i -= len(x.Txhash) copy(dAtA[i:], x.Txhash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txhash))) i-- dAtA[i] = 0x12 } if len(x.Message) > 0 { i -= len(x.Message) copy(dAtA[i:], x.Message) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GrantDIDAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantDIDAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } x.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AmountLimit == nil { x.AmountLimit = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountLimit); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Expiration == nil { x.Expiration = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/faucet/faucet.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // FaucetRequestRecord represents a faucet request record stored internally. type FaucetRequestRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Amount *v1beta1.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` } func (x *FaucetRequestRecord) Reset() { *x = FaucetRequestRecord{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FaucetRequestRecord) String() string { return protoimpl.X.MessageStringOf(x) } func (*FaucetRequestRecord) ProtoMessage() {} // Deprecated: Use FaucetRequestRecord.ProtoReflect.Descriptor instead. func (*FaucetRequestRecord) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{0} } func (x *FaucetRequestRecord) GetAddress() string { if x != nil { return x.Address } return "" } func (x *FaucetRequestRecord) GetAmount() *v1beta1.Coin { if x != nil { return x.Amount } return nil } func (x *FaucetRequestRecord) GetTxHash() string { if x != nil { return x.TxHash } return "" } // FaucetRequest represents a request to get funds from the faucet. type FaucetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } func (x *FaucetRequest) Reset() { *x = FaucetRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FaucetRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*FaucetRequest) ProtoMessage() {} // Deprecated: Use FaucetRequest.ProtoReflect.Descriptor instead. func (*FaucetRequest) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{1} } func (x *FaucetRequest) GetAddress() string { if x != nil { return x.Address } return "" } // FaucetResponse represents the response from a faucet request. type FaucetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Txhash string `protobuf:"bytes,1,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,3,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` Amount *v1beta1.Coin `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` } func (x *FaucetResponse) Reset() { *x = FaucetResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FaucetResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*FaucetResponse) ProtoMessage() {} // Deprecated: Use FaucetResponse.ProtoReflect.Descriptor instead. func (*FaucetResponse) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{2} } func (x *FaucetResponse) GetTxhash() string { if x != nil { return x.Txhash } return "" } func (x *FaucetResponse) GetCode() uint32 { if x != nil { return x.Code } return 0 } func (x *FaucetResponse) GetRawLog() string { if x != nil { return x.RawLog } return "" } func (x *FaucetResponse) GetAddress() string { if x != nil { return x.Address } return "" } func (x *FaucetResponse) GetAmount() *v1beta1.Coin { if x != nil { return x.Amount } return nil } // InitAccountRequest represents a request to initialize an account. type InitAccountRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } func (x *InitAccountRequest) Reset() { *x = InitAccountRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *InitAccountRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*InitAccountRequest) ProtoMessage() {} // Deprecated: Use InitAccountRequest.ProtoReflect.Descriptor instead. func (*InitAccountRequest) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{3} } func (x *InitAccountRequest) GetAddress() string { if x != nil { return x.Address } return "" } // InitAccountResponse represents the response from an account initialization request. type InitAccountResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Txhash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,4,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` Amount *v1beta1.Coin `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` Exists bool `protobuf:"varint,7,opt,name=exists,proto3" json:"exists,omitempty"` } func (x *InitAccountResponse) Reset() { *x = InitAccountResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *InitAccountResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*InitAccountResponse) ProtoMessage() {} // Deprecated: Use InitAccountResponse.ProtoReflect.Descriptor instead. func (*InitAccountResponse) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{4} } func (x *InitAccountResponse) GetMessage() string { if x != nil { return x.Message } return "" } func (x *InitAccountResponse) GetTxhash() string { if x != nil { return x.Txhash } return "" } func (x *InitAccountResponse) GetCode() uint32 { if x != nil { return x.Code } return 0 } func (x *InitAccountResponse) GetRawLog() string { if x != nil { return x.RawLog } return "" } func (x *InitAccountResponse) GetAddress() string { if x != nil { return x.Address } return "" } func (x *InitAccountResponse) GetAmount() *v1beta1.Coin { if x != nil { return x.Amount } return nil } func (x *InitAccountResponse) GetExists() bool { if x != nil { return x.Exists } return false } // FaucetInfoResponse represents the faucet information response. type FaucetInfoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Balance *v1beta1.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` RequestCount int32 `protobuf:"varint,3,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` } func (x *FaucetInfoResponse) Reset() { *x = FaucetInfoResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FaucetInfoResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*FaucetInfoResponse) ProtoMessage() {} // Deprecated: Use FaucetInfoResponse.ProtoReflect.Descriptor instead. func (*FaucetInfoResponse) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{5} } func (x *FaucetInfoResponse) GetAddress() string { if x != nil { return x.Address } return "" } func (x *FaucetInfoResponse) GetBalance() *v1beta1.Coin { if x != nil { return x.Balance } return nil } func (x *FaucetInfoResponse) GetRequestCount() int32 { if x != nil { return x.RequestCount } return 0 } // GrantAllowanceRequest represents a request to grant fee allowance from the faucet. type GrantAllowanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Optional amount limit for the allowance (in uopen). If not provided, defaults to 10000000000 (10,000 OPEN) AmountLimit *v1beta1.Coin `protobuf:"bytes,2,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit,omitempty"` // Optional expiration time. If not provided, defaults to 30 days from now Expiration *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (x *GrantAllowanceRequest) Reset() { *x = GrantAllowanceRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GrantAllowanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GrantAllowanceRequest) ProtoMessage() {} // Deprecated: Use GrantAllowanceRequest.ProtoReflect.Descriptor instead. func (*GrantAllowanceRequest) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{6} } func (x *GrantAllowanceRequest) GetAddress() string { if x != nil { return x.Address } return "" } func (x *GrantAllowanceRequest) GetAmountLimit() *v1beta1.Coin { if x != nil { return x.AmountLimit } return nil } func (x *GrantAllowanceRequest) GetExpiration() *timestamppb.Timestamp { if x != nil { return x.Expiration } return nil } // GrantAllowanceResponse represents the response from a grant allowance request. type GrantAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Txhash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,4,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Granter string `protobuf:"bytes,5,opt,name=granter,proto3" json:"granter,omitempty"` Grantee string `protobuf:"bytes,6,opt,name=grantee,proto3" json:"grantee,omitempty"` AmountLimit *v1beta1.Coin `protobuf:"bytes,7,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit,omitempty"` Expiration *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (x *GrantAllowanceResponse) Reset() { *x = GrantAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GrantAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GrantAllowanceResponse) ProtoMessage() {} // Deprecated: Use GrantAllowanceResponse.ProtoReflect.Descriptor instead. func (*GrantAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{7} } func (x *GrantAllowanceResponse) GetMessage() string { if x != nil { return x.Message } return "" } func (x *GrantAllowanceResponse) GetTxhash() string { if x != nil { return x.Txhash } return "" } func (x *GrantAllowanceResponse) GetCode() uint32 { if x != nil { return x.Code } return 0 } func (x *GrantAllowanceResponse) GetRawLog() string { if x != nil { return x.RawLog } return "" } func (x *GrantAllowanceResponse) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *GrantAllowanceResponse) GetGrantee() string { if x != nil { return x.Grantee } return "" } func (x *GrantAllowanceResponse) GetAmountLimit() *v1beta1.Coin { if x != nil { return x.AmountLimit } return nil } func (x *GrantAllowanceResponse) GetExpiration() *timestamppb.Timestamp { if x != nil { return x.Expiration } return nil } // GrantDIDAllowanceRequest represents a request to grant fee allowance to a DID from the faucet. type GrantDIDAllowanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` // Optional amount limit for the allowance (in uopen). If not provided, defaults to 10000000000 (10,000 OPEN) AmountLimit *v1beta1.Coin `protobuf:"bytes,2,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit,omitempty"` // Optional expiration time. If not provided, defaults to 30 days from now Expiration *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (x *GrantDIDAllowanceRequest) Reset() { *x = GrantDIDAllowanceRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GrantDIDAllowanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GrantDIDAllowanceRequest) ProtoMessage() {} // Deprecated: Use GrantDIDAllowanceRequest.ProtoReflect.Descriptor instead. func (*GrantDIDAllowanceRequest) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{8} } func (x *GrantDIDAllowanceRequest) GetDid() string { if x != nil { return x.Did } return "" } func (x *GrantDIDAllowanceRequest) GetAmountLimit() *v1beta1.Coin { if x != nil { return x.AmountLimit } return nil } func (x *GrantDIDAllowanceRequest) GetExpiration() *timestamppb.Timestamp { if x != nil { return x.Expiration } return nil } // GrantDIDAllowanceResponse represents the response from a DID grant allowance request. type GrantDIDAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Txhash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,4,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Granter string `protobuf:"bytes,5,opt,name=granter,proto3" json:"granter,omitempty"` GranteeDid string `protobuf:"bytes,6,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` AmountLimit *v1beta1.Coin `protobuf:"bytes,7,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit,omitempty"` Expiration *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (x *GrantDIDAllowanceResponse) Reset() { *x = GrantDIDAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_faucet_faucet_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GrantDIDAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GrantDIDAllowanceResponse) ProtoMessage() {} // Deprecated: Use GrantDIDAllowanceResponse.ProtoReflect.Descriptor instead. func (*GrantDIDAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_faucet_faucet_proto_rawDescGZIP(), []int{9} } func (x *GrantDIDAllowanceResponse) GetMessage() string { if x != nil { return x.Message } return "" } func (x *GrantDIDAllowanceResponse) GetTxhash() string { if x != nil { return x.Txhash } return "" } func (x *GrantDIDAllowanceResponse) GetCode() uint32 { if x != nil { return x.Code } return 0 } func (x *GrantDIDAllowanceResponse) GetRawLog() string { if x != nil { return x.RawLog } return "" } func (x *GrantDIDAllowanceResponse) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *GrantDIDAllowanceResponse) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } func (x *GrantDIDAllowanceResponse) GetAmountLimit() *v1beta1.Coin { if x != nil { return x.AmountLimit } return nil } func (x *GrantDIDAllowanceResponse) GetExpiration() *timestamppb.Timestamp { if x != nil { return x.Expiration } return nil } var File_sourcehub_faucet_faucet_proto protoreflect.FileDescriptor var file_sourcehub_faucet_faucet_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x2f, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x13, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x22, 0x29, 0x0a, 0x0d, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x61, 0x77, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, 0x77, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xe4, 0x01, 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x61, 0x77, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, 0x77, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xbc, 0x01, 0x0a, 0x15, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb6, 0x02, 0x0a, 0x16, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x61, 0x77, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, 0x77, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x18, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x02, 0x0a, 0x19, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x61, 0x77, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, 0x77, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xa7, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x42, 0x0b, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0xa2, 0x02, 0x03, 0x53, 0x46, 0x58, 0xaa, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0xca, 0x02, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0xe2, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_faucet_faucet_proto_rawDescOnce sync.Once file_sourcehub_faucet_faucet_proto_rawDescData = file_sourcehub_faucet_faucet_proto_rawDesc ) func file_sourcehub_faucet_faucet_proto_rawDescGZIP() []byte { file_sourcehub_faucet_faucet_proto_rawDescOnce.Do(func() { file_sourcehub_faucet_faucet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_faucet_faucet_proto_rawDescData) }) return file_sourcehub_faucet_faucet_proto_rawDescData } var file_sourcehub_faucet_faucet_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_sourcehub_faucet_faucet_proto_goTypes = []interface{}{ (*FaucetRequestRecord)(nil), // 0: sourcehub.faucet.FaucetRequestRecord (*FaucetRequest)(nil), // 1: sourcehub.faucet.FaucetRequest (*FaucetResponse)(nil), // 2: sourcehub.faucet.FaucetResponse (*InitAccountRequest)(nil), // 3: sourcehub.faucet.InitAccountRequest (*InitAccountResponse)(nil), // 4: sourcehub.faucet.InitAccountResponse (*FaucetInfoResponse)(nil), // 5: sourcehub.faucet.FaucetInfoResponse (*GrantAllowanceRequest)(nil), // 6: sourcehub.faucet.GrantAllowanceRequest (*GrantAllowanceResponse)(nil), // 7: sourcehub.faucet.GrantAllowanceResponse (*GrantDIDAllowanceRequest)(nil), // 8: sourcehub.faucet.GrantDIDAllowanceRequest (*GrantDIDAllowanceResponse)(nil), // 9: sourcehub.faucet.GrantDIDAllowanceResponse (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp } var file_sourcehub_faucet_faucet_proto_depIdxs = []int32{ 10, // 0: sourcehub.faucet.FaucetRequestRecord.amount:type_name -> cosmos.base.v1beta1.Coin 10, // 1: sourcehub.faucet.FaucetResponse.amount:type_name -> cosmos.base.v1beta1.Coin 10, // 2: sourcehub.faucet.InitAccountResponse.amount:type_name -> cosmos.base.v1beta1.Coin 10, // 3: sourcehub.faucet.FaucetInfoResponse.balance:type_name -> cosmos.base.v1beta1.Coin 10, // 4: sourcehub.faucet.GrantAllowanceRequest.amount_limit:type_name -> cosmos.base.v1beta1.Coin 11, // 5: sourcehub.faucet.GrantAllowanceRequest.expiration:type_name -> google.protobuf.Timestamp 10, // 6: sourcehub.faucet.GrantAllowanceResponse.amount_limit:type_name -> cosmos.base.v1beta1.Coin 11, // 7: sourcehub.faucet.GrantAllowanceResponse.expiration:type_name -> google.protobuf.Timestamp 10, // 8: sourcehub.faucet.GrantDIDAllowanceRequest.amount_limit:type_name -> cosmos.base.v1beta1.Coin 11, // 9: sourcehub.faucet.GrantDIDAllowanceRequest.expiration:type_name -> google.protobuf.Timestamp 10, // 10: sourcehub.faucet.GrantDIDAllowanceResponse.amount_limit:type_name -> cosmos.base.v1beta1.Coin 11, // 11: sourcehub.faucet.GrantDIDAllowanceResponse.expiration:type_name -> google.protobuf.Timestamp 12, // [12:12] is the sub-list for method output_type 12, // [12:12] is the sub-list for method input_type 12, // [12:12] is the sub-list for extension type_name 12, // [12:12] is the sub-list for extension extendee 0, // [0:12] is the sub-list for field type_name } func init() { file_sourcehub_faucet_faucet_proto_init() } func file_sourcehub_faucet_faucet_proto_init() { if File_sourcehub_faucet_faucet_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_faucet_faucet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FaucetRequestRecord); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FaucetRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FaucetResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitAccountRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitAccountResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FaucetInfoResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GrantAllowanceRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GrantAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GrantDIDAllowanceRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_faucet_faucet_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GrantDIDAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_faucet_faucet_proto_rawDesc, NumEnums: 0, NumMessages: 10, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_faucet_faucet_proto_goTypes, DependencyIndexes: file_sourcehub_faucet_faucet_proto_depIdxs, MessageInfos: file_sourcehub_faucet_faucet_proto_msgTypes, }.Build() File_sourcehub_faucet_faucet_proto = out.File file_sourcehub_faucet_faucet_proto_rawDesc = nil file_sourcehub_faucet_faucet_proto_goTypes = nil file_sourcehub_faucet_faucet_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/feegrant/module/v1/module.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package modulev1 import ( _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Module protoreflect.MessageDescriptor ) func init() { file_sourcehub_feegrant_module_v1_module_proto_init() md_Module = File_sourcehub_feegrant_module_v1_module_proto.Messages().ByName("Module") } var _ protoreflect.Message = (*fastReflection_Module)(nil) type fastReflection_Module Module func (x *Module) ProtoReflect() protoreflect.Message { return (*fastReflection_Module)(x) } func (x *Module) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_module_v1_module_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Module_messageType fastReflection_Module_messageType var _ protoreflect.MessageType = fastReflection_Module_messageType{} type fastReflection_Module_messageType struct{} func (x fastReflection_Module_messageType) Zero() protoreflect.Message { return (*fastReflection_Module)(nil) } func (x fastReflection_Module_messageType) New() protoreflect.Message { return new(fastReflection_Module) } func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Module) Type() protoreflect.MessageType { return _fastReflection_Module_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Module) New() protoreflect.Message { return new(fastReflection_Module) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { return (*Module)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.module.v1.Module")) } panic(fmt.Errorf("message sourcehub.feegrant.module.v1.Module does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.module.v1.Module")) } panic(fmt.Errorf("message sourcehub.feegrant.module.v1.Module does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.module.v1.Module")) } panic(fmt.Errorf("message sourcehub.feegrant.module.v1.Module does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.module.v1.Module")) } panic(fmt.Errorf("message sourcehub.feegrant.module.v1.Module does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.module.v1.Module")) } panic(fmt.Errorf("message sourcehub.feegrant.module.v1.Module does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.module.v1.Module")) } panic(fmt.Errorf("message sourcehub.feegrant.module.v1.Module does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.module.v1.Module", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Module) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Module) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/feegrant/module/v1/module.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Module is the config object of the feegrant module. type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_module_v1_module_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Module) String() string { return protoimpl.X.MessageStringOf(x) } func (*Module) ProtoMessage() {} // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_module_v1_module_proto_rawDescGZIP(), []int{0} } var File_sourcehub_feegrant_module_v1_module_proto protoreflect.FileDescriptor var file_sourcehub_feegrant_module_v1_module_proto_rawDesc = []byte{ 0x0a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x35, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2f, 0x0a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x42, 0xfa, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x46, 0x4d, 0xaa, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x28, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_feegrant_module_v1_module_proto_rawDescOnce sync.Once file_sourcehub_feegrant_module_v1_module_proto_rawDescData = file_sourcehub_feegrant_module_v1_module_proto_rawDesc ) func file_sourcehub_feegrant_module_v1_module_proto_rawDescGZIP() []byte { file_sourcehub_feegrant_module_v1_module_proto_rawDescOnce.Do(func() { file_sourcehub_feegrant_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_feegrant_module_v1_module_proto_rawDescData) }) return file_sourcehub_feegrant_module_v1_module_proto_rawDescData } var file_sourcehub_feegrant_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_feegrant_module_v1_module_proto_goTypes = []interface{}{ (*Module)(nil), // 0: sourcehub.feegrant.module.v1.Module } var file_sourcehub_feegrant_module_v1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_feegrant_module_v1_module_proto_init() } func file_sourcehub_feegrant_module_v1_module_proto_init() { if File_sourcehub_feegrant_module_v1_module_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_feegrant_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_feegrant_module_v1_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_feegrant_module_v1_module_proto_goTypes, DependencyIndexes: file_sourcehub_feegrant_module_v1_module_proto_depIdxs, MessageInfos: file_sourcehub_feegrant_module_v1_module_proto_msgTypes, }.Build() File_sourcehub_feegrant_module_v1_module_proto = out.File file_sourcehub_feegrant_module_v1_module_proto_rawDesc = nil file_sourcehub_feegrant_module_v1_module_proto_goTypes = nil file_sourcehub_feegrant_module_v1_module_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/feegrant/v1beta1/feegrant.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package feegrantv1beta1 import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_BasicAllowance_1_list)(nil) type _BasicAllowance_1_list struct { list *[]*v1beta1.Coin } func (x *_BasicAllowance_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_BasicAllowance_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_BasicAllowance_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } func (x *_BasicAllowance_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } func (x *_BasicAllowance_1_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_BasicAllowance_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_BasicAllowance_1_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_BasicAllowance_1_list) IsValid() bool { return x.list != nil } var ( md_BasicAllowance protoreflect.MessageDescriptor fd_BasicAllowance_spend_limit protoreflect.FieldDescriptor fd_BasicAllowance_expiration protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_feegrant_proto_init() md_BasicAllowance = File_sourcehub_feegrant_v1beta1_feegrant_proto.Messages().ByName("BasicAllowance") fd_BasicAllowance_spend_limit = md_BasicAllowance.Fields().ByName("spend_limit") fd_BasicAllowance_expiration = md_BasicAllowance.Fields().ByName("expiration") } var _ protoreflect.Message = (*fastReflection_BasicAllowance)(nil) type fastReflection_BasicAllowance BasicAllowance func (x *BasicAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_BasicAllowance)(x) } func (x *BasicAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_BasicAllowance_messageType fastReflection_BasicAllowance_messageType var _ protoreflect.MessageType = fastReflection_BasicAllowance_messageType{} type fastReflection_BasicAllowance_messageType struct{} func (x fastReflection_BasicAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_BasicAllowance)(nil) } func (x fastReflection_BasicAllowance_messageType) New() protoreflect.Message { return new(fastReflection_BasicAllowance) } func (x fastReflection_BasicAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_BasicAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_BasicAllowance) Descriptor() protoreflect.MessageDescriptor { return md_BasicAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_BasicAllowance) Type() protoreflect.MessageType { return _fastReflection_BasicAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_BasicAllowance) New() protoreflect.Message { return new(fastReflection_BasicAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_BasicAllowance) Interface() protoreflect.ProtoMessage { return (*BasicAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_BasicAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.SpendLimit) != 0 { value := protoreflect.ValueOfList(&_BasicAllowance_1_list{list: &x.SpendLimit}) if !f(fd_BasicAllowance_spend_limit, value) { return } } if x.Expiration != nil { value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) if !f(fd_BasicAllowance_expiration, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_BasicAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.BasicAllowance.spend_limit": return len(x.SpendLimit) != 0 case "sourcehub.feegrant.v1beta1.BasicAllowance.expiration": return x.Expiration != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.BasicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.BasicAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_BasicAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.BasicAllowance.spend_limit": x.SpendLimit = nil case "sourcehub.feegrant.v1beta1.BasicAllowance.expiration": x.Expiration = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.BasicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.BasicAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_BasicAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.BasicAllowance.spend_limit": if len(x.SpendLimit) == 0 { return protoreflect.ValueOfList(&_BasicAllowance_1_list{}) } listValue := &_BasicAllowance_1_list{list: &x.SpendLimit} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.BasicAllowance.expiration": value := x.Expiration return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.BasicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.BasicAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_BasicAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.BasicAllowance.spend_limit": lv := value.List() clv := lv.(*_BasicAllowance_1_list) x.SpendLimit = *clv.list case "sourcehub.feegrant.v1beta1.BasicAllowance.expiration": x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.BasicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.BasicAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_BasicAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.BasicAllowance.spend_limit": if x.SpendLimit == nil { x.SpendLimit = []*v1beta1.Coin{} } value := &_BasicAllowance_1_list{list: &x.SpendLimit} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.BasicAllowance.expiration": if x.Expiration == nil { x.Expiration = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.BasicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.BasicAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_BasicAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.BasicAllowance.spend_limit": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_BasicAllowance_1_list{list: &list}) case "sourcehub.feegrant.v1beta1.BasicAllowance.expiration": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.BasicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.BasicAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_BasicAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.BasicAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_BasicAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_BasicAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_BasicAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_BasicAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*BasicAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.SpendLimit) > 0 { for _, e := range x.SpendLimit { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Expiration != nil { l = options.Size(x.Expiration) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*BasicAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Expiration != nil { encoded, err := options.Marshal(x.Expiration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.SpendLimit) > 0 { for iNdEx := len(x.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.SpendLimit[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*BasicAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BasicAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BasicAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.SpendLimit = append(x.SpendLimit, &v1beta1.Coin{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SpendLimit[len(x.SpendLimit)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Expiration == nil { x.Expiration = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_PeriodicAllowance_3_list)(nil) type _PeriodicAllowance_3_list struct { list *[]*v1beta1.Coin } func (x *_PeriodicAllowance_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_PeriodicAllowance_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_PeriodicAllowance_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } func (x *_PeriodicAllowance_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } func (x *_PeriodicAllowance_3_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_PeriodicAllowance_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_PeriodicAllowance_3_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_PeriodicAllowance_3_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_PeriodicAllowance_4_list)(nil) type _PeriodicAllowance_4_list struct { list *[]*v1beta1.Coin } func (x *_PeriodicAllowance_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_PeriodicAllowance_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_PeriodicAllowance_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } func (x *_PeriodicAllowance_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } func (x *_PeriodicAllowance_4_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_PeriodicAllowance_4_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_PeriodicAllowance_4_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_PeriodicAllowance_4_list) IsValid() bool { return x.list != nil } var ( md_PeriodicAllowance protoreflect.MessageDescriptor fd_PeriodicAllowance_basic protoreflect.FieldDescriptor fd_PeriodicAllowance_period protoreflect.FieldDescriptor fd_PeriodicAllowance_period_spend_limit protoreflect.FieldDescriptor fd_PeriodicAllowance_period_can_spend protoreflect.FieldDescriptor fd_PeriodicAllowance_period_reset protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_feegrant_proto_init() md_PeriodicAllowance = File_sourcehub_feegrant_v1beta1_feegrant_proto.Messages().ByName("PeriodicAllowance") fd_PeriodicAllowance_basic = md_PeriodicAllowance.Fields().ByName("basic") fd_PeriodicAllowance_period = md_PeriodicAllowance.Fields().ByName("period") fd_PeriodicAllowance_period_spend_limit = md_PeriodicAllowance.Fields().ByName("period_spend_limit") fd_PeriodicAllowance_period_can_spend = md_PeriodicAllowance.Fields().ByName("period_can_spend") fd_PeriodicAllowance_period_reset = md_PeriodicAllowance.Fields().ByName("period_reset") } var _ protoreflect.Message = (*fastReflection_PeriodicAllowance)(nil) type fastReflection_PeriodicAllowance PeriodicAllowance func (x *PeriodicAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_PeriodicAllowance)(x) } func (x *PeriodicAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PeriodicAllowance_messageType fastReflection_PeriodicAllowance_messageType var _ protoreflect.MessageType = fastReflection_PeriodicAllowance_messageType{} type fastReflection_PeriodicAllowance_messageType struct{} func (x fastReflection_PeriodicAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_PeriodicAllowance)(nil) } func (x fastReflection_PeriodicAllowance_messageType) New() protoreflect.Message { return new(fastReflection_PeriodicAllowance) } func (x fastReflection_PeriodicAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PeriodicAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PeriodicAllowance) Descriptor() protoreflect.MessageDescriptor { return md_PeriodicAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PeriodicAllowance) Type() protoreflect.MessageType { return _fastReflection_PeriodicAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PeriodicAllowance) New() protoreflect.Message { return new(fastReflection_PeriodicAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PeriodicAllowance) Interface() protoreflect.ProtoMessage { return (*PeriodicAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PeriodicAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Basic != nil { value := protoreflect.ValueOfMessage(x.Basic.ProtoReflect()) if !f(fd_PeriodicAllowance_basic, value) { return } } if x.Period != nil { value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) if !f(fd_PeriodicAllowance_period, value) { return } } if len(x.PeriodSpendLimit) != 0 { value := protoreflect.ValueOfList(&_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit}) if !f(fd_PeriodicAllowance_period_spend_limit, value) { return } } if len(x.PeriodCanSpend) != 0 { value := protoreflect.ValueOfList(&_PeriodicAllowance_4_list{list: &x.PeriodCanSpend}) if !f(fd_PeriodicAllowance_period_can_spend, value) { return } } if x.PeriodReset != nil { value := protoreflect.ValueOfMessage(x.PeriodReset.ProtoReflect()) if !f(fd_PeriodicAllowance_period_reset, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PeriodicAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.PeriodicAllowance.basic": return x.Basic != nil case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period": return x.Period != nil case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": return len(x.PeriodSpendLimit) != 0 case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_can_spend": return len(x.PeriodCanSpend) != 0 case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_reset": return x.PeriodReset != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.PeriodicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.PeriodicAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PeriodicAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.PeriodicAllowance.basic": x.Basic = nil case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period": x.Period = nil case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": x.PeriodSpendLimit = nil case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_can_spend": x.PeriodCanSpend = nil case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_reset": x.PeriodReset = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.PeriodicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.PeriodicAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PeriodicAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.PeriodicAllowance.basic": value := x.Basic return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period": value := x.Period return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": if len(x.PeriodSpendLimit) == 0 { return protoreflect.ValueOfList(&_PeriodicAllowance_3_list{}) } listValue := &_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_can_spend": if len(x.PeriodCanSpend) == 0 { return protoreflect.ValueOfList(&_PeriodicAllowance_4_list{}) } listValue := &_PeriodicAllowance_4_list{list: &x.PeriodCanSpend} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_reset": value := x.PeriodReset return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.PeriodicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.PeriodicAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PeriodicAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.PeriodicAllowance.basic": x.Basic = value.Message().Interface().(*BasicAllowance) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period": x.Period = value.Message().Interface().(*durationpb.Duration) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": lv := value.List() clv := lv.(*_PeriodicAllowance_3_list) x.PeriodSpendLimit = *clv.list case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_can_spend": lv := value.List() clv := lv.(*_PeriodicAllowance_4_list) x.PeriodCanSpend = *clv.list case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_reset": x.PeriodReset = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.PeriodicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.PeriodicAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PeriodicAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.PeriodicAllowance.basic": if x.Basic == nil { x.Basic = new(BasicAllowance) } return protoreflect.ValueOfMessage(x.Basic.ProtoReflect()) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period": if x.Period == nil { x.Period = new(durationpb.Duration) } return protoreflect.ValueOfMessage(x.Period.ProtoReflect()) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": if x.PeriodSpendLimit == nil { x.PeriodSpendLimit = []*v1beta1.Coin{} } value := &_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_can_spend": if x.PeriodCanSpend == nil { x.PeriodCanSpend = []*v1beta1.Coin{} } value := &_PeriodicAllowance_4_list{list: &x.PeriodCanSpend} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_reset": if x.PeriodReset == nil { x.PeriodReset = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.PeriodReset.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.PeriodicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.PeriodicAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PeriodicAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.PeriodicAllowance.basic": m := new(BasicAllowance) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period": m := new(durationpb.Duration) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_PeriodicAllowance_3_list{list: &list}) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_can_spend": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_PeriodicAllowance_4_list{list: &list}) case "sourcehub.feegrant.v1beta1.PeriodicAllowance.period_reset": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.PeriodicAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.PeriodicAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PeriodicAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.PeriodicAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PeriodicAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PeriodicAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PeriodicAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PeriodicAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PeriodicAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Basic != nil { l = options.Size(x.Basic) n += 1 + l + runtime.Sov(uint64(l)) } if x.Period != nil { l = options.Size(x.Period) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.PeriodSpendLimit) > 0 { for _, e := range x.PeriodSpendLimit { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.PeriodCanSpend) > 0 { for _, e := range x.PeriodCanSpend { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.PeriodReset != nil { l = options.Size(x.PeriodReset) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PeriodicAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.PeriodReset != nil { encoded, err := options.Marshal(x.PeriodReset) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if len(x.PeriodCanSpend) > 0 { for iNdEx := len(x.PeriodCanSpend) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.PeriodCanSpend[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } } if len(x.PeriodSpendLimit) > 0 { for iNdEx := len(x.PeriodSpendLimit) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.PeriodSpendLimit[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } } if x.Period != nil { encoded, err := options.Marshal(x.Period) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.Basic != nil { encoded, err := options.Marshal(x.Basic) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PeriodicAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PeriodicAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PeriodicAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Basic == nil { x.Basic = &BasicAllowance{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Basic); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Period == nil { x.Period = &durationpb.Duration{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Period); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeriodSpendLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PeriodSpendLimit = append(x.PeriodSpendLimit, &v1beta1.Coin{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodSpendLimit[len(x.PeriodSpendLimit)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeriodCanSpend", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PeriodCanSpend = append(x.PeriodCanSpend, &v1beta1.Coin{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodCanSpend[len(x.PeriodCanSpend)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeriodReset", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.PeriodReset == nil { x.PeriodReset = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodReset); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_AllowedMsgAllowance_2_list)(nil) type _AllowedMsgAllowance_2_list struct { list *[]string } func (x *_AllowedMsgAllowance_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_AllowedMsgAllowance_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } func (x *_AllowedMsgAllowance_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_AllowedMsgAllowance_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_AllowedMsgAllowance_2_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message AllowedMsgAllowance at list field AllowedMessages as it is not of Message kind")) } func (x *_AllowedMsgAllowance_2_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_AllowedMsgAllowance_2_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_AllowedMsgAllowance_2_list) IsValid() bool { return x.list != nil } var ( md_AllowedMsgAllowance protoreflect.MessageDescriptor fd_AllowedMsgAllowance_allowance protoreflect.FieldDescriptor fd_AllowedMsgAllowance_allowed_messages protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_feegrant_proto_init() md_AllowedMsgAllowance = File_sourcehub_feegrant_v1beta1_feegrant_proto.Messages().ByName("AllowedMsgAllowance") fd_AllowedMsgAllowance_allowance = md_AllowedMsgAllowance.Fields().ByName("allowance") fd_AllowedMsgAllowance_allowed_messages = md_AllowedMsgAllowance.Fields().ByName("allowed_messages") } var _ protoreflect.Message = (*fastReflection_AllowedMsgAllowance)(nil) type fastReflection_AllowedMsgAllowance AllowedMsgAllowance func (x *AllowedMsgAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_AllowedMsgAllowance)(x) } func (x *AllowedMsgAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AllowedMsgAllowance_messageType fastReflection_AllowedMsgAllowance_messageType var _ protoreflect.MessageType = fastReflection_AllowedMsgAllowance_messageType{} type fastReflection_AllowedMsgAllowance_messageType struct{} func (x fastReflection_AllowedMsgAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_AllowedMsgAllowance)(nil) } func (x fastReflection_AllowedMsgAllowance_messageType) New() protoreflect.Message { return new(fastReflection_AllowedMsgAllowance) } func (x fastReflection_AllowedMsgAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AllowedMsgAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AllowedMsgAllowance) Descriptor() protoreflect.MessageDescriptor { return md_AllowedMsgAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AllowedMsgAllowance) Type() protoreflect.MessageType { return _fastReflection_AllowedMsgAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AllowedMsgAllowance) New() protoreflect.Message { return new(fastReflection_AllowedMsgAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AllowedMsgAllowance) Interface() protoreflect.ProtoMessage { return (*AllowedMsgAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AllowedMsgAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Allowance != nil { value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) if !f(fd_AllowedMsgAllowance_allowance, value) { return } } if len(x.AllowedMessages) != 0 { value := protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{list: &x.AllowedMessages}) if !f(fd_AllowedMsgAllowance_allowed_messages, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AllowedMsgAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowance": return x.Allowance != nil case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": return len(x.AllowedMessages) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.AllowedMsgAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.AllowedMsgAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllowedMsgAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowance": x.Allowance = nil case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": x.AllowedMessages = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.AllowedMsgAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.AllowedMsgAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AllowedMsgAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowance": value := x.Allowance return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": if len(x.AllowedMessages) == 0 { return protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{}) } listValue := &_AllowedMsgAllowance_2_list{list: &x.AllowedMessages} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.AllowedMsgAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.AllowedMsgAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllowedMsgAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowance": x.Allowance = value.Message().Interface().(*anypb.Any) case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": lv := value.List() clv := lv.(*_AllowedMsgAllowance_2_list) x.AllowedMessages = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.AllowedMsgAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.AllowedMsgAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllowedMsgAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowance": if x.Allowance == nil { x.Allowance = new(anypb.Any) } return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": if x.AllowedMessages == nil { x.AllowedMessages = []string{} } value := &_AllowedMsgAllowance_2_list{list: &x.AllowedMessages} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.AllowedMsgAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.AllowedMsgAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AllowedMsgAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowance": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": list := []string{} return protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.AllowedMsgAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.AllowedMsgAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AllowedMsgAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.AllowedMsgAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AllowedMsgAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllowedMsgAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AllowedMsgAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AllowedMsgAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AllowedMsgAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Allowance != nil { l = options.Size(x.Allowance) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.AllowedMessages) > 0 { for _, s := range x.AllowedMessages { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AllowedMsgAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.AllowedMessages) > 0 { for iNdEx := len(x.AllowedMessages) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.AllowedMessages[iNdEx]) copy(dAtA[i:], x.AllowedMessages[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AllowedMessages[iNdEx]))) i-- dAtA[i] = 0x12 } } if x.Allowance != nil { encoded, err := options.Marshal(x.Allowance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AllowedMsgAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllowedMsgAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllowedMsgAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Allowance == nil { x.Allowance = &anypb.Any{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedMessages", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.AllowedMessages = append(x.AllowedMessages, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Grant protoreflect.MessageDescriptor fd_Grant_granter protoreflect.FieldDescriptor fd_Grant_grantee protoreflect.FieldDescriptor fd_Grant_allowance protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_feegrant_proto_init() md_Grant = File_sourcehub_feegrant_v1beta1_feegrant_proto.Messages().ByName("Grant") fd_Grant_granter = md_Grant.Fields().ByName("granter") fd_Grant_grantee = md_Grant.Fields().ByName("grantee") fd_Grant_allowance = md_Grant.Fields().ByName("allowance") } var _ protoreflect.Message = (*fastReflection_Grant)(nil) type fastReflection_Grant Grant func (x *Grant) ProtoReflect() protoreflect.Message { return (*fastReflection_Grant)(x) } func (x *Grant) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Grant_messageType fastReflection_Grant_messageType var _ protoreflect.MessageType = fastReflection_Grant_messageType{} type fastReflection_Grant_messageType struct{} func (x fastReflection_Grant_messageType) Zero() protoreflect.Message { return (*fastReflection_Grant)(nil) } func (x fastReflection_Grant_messageType) New() protoreflect.Message { return new(fastReflection_Grant) } func (x fastReflection_Grant_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Grant } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Grant) Descriptor() protoreflect.MessageDescriptor { return md_Grant } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Grant) Type() protoreflect.MessageType { return _fastReflection_Grant_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Grant) New() protoreflect.Message { return new(fastReflection_Grant) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Grant) Interface() protoreflect.ProtoMessage { return (*Grant)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Grant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_Grant_granter, value) { return } } if x.Grantee != "" { value := protoreflect.ValueOfString(x.Grantee) if !f(fd_Grant_grantee, value) { return } } if x.Allowance != nil { value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) if !f(fd_Grant_allowance, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Grant) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.Grant.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.Grant.grantee": return x.Grantee != "" case "sourcehub.feegrant.v1beta1.Grant.allowance": return x.Allowance != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.Grant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.Grant does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Grant) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.Grant.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.Grant.grantee": x.Grantee = "" case "sourcehub.feegrant.v1beta1.Grant.allowance": x.Allowance = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.Grant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.Grant does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Grant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.Grant.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.Grant.grantee": value := x.Grantee return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.Grant.allowance": value := x.Allowance return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.Grant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.Grant does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Grant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.Grant.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.Grant.grantee": x.Grantee = value.Interface().(string) case "sourcehub.feegrant.v1beta1.Grant.allowance": x.Allowance = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.Grant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.Grant does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Grant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.Grant.allowance": if x.Allowance == nil { x.Allowance = new(anypb.Any) } return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) case "sourcehub.feegrant.v1beta1.Grant.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.Grant is not mutable")) case "sourcehub.feegrant.v1beta1.Grant.grantee": panic(fmt.Errorf("field grantee of message sourcehub.feegrant.v1beta1.Grant is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.Grant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.Grant does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Grant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.Grant.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.Grant.grantee": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.Grant.allowance": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.Grant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.Grant does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Grant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.Grant", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Grant) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Grant) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Grant) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Grant) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Grant) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Grantee) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Allowance != nil { l = options.Size(x.Allowance) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Grant) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Allowance != nil { encoded, err := options.Marshal(x.Allowance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.Grantee) > 0 { i -= len(x.Grantee) copy(dAtA[i:], x.Grantee) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Grant) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Grant: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Grant: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Allowance == nil { x.Allowance = &anypb.Any{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DIDGrant protoreflect.MessageDescriptor fd_DIDGrant_granter protoreflect.FieldDescriptor fd_DIDGrant_grantee_did protoreflect.FieldDescriptor fd_DIDGrant_allowance protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_feegrant_proto_init() md_DIDGrant = File_sourcehub_feegrant_v1beta1_feegrant_proto.Messages().ByName("DIDGrant") fd_DIDGrant_granter = md_DIDGrant.Fields().ByName("granter") fd_DIDGrant_grantee_did = md_DIDGrant.Fields().ByName("grantee_did") fd_DIDGrant_allowance = md_DIDGrant.Fields().ByName("allowance") } var _ protoreflect.Message = (*fastReflection_DIDGrant)(nil) type fastReflection_DIDGrant DIDGrant func (x *DIDGrant) ProtoReflect() protoreflect.Message { return (*fastReflection_DIDGrant)(x) } func (x *DIDGrant) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DIDGrant_messageType fastReflection_DIDGrant_messageType var _ protoreflect.MessageType = fastReflection_DIDGrant_messageType{} type fastReflection_DIDGrant_messageType struct{} func (x fastReflection_DIDGrant_messageType) Zero() protoreflect.Message { return (*fastReflection_DIDGrant)(nil) } func (x fastReflection_DIDGrant_messageType) New() protoreflect.Message { return new(fastReflection_DIDGrant) } func (x fastReflection_DIDGrant_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DIDGrant } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DIDGrant) Descriptor() protoreflect.MessageDescriptor { return md_DIDGrant } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DIDGrant) Type() protoreflect.MessageType { return _fastReflection_DIDGrant_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DIDGrant) New() protoreflect.Message { return new(fastReflection_DIDGrant) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DIDGrant) Interface() protoreflect.ProtoMessage { return (*DIDGrant)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DIDGrant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_DIDGrant_granter, value) { return } } if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_DIDGrant_grantee_did, value) { return } } if x.Allowance != nil { value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) if !f(fd_DIDGrant_allowance, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DIDGrant) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.DIDGrant.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.DIDGrant.grantee_did": return x.GranteeDid != "" case "sourcehub.feegrant.v1beta1.DIDGrant.allowance": return x.Allowance != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.DIDGrant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.DIDGrant does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DIDGrant) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.DIDGrant.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.DIDGrant.grantee_did": x.GranteeDid = "" case "sourcehub.feegrant.v1beta1.DIDGrant.allowance": x.Allowance = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.DIDGrant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.DIDGrant does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DIDGrant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.DIDGrant.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.DIDGrant.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.DIDGrant.allowance": value := x.Allowance return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.DIDGrant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.DIDGrant does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DIDGrant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.DIDGrant.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.DIDGrant.grantee_did": x.GranteeDid = value.Interface().(string) case "sourcehub.feegrant.v1beta1.DIDGrant.allowance": x.Allowance = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.DIDGrant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.DIDGrant does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DIDGrant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.DIDGrant.allowance": if x.Allowance == nil { x.Allowance = new(anypb.Any) } return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) case "sourcehub.feegrant.v1beta1.DIDGrant.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.DIDGrant is not mutable")) case "sourcehub.feegrant.v1beta1.DIDGrant.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.feegrant.v1beta1.DIDGrant is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.DIDGrant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.DIDGrant does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DIDGrant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.DIDGrant.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.DIDGrant.grantee_did": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.DIDGrant.allowance": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.DIDGrant")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.DIDGrant does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DIDGrant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.DIDGrant", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DIDGrant) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DIDGrant) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DIDGrant) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DIDGrant) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DIDGrant) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Allowance != nil { l = options.Size(x.Allowance) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DIDGrant) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Allowance != nil { encoded, err := options.Marshal(x.Allowance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DIDGrant) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DIDGrant: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DIDGrant: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Allowance == nil { x.Allowance = &anypb.Any{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/feegrant/v1beta1/feegrant.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // BasicAllowance implements Allowance with a one-time grant of coins // that optionally expires. The grantee can use up to SpendLimit to cover fees. type BasicAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // spend_limit specifies the maximum amount of coins that can be spent // by this allowance and will be updated as coins are spent. If it is // empty, there is no spend limit and any amount of coins can be spent. SpendLimit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3" json:"spend_limit,omitempty"` // expiration specifies an optional time when this allowance expires Expiration *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` } func (x *BasicAllowance) Reset() { *x = BasicAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *BasicAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*BasicAllowance) ProtoMessage() {} // Deprecated: Use BasicAllowance.ProtoReflect.Descriptor instead. func (*BasicAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{0} } func (x *BasicAllowance) GetSpendLimit() []*v1beta1.Coin { if x != nil { return x.SpendLimit } return nil } func (x *BasicAllowance) GetExpiration() *timestamppb.Timestamp { if x != nil { return x.Expiration } return nil } // PeriodicAllowance extends Allowance to allow for both a maximum cap, // as well as a limit per time period. type PeriodicAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // basic specifies a struct of `BasicAllowance` Basic *BasicAllowance `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic,omitempty"` // period specifies the time duration in which period_spend_limit coins can // be spent before that allowance is reset Period *durationpb.Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period,omitempty"` // period_spend_limit specifies the maximum number of coins that can be spent // in the period PeriodSpendLimit []*v1beta1.Coin `protobuf:"bytes,3,rep,name=period_spend_limit,json=periodSpendLimit,proto3" json:"period_spend_limit,omitempty"` // period_can_spend is the number of coins left to be spent before the period_reset time PeriodCanSpend []*v1beta1.Coin `protobuf:"bytes,4,rep,name=period_can_spend,json=periodCanSpend,proto3" json:"period_can_spend,omitempty"` // period_reset is the time at which this period resets and a new one begins, // it is calculated from the start time of the first transaction after the // last period ended PeriodReset *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=period_reset,json=periodReset,proto3" json:"period_reset,omitempty"` } func (x *PeriodicAllowance) Reset() { *x = PeriodicAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PeriodicAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*PeriodicAllowance) ProtoMessage() {} // Deprecated: Use PeriodicAllowance.ProtoReflect.Descriptor instead. func (*PeriodicAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{1} } func (x *PeriodicAllowance) GetBasic() *BasicAllowance { if x != nil { return x.Basic } return nil } func (x *PeriodicAllowance) GetPeriod() *durationpb.Duration { if x != nil { return x.Period } return nil } func (x *PeriodicAllowance) GetPeriodSpendLimit() []*v1beta1.Coin { if x != nil { return x.PeriodSpendLimit } return nil } func (x *PeriodicAllowance) GetPeriodCanSpend() []*v1beta1.Coin { if x != nil { return x.PeriodCanSpend } return nil } func (x *PeriodicAllowance) GetPeriodReset() *timestamppb.Timestamp { if x != nil { return x.PeriodReset } return nil } // AllowedMsgAllowance creates allowance only for specified message types. type AllowedMsgAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allowance can be any of basic and periodic fee allowance. Allowance *anypb.Any `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` // allowed_messages are the messages for which the grantee has the access. AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"` } func (x *AllowedMsgAllowance) Reset() { *x = AllowedMsgAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AllowedMsgAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*AllowedMsgAllowance) ProtoMessage() {} // Deprecated: Use AllowedMsgAllowance.ProtoReflect.Descriptor instead. func (*AllowedMsgAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{2} } func (x *AllowedMsgAllowance) GetAllowance() *anypb.Any { if x != nil { return x.Allowance } return nil } func (x *AllowedMsgAllowance) GetAllowedMessages() []string { if x != nil { return x.AllowedMessages } return nil } // Grant is stored in the KVStore to record a grant with full context type Grant struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (x *Grant) Reset() { *x = Grant{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Grant) String() string { return protoimpl.X.MessageStringOf(x) } func (*Grant) ProtoMessage() {} // Deprecated: Use Grant.ProtoReflect.Descriptor instead. func (*Grant) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{3} } func (x *Grant) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *Grant) GetGrantee() string { if x != nil { return x.Grantee } return "" } func (x *Grant) GetAllowance() *anypb.Any { if x != nil { return x.Allowance } return nil } // DIDGrant is stored in the KVStore to record a grant with DID as grantee type DIDGrant struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID of the user being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (x *DIDGrant) Reset() { *x = DIDGrant{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DIDGrant) String() string { return protoimpl.X.MessageStringOf(x) } func (*DIDGrant) ProtoMessage() {} // Deprecated: Use DIDGrant.ProtoReflect.Descriptor instead. func (*DIDGrant) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{4} } func (x *DIDGrant) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *DIDGrant) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } func (x *DIDGrant) GetAllowance() *anypb.Any { if x != nil { return x.Allowance } return nil } var File_sourcehub_feegrant_v1beta1_feegrant_proto protoreflect.FileDescriptor var file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDesc = []byte{ 0x0a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x0e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x4a, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xdf, 0x04, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, 0x40, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x8f, 0x01, 0x0a, 0x12, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x43, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x4c, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x4d, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x2c, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x3a, 0x53, 0x88, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x2c, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x08, 0x44, 0x49, 0x44, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x12, 0x60, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x2c, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xf6, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x46, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescOnce sync.Once file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescData = file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDesc ) func file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescGZIP() []byte { file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescOnce.Do(func() { file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescData) }) return file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDescData } var file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_sourcehub_feegrant_v1beta1_feegrant_proto_goTypes = []interface{}{ (*BasicAllowance)(nil), // 0: sourcehub.feegrant.v1beta1.BasicAllowance (*PeriodicAllowance)(nil), // 1: sourcehub.feegrant.v1beta1.PeriodicAllowance (*AllowedMsgAllowance)(nil), // 2: sourcehub.feegrant.v1beta1.AllowedMsgAllowance (*Grant)(nil), // 3: sourcehub.feegrant.v1beta1.Grant (*DIDGrant)(nil), // 4: sourcehub.feegrant.v1beta1.DIDGrant (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp (*durationpb.Duration)(nil), // 7: google.protobuf.Duration (*anypb.Any)(nil), // 8: google.protobuf.Any } var file_sourcehub_feegrant_v1beta1_feegrant_proto_depIdxs = []int32{ 5, // 0: sourcehub.feegrant.v1beta1.BasicAllowance.spend_limit:type_name -> cosmos.base.v1beta1.Coin 6, // 1: sourcehub.feegrant.v1beta1.BasicAllowance.expiration:type_name -> google.protobuf.Timestamp 0, // 2: sourcehub.feegrant.v1beta1.PeriodicAllowance.basic:type_name -> sourcehub.feegrant.v1beta1.BasicAllowance 7, // 3: sourcehub.feegrant.v1beta1.PeriodicAllowance.period:type_name -> google.protobuf.Duration 5, // 4: sourcehub.feegrant.v1beta1.PeriodicAllowance.period_spend_limit:type_name -> cosmos.base.v1beta1.Coin 5, // 5: sourcehub.feegrant.v1beta1.PeriodicAllowance.period_can_spend:type_name -> cosmos.base.v1beta1.Coin 6, // 6: sourcehub.feegrant.v1beta1.PeriodicAllowance.period_reset:type_name -> google.protobuf.Timestamp 8, // 7: sourcehub.feegrant.v1beta1.AllowedMsgAllowance.allowance:type_name -> google.protobuf.Any 8, // 8: sourcehub.feegrant.v1beta1.Grant.allowance:type_name -> google.protobuf.Any 8, // 9: sourcehub.feegrant.v1beta1.DIDGrant.allowance:type_name -> google.protobuf.Any 10, // [10:10] is the sub-list for method output_type 10, // [10:10] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name 10, // [10:10] is the sub-list for extension extendee 0, // [0:10] is the sub-list for field type_name } func init() { file_sourcehub_feegrant_v1beta1_feegrant_proto_init() } func file_sourcehub_feegrant_v1beta1_feegrant_proto_init() { if File_sourcehub_feegrant_v1beta1_feegrant_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BasicAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeriodicAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllowedMsgAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Grant); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DIDGrant); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDesc, NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_feegrant_v1beta1_feegrant_proto_goTypes, DependencyIndexes: file_sourcehub_feegrant_v1beta1_feegrant_proto_depIdxs, MessageInfos: file_sourcehub_feegrant_v1beta1_feegrant_proto_msgTypes, }.Build() File_sourcehub_feegrant_v1beta1_feegrant_proto = out.File file_sourcehub_feegrant_v1beta1_feegrant_proto_rawDesc = nil file_sourcehub_feegrant_v1beta1_feegrant_proto_goTypes = nil file_sourcehub_feegrant_v1beta1_feegrant_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/feegrant/v1beta1/genesis.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package feegrantv1beta1 import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_GenesisState_1_list)(nil) type _GenesisState_1_list struct { list *[]*Grant } func (x *_GenesisState_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) (*x.list)[i] = concreteValue } func (x *_GenesisState_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { v := new(Grant) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_1_list) NewElement() protoreflect.Value { v := new(Grant) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_1_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_2_list)(nil) type _GenesisState_2_list struct { list *[]*DIDGrant } func (x *_GenesisState_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*DIDGrant) (*x.list)[i] = concreteValue } func (x *_GenesisState_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*DIDGrant) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { v := new(DIDGrant) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_2_list) NewElement() protoreflect.Value { v := new(DIDGrant) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_2_list) IsValid() bool { return x.list != nil } var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_allowances protoreflect.FieldDescriptor fd_GenesisState_did_allowances protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_genesis_proto_init() md_GenesisState = File_sourcehub_feegrant_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_allowances = md_GenesisState.Fields().ByName("allowances") fd_GenesisState_did_allowances = md_GenesisState.Fields().ByName("did_allowances") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) type fastReflection_GenesisState GenesisState func (x *GenesisState) ProtoReflect() protoreflect.Message { return (*fastReflection_GenesisState)(x) } func (x *GenesisState) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} type fastReflection_GenesisState_messageType struct{} func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { return (*fastReflection_GenesisState)(nil) } func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { return new(fastReflection_GenesisState) } func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { return _fastReflection_GenesisState_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GenesisState) New() protoreflect.Message { return new(fastReflection_GenesisState) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { return (*GenesisState)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Allowances) != 0 { value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Allowances}) if !f(fd_GenesisState_allowances, value) { return } } if len(x.DidAllowances) != 0 { value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.DidAllowances}) if !f(fd_GenesisState_did_allowances, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.GenesisState.allowances": return len(x.Allowances) != 0 case "sourcehub.feegrant.v1beta1.GenesisState.did_allowances": return len(x.DidAllowances) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.GenesisState.allowances": x.Allowances = nil case "sourcehub.feegrant.v1beta1.GenesisState.did_allowances": x.DidAllowances = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.GenesisState.allowances": if len(x.Allowances) == 0 { return protoreflect.ValueOfList(&_GenesisState_1_list{}) } listValue := &_GenesisState_1_list{list: &x.Allowances} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.GenesisState.did_allowances": if len(x.DidAllowances) == 0 { return protoreflect.ValueOfList(&_GenesisState_2_list{}) } listValue := &_GenesisState_2_list{list: &x.DidAllowances} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.GenesisState.allowances": lv := value.List() clv := lv.(*_GenesisState_1_list) x.Allowances = *clv.list case "sourcehub.feegrant.v1beta1.GenesisState.did_allowances": lv := value.List() clv := lv.(*_GenesisState_2_list) x.DidAllowances = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.GenesisState.allowances": if x.Allowances == nil { x.Allowances = []*Grant{} } value := &_GenesisState_1_list{list: &x.Allowances} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.GenesisState.did_allowances": if x.DidAllowances == nil { x.DidAllowances = []*DIDGrant{} } value := &_GenesisState_2_list{list: &x.DidAllowances} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.GenesisState.allowances": list := []*Grant{} return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) case "sourcehub.feegrant.v1beta1.GenesisState.did_allowances": list := []*DIDGrant{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.GenesisState", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GenesisState) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Allowances) > 0 { for _, e := range x.Allowances { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.DidAllowances) > 0 { for _, e := range x.DidAllowances { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.DidAllowances) > 0 { for iNdEx := len(x.DidAllowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.DidAllowances[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } } if len(x.Allowances) > 0 { for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Allowances[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Allowances = append(x.Allowances, &Grant{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DidAllowances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DidAllowances = append(x.DidAllowances, &DIDGrant{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DidAllowances[len(x.DidAllowances)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/feegrant/v1beta1/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // GenesisState contains a set of fee allowances, persisted from the store. type GenesisState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` DidAllowances []*DIDGrant `protobuf:"bytes,2,rep,name=did_allowances,json=didAllowances,proto3" json:"did_allowances,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenesisState) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetAllowances() []*Grant { if x != nil { return x.Allowances } return nil } func (x *GenesisState) GetDidAllowances() []*DIDGrant { if x != nil { return x.DidAllowances } return nil } var File_sourcehub_feegrant_v1beta1_genesis_proto protoreflect.FileDescriptor var file_sourcehub_feegrant_v1beta1_genesis_proto_rawDesc = []byte{ 0x0a, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x0e, 0x64, 0x69, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x64, 0x69, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0xf5, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x46, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescOnce sync.Once file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescData = file_sourcehub_feegrant_v1beta1_genesis_proto_rawDesc ) func file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescGZIP() []byte { file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescOnce.Do(func() { file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescData) }) return file_sourcehub_feegrant_v1beta1_genesis_proto_rawDescData } var file_sourcehub_feegrant_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_feegrant_v1beta1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: sourcehub.feegrant.v1beta1.GenesisState (*Grant)(nil), // 1: sourcehub.feegrant.v1beta1.Grant (*DIDGrant)(nil), // 2: sourcehub.feegrant.v1beta1.DIDGrant } var file_sourcehub_feegrant_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: sourcehub.feegrant.v1beta1.GenesisState.allowances:type_name -> sourcehub.feegrant.v1beta1.Grant 2, // 1: sourcehub.feegrant.v1beta1.GenesisState.did_allowances:type_name -> sourcehub.feegrant.v1beta1.DIDGrant 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcehub_feegrant_v1beta1_genesis_proto_init() } func file_sourcehub_feegrant_v1beta1_genesis_proto_init() { if File_sourcehub_feegrant_v1beta1_genesis_proto != nil { return } file_sourcehub_feegrant_v1beta1_feegrant_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_feegrant_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_feegrant_v1beta1_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_feegrant_v1beta1_genesis_proto_goTypes, DependencyIndexes: file_sourcehub_feegrant_v1beta1_genesis_proto_depIdxs, MessageInfos: file_sourcehub_feegrant_v1beta1_genesis_proto_msgTypes, }.Build() File_sourcehub_feegrant_v1beta1_genesis_proto = out.File file_sourcehub_feegrant_v1beta1_genesis_proto_rawDesc = nil file_sourcehub_feegrant_v1beta1_genesis_proto_goTypes = nil file_sourcehub_feegrant_v1beta1_genesis_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/feegrant/v1beta1/query.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package feegrantv1beta1 import ( v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_QueryAllowanceRequest protoreflect.MessageDescriptor fd_QueryAllowanceRequest_granter protoreflect.FieldDescriptor fd_QueryAllowanceRequest_grantee protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryAllowanceRequest = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowanceRequest") fd_QueryAllowanceRequest_granter = md_QueryAllowanceRequest.Fields().ByName("granter") fd_QueryAllowanceRequest_grantee = md_QueryAllowanceRequest.Fields().ByName("grantee") } var _ protoreflect.Message = (*fastReflection_QueryAllowanceRequest)(nil) type fastReflection_QueryAllowanceRequest QueryAllowanceRequest func (x *QueryAllowanceRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAllowanceRequest)(x) } func (x *QueryAllowanceRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAllowanceRequest_messageType fastReflection_QueryAllowanceRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryAllowanceRequest_messageType{} type fastReflection_QueryAllowanceRequest_messageType struct{} func (x fastReflection_QueryAllowanceRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAllowanceRequest)(nil) } func (x fastReflection_QueryAllowanceRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryAllowanceRequest) } func (x fastReflection_QueryAllowanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowanceRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAllowanceRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowanceRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAllowanceRequest) Type() protoreflect.MessageType { return _fastReflection_QueryAllowanceRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAllowanceRequest) New() protoreflect.Message { return new(fastReflection_QueryAllowanceRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAllowanceRequest) Interface() protoreflect.ProtoMessage { return (*QueryAllowanceRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAllowanceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_QueryAllowanceRequest_granter, value) { return } } if x.Grantee != "" { value := protoreflect.ValueOfString(x.Grantee) if !f(fd_QueryAllowanceRequest_grantee, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAllowanceRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.grantee": return x.Grantee != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.grantee": x.Grantee = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAllowanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.grantee": value := x.Grantee return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.grantee": x.Grantee = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.QueryAllowanceRequest is not mutable")) case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.grantee": panic(fmt.Errorf("field grantee of message sourcehub.feegrant.v1beta1.QueryAllowanceRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAllowanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.QueryAllowanceRequest.grantee": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAllowanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryAllowanceRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAllowanceRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAllowanceRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAllowanceRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAllowanceRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Grantee) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAllowanceRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Grantee) > 0 { i -= len(x.Grantee) copy(dAtA[i:], x.Grantee) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAllowanceRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryAllowanceResponse protoreflect.MessageDescriptor fd_QueryAllowanceResponse_allowance protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryAllowanceResponse = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowanceResponse") fd_QueryAllowanceResponse_allowance = md_QueryAllowanceResponse.Fields().ByName("allowance") } var _ protoreflect.Message = (*fastReflection_QueryAllowanceResponse)(nil) type fastReflection_QueryAllowanceResponse QueryAllowanceResponse func (x *QueryAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAllowanceResponse)(x) } func (x *QueryAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAllowanceResponse_messageType fastReflection_QueryAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryAllowanceResponse_messageType{} type fastReflection_QueryAllowanceResponse_messageType struct{} func (x fastReflection_QueryAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAllowanceResponse)(nil) } func (x fastReflection_QueryAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryAllowanceResponse) } func (x fastReflection_QueryAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_QueryAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAllowanceResponse) New() protoreflect.Message { return new(fastReflection_QueryAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*QueryAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Allowance != nil { value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) if !f(fd_QueryAllowanceResponse_allowance, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceResponse.allowance": return x.Allowance != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceResponse.allowance": x.Allowance = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceResponse.allowance": value := x.Allowance return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceResponse.allowance": x.Allowance = value.Message().Interface().(*Grant) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceResponse.allowance": if x.Allowance == nil { x.Allowance = new(Grant) } return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowanceResponse.allowance": m := new(Grant) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Allowance != nil { l = options.Size(x.Allowance) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Allowance != nil { encoded, err := options.Marshal(x.Allowance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Allowance == nil { x.Allowance = &Grant{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryAllowancesRequest protoreflect.MessageDescriptor fd_QueryAllowancesRequest_grantee protoreflect.FieldDescriptor fd_QueryAllowancesRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryAllowancesRequest = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesRequest") fd_QueryAllowancesRequest_grantee = md_QueryAllowancesRequest.Fields().ByName("grantee") fd_QueryAllowancesRequest_pagination = md_QueryAllowancesRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryAllowancesRequest)(nil) type fastReflection_QueryAllowancesRequest QueryAllowancesRequest func (x *QueryAllowancesRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAllowancesRequest)(x) } func (x *QueryAllowancesRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAllowancesRequest_messageType fastReflection_QueryAllowancesRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryAllowancesRequest_messageType{} type fastReflection_QueryAllowancesRequest_messageType struct{} func (x fastReflection_QueryAllowancesRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAllowancesRequest)(nil) } func (x fastReflection_QueryAllowancesRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryAllowancesRequest) } func (x fastReflection_QueryAllowancesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAllowancesRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAllowancesRequest) Type() protoreflect.MessageType { return _fastReflection_QueryAllowancesRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAllowancesRequest) New() protoreflect.Message { return new(fastReflection_QueryAllowancesRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAllowancesRequest) Interface() protoreflect.ProtoMessage { return (*QueryAllowancesRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAllowancesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Grantee != "" { value := protoreflect.ValueOfString(x.Grantee) if !f(fd_QueryAllowancesRequest_grantee, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryAllowancesRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAllowancesRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.grantee": return x.Grantee != "" case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.grantee": x.Grantee = "" case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAllowancesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.grantee": value := x.Grantee return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.grantee": x.Grantee = value.Interface().(string) case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.grantee": panic(fmt.Errorf("field grantee of message sourcehub.feegrant.v1beta1.QueryAllowancesRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAllowancesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.grantee": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.QueryAllowancesRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAllowancesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryAllowancesRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAllowancesRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAllowancesRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAllowancesRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAllowancesRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Grantee) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Grantee) > 0 { i -= len(x.Grantee) copy(dAtA[i:], x.Grantee) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryAllowancesResponse_1_list)(nil) type _QueryAllowancesResponse_1_list struct { list *[]*Grant } func (x *_QueryAllowancesResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryAllowancesResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryAllowancesResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) (*x.list)[i] = concreteValue } func (x *_QueryAllowancesResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) *x.list = append(*x.list, concreteValue) } func (x *_QueryAllowancesResponse_1_list) AppendMutable() protoreflect.Value { v := new(Grant) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryAllowancesResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryAllowancesResponse_1_list) NewElement() protoreflect.Value { v := new(Grant) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryAllowancesResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryAllowancesResponse protoreflect.MessageDescriptor fd_QueryAllowancesResponse_allowances protoreflect.FieldDescriptor fd_QueryAllowancesResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryAllowancesResponse = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesResponse") fd_QueryAllowancesResponse_allowances = md_QueryAllowancesResponse.Fields().ByName("allowances") fd_QueryAllowancesResponse_pagination = md_QueryAllowancesResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryAllowancesResponse)(nil) type fastReflection_QueryAllowancesResponse QueryAllowancesResponse func (x *QueryAllowancesResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAllowancesResponse)(x) } func (x *QueryAllowancesResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAllowancesResponse_messageType fastReflection_QueryAllowancesResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryAllowancesResponse_messageType{} type fastReflection_QueryAllowancesResponse_messageType struct{} func (x fastReflection_QueryAllowancesResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAllowancesResponse)(nil) } func (x fastReflection_QueryAllowancesResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryAllowancesResponse) } func (x fastReflection_QueryAllowancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAllowancesResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAllowancesResponse) Type() protoreflect.MessageType { return _fastReflection_QueryAllowancesResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAllowancesResponse) New() protoreflect.Message { return new(fastReflection_QueryAllowancesResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAllowancesResponse) Interface() protoreflect.ProtoMessage { return (*QueryAllowancesResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAllowancesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Allowances) != 0 { value := protoreflect.ValueOfList(&_QueryAllowancesResponse_1_list{list: &x.Allowances}) if !f(fd_QueryAllowancesResponse_allowances, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryAllowancesResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAllowancesResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.allowances": return len(x.Allowances) != 0 case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.allowances": x.Allowances = nil case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAllowancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.allowances": if len(x.Allowances) == 0 { return protoreflect.ValueOfList(&_QueryAllowancesResponse_1_list{}) } listValue := &_QueryAllowancesResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.allowances": lv := value.List() clv := lv.(*_QueryAllowancesResponse_1_list) x.Allowances = *clv.list case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.allowances": if x.Allowances == nil { x.Allowances = []*Grant{} } value := &_QueryAllowancesResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAllowancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.allowances": list := []*Grant{} return protoreflect.ValueOfList(&_QueryAllowancesResponse_1_list{list: &list}) case "sourcehub.feegrant.v1beta1.QueryAllowancesResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAllowancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryAllowancesResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAllowancesResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAllowancesResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAllowancesResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAllowancesResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Allowances) > 0 { for _, e := range x.Allowances { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Allowances) > 0 { for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Allowances[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Allowances = append(x.Allowances, &Grant{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryAllowancesByGranterRequest protoreflect.MessageDescriptor fd_QueryAllowancesByGranterRequest_granter protoreflect.FieldDescriptor fd_QueryAllowancesByGranterRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryAllowancesByGranterRequest = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesByGranterRequest") fd_QueryAllowancesByGranterRequest_granter = md_QueryAllowancesByGranterRequest.Fields().ByName("granter") fd_QueryAllowancesByGranterRequest_pagination = md_QueryAllowancesByGranterRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryAllowancesByGranterRequest)(nil) type fastReflection_QueryAllowancesByGranterRequest QueryAllowancesByGranterRequest func (x *QueryAllowancesByGranterRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAllowancesByGranterRequest)(x) } func (x *QueryAllowancesByGranterRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAllowancesByGranterRequest_messageType fastReflection_QueryAllowancesByGranterRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryAllowancesByGranterRequest_messageType{} type fastReflection_QueryAllowancesByGranterRequest_messageType struct{} func (x fastReflection_QueryAllowancesByGranterRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAllowancesByGranterRequest)(nil) } func (x fastReflection_QueryAllowancesByGranterRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryAllowancesByGranterRequest) } func (x fastReflection_QueryAllowancesByGranterRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesByGranterRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAllowancesByGranterRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesByGranterRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAllowancesByGranterRequest) Type() protoreflect.MessageType { return _fastReflection_QueryAllowancesByGranterRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAllowancesByGranterRequest) New() protoreflect.Message { return new(fastReflection_QueryAllowancesByGranterRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAllowancesByGranterRequest) Interface() protoreflect.ProtoMessage { return (*QueryAllowancesByGranterRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAllowancesByGranterRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_QueryAllowancesByGranterRequest_granter, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryAllowancesByGranterRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAllowancesByGranterRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAllowancesByGranterRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAllowancesByGranterRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAllowancesByGranterRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAllowancesByGranterRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAllowancesByGranterRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAllowancesByGranterRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAllowancesByGranterRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesByGranterRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesByGranterRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesByGranterRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesByGranterRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryAllowancesByGranterResponse_1_list)(nil) type _QueryAllowancesByGranterResponse_1_list struct { list *[]*Grant } func (x *_QueryAllowancesByGranterResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryAllowancesByGranterResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryAllowancesByGranterResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) (*x.list)[i] = concreteValue } func (x *_QueryAllowancesByGranterResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) *x.list = append(*x.list, concreteValue) } func (x *_QueryAllowancesByGranterResponse_1_list) AppendMutable() protoreflect.Value { v := new(Grant) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryAllowancesByGranterResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryAllowancesByGranterResponse_1_list) NewElement() protoreflect.Value { v := new(Grant) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryAllowancesByGranterResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryAllowancesByGranterResponse protoreflect.MessageDescriptor fd_QueryAllowancesByGranterResponse_allowances protoreflect.FieldDescriptor fd_QueryAllowancesByGranterResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryAllowancesByGranterResponse = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesByGranterResponse") fd_QueryAllowancesByGranterResponse_allowances = md_QueryAllowancesByGranterResponse.Fields().ByName("allowances") fd_QueryAllowancesByGranterResponse_pagination = md_QueryAllowancesByGranterResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryAllowancesByGranterResponse)(nil) type fastReflection_QueryAllowancesByGranterResponse QueryAllowancesByGranterResponse func (x *QueryAllowancesByGranterResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryAllowancesByGranterResponse)(x) } func (x *QueryAllowancesByGranterResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryAllowancesByGranterResponse_messageType fastReflection_QueryAllowancesByGranterResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryAllowancesByGranterResponse_messageType{} type fastReflection_QueryAllowancesByGranterResponse_messageType struct{} func (x fastReflection_QueryAllowancesByGranterResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryAllowancesByGranterResponse)(nil) } func (x fastReflection_QueryAllowancesByGranterResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryAllowancesByGranterResponse) } func (x fastReflection_QueryAllowancesByGranterResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesByGranterResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryAllowancesByGranterResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryAllowancesByGranterResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryAllowancesByGranterResponse) Type() protoreflect.MessageType { return _fastReflection_QueryAllowancesByGranterResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryAllowancesByGranterResponse) New() protoreflect.Message { return new(fastReflection_QueryAllowancesByGranterResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryAllowancesByGranterResponse) Interface() protoreflect.ProtoMessage { return (*QueryAllowancesByGranterResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryAllowancesByGranterResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Allowances) != 0 { value := protoreflect.ValueOfList(&_QueryAllowancesByGranterResponse_1_list{list: &x.Allowances}) if !f(fd_QueryAllowancesByGranterResponse_allowances, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryAllowancesByGranterResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryAllowancesByGranterResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": return len(x.Allowances) != 0 case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": x.Allowances = nil case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryAllowancesByGranterResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": if len(x.Allowances) == 0 { return protoreflect.ValueOfList(&_QueryAllowancesByGranterResponse_1_list{}) } listValue := &_QueryAllowancesByGranterResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": lv := value.List() clv := lv.(*_QueryAllowancesByGranterResponse_1_list) x.Allowances = *clv.list case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": if x.Allowances == nil { x.Allowances = []*Grant{} } value := &_QueryAllowancesByGranterResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryAllowancesByGranterResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": list := []*Grant{} return protoreflect.ValueOfList(&_QueryAllowancesByGranterResponse_1_list{list: &list}) case "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryAllowancesByGranterResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryAllowancesByGranterResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryAllowancesByGranterResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryAllowancesByGranterResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryAllowancesByGranterResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryAllowancesByGranterResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Allowances) > 0 { for _, e := range x.Allowances { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesByGranterResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Allowances) > 0 { for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Allowances[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryAllowancesByGranterResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesByGranterResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesByGranterResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Allowances = append(x.Allowances, &Grant{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryDIDAllowanceRequest protoreflect.MessageDescriptor fd_QueryDIDAllowanceRequest_granter protoreflect.FieldDescriptor fd_QueryDIDAllowanceRequest_grantee_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryDIDAllowanceRequest = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryDIDAllowanceRequest") fd_QueryDIDAllowanceRequest_granter = md_QueryDIDAllowanceRequest.Fields().ByName("granter") fd_QueryDIDAllowanceRequest_grantee_did = md_QueryDIDAllowanceRequest.Fields().ByName("grantee_did") } var _ protoreflect.Message = (*fastReflection_QueryDIDAllowanceRequest)(nil) type fastReflection_QueryDIDAllowanceRequest QueryDIDAllowanceRequest func (x *QueryDIDAllowanceRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryDIDAllowanceRequest)(x) } func (x *QueryDIDAllowanceRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryDIDAllowanceRequest_messageType fastReflection_QueryDIDAllowanceRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryDIDAllowanceRequest_messageType{} type fastReflection_QueryDIDAllowanceRequest_messageType struct{} func (x fastReflection_QueryDIDAllowanceRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryDIDAllowanceRequest)(nil) } func (x fastReflection_QueryDIDAllowanceRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowanceRequest) } func (x fastReflection_QueryDIDAllowanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowanceRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryDIDAllowanceRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowanceRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryDIDAllowanceRequest) Type() protoreflect.MessageType { return _fastReflection_QueryDIDAllowanceRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryDIDAllowanceRequest) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowanceRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryDIDAllowanceRequest) Interface() protoreflect.ProtoMessage { return (*QueryDIDAllowanceRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDIDAllowanceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_QueryDIDAllowanceRequest_granter, value) { return } } if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_QueryDIDAllowanceRequest_grantee_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDIDAllowanceRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.grantee_did": return x.GranteeDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.grantee_did": x.GranteeDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDIDAllowanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.grantee_did": x.GranteeDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest is not mutable")) case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDIDAllowanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest.grantee_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryDIDAllowanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryDIDAllowanceRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryDIDAllowanceRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryDIDAllowanceRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryDIDAllowanceRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowanceRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowanceRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryDIDAllowanceResponse protoreflect.MessageDescriptor fd_QueryDIDAllowanceResponse_allowance protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryDIDAllowanceResponse = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryDIDAllowanceResponse") fd_QueryDIDAllowanceResponse_allowance = md_QueryDIDAllowanceResponse.Fields().ByName("allowance") } var _ protoreflect.Message = (*fastReflection_QueryDIDAllowanceResponse)(nil) type fastReflection_QueryDIDAllowanceResponse QueryDIDAllowanceResponse func (x *QueryDIDAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryDIDAllowanceResponse)(x) } func (x *QueryDIDAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryDIDAllowanceResponse_messageType fastReflection_QueryDIDAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryDIDAllowanceResponse_messageType{} type fastReflection_QueryDIDAllowanceResponse_messageType struct{} func (x fastReflection_QueryDIDAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryDIDAllowanceResponse)(nil) } func (x fastReflection_QueryDIDAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowanceResponse) } func (x fastReflection_QueryDIDAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryDIDAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryDIDAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_QueryDIDAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryDIDAllowanceResponse) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryDIDAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*QueryDIDAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDIDAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Allowance != nil { value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) if !f(fd_QueryDIDAllowanceResponse_allowance, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDIDAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse.allowance": return x.Allowance != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse.allowance": x.Allowance = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDIDAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse.allowance": value := x.Allowance return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse.allowance": x.Allowance = value.Message().Interface().(*Grant) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse.allowance": if x.Allowance == nil { x.Allowance = new(Grant) } return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDIDAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse.allowance": m := new(Grant) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryDIDAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryDIDAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryDIDAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryDIDAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryDIDAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Allowance != nil { l = options.Size(x.Allowance) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Allowance != nil { encoded, err := options.Marshal(x.Allowance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Allowance == nil { x.Allowance = &Grant{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryDIDAllowancesRequest protoreflect.MessageDescriptor fd_QueryDIDAllowancesRequest_grantee_did protoreflect.FieldDescriptor fd_QueryDIDAllowancesRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryDIDAllowancesRequest = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryDIDAllowancesRequest") fd_QueryDIDAllowancesRequest_grantee_did = md_QueryDIDAllowancesRequest.Fields().ByName("grantee_did") fd_QueryDIDAllowancesRequest_pagination = md_QueryDIDAllowancesRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryDIDAllowancesRequest)(nil) type fastReflection_QueryDIDAllowancesRequest QueryDIDAllowancesRequest func (x *QueryDIDAllowancesRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesRequest)(x) } func (x *QueryDIDAllowancesRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryDIDAllowancesRequest_messageType fastReflection_QueryDIDAllowancesRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryDIDAllowancesRequest_messageType{} type fastReflection_QueryDIDAllowancesRequest_messageType struct{} func (x fastReflection_QueryDIDAllowancesRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesRequest)(nil) } func (x fastReflection_QueryDIDAllowancesRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesRequest) } func (x fastReflection_QueryDIDAllowancesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryDIDAllowancesRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryDIDAllowancesRequest) Type() protoreflect.MessageType { return _fastReflection_QueryDIDAllowancesRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryDIDAllowancesRequest) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryDIDAllowancesRequest) Interface() protoreflect.ProtoMessage { return (*QueryDIDAllowancesRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDIDAllowancesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_QueryDIDAllowancesRequest_grantee_did, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryDIDAllowancesRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDIDAllowancesRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.grantee_did": return x.GranteeDid != "" case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.grantee_did": x.GranteeDid = "" case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDIDAllowancesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.grantee_did": x.GranteeDid = value.Interface().(string) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDIDAllowancesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.grantee_did": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryDIDAllowancesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryDIDAllowancesRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryDIDAllowancesRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryDIDAllowancesRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryDIDAllowancesRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryDIDAllowancesResponse_1_list)(nil) type _QueryDIDAllowancesResponse_1_list struct { list *[]*Grant } func (x *_QueryDIDAllowancesResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryDIDAllowancesResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryDIDAllowancesResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) (*x.list)[i] = concreteValue } func (x *_QueryDIDAllowancesResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) *x.list = append(*x.list, concreteValue) } func (x *_QueryDIDAllowancesResponse_1_list) AppendMutable() protoreflect.Value { v := new(Grant) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryDIDAllowancesResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryDIDAllowancesResponse_1_list) NewElement() protoreflect.Value { v := new(Grant) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryDIDAllowancesResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryDIDAllowancesResponse protoreflect.MessageDescriptor fd_QueryDIDAllowancesResponse_allowances protoreflect.FieldDescriptor fd_QueryDIDAllowancesResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryDIDAllowancesResponse = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryDIDAllowancesResponse") fd_QueryDIDAllowancesResponse_allowances = md_QueryDIDAllowancesResponse.Fields().ByName("allowances") fd_QueryDIDAllowancesResponse_pagination = md_QueryDIDAllowancesResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryDIDAllowancesResponse)(nil) type fastReflection_QueryDIDAllowancesResponse QueryDIDAllowancesResponse func (x *QueryDIDAllowancesResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesResponse)(x) } func (x *QueryDIDAllowancesResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryDIDAllowancesResponse_messageType fastReflection_QueryDIDAllowancesResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryDIDAllowancesResponse_messageType{} type fastReflection_QueryDIDAllowancesResponse_messageType struct{} func (x fastReflection_QueryDIDAllowancesResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesResponse)(nil) } func (x fastReflection_QueryDIDAllowancesResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesResponse) } func (x fastReflection_QueryDIDAllowancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryDIDAllowancesResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryDIDAllowancesResponse) Type() protoreflect.MessageType { return _fastReflection_QueryDIDAllowancesResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryDIDAllowancesResponse) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryDIDAllowancesResponse) Interface() protoreflect.ProtoMessage { return (*QueryDIDAllowancesResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDIDAllowancesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Allowances) != 0 { value := protoreflect.ValueOfList(&_QueryDIDAllowancesResponse_1_list{list: &x.Allowances}) if !f(fd_QueryDIDAllowancesResponse_allowances, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryDIDAllowancesResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDIDAllowancesResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.allowances": return len(x.Allowances) != 0 case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.allowances": x.Allowances = nil case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDIDAllowancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.allowances": if len(x.Allowances) == 0 { return protoreflect.ValueOfList(&_QueryDIDAllowancesResponse_1_list{}) } listValue := &_QueryDIDAllowancesResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.allowances": lv := value.List() clv := lv.(*_QueryDIDAllowancesResponse_1_list) x.Allowances = *clv.list case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.allowances": if x.Allowances == nil { x.Allowances = []*Grant{} } value := &_QueryDIDAllowancesResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDIDAllowancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.allowances": list := []*Grant{} return protoreflect.ValueOfList(&_QueryDIDAllowancesResponse_1_list{list: &list}) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryDIDAllowancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryDIDAllowancesResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryDIDAllowancesResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryDIDAllowancesResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryDIDAllowancesResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Allowances) > 0 { for _, e := range x.Allowances { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Allowances) > 0 { for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Allowances[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Allowances = append(x.Allowances, &Grant{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryDIDAllowancesByGranterRequest protoreflect.MessageDescriptor fd_QueryDIDAllowancesByGranterRequest_granter protoreflect.FieldDescriptor fd_QueryDIDAllowancesByGranterRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryDIDAllowancesByGranterRequest = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryDIDAllowancesByGranterRequest") fd_QueryDIDAllowancesByGranterRequest_granter = md_QueryDIDAllowancesByGranterRequest.Fields().ByName("granter") fd_QueryDIDAllowancesByGranterRequest_pagination = md_QueryDIDAllowancesByGranterRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryDIDAllowancesByGranterRequest)(nil) type fastReflection_QueryDIDAllowancesByGranterRequest QueryDIDAllowancesByGranterRequest func (x *QueryDIDAllowancesByGranterRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesByGranterRequest)(x) } func (x *QueryDIDAllowancesByGranterRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryDIDAllowancesByGranterRequest_messageType fastReflection_QueryDIDAllowancesByGranterRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryDIDAllowancesByGranterRequest_messageType{} type fastReflection_QueryDIDAllowancesByGranterRequest_messageType struct{} func (x fastReflection_QueryDIDAllowancesByGranterRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesByGranterRequest)(nil) } func (x fastReflection_QueryDIDAllowancesByGranterRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesByGranterRequest) } func (x fastReflection_QueryDIDAllowancesByGranterRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesByGranterRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesByGranterRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Type() protoreflect.MessageType { return _fastReflection_QueryDIDAllowancesByGranterRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesByGranterRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Interface() protoreflect.ProtoMessage { return (*QueryDIDAllowancesByGranterRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_QueryDIDAllowancesByGranterRequest_granter, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryDIDAllowancesByGranterRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryDIDAllowancesByGranterRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryDIDAllowancesByGranterRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesByGranterRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesByGranterRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesByGranterRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesByGranterRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_QueryDIDAllowancesByGranterResponse_1_list)(nil) type _QueryDIDAllowancesByGranterResponse_1_list struct { list *[]*Grant } func (x *_QueryDIDAllowancesByGranterResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_QueryDIDAllowancesByGranterResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryDIDAllowancesByGranterResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) (*x.list)[i] = concreteValue } func (x *_QueryDIDAllowancesByGranterResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Grant) *x.list = append(*x.list, concreteValue) } func (x *_QueryDIDAllowancesByGranterResponse_1_list) AppendMutable() protoreflect.Value { v := new(Grant) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryDIDAllowancesByGranterResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_QueryDIDAllowancesByGranterResponse_1_list) NewElement() protoreflect.Value { v := new(Grant) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryDIDAllowancesByGranterResponse_1_list) IsValid() bool { return x.list != nil } var ( md_QueryDIDAllowancesByGranterResponse protoreflect.MessageDescriptor fd_QueryDIDAllowancesByGranterResponse_allowances protoreflect.FieldDescriptor fd_QueryDIDAllowancesByGranterResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() md_QueryDIDAllowancesByGranterResponse = File_sourcehub_feegrant_v1beta1_query_proto.Messages().ByName("QueryDIDAllowancesByGranterResponse") fd_QueryDIDAllowancesByGranterResponse_allowances = md_QueryDIDAllowancesByGranterResponse.Fields().ByName("allowances") fd_QueryDIDAllowancesByGranterResponse_pagination = md_QueryDIDAllowancesByGranterResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_QueryDIDAllowancesByGranterResponse)(nil) type fastReflection_QueryDIDAllowancesByGranterResponse QueryDIDAllowancesByGranterResponse func (x *QueryDIDAllowancesByGranterResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesByGranterResponse)(x) } func (x *QueryDIDAllowancesByGranterResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryDIDAllowancesByGranterResponse_messageType fastReflection_QueryDIDAllowancesByGranterResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryDIDAllowancesByGranterResponse_messageType{} type fastReflection_QueryDIDAllowancesByGranterResponse_messageType struct{} func (x fastReflection_QueryDIDAllowancesByGranterResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryDIDAllowancesByGranterResponse)(nil) } func (x fastReflection_QueryDIDAllowancesByGranterResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesByGranterResponse) } func (x fastReflection_QueryDIDAllowancesByGranterResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesByGranterResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryDIDAllowancesByGranterResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Type() protoreflect.MessageType { return _fastReflection_QueryDIDAllowancesByGranterResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) New() protoreflect.Message { return new(fastReflection_QueryDIDAllowancesByGranterResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Interface() protoreflect.ProtoMessage { return (*QueryDIDAllowancesByGranterResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Allowances) != 0 { value := protoreflect.ValueOfList(&_QueryDIDAllowancesByGranterResponse_1_list{list: &x.Allowances}) if !f(fd_QueryDIDAllowancesByGranterResponse_allowances, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_QueryDIDAllowancesByGranterResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.allowances": return len(x.Allowances) != 0 case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.allowances": x.Allowances = nil case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.allowances": if len(x.Allowances) == 0 { return protoreflect.ValueOfList(&_QueryDIDAllowancesByGranterResponse_1_list{}) } listValue := &_QueryDIDAllowancesByGranterResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(listValue) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.allowances": lv := value.List() clv := lv.(*_QueryDIDAllowancesByGranterResponse_1_list) x.Allowances = *clv.list case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.allowances": if x.Allowances == nil { x.Allowances = []*Grant{} } value := &_QueryDIDAllowancesByGranterResponse_1_list{list: &x.Allowances} return protoreflect.ValueOfList(value) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.allowances": list := []*Grant{} return protoreflect.ValueOfList(&_QueryDIDAllowancesByGranterResponse_1_list{list: &list}) case "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryDIDAllowancesByGranterResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryDIDAllowancesByGranterResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Allowances) > 0 { for _, e := range x.Allowances { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesByGranterResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Allowances) > 0 { for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Allowances[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryDIDAllowancesByGranterResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesByGranterResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDIDAllowancesByGranterResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Allowances = append(x.Allowances, &Grant{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/feegrant/v1beta1/query.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // QueryAllowanceRequest is the request type for the Query/Allowance RPC method. type QueryAllowanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` } func (x *QueryAllowanceRequest) Reset() { *x = QueryAllowanceRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAllowanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAllowanceRequest) ProtoMessage() {} // Deprecated: Use QueryAllowanceRequest.ProtoReflect.Descriptor instead. func (*QueryAllowanceRequest) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{0} } func (x *QueryAllowanceRequest) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *QueryAllowanceRequest) GetGrantee() string { if x != nil { return x.Grantee } return "" } // QueryAllowanceResponse is the response type for the Query/Allowance RPC method. type QueryAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allowance is an allowance granted for grantee by granter. Allowance *Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (x *QueryAllowanceResponse) Reset() { *x = QueryAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAllowanceResponse) ProtoMessage() {} // Deprecated: Use QueryAllowanceResponse.ProtoReflect.Descriptor instead. func (*QueryAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{1} } func (x *QueryAllowanceResponse) GetAllowance() *Grant { if x != nil { return x.Allowance } return nil } // QueryAllowancesRequest is the request type for the Query/Allowances RPC method. type QueryAllowancesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` // pagination defines a pagination for the request. Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryAllowancesRequest) Reset() { *x = QueryAllowancesRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAllowancesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAllowancesRequest) ProtoMessage() {} // Deprecated: Use QueryAllowancesRequest.ProtoReflect.Descriptor instead. func (*QueryAllowancesRequest) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryAllowancesRequest) GetGrantee() string { if x != nil { return x.Grantee } return "" } func (x *QueryAllowancesRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // QueryAllowancesResponse is the response type for the Query/Allowances RPC method. type QueryAllowancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allowances are allowance's granted for grantee by granter. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryAllowancesResponse) Reset() { *x = QueryAllowancesResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAllowancesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAllowancesResponse) ProtoMessage() {} // Deprecated: Use QueryAllowancesResponse.ProtoReflect.Descriptor instead. func (*QueryAllowancesResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryAllowancesResponse) GetAllowances() []*Grant { if x != nil { return x.Allowances } return nil } func (x *QueryAllowancesResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } // QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. type QueryAllowancesByGranterRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // pagination defines a pagination for the request. Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryAllowancesByGranterRequest) Reset() { *x = QueryAllowancesByGranterRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAllowancesByGranterRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAllowancesByGranterRequest) ProtoMessage() {} // Deprecated: Use QueryAllowancesByGranterRequest.ProtoReflect.Descriptor instead. func (*QueryAllowancesByGranterRequest) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{4} } func (x *QueryAllowancesByGranterRequest) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *QueryAllowancesByGranterRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. type QueryAllowancesByGranterResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allowances that have been issued by the granter. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryAllowancesByGranterResponse) Reset() { *x = QueryAllowancesByGranterResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryAllowancesByGranterResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryAllowancesByGranterResponse) ProtoMessage() {} // Deprecated: Use QueryAllowancesByGranterResponse.ProtoReflect.Descriptor instead. func (*QueryAllowancesByGranterResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{5} } func (x *QueryAllowancesByGranterResponse) GetAllowances() []*Grant { if x != nil { return x.Allowances } return nil } func (x *QueryAllowancesByGranterResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } // QueryDIDAllowanceRequest is the request type for the Query/DIDAllowance RPC method. type QueryDIDAllowanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (x *QueryDIDAllowanceRequest) Reset() { *x = QueryDIDAllowanceRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryDIDAllowanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryDIDAllowanceRequest) ProtoMessage() {} // Deprecated: Use QueryDIDAllowanceRequest.ProtoReflect.Descriptor instead. func (*QueryDIDAllowanceRequest) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{6} } func (x *QueryDIDAllowanceRequest) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *QueryDIDAllowanceRequest) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } // QueryDIDAllowanceResponse is the response type for the Query/DIDAllowance RPC method. type QueryDIDAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allowance is an allowance granted for DID by granter. Allowance *Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (x *QueryDIDAllowanceResponse) Reset() { *x = QueryDIDAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryDIDAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryDIDAllowanceResponse) ProtoMessage() {} // Deprecated: Use QueryDIDAllowanceResponse.ProtoReflect.Descriptor instead. func (*QueryDIDAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{7} } func (x *QueryDIDAllowanceResponse) GetAllowance() *Grant { if x != nil { return x.Allowance } return nil } // QueryDIDAllowancesRequest is the request type for the Query/DIDAllowances RPC method. type QueryDIDAllowancesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // grantee_did is the DID being granted allowances. GranteeDid string `protobuf:"bytes,1,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` // pagination defines a pagination for the request. Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryDIDAllowancesRequest) Reset() { *x = QueryDIDAllowancesRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryDIDAllowancesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryDIDAllowancesRequest) ProtoMessage() {} // Deprecated: Use QueryDIDAllowancesRequest.ProtoReflect.Descriptor instead. func (*QueryDIDAllowancesRequest) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{8} } func (x *QueryDIDAllowancesRequest) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } func (x *QueryDIDAllowancesRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // QueryDIDAllowancesResponse is the response type for the Query/DIDAllowances RPC method. type QueryDIDAllowancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allowances are DID allowances granted for the grantee DID. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryDIDAllowancesResponse) Reset() { *x = QueryDIDAllowancesResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryDIDAllowancesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryDIDAllowancesResponse) ProtoMessage() {} // Deprecated: Use QueryDIDAllowancesResponse.ProtoReflect.Descriptor instead. func (*QueryDIDAllowancesResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{9} } func (x *QueryDIDAllowancesResponse) GetAllowances() []*Grant { if x != nil { return x.Allowances } return nil } func (x *QueryDIDAllowancesResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } // QueryDIDAllowancesByGranterRequest is the request type for the Query/DIDAllowancesByGranter RPC method. type QueryDIDAllowancesByGranterRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // pagination defines a pagination for the request. Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryDIDAllowancesByGranterRequest) Reset() { *x = QueryDIDAllowancesByGranterRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryDIDAllowancesByGranterRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryDIDAllowancesByGranterRequest) ProtoMessage() {} // Deprecated: Use QueryDIDAllowancesByGranterRequest.ProtoReflect.Descriptor instead. func (*QueryDIDAllowancesByGranterRequest) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{10} } func (x *QueryDIDAllowancesByGranterRequest) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *QueryDIDAllowancesByGranterRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // QueryDIDAllowancesByGranterResponse is the response type for the Query/DIDAllowancesByGranter RPC method. type QueryDIDAllowancesByGranterResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allowances that have been issued by the granter to DIDs. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *QueryDIDAllowancesByGranterResponse) Reset() { *x = QueryDIDAllowancesByGranterResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryDIDAllowancesByGranterResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryDIDAllowancesByGranterResponse) ProtoMessage() {} // Deprecated: Use QueryDIDAllowancesByGranterResponse.ProtoReflect.Descriptor instead. func (*QueryDIDAllowancesByGranterResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{11} } func (x *QueryDIDAllowancesByGranterResponse) GetAllowances() []*Grant { if x != nil { return x.Allowances } return nil } func (x *QueryDIDAllowancesByGranterResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } var File_sourcehub_feegrant_v1beta1_query_proto protoreflect.FileDescriptor var file_sourcehub_feegrant_v1beta1_query_proto_rawDesc = []byte{ 0x0a, 0x26, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x59, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x22, 0xc3, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x22, 0x6f, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x22, 0x5c, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa8, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, 0x01, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb1, 0x01, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xaf, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xb5, 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xd9, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x0c, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x12, 0x41, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x0d, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x7d, 0x12, 0xd3, 0x01, 0x0a, 0x16, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x64, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x42, 0xf3, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x46, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_feegrant_v1beta1_query_proto_rawDescOnce sync.Once file_sourcehub_feegrant_v1beta1_query_proto_rawDescData = file_sourcehub_feegrant_v1beta1_query_proto_rawDesc ) func file_sourcehub_feegrant_v1beta1_query_proto_rawDescGZIP() []byte { file_sourcehub_feegrant_v1beta1_query_proto_rawDescOnce.Do(func() { file_sourcehub_feegrant_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_feegrant_v1beta1_query_proto_rawDescData) }) return file_sourcehub_feegrant_v1beta1_query_proto_rawDescData } var file_sourcehub_feegrant_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_sourcehub_feegrant_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAllowanceRequest)(nil), // 0: sourcehub.feegrant.v1beta1.QueryAllowanceRequest (*QueryAllowanceResponse)(nil), // 1: sourcehub.feegrant.v1beta1.QueryAllowanceResponse (*QueryAllowancesRequest)(nil), // 2: sourcehub.feegrant.v1beta1.QueryAllowancesRequest (*QueryAllowancesResponse)(nil), // 3: sourcehub.feegrant.v1beta1.QueryAllowancesResponse (*QueryAllowancesByGranterRequest)(nil), // 4: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest (*QueryAllowancesByGranterResponse)(nil), // 5: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse (*QueryDIDAllowanceRequest)(nil), // 6: sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest (*QueryDIDAllowanceResponse)(nil), // 7: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse (*QueryDIDAllowancesRequest)(nil), // 8: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest (*QueryDIDAllowancesResponse)(nil), // 9: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse (*QueryDIDAllowancesByGranterRequest)(nil), // 10: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest (*QueryDIDAllowancesByGranterResponse)(nil), // 11: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse (*Grant)(nil), // 12: sourcehub.feegrant.v1beta1.Grant (*v1beta1.PageRequest)(nil), // 13: cosmos.base.query.v1beta1.PageRequest (*v1beta1.PageResponse)(nil), // 14: cosmos.base.query.v1beta1.PageResponse } var file_sourcehub_feegrant_v1beta1_query_proto_depIdxs = []int32{ 12, // 0: sourcehub.feegrant.v1beta1.QueryAllowanceResponse.allowance:type_name -> sourcehub.feegrant.v1beta1.Grant 13, // 1: sourcehub.feegrant.v1beta1.QueryAllowancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 12, // 2: sourcehub.feegrant.v1beta1.QueryAllowancesResponse.allowances:type_name -> sourcehub.feegrant.v1beta1.Grant 14, // 3: sourcehub.feegrant.v1beta1.QueryAllowancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 13, // 4: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 12, // 5: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances:type_name -> sourcehub.feegrant.v1beta1.Grant 14, // 6: sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 12, // 7: sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse.allowance:type_name -> sourcehub.feegrant.v1beta1.Grant 13, // 8: sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 12, // 9: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.allowances:type_name -> sourcehub.feegrant.v1beta1.Grant 14, // 10: sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 13, // 11: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 12, // 12: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.allowances:type_name -> sourcehub.feegrant.v1beta1.Grant 14, // 13: sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 0, // 14: sourcehub.feegrant.v1beta1.Query.Allowance:input_type -> sourcehub.feegrant.v1beta1.QueryAllowanceRequest 2, // 15: sourcehub.feegrant.v1beta1.Query.Allowances:input_type -> sourcehub.feegrant.v1beta1.QueryAllowancesRequest 4, // 16: sourcehub.feegrant.v1beta1.Query.AllowancesByGranter:input_type -> sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest 6, // 17: sourcehub.feegrant.v1beta1.Query.DIDAllowance:input_type -> sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest 8, // 18: sourcehub.feegrant.v1beta1.Query.DIDAllowances:input_type -> sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest 10, // 19: sourcehub.feegrant.v1beta1.Query.DIDAllowancesByGranter:input_type -> sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest 1, // 20: sourcehub.feegrant.v1beta1.Query.Allowance:output_type -> sourcehub.feegrant.v1beta1.QueryAllowanceResponse 3, // 21: sourcehub.feegrant.v1beta1.Query.Allowances:output_type -> sourcehub.feegrant.v1beta1.QueryAllowancesResponse 5, // 22: sourcehub.feegrant.v1beta1.Query.AllowancesByGranter:output_type -> sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse 7, // 23: sourcehub.feegrant.v1beta1.Query.DIDAllowance:output_type -> sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse 9, // 24: sourcehub.feegrant.v1beta1.Query.DIDAllowances:output_type -> sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse 11, // 25: sourcehub.feegrant.v1beta1.Query.DIDAllowancesByGranter:output_type -> sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse 20, // [20:26] is the sub-list for method output_type 14, // [14:20] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name 14, // [14:14] is the sub-list for extension extendee 0, // [0:14] is the sub-list for field type_name } func init() { file_sourcehub_feegrant_v1beta1_query_proto_init() } func file_sourcehub_feegrant_v1beta1_query_proto_init() { if File_sourcehub_feegrant_v1beta1_query_proto != nil { return } file_sourcehub_feegrant_v1beta1_feegrant_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowanceRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowancesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowancesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowancesByGranterRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAllowancesByGranterResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDIDAllowanceRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDIDAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDIDAllowancesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDIDAllowancesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDIDAllowancesByGranterRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDIDAllowancesByGranterResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_feegrant_v1beta1_query_proto_rawDesc, NumEnums: 0, NumMessages: 12, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_feegrant_v1beta1_query_proto_goTypes, DependencyIndexes: file_sourcehub_feegrant_v1beta1_query_proto_depIdxs, MessageInfos: file_sourcehub_feegrant_v1beta1_query_proto_msgTypes, }.Build() File_sourcehub_feegrant_v1beta1_query_proto = out.File file_sourcehub_feegrant_v1beta1_query_proto_rawDesc = nil file_sourcehub_feegrant_v1beta1_query_proto_goTypes = nil file_sourcehub_feegrant_v1beta1_query_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/feegrant/v1beta1/query_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/feegrant/v1beta1/query.proto package feegrantv1beta1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Query_Allowance_FullMethodName = "/sourcehub.feegrant.v1beta1.Query/Allowance" Query_Allowances_FullMethodName = "/sourcehub.feegrant.v1beta1.Query/Allowances" Query_AllowancesByGranter_FullMethodName = "/sourcehub.feegrant.v1beta1.Query/AllowancesByGranter" Query_DIDAllowance_FullMethodName = "/sourcehub.feegrant.v1beta1.Query/DIDAllowance" Query_DIDAllowances_FullMethodName = "/sourcehub.feegrant.v1beta1.Query/DIDAllowances" Query_DIDAllowancesByGranter_FullMethodName = "/sourcehub.feegrant.v1beta1.Query/DIDAllowancesByGranter" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Query defines the gRPC querier service. type QueryClient interface { // Allowance returns granted allowance to the grantee by the granter. Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) // Allowances returns all the grants for the given grantee address. Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address. AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) // DIDAllowance returns granted allowance to the DID by the granter. DIDAllowance(ctx context.Context, in *QueryDIDAllowanceRequest, opts ...grpc.CallOption) (*QueryDIDAllowanceResponse, error) // DIDAllowances returns all the DID grants for the given grantee DID. DIDAllowances(ctx context.Context, in *QueryDIDAllowancesRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesResponse, error) // DIDAllowancesByGranter returns all the DID grants given by an address. DIDAllowancesByGranter(ctx context.Context, in *QueryDIDAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesByGranterResponse, error) } type queryClient struct { cc grpc.ClientConnInterface } func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } func (c *queryClient) Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryAllowanceResponse) err := c.cc.Invoke(ctx, Query_Allowance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryAllowancesResponse) err := c.cc.Invoke(ctx, Query_Allowances_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryAllowancesByGranterResponse) err := c.cc.Invoke(ctx, Query_AllowancesByGranter_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) DIDAllowance(ctx context.Context, in *QueryDIDAllowanceRequest, opts ...grpc.CallOption) (*QueryDIDAllowanceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryDIDAllowanceResponse) err := c.cc.Invoke(ctx, Query_DIDAllowance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) DIDAllowances(ctx context.Context, in *QueryDIDAllowancesRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryDIDAllowancesResponse) err := c.cc.Invoke(ctx, Query_DIDAllowances_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) DIDAllowancesByGranter(ctx context.Context, in *QueryDIDAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesByGranterResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryDIDAllowancesByGranterResponse) err := c.cc.Invoke(ctx, Query_DIDAllowancesByGranter_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility. // // Query defines the gRPC querier service. type QueryServer interface { // Allowance returns granted allowance to the grantee by the granter. Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) // Allowances returns all the grants for the given grantee address. Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address. AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) // DIDAllowance returns granted allowance to the DID by the granter. DIDAllowance(context.Context, *QueryDIDAllowanceRequest) (*QueryDIDAllowanceResponse, error) // DIDAllowances returns all the DID grants for the given grantee DID. DIDAllowances(context.Context, *QueryDIDAllowancesRequest) (*QueryDIDAllowancesResponse, error) // DIDAllowancesByGranter returns all the DID grants given by an address. DIDAllowancesByGranter(context.Context, *QueryDIDAllowancesByGranterRequest) (*QueryDIDAllowancesByGranterResponse, error) mustEmbedUnimplementedQueryServer() } // UnimplementedQueryServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allowance not implemented") } func (UnimplementedQueryServer) Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allowances not implemented") } func (UnimplementedQueryServer) AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowancesByGranter not implemented") } func (UnimplementedQueryServer) DIDAllowance(context.Context, *QueryDIDAllowanceRequest) (*QueryDIDAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DIDAllowance not implemented") } func (UnimplementedQueryServer) DIDAllowances(context.Context, *QueryDIDAllowancesRequest) (*QueryDIDAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DIDAllowances not implemented") } func (UnimplementedQueryServer) DIDAllowancesByGranter(context.Context, *QueryDIDAllowancesByGranterRequest) (*QueryDIDAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DIDAllowancesByGranter not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will // result in compilation errors. type UnsafeQueryServer interface { mustEmbedUnimplementedQueryServer() } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { // If the following call pancis, it indicates UnimplementedQueryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&Query_ServiceDesc, srv) } func _Query_Allowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Allowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Allowance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Allowance(ctx, req.(*QueryAllowanceRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Allowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowancesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Allowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Allowances_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Allowances(ctx, req.(*QueryAllowancesRequest)) } return interceptor(ctx, in, info, handler) } func _Query_AllowancesByGranter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowancesByGranterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).AllowancesByGranter(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_AllowancesByGranter_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AllowancesByGranter(ctx, req.(*QueryAllowancesByGranterRequest)) } return interceptor(ctx, in, info, handler) } func _Query_DIDAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDIDAllowanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).DIDAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_DIDAllowance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DIDAllowance(ctx, req.(*QueryDIDAllowanceRequest)) } return interceptor(ctx, in, info, handler) } func _Query_DIDAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDIDAllowancesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).DIDAllowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_DIDAllowances_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DIDAllowances(ctx, req.(*QueryDIDAllowancesRequest)) } return interceptor(ctx, in, info, handler) } func _Query_DIDAllowancesByGranter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDIDAllowancesByGranterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).DIDAllowancesByGranter(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_DIDAllowancesByGranter_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DIDAllowancesByGranter(ctx, req.(*QueryDIDAllowancesByGranterRequest)) } return interceptor(ctx, in, info, handler) } // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.feegrant.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Allowance", Handler: _Query_Allowance_Handler, }, { MethodName: "Allowances", Handler: _Query_Allowances_Handler, }, { MethodName: "AllowancesByGranter", Handler: _Query_AllowancesByGranter_Handler, }, { MethodName: "DIDAllowance", Handler: _Query_DIDAllowance_Handler, }, { MethodName: "DIDAllowances", Handler: _Query_DIDAllowances_Handler, }, { MethodName: "DIDAllowancesByGranter", Handler: _Query_DIDAllowancesByGranter_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/feegrant/v1beta1/query.proto", } ================================================ FILE: api/sourcehub/feegrant/v1beta1/tx.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package feegrantv1beta1 import ( _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" io "io" reflect "reflect" sync "sync" ) var ( md_MsgGrantAllowance protoreflect.MessageDescriptor fd_MsgGrantAllowance_granter protoreflect.FieldDescriptor fd_MsgGrantAllowance_grantee protoreflect.FieldDescriptor fd_MsgGrantAllowance_allowance protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgGrantAllowance = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgGrantAllowance") fd_MsgGrantAllowance_granter = md_MsgGrantAllowance.Fields().ByName("granter") fd_MsgGrantAllowance_grantee = md_MsgGrantAllowance.Fields().ByName("grantee") fd_MsgGrantAllowance_allowance = md_MsgGrantAllowance.Fields().ByName("allowance") } var _ protoreflect.Message = (*fastReflection_MsgGrantAllowance)(nil) type fastReflection_MsgGrantAllowance MsgGrantAllowance func (x *MsgGrantAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgGrantAllowance)(x) } func (x *MsgGrantAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgGrantAllowance_messageType fastReflection_MsgGrantAllowance_messageType var _ protoreflect.MessageType = fastReflection_MsgGrantAllowance_messageType{} type fastReflection_MsgGrantAllowance_messageType struct{} func (x fastReflection_MsgGrantAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgGrantAllowance)(nil) } func (x fastReflection_MsgGrantAllowance_messageType) New() protoreflect.Message { return new(fastReflection_MsgGrantAllowance) } func (x fastReflection_MsgGrantAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgGrantAllowance) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgGrantAllowance) Type() protoreflect.MessageType { return _fastReflection_MsgGrantAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgGrantAllowance) New() protoreflect.Message { return new(fastReflection_MsgGrantAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgGrantAllowance) Interface() protoreflect.ProtoMessage { return (*MsgGrantAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgGrantAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_MsgGrantAllowance_granter, value) { return } } if x.Grantee != "" { value := protoreflect.ValueOfString(x.Grantee) if !f(fd_MsgGrantAllowance_grantee, value) { return } } if x.Allowance != nil { value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) if !f(fd_MsgGrantAllowance_allowance, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgGrantAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.grantee": return x.Grantee != "" case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.allowance": return x.Allowance != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.grantee": x.Grantee = "" case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.allowance": x.Allowance = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgGrantAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.grantee": value := x.Grantee return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.allowance": value := x.Allowance return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.grantee": x.Grantee = value.Interface().(string) case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.allowance": x.Allowance = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.allowance": if x.Allowance == nil { x.Allowance = new(anypb.Any) } return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.MsgGrantAllowance is not mutable")) case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.grantee": panic(fmt.Errorf("field grantee of message sourcehub.feegrant.v1beta1.MsgGrantAllowance is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgGrantAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.grantee": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.MsgGrantAllowance.allowance": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgGrantAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgGrantAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgGrantAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgGrantAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgGrantAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgGrantAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Grantee) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Allowance != nil { l = options.Size(x.Allowance) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgGrantAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Allowance != nil { encoded, err := options.Marshal(x.Allowance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.Grantee) > 0 { i -= len(x.Grantee) copy(dAtA[i:], x.Grantee) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgGrantAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Allowance == nil { x.Allowance = &anypb.Any{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgGrantAllowanceResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgGrantAllowanceResponse = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgGrantAllowanceResponse") } var _ protoreflect.Message = (*fastReflection_MsgGrantAllowanceResponse)(nil) type fastReflection_MsgGrantAllowanceResponse MsgGrantAllowanceResponse func (x *MsgGrantAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgGrantAllowanceResponse)(x) } func (x *MsgGrantAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgGrantAllowanceResponse_messageType fastReflection_MsgGrantAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgGrantAllowanceResponse_messageType{} type fastReflection_MsgGrantAllowanceResponse_messageType struct{} func (x fastReflection_MsgGrantAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgGrantAllowanceResponse)(nil) } func (x fastReflection_MsgGrantAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgGrantAllowanceResponse) } func (x fastReflection_MsgGrantAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgGrantAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgGrantAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_MsgGrantAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgGrantAllowanceResponse) New() protoreflect.Message { return new(fastReflection_MsgGrantAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgGrantAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*MsgGrantAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgGrantAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgGrantAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgGrantAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgGrantAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgGrantAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgGrantAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgGrantAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgGrantAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgGrantAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgGrantAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgGrantAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRevokeAllowance protoreflect.MessageDescriptor fd_MsgRevokeAllowance_granter protoreflect.FieldDescriptor fd_MsgRevokeAllowance_grantee protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgRevokeAllowance = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgRevokeAllowance") fd_MsgRevokeAllowance_granter = md_MsgRevokeAllowance.Fields().ByName("granter") fd_MsgRevokeAllowance_grantee = md_MsgRevokeAllowance.Fields().ByName("grantee") } var _ protoreflect.Message = (*fastReflection_MsgRevokeAllowance)(nil) type fastReflection_MsgRevokeAllowance MsgRevokeAllowance func (x *MsgRevokeAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRevokeAllowance)(x) } func (x *MsgRevokeAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRevokeAllowance_messageType fastReflection_MsgRevokeAllowance_messageType var _ protoreflect.MessageType = fastReflection_MsgRevokeAllowance_messageType{} type fastReflection_MsgRevokeAllowance_messageType struct{} func (x fastReflection_MsgRevokeAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRevokeAllowance)(nil) } func (x fastReflection_MsgRevokeAllowance_messageType) New() protoreflect.Message { return new(fastReflection_MsgRevokeAllowance) } func (x fastReflection_MsgRevokeAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRevokeAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRevokeAllowance) Descriptor() protoreflect.MessageDescriptor { return md_MsgRevokeAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRevokeAllowance) Type() protoreflect.MessageType { return _fastReflection_MsgRevokeAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRevokeAllowance) New() protoreflect.Message { return new(fastReflection_MsgRevokeAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRevokeAllowance) Interface() protoreflect.ProtoMessage { return (*MsgRevokeAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRevokeAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_MsgRevokeAllowance_granter, value) { return } } if x.Grantee != "" { value := protoreflect.ValueOfString(x.Grantee) if !f(fd_MsgRevokeAllowance_grantee, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRevokeAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.grantee": return x.Grantee != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.grantee": x.Grantee = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRevokeAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.grantee": value := x.Grantee return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.grantee": x.Grantee = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.MsgRevokeAllowance is not mutable")) case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.grantee": panic(fmt.Errorf("field grantee of message sourcehub.feegrant.v1beta1.MsgRevokeAllowance is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRevokeAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.MsgRevokeAllowance.grantee": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRevokeAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgRevokeAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRevokeAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRevokeAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRevokeAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRevokeAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Grantee) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRevokeAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Grantee) > 0 { i -= len(x.Grantee) copy(dAtA[i:], x.Grantee) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRevokeAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRevokeAllowanceResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgRevokeAllowanceResponse = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgRevokeAllowanceResponse") } var _ protoreflect.Message = (*fastReflection_MsgRevokeAllowanceResponse)(nil) type fastReflection_MsgRevokeAllowanceResponse MsgRevokeAllowanceResponse func (x *MsgRevokeAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRevokeAllowanceResponse)(x) } func (x *MsgRevokeAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRevokeAllowanceResponse_messageType fastReflection_MsgRevokeAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgRevokeAllowanceResponse_messageType{} type fastReflection_MsgRevokeAllowanceResponse_messageType struct{} func (x fastReflection_MsgRevokeAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRevokeAllowanceResponse)(nil) } func (x fastReflection_MsgRevokeAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgRevokeAllowanceResponse) } func (x fastReflection_MsgRevokeAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRevokeAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRevokeAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgRevokeAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRevokeAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_MsgRevokeAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRevokeAllowanceResponse) New() protoreflect.Message { return new(fastReflection_MsgRevokeAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRevokeAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*MsgRevokeAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRevokeAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRevokeAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRevokeAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRevokeAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRevokeAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRevokeAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRevokeAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRevokeAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRevokeAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRevokeAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRevokeAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRevokeAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgPruneAllowances protoreflect.MessageDescriptor fd_MsgPruneAllowances_pruner protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgPruneAllowances = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneAllowances") fd_MsgPruneAllowances_pruner = md_MsgPruneAllowances.Fields().ByName("pruner") } var _ protoreflect.Message = (*fastReflection_MsgPruneAllowances)(nil) type fastReflection_MsgPruneAllowances MsgPruneAllowances func (x *MsgPruneAllowances) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgPruneAllowances)(x) } func (x *MsgPruneAllowances) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgPruneAllowances_messageType fastReflection_MsgPruneAllowances_messageType var _ protoreflect.MessageType = fastReflection_MsgPruneAllowances_messageType{} type fastReflection_MsgPruneAllowances_messageType struct{} func (x fastReflection_MsgPruneAllowances_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgPruneAllowances)(nil) } func (x fastReflection_MsgPruneAllowances_messageType) New() protoreflect.Message { return new(fastReflection_MsgPruneAllowances) } func (x fastReflection_MsgPruneAllowances_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneAllowances } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgPruneAllowances) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneAllowances } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgPruneAllowances) Type() protoreflect.MessageType { return _fastReflection_MsgPruneAllowances_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgPruneAllowances) New() protoreflect.Message { return new(fastReflection_MsgPruneAllowances) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgPruneAllowances) Interface() protoreflect.ProtoMessage { return (*MsgPruneAllowances)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgPruneAllowances) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Pruner != "" { value := protoreflect.ValueOfString(x.Pruner) if !f(fd_MsgPruneAllowances_pruner, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgPruneAllowances) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneAllowances.pruner": return x.Pruner != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowances does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowances) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneAllowances.pruner": x.Pruner = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowances does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgPruneAllowances) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneAllowances.pruner": value := x.Pruner return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowances does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowances) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneAllowances.pruner": x.Pruner = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowances does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowances) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneAllowances.pruner": panic(fmt.Errorf("field pruner of message sourcehub.feegrant.v1beta1.MsgPruneAllowances is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowances does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgPruneAllowances) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneAllowances.pruner": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowances does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgPruneAllowances) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgPruneAllowances", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgPruneAllowances) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowances) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgPruneAllowances) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgPruneAllowances) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgPruneAllowances) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Pruner) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgPruneAllowances) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Pruner) > 0 { i -= len(x.Pruner) copy(dAtA[i:], x.Pruner) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pruner))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgPruneAllowances) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowances: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowances: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pruner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Pruner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgPruneAllowancesResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgPruneAllowancesResponse = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneAllowancesResponse") } var _ protoreflect.Message = (*fastReflection_MsgPruneAllowancesResponse)(nil) type fastReflection_MsgPruneAllowancesResponse MsgPruneAllowancesResponse func (x *MsgPruneAllowancesResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgPruneAllowancesResponse)(x) } func (x *MsgPruneAllowancesResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgPruneAllowancesResponse_messageType fastReflection_MsgPruneAllowancesResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgPruneAllowancesResponse_messageType{} type fastReflection_MsgPruneAllowancesResponse_messageType struct{} func (x fastReflection_MsgPruneAllowancesResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgPruneAllowancesResponse)(nil) } func (x fastReflection_MsgPruneAllowancesResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgPruneAllowancesResponse) } func (x fastReflection_MsgPruneAllowancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneAllowancesResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgPruneAllowancesResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneAllowancesResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgPruneAllowancesResponse) Type() protoreflect.MessageType { return _fastReflection_MsgPruneAllowancesResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgPruneAllowancesResponse) New() protoreflect.Message { return new(fastReflection_MsgPruneAllowancesResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgPruneAllowancesResponse) Interface() protoreflect.ProtoMessage { return (*MsgPruneAllowancesResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgPruneAllowancesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgPruneAllowancesResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowancesResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgPruneAllowancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowancesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgPruneAllowancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgPruneAllowancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgPruneAllowancesResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneAllowancesResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgPruneAllowancesResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgPruneAllowancesResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgPruneAllowancesResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgPruneAllowancesResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgPruneAllowancesResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgGrantDIDAllowance protoreflect.MessageDescriptor fd_MsgGrantDIDAllowance_granter protoreflect.FieldDescriptor fd_MsgGrantDIDAllowance_grantee_did protoreflect.FieldDescriptor fd_MsgGrantDIDAllowance_allowance protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgGrantDIDAllowance = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgGrantDIDAllowance") fd_MsgGrantDIDAllowance_granter = md_MsgGrantDIDAllowance.Fields().ByName("granter") fd_MsgGrantDIDAllowance_grantee_did = md_MsgGrantDIDAllowance.Fields().ByName("grantee_did") fd_MsgGrantDIDAllowance_allowance = md_MsgGrantDIDAllowance.Fields().ByName("allowance") } var _ protoreflect.Message = (*fastReflection_MsgGrantDIDAllowance)(nil) type fastReflection_MsgGrantDIDAllowance MsgGrantDIDAllowance func (x *MsgGrantDIDAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgGrantDIDAllowance)(x) } func (x *MsgGrantDIDAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgGrantDIDAllowance_messageType fastReflection_MsgGrantDIDAllowance_messageType var _ protoreflect.MessageType = fastReflection_MsgGrantDIDAllowance_messageType{} type fastReflection_MsgGrantDIDAllowance_messageType struct{} func (x fastReflection_MsgGrantDIDAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgGrantDIDAllowance)(nil) } func (x fastReflection_MsgGrantDIDAllowance_messageType) New() protoreflect.Message { return new(fastReflection_MsgGrantDIDAllowance) } func (x fastReflection_MsgGrantDIDAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantDIDAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgGrantDIDAllowance) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantDIDAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgGrantDIDAllowance) Type() protoreflect.MessageType { return _fastReflection_MsgGrantDIDAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgGrantDIDAllowance) New() protoreflect.Message { return new(fastReflection_MsgGrantDIDAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgGrantDIDAllowance) Interface() protoreflect.ProtoMessage { return (*MsgGrantDIDAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgGrantDIDAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_MsgGrantDIDAllowance_granter, value) { return } } if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_MsgGrantDIDAllowance_grantee_did, value) { return } } if x.Allowance != nil { value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) if !f(fd_MsgGrantDIDAllowance_allowance, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgGrantDIDAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.grantee_did": return x.GranteeDid != "" case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.allowance": return x.Allowance != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.grantee_did": x.GranteeDid = "" case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.allowance": x.Allowance = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgGrantDIDAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.allowance": value := x.Allowance return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.grantee_did": x.GranteeDid = value.Interface().(string) case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.allowance": x.Allowance = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.allowance": if x.Allowance == nil { x.Allowance = new(anypb.Any) } return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance is not mutable")) case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgGrantDIDAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.grantee_did": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.allowance": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgGrantDIDAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgGrantDIDAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgGrantDIDAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgGrantDIDAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgGrantDIDAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Allowance != nil { l = options.Size(x.Allowance) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgGrantDIDAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Allowance != nil { encoded, err := options.Marshal(x.Allowance) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgGrantDIDAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Allowance == nil { x.Allowance = &anypb.Any{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgGrantDIDAllowanceResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgGrantDIDAllowanceResponse = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgGrantDIDAllowanceResponse") } var _ protoreflect.Message = (*fastReflection_MsgGrantDIDAllowanceResponse)(nil) type fastReflection_MsgGrantDIDAllowanceResponse MsgGrantDIDAllowanceResponse func (x *MsgGrantDIDAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgGrantDIDAllowanceResponse)(x) } func (x *MsgGrantDIDAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgGrantDIDAllowanceResponse_messageType fastReflection_MsgGrantDIDAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgGrantDIDAllowanceResponse_messageType{} type fastReflection_MsgGrantDIDAllowanceResponse_messageType struct{} func (x fastReflection_MsgGrantDIDAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgGrantDIDAllowanceResponse)(nil) } func (x fastReflection_MsgGrantDIDAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgGrantDIDAllowanceResponse) } func (x fastReflection_MsgGrantDIDAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantDIDAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgGrantDIDAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_MsgGrantDIDAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgGrantDIDAllowanceResponse) New() protoreflect.Message { return new(fastReflection_MsgGrantDIDAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*MsgGrantDIDAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgGrantDIDAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgGrantDIDAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgGrantDIDAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgGrantDIDAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgGrantDIDAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgGrantDIDAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgGrantDIDAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgGrantDIDAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgGrantDIDAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantDIDAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgExpireDIDAllowance protoreflect.MessageDescriptor fd_MsgExpireDIDAllowance_granter protoreflect.FieldDescriptor fd_MsgExpireDIDAllowance_grantee_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgExpireDIDAllowance = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgExpireDIDAllowance") fd_MsgExpireDIDAllowance_granter = md_MsgExpireDIDAllowance.Fields().ByName("granter") fd_MsgExpireDIDAllowance_grantee_did = md_MsgExpireDIDAllowance.Fields().ByName("grantee_did") } var _ protoreflect.Message = (*fastReflection_MsgExpireDIDAllowance)(nil) type fastReflection_MsgExpireDIDAllowance MsgExpireDIDAllowance func (x *MsgExpireDIDAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgExpireDIDAllowance)(x) } func (x *MsgExpireDIDAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgExpireDIDAllowance_messageType fastReflection_MsgExpireDIDAllowance_messageType var _ protoreflect.MessageType = fastReflection_MsgExpireDIDAllowance_messageType{} type fastReflection_MsgExpireDIDAllowance_messageType struct{} func (x fastReflection_MsgExpireDIDAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgExpireDIDAllowance)(nil) } func (x fastReflection_MsgExpireDIDAllowance_messageType) New() protoreflect.Message { return new(fastReflection_MsgExpireDIDAllowance) } func (x fastReflection_MsgExpireDIDAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgExpireDIDAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgExpireDIDAllowance) Descriptor() protoreflect.MessageDescriptor { return md_MsgExpireDIDAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgExpireDIDAllowance) Type() protoreflect.MessageType { return _fastReflection_MsgExpireDIDAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgExpireDIDAllowance) New() protoreflect.Message { return new(fastReflection_MsgExpireDIDAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgExpireDIDAllowance) Interface() protoreflect.ProtoMessage { return (*MsgExpireDIDAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgExpireDIDAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_MsgExpireDIDAllowance_granter, value) { return } } if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_MsgExpireDIDAllowance_grantee_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgExpireDIDAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.grantee_did": return x.GranteeDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.grantee_did": x.GranteeDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgExpireDIDAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.grantee_did": x.GranteeDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance is not mutable")) case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgExpireDIDAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance.grantee_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgExpireDIDAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgExpireDIDAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgExpireDIDAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgExpireDIDAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgExpireDIDAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgExpireDIDAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgExpireDIDAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExpireDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExpireDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgExpireDIDAllowanceResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgExpireDIDAllowanceResponse = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgExpireDIDAllowanceResponse") } var _ protoreflect.Message = (*fastReflection_MsgExpireDIDAllowanceResponse)(nil) type fastReflection_MsgExpireDIDAllowanceResponse MsgExpireDIDAllowanceResponse func (x *MsgExpireDIDAllowanceResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgExpireDIDAllowanceResponse)(x) } func (x *MsgExpireDIDAllowanceResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgExpireDIDAllowanceResponse_messageType fastReflection_MsgExpireDIDAllowanceResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgExpireDIDAllowanceResponse_messageType{} type fastReflection_MsgExpireDIDAllowanceResponse_messageType struct{} func (x fastReflection_MsgExpireDIDAllowanceResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgExpireDIDAllowanceResponse)(nil) } func (x fastReflection_MsgExpireDIDAllowanceResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgExpireDIDAllowanceResponse) } func (x fastReflection_MsgExpireDIDAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgExpireDIDAllowanceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgExpireDIDAllowanceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Type() protoreflect.MessageType { return _fastReflection_MsgExpireDIDAllowanceResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgExpireDIDAllowanceResponse) New() protoreflect.Message { return new(fastReflection_MsgExpireDIDAllowanceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Interface() protoreflect.ProtoMessage { return (*MsgExpireDIDAllowanceResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgExpireDIDAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgExpireDIDAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgExpireDIDAllowanceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExpireDIDAllowanceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgExpireDIDAllowanceResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgExpireDIDAllowanceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgExpireDIDAllowanceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgExpireDIDAllowanceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgExpireDIDAllowanceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExpireDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExpireDIDAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventGrantDIDAllowance protoreflect.MessageDescriptor fd_EventGrantDIDAllowance_granter protoreflect.FieldDescriptor fd_EventGrantDIDAllowance_grantee_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_EventGrantDIDAllowance = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("EventGrantDIDAllowance") fd_EventGrantDIDAllowance_granter = md_EventGrantDIDAllowance.Fields().ByName("granter") fd_EventGrantDIDAllowance_grantee_did = md_EventGrantDIDAllowance.Fields().ByName("grantee_did") } var _ protoreflect.Message = (*fastReflection_EventGrantDIDAllowance)(nil) type fastReflection_EventGrantDIDAllowance EventGrantDIDAllowance func (x *EventGrantDIDAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_EventGrantDIDAllowance)(x) } func (x *EventGrantDIDAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventGrantDIDAllowance_messageType fastReflection_EventGrantDIDAllowance_messageType var _ protoreflect.MessageType = fastReflection_EventGrantDIDAllowance_messageType{} type fastReflection_EventGrantDIDAllowance_messageType struct{} func (x fastReflection_EventGrantDIDAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_EventGrantDIDAllowance)(nil) } func (x fastReflection_EventGrantDIDAllowance_messageType) New() protoreflect.Message { return new(fastReflection_EventGrantDIDAllowance) } func (x fastReflection_EventGrantDIDAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventGrantDIDAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventGrantDIDAllowance) Descriptor() protoreflect.MessageDescriptor { return md_EventGrantDIDAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventGrantDIDAllowance) Type() protoreflect.MessageType { return _fastReflection_EventGrantDIDAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventGrantDIDAllowance) New() protoreflect.Message { return new(fastReflection_EventGrantDIDAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventGrantDIDAllowance) Interface() protoreflect.ProtoMessage { return (*EventGrantDIDAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventGrantDIDAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_EventGrantDIDAllowance_granter, value) { return } } if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_EventGrantDIDAllowance_grantee_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventGrantDIDAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.grantee_did": return x.GranteeDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventGrantDIDAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.grantee_did": x.GranteeDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventGrantDIDAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventGrantDIDAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.grantee_did": x.GranteeDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventGrantDIDAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance is not mutable")) case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventGrantDIDAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance.grantee_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventGrantDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventGrantDIDAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventGrantDIDAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.EventGrantDIDAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventGrantDIDAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventGrantDIDAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventGrantDIDAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventGrantDIDAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventGrantDIDAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventGrantDIDAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventGrantDIDAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventGrantDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventGrantDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventExpireDIDAllowance protoreflect.MessageDescriptor fd_EventExpireDIDAllowance_granter protoreflect.FieldDescriptor fd_EventExpireDIDAllowance_grantee_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_EventExpireDIDAllowance = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("EventExpireDIDAllowance") fd_EventExpireDIDAllowance_granter = md_EventExpireDIDAllowance.Fields().ByName("granter") fd_EventExpireDIDAllowance_grantee_did = md_EventExpireDIDAllowance.Fields().ByName("grantee_did") } var _ protoreflect.Message = (*fastReflection_EventExpireDIDAllowance)(nil) type fastReflection_EventExpireDIDAllowance EventExpireDIDAllowance func (x *EventExpireDIDAllowance) ProtoReflect() protoreflect.Message { return (*fastReflection_EventExpireDIDAllowance)(x) } func (x *EventExpireDIDAllowance) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventExpireDIDAllowance_messageType fastReflection_EventExpireDIDAllowance_messageType var _ protoreflect.MessageType = fastReflection_EventExpireDIDAllowance_messageType{} type fastReflection_EventExpireDIDAllowance_messageType struct{} func (x fastReflection_EventExpireDIDAllowance_messageType) Zero() protoreflect.Message { return (*fastReflection_EventExpireDIDAllowance)(nil) } func (x fastReflection_EventExpireDIDAllowance_messageType) New() protoreflect.Message { return new(fastReflection_EventExpireDIDAllowance) } func (x fastReflection_EventExpireDIDAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventExpireDIDAllowance } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventExpireDIDAllowance) Descriptor() protoreflect.MessageDescriptor { return md_EventExpireDIDAllowance } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventExpireDIDAllowance) Type() protoreflect.MessageType { return _fastReflection_EventExpireDIDAllowance_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventExpireDIDAllowance) New() protoreflect.Message { return new(fastReflection_EventExpireDIDAllowance) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventExpireDIDAllowance) Interface() protoreflect.ProtoMessage { return (*EventExpireDIDAllowance)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventExpireDIDAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Granter != "" { value := protoreflect.ValueOfString(x.Granter) if !f(fd_EventExpireDIDAllowance_granter, value) { return } } if x.GranteeDid != "" { value := protoreflect.ValueOfString(x.GranteeDid) if !f(fd_EventExpireDIDAllowance_grantee_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventExpireDIDAllowance) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.granter": return x.Granter != "" case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.grantee_did": return x.GranteeDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventExpireDIDAllowance) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.granter": x.Granter = "" case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.grantee_did": x.GranteeDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventExpireDIDAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.granter": value := x.Granter return protoreflect.ValueOfString(value) case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.grantee_did": value := x.GranteeDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventExpireDIDAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.granter": x.Granter = value.Interface().(string) case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.grantee_did": x.GranteeDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventExpireDIDAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.granter": panic(fmt.Errorf("field granter of message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance is not mutable")) case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.grantee_did": panic(fmt.Errorf("field grantee_did of message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventExpireDIDAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.granter": return protoreflect.ValueOfString("") case "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance.grantee_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.EventExpireDIDAllowance")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.EventExpireDIDAllowance does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventExpireDIDAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.EventExpireDIDAllowance", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventExpireDIDAllowance) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventExpireDIDAllowance) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventExpireDIDAllowance) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventExpireDIDAllowance) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventExpireDIDAllowance) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Granter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.GranteeDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventExpireDIDAllowance) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.GranteeDid) > 0 { i -= len(x.GranteeDid) copy(dAtA[i:], x.GranteeDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GranteeDid))) i-- dAtA[i] = 0x12 } if len(x.Granter) > 0 { i -= len(x.Granter) copy(dAtA[i:], x.Granter) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventExpireDIDAllowance) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventExpireDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventExpireDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgPruneDIDAllowances protoreflect.MessageDescriptor fd_MsgPruneDIDAllowances_pruner protoreflect.FieldDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgPruneDIDAllowances = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneDIDAllowances") fd_MsgPruneDIDAllowances_pruner = md_MsgPruneDIDAllowances.Fields().ByName("pruner") } var _ protoreflect.Message = (*fastReflection_MsgPruneDIDAllowances)(nil) type fastReflection_MsgPruneDIDAllowances MsgPruneDIDAllowances func (x *MsgPruneDIDAllowances) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgPruneDIDAllowances)(x) } func (x *MsgPruneDIDAllowances) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgPruneDIDAllowances_messageType fastReflection_MsgPruneDIDAllowances_messageType var _ protoreflect.MessageType = fastReflection_MsgPruneDIDAllowances_messageType{} type fastReflection_MsgPruneDIDAllowances_messageType struct{} func (x fastReflection_MsgPruneDIDAllowances_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgPruneDIDAllowances)(nil) } func (x fastReflection_MsgPruneDIDAllowances_messageType) New() protoreflect.Message { return new(fastReflection_MsgPruneDIDAllowances) } func (x fastReflection_MsgPruneDIDAllowances_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneDIDAllowances } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgPruneDIDAllowances) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneDIDAllowances } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgPruneDIDAllowances) Type() protoreflect.MessageType { return _fastReflection_MsgPruneDIDAllowances_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgPruneDIDAllowances) New() protoreflect.Message { return new(fastReflection_MsgPruneDIDAllowances) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgPruneDIDAllowances) Interface() protoreflect.ProtoMessage { return (*MsgPruneDIDAllowances)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgPruneDIDAllowances) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Pruner != "" { value := protoreflect.ValueOfString(x.Pruner) if !f(fd_MsgPruneDIDAllowances_pruner, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgPruneDIDAllowances) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances.pruner": return x.Pruner != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowances) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances.pruner": x.Pruner = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgPruneDIDAllowances) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances.pruner": value := x.Pruner return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowances) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances.pruner": x.Pruner = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowances) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances.pruner": panic(fmt.Errorf("field pruner of message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgPruneDIDAllowances) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances.pruner": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgPruneDIDAllowances) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgPruneDIDAllowances) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowances) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgPruneDIDAllowances) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgPruneDIDAllowances) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgPruneDIDAllowances) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Pruner) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgPruneDIDAllowances) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Pruner) > 0 { i -= len(x.Pruner) copy(dAtA[i:], x.Pruner) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pruner))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgPruneDIDAllowances) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneDIDAllowances: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneDIDAllowances: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pruner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Pruner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgPruneDIDAllowancesResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() md_MsgPruneDIDAllowancesResponse = File_sourcehub_feegrant_v1beta1_tx_proto.Messages().ByName("MsgPruneDIDAllowancesResponse") } var _ protoreflect.Message = (*fastReflection_MsgPruneDIDAllowancesResponse)(nil) type fastReflection_MsgPruneDIDAllowancesResponse MsgPruneDIDAllowancesResponse func (x *MsgPruneDIDAllowancesResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgPruneDIDAllowancesResponse)(x) } func (x *MsgPruneDIDAllowancesResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgPruneDIDAllowancesResponse_messageType fastReflection_MsgPruneDIDAllowancesResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgPruneDIDAllowancesResponse_messageType{} type fastReflection_MsgPruneDIDAllowancesResponse_messageType struct{} func (x fastReflection_MsgPruneDIDAllowancesResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgPruneDIDAllowancesResponse)(nil) } func (x fastReflection_MsgPruneDIDAllowancesResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgPruneDIDAllowancesResponse) } func (x fastReflection_MsgPruneDIDAllowancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneDIDAllowancesResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgPruneDIDAllowancesResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Type() protoreflect.MessageType { return _fastReflection_MsgPruneDIDAllowancesResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgPruneDIDAllowancesResponse) New() protoreflect.Message { return new(fastReflection_MsgPruneDIDAllowancesResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Interface() protoreflect.ProtoMessage { return (*MsgPruneDIDAllowancesResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgPruneDIDAllowancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse")) } panic(fmt.Errorf("message sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgPruneDIDAllowancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgPruneDIDAllowancesResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPruneDIDAllowancesResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgPruneDIDAllowancesResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgPruneDIDAllowancesResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgPruneDIDAllowancesResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgPruneDIDAllowancesResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgPruneDIDAllowancesResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneDIDAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPruneDIDAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/feegrant/v1beta1/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // MsgGrantAllowance adds permission for Grantee to spend up to Allowance // of fees from the account of Granter. type MsgGrantAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (x *MsgGrantAllowance) Reset() { *x = MsgGrantAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgGrantAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgGrantAllowance) ProtoMessage() {} // Deprecated: Use MsgGrantAllowance.ProtoReflect.Descriptor instead. func (*MsgGrantAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgGrantAllowance) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *MsgGrantAllowance) GetGrantee() string { if x != nil { return x.Grantee } return "" } func (x *MsgGrantAllowance) GetAllowance() *anypb.Any { if x != nil { return x.Allowance } return nil } // MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. type MsgGrantAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgGrantAllowanceResponse) Reset() { *x = MsgGrantAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgGrantAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgGrantAllowanceResponse) ProtoMessage() {} // Deprecated: Use MsgGrantAllowanceResponse.ProtoReflect.Descriptor instead. func (*MsgGrantAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{1} } // MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. type MsgRevokeAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` } func (x *MsgRevokeAllowance) Reset() { *x = MsgRevokeAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRevokeAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRevokeAllowance) ProtoMessage() {} // Deprecated: Use MsgRevokeAllowance.ProtoReflect.Descriptor instead. func (*MsgRevokeAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgRevokeAllowance) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *MsgRevokeAllowance) GetGrantee() string { if x != nil { return x.Grantee } return "" } // MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. type MsgRevokeAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgRevokeAllowanceResponse) Reset() { *x = MsgRevokeAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRevokeAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRevokeAllowanceResponse) ProtoMessage() {} // Deprecated: Use MsgRevokeAllowanceResponse.ProtoReflect.Descriptor instead. func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{3} } // MsgPruneAllowances prunes expired fee allowances. type MsgPruneAllowances struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // pruner is the address of the user pruning expired allowances. Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` } func (x *MsgPruneAllowances) Reset() { *x = MsgPruneAllowances{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgPruneAllowances) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgPruneAllowances) ProtoMessage() {} // Deprecated: Use MsgPruneAllowances.ProtoReflect.Descriptor instead. func (*MsgPruneAllowances) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgPruneAllowances) GetPruner() string { if x != nil { return x.Pruner } return "" } // MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. type MsgPruneAllowancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgPruneAllowancesResponse) Reset() { *x = MsgPruneAllowancesResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgPruneAllowancesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgPruneAllowancesResponse) ProtoMessage() {} // Deprecated: Use MsgPruneAllowancesResponse.ProtoReflect.Descriptor instead. func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{5} } // MsgGrantDIDAllowance adds permission for a DID to spend up to Allowance // of fees from the account of Granter. type MsgGrantDIDAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (x *MsgGrantDIDAllowance) Reset() { *x = MsgGrantDIDAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgGrantDIDAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgGrantDIDAllowance) ProtoMessage() {} // Deprecated: Use MsgGrantDIDAllowance.ProtoReflect.Descriptor instead. func (*MsgGrantDIDAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgGrantDIDAllowance) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *MsgGrantDIDAllowance) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } func (x *MsgGrantDIDAllowance) GetAllowance() *anypb.Any { if x != nil { return x.Allowance } return nil } // MsgGrantDIDAllowanceResponse defines the Msg/GrantDIDAllowanceResponse response type. type MsgGrantDIDAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgGrantDIDAllowanceResponse) Reset() { *x = MsgGrantDIDAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgGrantDIDAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgGrantDIDAllowanceResponse) ProtoMessage() {} // Deprecated: Use MsgGrantDIDAllowanceResponse.ProtoReflect.Descriptor instead. func (*MsgGrantDIDAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{7} } // MsgExpireDIDAllowance expires an existing DID allowance by setting the expiration to current PeriodReset. type MsgExpireDIDAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user who granted the allowance. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID whose allowance should be expired. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (x *MsgExpireDIDAllowance) Reset() { *x = MsgExpireDIDAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgExpireDIDAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgExpireDIDAllowance) ProtoMessage() {} // Deprecated: Use MsgExpireDIDAllowance.ProtoReflect.Descriptor instead. func (*MsgExpireDIDAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgExpireDIDAllowance) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *MsgExpireDIDAllowance) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } // MsgExpireDIDAllowanceResponse defines the Msg/ExpireDIDAllowanceResponse response type. type MsgExpireDIDAllowanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgExpireDIDAllowanceResponse) Reset() { *x = MsgExpireDIDAllowanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgExpireDIDAllowanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgExpireDIDAllowanceResponse) ProtoMessage() {} // Deprecated: Use MsgExpireDIDAllowanceResponse.ProtoReflect.Descriptor instead. func (*MsgExpireDIDAllowanceResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{9} } // EventGrantDIDAllowance is emitted when a DID allowance is granted. type EventGrantDIDAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (x *EventGrantDIDAllowance) Reset() { *x = EventGrantDIDAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventGrantDIDAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventGrantDIDAllowance) ProtoMessage() {} // Deprecated: Use EventGrantDIDAllowance.ProtoReflect.Descriptor instead. func (*EventGrantDIDAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{10} } func (x *EventGrantDIDAllowance) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *EventGrantDIDAllowance) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } // EventExpireDIDAllowance is emitted when a DID allowance is expired. type EventExpireDIDAllowance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // granter is the address of the user expiring an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID whose allowance is being expired. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (x *EventExpireDIDAllowance) Reset() { *x = EventExpireDIDAllowance{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventExpireDIDAllowance) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventExpireDIDAllowance) ProtoMessage() {} // Deprecated: Use EventExpireDIDAllowance.ProtoReflect.Descriptor instead. func (*EventExpireDIDAllowance) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{11} } func (x *EventExpireDIDAllowance) GetGranter() string { if x != nil { return x.Granter } return "" } func (x *EventExpireDIDAllowance) GetGranteeDid() string { if x != nil { return x.GranteeDid } return "" } // MsgPruneDIDAllowances prunes expired DID fee allowances. type MsgPruneDIDAllowances struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // pruner is the address of the user pruning expired DID allowances. Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` } func (x *MsgPruneDIDAllowances) Reset() { *x = MsgPruneDIDAllowances{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgPruneDIDAllowances) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgPruneDIDAllowances) ProtoMessage() {} // Deprecated: Use MsgPruneDIDAllowances.ProtoReflect.Descriptor instead. func (*MsgPruneDIDAllowances) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgPruneDIDAllowances) GetPruner() string { if x != nil { return x.Pruner } return "" } // MsgPruneDIDAllowancesResponse defines the Msg/PruneDIDAllowancesResponse response type. type MsgPruneDIDAllowancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgPruneDIDAllowancesResponse) Reset() { *x = MsgPruneDIDAllowancesResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgPruneDIDAllowancesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgPruneDIDAllowancesResponse) ProtoMessage() {} // Deprecated: Use MsgPruneDIDAllowancesResponse.ProtoReflect.Descriptor instead. func (*MsgPruneDIDAllowancesResponse) Descriptor() ([]byte, []int) { return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{13} } var File_sourcehub_feegrant_v1beta1_tx_proto protoreflect.FileDescriptor var file_sourcehub_feegrant_v1beta1_tx_proto_rawDesc = []byte{ 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x2c, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x1f, 0xd2, 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x76, 0x30, 0x2e, 0x35, 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x32, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x14, 0xd2, 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x76, 0x30, 0x2e, 0x35, 0x30, 0x22, 0xfe, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x12, 0x60, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x2c, 0xca, 0xb4, 0x2d, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x3a, 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x16, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x22, 0x54, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x44, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x76, 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x36, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x36, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0xca, 0xb4, 0x2d, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x76, 0x30, 0x2e, 0x35, 0x30, 0x2e, 0x30, 0x12, 0x7f, 0x0a, 0x11, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x38, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x44, 0x49, 0x44, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xf0, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x46, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_feegrant_v1beta1_tx_proto_rawDescOnce sync.Once file_sourcehub_feegrant_v1beta1_tx_proto_rawDescData = file_sourcehub_feegrant_v1beta1_tx_proto_rawDesc ) func file_sourcehub_feegrant_v1beta1_tx_proto_rawDescGZIP() []byte { file_sourcehub_feegrant_v1beta1_tx_proto_rawDescOnce.Do(func() { file_sourcehub_feegrant_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_feegrant_v1beta1_tx_proto_rawDescData) }) return file_sourcehub_feegrant_v1beta1_tx_proto_rawDescData } var file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_sourcehub_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgGrantAllowance)(nil), // 0: sourcehub.feegrant.v1beta1.MsgGrantAllowance (*MsgGrantAllowanceResponse)(nil), // 1: sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse (*MsgRevokeAllowance)(nil), // 2: sourcehub.feegrant.v1beta1.MsgRevokeAllowance (*MsgRevokeAllowanceResponse)(nil), // 3: sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse (*MsgPruneAllowances)(nil), // 4: sourcehub.feegrant.v1beta1.MsgPruneAllowances (*MsgPruneAllowancesResponse)(nil), // 5: sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse (*MsgGrantDIDAllowance)(nil), // 6: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance (*MsgGrantDIDAllowanceResponse)(nil), // 7: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse (*MsgExpireDIDAllowance)(nil), // 8: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance (*MsgExpireDIDAllowanceResponse)(nil), // 9: sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse (*EventGrantDIDAllowance)(nil), // 10: sourcehub.feegrant.v1beta1.EventGrantDIDAllowance (*EventExpireDIDAllowance)(nil), // 11: sourcehub.feegrant.v1beta1.EventExpireDIDAllowance (*MsgPruneDIDAllowances)(nil), // 12: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances (*MsgPruneDIDAllowancesResponse)(nil), // 13: sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse (*anypb.Any)(nil), // 14: google.protobuf.Any } var file_sourcehub_feegrant_v1beta1_tx_proto_depIdxs = []int32{ 14, // 0: sourcehub.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any 14, // 1: sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance.allowance:type_name -> google.protobuf.Any 0, // 2: sourcehub.feegrant.v1beta1.Msg.GrantAllowance:input_type -> sourcehub.feegrant.v1beta1.MsgGrantAllowance 2, // 3: sourcehub.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> sourcehub.feegrant.v1beta1.MsgRevokeAllowance 4, // 4: sourcehub.feegrant.v1beta1.Msg.PruneAllowances:input_type -> sourcehub.feegrant.v1beta1.MsgPruneAllowances 6, // 5: sourcehub.feegrant.v1beta1.Msg.GrantDIDAllowance:input_type -> sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance 8, // 6: sourcehub.feegrant.v1beta1.Msg.ExpireDIDAllowance:input_type -> sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance 12, // 7: sourcehub.feegrant.v1beta1.Msg.PruneDIDAllowances:input_type -> sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances 1, // 8: sourcehub.feegrant.v1beta1.Msg.GrantAllowance:output_type -> sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse 3, // 9: sourcehub.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse 5, // 10: sourcehub.feegrant.v1beta1.Msg.PruneAllowances:output_type -> sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse 7, // 11: sourcehub.feegrant.v1beta1.Msg.GrantDIDAllowance:output_type -> sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse 9, // 12: sourcehub.feegrant.v1beta1.Msg.ExpireDIDAllowance:output_type -> sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse 13, // 13: sourcehub.feegrant.v1beta1.Msg.PruneDIDAllowances:output_type -> sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse 8, // [8:14] is the sub-list for method output_type 2, // [2:8] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcehub_feegrant_v1beta1_tx_proto_init() } func file_sourcehub_feegrant_v1beta1_tx_proto_init() { if File_sourcehub_feegrant_v1beta1_tx_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgGrantAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgGrantAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRevokeAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRevokeAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgPruneAllowances); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgPruneAllowancesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgGrantDIDAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgGrantDIDAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgExpireDIDAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgExpireDIDAllowanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventGrantDIDAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventExpireDIDAllowance); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgPruneDIDAllowances); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgPruneDIDAllowancesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_feegrant_v1beta1_tx_proto_rawDesc, NumEnums: 0, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_feegrant_v1beta1_tx_proto_goTypes, DependencyIndexes: file_sourcehub_feegrant_v1beta1_tx_proto_depIdxs, MessageInfos: file_sourcehub_feegrant_v1beta1_tx_proto_msgTypes, }.Build() File_sourcehub_feegrant_v1beta1_tx_proto = out.File file_sourcehub_feegrant_v1beta1_tx_proto_rawDesc = nil file_sourcehub_feegrant_v1beta1_tx_proto_goTypes = nil file_sourcehub_feegrant_v1beta1_tx_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/feegrant/v1beta1/tx_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/feegrant/v1beta1/tx.proto package feegrantv1beta1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Msg_GrantAllowance_FullMethodName = "/sourcehub.feegrant.v1beta1.Msg/GrantAllowance" Msg_RevokeAllowance_FullMethodName = "/sourcehub.feegrant.v1beta1.Msg/RevokeAllowance" Msg_PruneAllowances_FullMethodName = "/sourcehub.feegrant.v1beta1.Msg/PruneAllowances" Msg_GrantDIDAllowance_FullMethodName = "/sourcehub.feegrant.v1beta1.Msg/GrantDIDAllowance" Msg_ExpireDIDAllowance_FullMethodName = "/sourcehub.feegrant.v1beta1.Msg/ExpireDIDAllowance" Msg_PruneDIDAllowances_FullMethodName = "/sourcehub.feegrant.v1beta1.Msg/PruneDIDAllowances" ) // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Msg defines the feegrant msg service. type MsgClient interface { // GrantAllowance grants fee allowance to the grantee on the granter's // account with the provided expiration time. GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) // GrantDIDAllowance grants fee allowance to a DID on the granter's account. GrantDIDAllowance(ctx context.Context, in *MsgGrantDIDAllowance, opts ...grpc.CallOption) (*MsgGrantDIDAllowanceResponse, error) // ExpireDIDAllowance expires a fee allowance by setting the expiration to current PeriodReset. // This allows the allowance to be automatically pruned when the current period expires. ExpireDIDAllowance(ctx context.Context, in *MsgExpireDIDAllowance, opts ...grpc.CallOption) (*MsgExpireDIDAllowanceResponse, error) // PruneDIDAllowances prunes expired DID fee allowances, currently up to 75 at a time. PruneDIDAllowances(ctx context.Context, in *MsgPruneDIDAllowances, opts ...grpc.CallOption) (*MsgPruneDIDAllowancesResponse, error) } type msgClient struct { cc grpc.ClientConnInterface } func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } func (c *msgClient) GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgGrantAllowanceResponse) err := c.cc.Invoke(ctx, Msg_GrantAllowance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgRevokeAllowanceResponse) err := c.cc.Invoke(ctx, Msg_RevokeAllowance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgPruneAllowancesResponse) err := c.cc.Invoke(ctx, Msg_PruneAllowances_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) GrantDIDAllowance(ctx context.Context, in *MsgGrantDIDAllowance, opts ...grpc.CallOption) (*MsgGrantDIDAllowanceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgGrantDIDAllowanceResponse) err := c.cc.Invoke(ctx, Msg_GrantDIDAllowance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) ExpireDIDAllowance(ctx context.Context, in *MsgExpireDIDAllowance, opts ...grpc.CallOption) (*MsgExpireDIDAllowanceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgExpireDIDAllowanceResponse) err := c.cc.Invoke(ctx, Msg_ExpireDIDAllowance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) PruneDIDAllowances(ctx context.Context, in *MsgPruneDIDAllowances, opts ...grpc.CallOption) (*MsgPruneDIDAllowancesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgPruneDIDAllowancesResponse) err := c.cc.Invoke(ctx, Msg_PruneDIDAllowances_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility. // // Msg defines the feegrant msg service. type MsgServer interface { // GrantAllowance grants fee allowance to the grantee on the granter's // account with the provided expiration time. GrantAllowance(context.Context, *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) // GrantDIDAllowance grants fee allowance to a DID on the granter's account. GrantDIDAllowance(context.Context, *MsgGrantDIDAllowance) (*MsgGrantDIDAllowanceResponse, error) // ExpireDIDAllowance expires a fee allowance by setting the expiration to current PeriodReset. // This allows the allowance to be automatically pruned when the current period expires. ExpireDIDAllowance(context.Context, *MsgExpireDIDAllowance) (*MsgExpireDIDAllowanceResponse, error) // PruneDIDAllowances prunes expired DID fee allowances, currently up to 75 at a time. PruneDIDAllowances(context.Context, *MsgPruneDIDAllowances) (*MsgPruneDIDAllowancesResponse, error) mustEmbedUnimplementedMsgServer() } // UnimplementedMsgServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMsgServer struct{} func (UnimplementedMsgServer) GrantAllowance(context.Context, *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GrantAllowance not implemented") } func (UnimplementedMsgServer) RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") } func (UnimplementedMsgServer) PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") } func (UnimplementedMsgServer) GrantDIDAllowance(context.Context, *MsgGrantDIDAllowance) (*MsgGrantDIDAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GrantDIDAllowance not implemented") } func (UnimplementedMsgServer) ExpireDIDAllowance(context.Context, *MsgExpireDIDAllowance) (*MsgExpireDIDAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExpireDIDAllowance not implemented") } func (UnimplementedMsgServer) PruneDIDAllowances(context.Context, *MsgPruneDIDAllowances) (*MsgPruneDIDAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneDIDAllowances not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will // result in compilation errors. type UnsafeMsgServer interface { mustEmbedUnimplementedMsgServer() } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { // If the following call pancis, it indicates UnimplementedMsgServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&Msg_ServiceDesc, srv) } func _Msg_GrantAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgGrantAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).GrantAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_GrantAllowance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).GrantAllowance(ctx, req.(*MsgGrantAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRevokeAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RevokeAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_RevokeAllowance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RevokeAllowance(ctx, req.(*MsgRevokeAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgPruneAllowances) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).PruneAllowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_PruneAllowances_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).PruneAllowances(ctx, req.(*MsgPruneAllowances)) } return interceptor(ctx, in, info, handler) } func _Msg_GrantDIDAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgGrantDIDAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).GrantDIDAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_GrantDIDAllowance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).GrantDIDAllowance(ctx, req.(*MsgGrantDIDAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_ExpireDIDAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgExpireDIDAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).ExpireDIDAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_ExpireDIDAllowance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).ExpireDIDAllowance(ctx, req.(*MsgExpireDIDAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_PruneDIDAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgPruneDIDAllowances) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).PruneDIDAllowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_PruneDIDAllowances_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).PruneDIDAllowances(ctx, req.(*MsgPruneDIDAllowances)) } return interceptor(ctx, in, info, handler) } // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.feegrant.v1beta1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GrantAllowance", Handler: _Msg_GrantAllowance_Handler, }, { MethodName: "RevokeAllowance", Handler: _Msg_RevokeAllowance_Handler, }, { MethodName: "PruneAllowances", Handler: _Msg_PruneAllowances_Handler, }, { MethodName: "GrantDIDAllowance", Handler: _Msg_GrantDIDAllowance_Handler, }, { MethodName: "ExpireDIDAllowance", Handler: _Msg_ExpireDIDAllowance_Handler, }, { MethodName: "PruneDIDAllowances", Handler: _Msg_PruneDIDAllowances_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/feegrant/v1beta1/tx.proto", } ================================================ FILE: api/sourcehub/hub/chain_config.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package hub import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_ChainConfig protoreflect.MessageDescriptor fd_ChainConfig_allow_zero_fee_txs protoreflect.FieldDescriptor fd_ChainConfig_ignore_bearer_auth protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_chain_config_proto_init() md_ChainConfig = File_sourcehub_hub_chain_config_proto.Messages().ByName("ChainConfig") fd_ChainConfig_allow_zero_fee_txs = md_ChainConfig.Fields().ByName("allow_zero_fee_txs") fd_ChainConfig_ignore_bearer_auth = md_ChainConfig.Fields().ByName("ignore_bearer_auth") } var _ protoreflect.Message = (*fastReflection_ChainConfig)(nil) type fastReflection_ChainConfig ChainConfig func (x *ChainConfig) ProtoReflect() protoreflect.Message { return (*fastReflection_ChainConfig)(x) } func (x *ChainConfig) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_chain_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ChainConfig_messageType fastReflection_ChainConfig_messageType var _ protoreflect.MessageType = fastReflection_ChainConfig_messageType{} type fastReflection_ChainConfig_messageType struct{} func (x fastReflection_ChainConfig_messageType) Zero() protoreflect.Message { return (*fastReflection_ChainConfig)(nil) } func (x fastReflection_ChainConfig_messageType) New() protoreflect.Message { return new(fastReflection_ChainConfig) } func (x fastReflection_ChainConfig_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ChainConfig } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ChainConfig) Descriptor() protoreflect.MessageDescriptor { return md_ChainConfig } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ChainConfig) Type() protoreflect.MessageType { return _fastReflection_ChainConfig_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ChainConfig) New() protoreflect.Message { return new(fastReflection_ChainConfig) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ChainConfig) Interface() protoreflect.ProtoMessage { return (*ChainConfig)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ChainConfig) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.AllowZeroFeeTxs != false { value := protoreflect.ValueOfBool(x.AllowZeroFeeTxs) if !f(fd_ChainConfig_allow_zero_fee_txs, value) { return } } if x.IgnoreBearerAuth != false { value := protoreflect.ValueOfBool(x.IgnoreBearerAuth) if !f(fd_ChainConfig_ignore_bearer_auth, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ChainConfig) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.ChainConfig.allow_zero_fee_txs": return x.AllowZeroFeeTxs != false case "sourcehub.hub.ChainConfig.ignore_bearer_auth": return x.IgnoreBearerAuth != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ChainConfig")) } panic(fmt.Errorf("message sourcehub.hub.ChainConfig does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ChainConfig) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.ChainConfig.allow_zero_fee_txs": x.AllowZeroFeeTxs = false case "sourcehub.hub.ChainConfig.ignore_bearer_auth": x.IgnoreBearerAuth = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ChainConfig")) } panic(fmt.Errorf("message sourcehub.hub.ChainConfig does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ChainConfig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.ChainConfig.allow_zero_fee_txs": value := x.AllowZeroFeeTxs return protoreflect.ValueOfBool(value) case "sourcehub.hub.ChainConfig.ignore_bearer_auth": value := x.IgnoreBearerAuth return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ChainConfig")) } panic(fmt.Errorf("message sourcehub.hub.ChainConfig does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ChainConfig) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.ChainConfig.allow_zero_fee_txs": x.AllowZeroFeeTxs = value.Bool() case "sourcehub.hub.ChainConfig.ignore_bearer_auth": x.IgnoreBearerAuth = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ChainConfig")) } panic(fmt.Errorf("message sourcehub.hub.ChainConfig does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ChainConfig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.ChainConfig.allow_zero_fee_txs": panic(fmt.Errorf("field allow_zero_fee_txs of message sourcehub.hub.ChainConfig is not mutable")) case "sourcehub.hub.ChainConfig.ignore_bearer_auth": panic(fmt.Errorf("field ignore_bearer_auth of message sourcehub.hub.ChainConfig is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ChainConfig")) } panic(fmt.Errorf("message sourcehub.hub.ChainConfig does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ChainConfig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.ChainConfig.allow_zero_fee_txs": return protoreflect.ValueOfBool(false) case "sourcehub.hub.ChainConfig.ignore_bearer_auth": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ChainConfig")) } panic(fmt.Errorf("message sourcehub.hub.ChainConfig does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ChainConfig) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.ChainConfig", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ChainConfig) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ChainConfig) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ChainConfig) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ChainConfig) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ChainConfig) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.AllowZeroFeeTxs { n += 2 } if x.IgnoreBearerAuth { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ChainConfig) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.IgnoreBearerAuth { i-- if x.IgnoreBearerAuth { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if x.AllowZeroFeeTxs { i-- if x.AllowZeroFeeTxs { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ChainConfig) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainConfig: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowZeroFeeTxs", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.AllowZeroFeeTxs = bool(v != 0) case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IgnoreBearerAuth", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.IgnoreBearerAuth = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/chain_config.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // ChainConfig specifies flags and parameters which // tune the chain behavior during genesis creation type ChainConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // allow_zero_fee_txs if true configures the ante handler // to not reject txs with 0 fees AllowZeroFeeTxs bool `protobuf:"varint,1,opt,name=allow_zero_fee_txs,json=allowZeroFeeTxs,proto3" json:"allow_zero_fee_txs,omitempty"` // ignore_bearer_auth if true ignores the `authorized_account` // field in the Bearer JWS from Extension Options IgnoreBearerAuth bool `protobuf:"varint,2,opt,name=ignore_bearer_auth,json=ignoreBearerAuth,proto3" json:"ignore_bearer_auth,omitempty"` } func (x *ChainConfig) Reset() { *x = ChainConfig{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_chain_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ChainConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*ChainConfig) ProtoMessage() {} // Deprecated: Use ChainConfig.ProtoReflect.Descriptor instead. func (*ChainConfig) Descriptor() ([]byte, []int) { return file_sourcehub_hub_chain_config_proto_rawDescGZIP(), []int{0} } func (x *ChainConfig) GetAllowZeroFeeTxs() bool { if x != nil { return x.AllowZeroFeeTxs } return false } func (x *ChainConfig) GetIgnoreBearerAuth() bool { if x != nil { return x.IgnoreBearerAuth } return false } var File_sourcehub_hub_chain_config_proto protoreflect.FileDescriptor var file_sourcehub_hub_chain_config_proto_rawDesc = []byte{ 0x0a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5a, 0x65, 0x72, 0x6f, 0x46, 0x65, 0x65, 0x54, 0x78, 0x73, 0x12, 0x33, 0x0a, 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x10, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0x9a, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x42, 0x10, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_chain_config_proto_rawDescOnce sync.Once file_sourcehub_hub_chain_config_proto_rawDescData = file_sourcehub_hub_chain_config_proto_rawDesc ) func file_sourcehub_hub_chain_config_proto_rawDescGZIP() []byte { file_sourcehub_hub_chain_config_proto_rawDescOnce.Do(func() { file_sourcehub_hub_chain_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_chain_config_proto_rawDescData) }) return file_sourcehub_hub_chain_config_proto_rawDescData } var file_sourcehub_hub_chain_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_hub_chain_config_proto_goTypes = []interface{}{ (*ChainConfig)(nil), // 0: sourcehub.hub.ChainConfig } var file_sourcehub_hub_chain_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_hub_chain_config_proto_init() } func file_sourcehub_hub_chain_config_proto_init() { if File_sourcehub_hub_chain_config_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_hub_chain_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChainConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_chain_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_hub_chain_config_proto_goTypes, DependencyIndexes: file_sourcehub_hub_chain_config_proto_depIdxs, MessageInfos: file_sourcehub_hub_chain_config_proto_msgTypes, }.Build() File_sourcehub_hub_chain_config_proto = out.File file_sourcehub_hub_chain_config_proto_rawDesc = nil file_sourcehub_hub_chain_config_proto_goTypes = nil file_sourcehub_hub_chain_config_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/genesis.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package hub import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_GenesisState_2_list)(nil) type _GenesisState_2_list struct { list *[]*ICAConnection } func (x *_GenesisState_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ICAConnection) (*x.list)[i] = concreteValue } func (x *_GenesisState_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ICAConnection) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { v := new(ICAConnection) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_2_list) NewElement() protoreflect.Value { v := new(ICAConnection) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_2_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_3_list)(nil) type _GenesisState_3_list struct { list *[]*JWSTokenRecord } func (x *_GenesisState_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*JWSTokenRecord) (*x.list)[i] = concreteValue } func (x *_GenesisState_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*JWSTokenRecord) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { v := new(JWSTokenRecord) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_3_list) NewElement() protoreflect.Value { v := new(JWSTokenRecord) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_3_list) IsValid() bool { return x.list != nil } var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor fd_GenesisState_ica_connections protoreflect.FieldDescriptor fd_GenesisState_jws_tokens protoreflect.FieldDescriptor fd_GenesisState_chain_config protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_genesis_proto_init() md_GenesisState = File_sourcehub_hub_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_ica_connections = md_GenesisState.Fields().ByName("ica_connections") fd_GenesisState_jws_tokens = md_GenesisState.Fields().ByName("jws_tokens") fd_GenesisState_chain_config = md_GenesisState.Fields().ByName("chain_config") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) type fastReflection_GenesisState GenesisState func (x *GenesisState) ProtoReflect() protoreflect.Message { return (*fastReflection_GenesisState)(x) } func (x *GenesisState) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} type fastReflection_GenesisState_messageType struct{} func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { return (*fastReflection_GenesisState)(nil) } func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { return new(fastReflection_GenesisState) } func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { return _fastReflection_GenesisState_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GenesisState) New() protoreflect.Message { return new(fastReflection_GenesisState) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { return (*GenesisState)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_GenesisState_params, value) { return } } if len(x.IcaConnections) != 0 { value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.IcaConnections}) if !f(fd_GenesisState_ica_connections, value) { return } } if len(x.JwsTokens) != 0 { value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.JwsTokens}) if !f(fd_GenesisState_jws_tokens, value) { return } } if x.ChainConfig != nil { value := protoreflect.ValueOfMessage(x.ChainConfig.ProtoReflect()) if !f(fd_GenesisState_chain_config, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.GenesisState.params": return x.Params != nil case "sourcehub.hub.GenesisState.ica_connections": return len(x.IcaConnections) != 0 case "sourcehub.hub.GenesisState.jws_tokens": return len(x.JwsTokens) != 0 case "sourcehub.hub.GenesisState.chain_config": return x.ChainConfig != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.GenesisState")) } panic(fmt.Errorf("message sourcehub.hub.GenesisState does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.GenesisState.params": x.Params = nil case "sourcehub.hub.GenesisState.ica_connections": x.IcaConnections = nil case "sourcehub.hub.GenesisState.jws_tokens": x.JwsTokens = nil case "sourcehub.hub.GenesisState.chain_config": x.ChainConfig = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.GenesisState")) } panic(fmt.Errorf("message sourcehub.hub.GenesisState does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.hub.GenesisState.ica_connections": if len(x.IcaConnections) == 0 { return protoreflect.ValueOfList(&_GenesisState_2_list{}) } listValue := &_GenesisState_2_list{list: &x.IcaConnections} return protoreflect.ValueOfList(listValue) case "sourcehub.hub.GenesisState.jws_tokens": if len(x.JwsTokens) == 0 { return protoreflect.ValueOfList(&_GenesisState_3_list{}) } listValue := &_GenesisState_3_list{list: &x.JwsTokens} return protoreflect.ValueOfList(listValue) case "sourcehub.hub.GenesisState.chain_config": value := x.ChainConfig return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.GenesisState")) } panic(fmt.Errorf("message sourcehub.hub.GenesisState does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.GenesisState.params": x.Params = value.Message().Interface().(*Params) case "sourcehub.hub.GenesisState.ica_connections": lv := value.List() clv := lv.(*_GenesisState_2_list) x.IcaConnections = *clv.list case "sourcehub.hub.GenesisState.jws_tokens": lv := value.List() clv := lv.(*_GenesisState_3_list) x.JwsTokens = *clv.list case "sourcehub.hub.GenesisState.chain_config": x.ChainConfig = value.Message().Interface().(*ChainConfig) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.GenesisState")) } panic(fmt.Errorf("message sourcehub.hub.GenesisState does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.GenesisState.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.hub.GenesisState.ica_connections": if x.IcaConnections == nil { x.IcaConnections = []*ICAConnection{} } value := &_GenesisState_2_list{list: &x.IcaConnections} return protoreflect.ValueOfList(value) case "sourcehub.hub.GenesisState.jws_tokens": if x.JwsTokens == nil { x.JwsTokens = []*JWSTokenRecord{} } value := &_GenesisState_3_list{list: &x.JwsTokens} return protoreflect.ValueOfList(value) case "sourcehub.hub.GenesisState.chain_config": if x.ChainConfig == nil { x.ChainConfig = new(ChainConfig) } return protoreflect.ValueOfMessage(x.ChainConfig.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.GenesisState")) } panic(fmt.Errorf("message sourcehub.hub.GenesisState does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.hub.GenesisState.ica_connections": list := []*ICAConnection{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) case "sourcehub.hub.GenesisState.jws_tokens": list := []*JWSTokenRecord{} return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) case "sourcehub.hub.GenesisState.chain_config": m := new(ChainConfig) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.GenesisState")) } panic(fmt.Errorf("message sourcehub.hub.GenesisState does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.GenesisState", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GenesisState) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.IcaConnections) > 0 { for _, e := range x.IcaConnections { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.JwsTokens) > 0 { for _, e := range x.JwsTokens { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.ChainConfig != nil { l = options.Size(x.ChainConfig) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.ChainConfig != nil { encoded, err := options.Marshal(x.ChainConfig) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if len(x.JwsTokens) > 0 { for iNdEx := len(x.JwsTokens) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.JwsTokens[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } } if len(x.IcaConnections) > 0 { for iNdEx := len(x.IcaConnections) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.IcaConnections[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IcaConnections", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.IcaConnections = append(x.IcaConnections, &ICAConnection{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.IcaConnections[len(x.IcaConnections)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JwsTokens", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.JwsTokens = append(x.JwsTokens, &JWSTokenRecord{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.JwsTokens[len(x.JwsTokens)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.ChainConfig == nil { x.ChainConfig = &ChainConfig{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ChainConfig); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // GenesisState defines the hub module's genesis state. type GenesisState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // ica_connections defines the list of ICA connections. IcaConnections []*ICAConnection `protobuf:"bytes,2,rep,name=ica_connections,json=icaConnections,proto3" json:"ica_connections,omitempty"` // jws_tokens defines the list of JWS token records. JwsTokens []*JWSTokenRecord `protobuf:"bytes,3,rep,name=jws_tokens,json=jwsTokens,proto3" json:"jws_tokens,omitempty"` ChainConfig *ChainConfig `protobuf:"bytes,4,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenesisState) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { return file_sourcehub_hub_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetParams() *Params { if x != nil { return x.Params } return nil } func (x *GenesisState) GetIcaConnections() []*ICAConnection { if x != nil { return x.IcaConnections } return nil } func (x *GenesisState) GetJwsTokens() []*JWSTokenRecord { if x != nil { return x.JwsTokens } return nil } func (x *GenesisState) GetChainConfig() *ChainConfig { if x != nil { return x.ChainConfig } return nil } var File_sourcehub_hub_genesis_proto protoreflect.FileDescriptor var file_sourcehub_hub_genesis_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x69, 0x63, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x6a, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x69, 0x63, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x49, 0x43, 0x41, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x69, 0x63, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x6a, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x4a, 0x57, 0x53, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x6a, 0x77, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x96, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_genesis_proto_rawDescOnce sync.Once file_sourcehub_hub_genesis_proto_rawDescData = file_sourcehub_hub_genesis_proto_rawDesc ) func file_sourcehub_hub_genesis_proto_rawDescGZIP() []byte { file_sourcehub_hub_genesis_proto_rawDescOnce.Do(func() { file_sourcehub_hub_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_genesis_proto_rawDescData) }) return file_sourcehub_hub_genesis_proto_rawDescData } var file_sourcehub_hub_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_hub_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: sourcehub.hub.GenesisState (*Params)(nil), // 1: sourcehub.hub.Params (*ICAConnection)(nil), // 2: sourcehub.hub.ICAConnection (*JWSTokenRecord)(nil), // 3: sourcehub.hub.JWSTokenRecord (*ChainConfig)(nil), // 4: sourcehub.hub.ChainConfig } var file_sourcehub_hub_genesis_proto_depIdxs = []int32{ 1, // 0: sourcehub.hub.GenesisState.params:type_name -> sourcehub.hub.Params 2, // 1: sourcehub.hub.GenesisState.ica_connections:type_name -> sourcehub.hub.ICAConnection 3, // 2: sourcehub.hub.GenesisState.jws_tokens:type_name -> sourcehub.hub.JWSTokenRecord 4, // 3: sourcehub.hub.GenesisState.chain_config:type_name -> sourcehub.hub.ChainConfig 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_sourcehub_hub_genesis_proto_init() } func file_sourcehub_hub_genesis_proto_init() { if File_sourcehub_hub_genesis_proto != nil { return } file_sourcehub_hub_params_proto_init() file_sourcehub_hub_ica_connection_proto_init() file_sourcehub_hub_jws_token_proto_init() file_sourcehub_hub_chain_config_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_hub_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_hub_genesis_proto_goTypes, DependencyIndexes: file_sourcehub_hub_genesis_proto_depIdxs, MessageInfos: file_sourcehub_hub_genesis_proto_msgTypes, }.Build() File_sourcehub_hub_genesis_proto = out.File file_sourcehub_hub_genesis_proto_rawDesc = nil file_sourcehub_hub_genesis_proto_goTypes = nil file_sourcehub_hub_genesis_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/ica_connection.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package hub import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_ICAConnection protoreflect.MessageDescriptor fd_ICAConnection_ica_address protoreflect.FieldDescriptor fd_ICAConnection_controller_address protoreflect.FieldDescriptor fd_ICAConnection_controller_chain_id protoreflect.FieldDescriptor fd_ICAConnection_connection_id protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_ica_connection_proto_init() md_ICAConnection = File_sourcehub_hub_ica_connection_proto.Messages().ByName("ICAConnection") fd_ICAConnection_ica_address = md_ICAConnection.Fields().ByName("ica_address") fd_ICAConnection_controller_address = md_ICAConnection.Fields().ByName("controller_address") fd_ICAConnection_controller_chain_id = md_ICAConnection.Fields().ByName("controller_chain_id") fd_ICAConnection_connection_id = md_ICAConnection.Fields().ByName("connection_id") } var _ protoreflect.Message = (*fastReflection_ICAConnection)(nil) type fastReflection_ICAConnection ICAConnection func (x *ICAConnection) ProtoReflect() protoreflect.Message { return (*fastReflection_ICAConnection)(x) } func (x *ICAConnection) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_ica_connection_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ICAConnection_messageType fastReflection_ICAConnection_messageType var _ protoreflect.MessageType = fastReflection_ICAConnection_messageType{} type fastReflection_ICAConnection_messageType struct{} func (x fastReflection_ICAConnection_messageType) Zero() protoreflect.Message { return (*fastReflection_ICAConnection)(nil) } func (x fastReflection_ICAConnection_messageType) New() protoreflect.Message { return new(fastReflection_ICAConnection) } func (x fastReflection_ICAConnection_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ICAConnection } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ICAConnection) Descriptor() protoreflect.MessageDescriptor { return md_ICAConnection } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ICAConnection) Type() protoreflect.MessageType { return _fastReflection_ICAConnection_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ICAConnection) New() protoreflect.Message { return new(fastReflection_ICAConnection) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ICAConnection) Interface() protoreflect.ProtoMessage { return (*ICAConnection)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ICAConnection) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.IcaAddress != "" { value := protoreflect.ValueOfString(x.IcaAddress) if !f(fd_ICAConnection_ica_address, value) { return } } if x.ControllerAddress != "" { value := protoreflect.ValueOfString(x.ControllerAddress) if !f(fd_ICAConnection_controller_address, value) { return } } if x.ControllerChainId != "" { value := protoreflect.ValueOfString(x.ControllerChainId) if !f(fd_ICAConnection_controller_chain_id, value) { return } } if x.ConnectionId != "" { value := protoreflect.ValueOfString(x.ConnectionId) if !f(fd_ICAConnection_connection_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ICAConnection) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.ICAConnection.ica_address": return x.IcaAddress != "" case "sourcehub.hub.ICAConnection.controller_address": return x.ControllerAddress != "" case "sourcehub.hub.ICAConnection.controller_chain_id": return x.ControllerChainId != "" case "sourcehub.hub.ICAConnection.connection_id": return x.ConnectionId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ICAConnection")) } panic(fmt.Errorf("message sourcehub.hub.ICAConnection does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ICAConnection) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.ICAConnection.ica_address": x.IcaAddress = "" case "sourcehub.hub.ICAConnection.controller_address": x.ControllerAddress = "" case "sourcehub.hub.ICAConnection.controller_chain_id": x.ControllerChainId = "" case "sourcehub.hub.ICAConnection.connection_id": x.ConnectionId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ICAConnection")) } panic(fmt.Errorf("message sourcehub.hub.ICAConnection does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ICAConnection) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.ICAConnection.ica_address": value := x.IcaAddress return protoreflect.ValueOfString(value) case "sourcehub.hub.ICAConnection.controller_address": value := x.ControllerAddress return protoreflect.ValueOfString(value) case "sourcehub.hub.ICAConnection.controller_chain_id": value := x.ControllerChainId return protoreflect.ValueOfString(value) case "sourcehub.hub.ICAConnection.connection_id": value := x.ConnectionId return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ICAConnection")) } panic(fmt.Errorf("message sourcehub.hub.ICAConnection does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ICAConnection) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.ICAConnection.ica_address": x.IcaAddress = value.Interface().(string) case "sourcehub.hub.ICAConnection.controller_address": x.ControllerAddress = value.Interface().(string) case "sourcehub.hub.ICAConnection.controller_chain_id": x.ControllerChainId = value.Interface().(string) case "sourcehub.hub.ICAConnection.connection_id": x.ConnectionId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ICAConnection")) } panic(fmt.Errorf("message sourcehub.hub.ICAConnection does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ICAConnection) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.ICAConnection.ica_address": panic(fmt.Errorf("field ica_address of message sourcehub.hub.ICAConnection is not mutable")) case "sourcehub.hub.ICAConnection.controller_address": panic(fmt.Errorf("field controller_address of message sourcehub.hub.ICAConnection is not mutable")) case "sourcehub.hub.ICAConnection.controller_chain_id": panic(fmt.Errorf("field controller_chain_id of message sourcehub.hub.ICAConnection is not mutable")) case "sourcehub.hub.ICAConnection.connection_id": panic(fmt.Errorf("field connection_id of message sourcehub.hub.ICAConnection is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ICAConnection")) } panic(fmt.Errorf("message sourcehub.hub.ICAConnection does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ICAConnection) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.ICAConnection.ica_address": return protoreflect.ValueOfString("") case "sourcehub.hub.ICAConnection.controller_address": return protoreflect.ValueOfString("") case "sourcehub.hub.ICAConnection.controller_chain_id": return protoreflect.ValueOfString("") case "sourcehub.hub.ICAConnection.connection_id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.ICAConnection")) } panic(fmt.Errorf("message sourcehub.hub.ICAConnection does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ICAConnection) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.ICAConnection", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ICAConnection) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ICAConnection) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ICAConnection) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ICAConnection) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ICAConnection) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.IcaAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ControllerAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ControllerChainId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ConnectionId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ICAConnection) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ConnectionId) > 0 { i -= len(x.ConnectionId) copy(dAtA[i:], x.ConnectionId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConnectionId))) i-- dAtA[i] = 0x22 } if len(x.ControllerChainId) > 0 { i -= len(x.ControllerChainId) copy(dAtA[i:], x.ControllerChainId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerChainId))) i-- dAtA[i] = 0x1a } if len(x.ControllerAddress) > 0 { i -= len(x.ControllerAddress) copy(dAtA[i:], x.ControllerAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerAddress))) i-- dAtA[i] = 0x12 } if len(x.IcaAddress) > 0 { i -= len(x.IcaAddress) copy(dAtA[i:], x.IcaAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IcaAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ICAConnection) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ICAConnection: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ICAConnection: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IcaAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.IcaAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ControllerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerChainId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ControllerChainId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ConnectionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/ica_connection.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // ICAConnection represents an interchain account connection between a controller and host chain. type ICAConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // ica_address is the interchain account address generated on the host chain. IcaAddress string `protobuf:"bytes,1,opt,name=ica_address,json=icaAddress,proto3" json:"ica_address,omitempty"` // controller_address is the address of the controlling account on the controller chain. ControllerAddress string `protobuf:"bytes,2,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"` // controller_chain_id is the chain ID of the controller chain. ControllerChainId string `protobuf:"bytes,3,opt,name=controller_chain_id,json=controllerChainId,proto3" json:"controller_chain_id,omitempty"` // connection_id is the IBC connection ID used for this interchain account. ConnectionId string `protobuf:"bytes,4,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` } func (x *ICAConnection) Reset() { *x = ICAConnection{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_ica_connection_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ICAConnection) String() string { return protoimpl.X.MessageStringOf(x) } func (*ICAConnection) ProtoMessage() {} // Deprecated: Use ICAConnection.ProtoReflect.Descriptor instead. func (*ICAConnection) Descriptor() ([]byte, []int) { return file_sourcehub_hub_ica_connection_proto_rawDescGZIP(), []int{0} } func (x *ICAConnection) GetIcaAddress() string { if x != nil { return x.IcaAddress } return "" } func (x *ICAConnection) GetControllerAddress() string { if x != nil { return x.ControllerAddress } return "" } func (x *ICAConnection) GetControllerChainId() string { if x != nil { return x.ControllerChainId } return "" } func (x *ICAConnection) GetConnectionId() string { if x != nil { return x.ConnectionId } return "" } var File_sourcehub_hub_ica_connection_proto protoreflect.FileDescriptor var file_sourcehub_hub_ica_connection_proto_rawDesc = []byte{ 0x0a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x69, 0x63, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x49, 0x43, 0x41, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x63, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x63, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x9c, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x42, 0x12, 0x49, 0x63, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_ica_connection_proto_rawDescOnce sync.Once file_sourcehub_hub_ica_connection_proto_rawDescData = file_sourcehub_hub_ica_connection_proto_rawDesc ) func file_sourcehub_hub_ica_connection_proto_rawDescGZIP() []byte { file_sourcehub_hub_ica_connection_proto_rawDescOnce.Do(func() { file_sourcehub_hub_ica_connection_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_ica_connection_proto_rawDescData) }) return file_sourcehub_hub_ica_connection_proto_rawDescData } var file_sourcehub_hub_ica_connection_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_hub_ica_connection_proto_goTypes = []interface{}{ (*ICAConnection)(nil), // 0: sourcehub.hub.ICAConnection } var file_sourcehub_hub_ica_connection_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_hub_ica_connection_proto_init() } func file_sourcehub_hub_ica_connection_proto_init() { if File_sourcehub_hub_ica_connection_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_hub_ica_connection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ICAConnection); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_ica_connection_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_hub_ica_connection_proto_goTypes, DependencyIndexes: file_sourcehub_hub_ica_connection_proto_depIdxs, MessageInfos: file_sourcehub_hub_ica_connection_proto_msgTypes, }.Build() File_sourcehub_hub_ica_connection_proto = out.File file_sourcehub_hub_ica_connection_proto_rawDesc = nil file_sourcehub_hub_ica_connection_proto_goTypes = nil file_sourcehub_hub_ica_connection_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/jws_token.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package hub import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_JWSTokenRecord protoreflect.MessageDescriptor fd_JWSTokenRecord_token_hash protoreflect.FieldDescriptor fd_JWSTokenRecord_bearer_token protoreflect.FieldDescriptor fd_JWSTokenRecord_issuer_did protoreflect.FieldDescriptor fd_JWSTokenRecord_authorized_account protoreflect.FieldDescriptor fd_JWSTokenRecord_issued_at protoreflect.FieldDescriptor fd_JWSTokenRecord_expires_at protoreflect.FieldDescriptor fd_JWSTokenRecord_status protoreflect.FieldDescriptor fd_JWSTokenRecord_first_used_at protoreflect.FieldDescriptor fd_JWSTokenRecord_last_used_at protoreflect.FieldDescriptor fd_JWSTokenRecord_invalidated_at protoreflect.FieldDescriptor fd_JWSTokenRecord_invalidated_by protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_jws_token_proto_init() md_JWSTokenRecord = File_sourcehub_hub_jws_token_proto.Messages().ByName("JWSTokenRecord") fd_JWSTokenRecord_token_hash = md_JWSTokenRecord.Fields().ByName("token_hash") fd_JWSTokenRecord_bearer_token = md_JWSTokenRecord.Fields().ByName("bearer_token") fd_JWSTokenRecord_issuer_did = md_JWSTokenRecord.Fields().ByName("issuer_did") fd_JWSTokenRecord_authorized_account = md_JWSTokenRecord.Fields().ByName("authorized_account") fd_JWSTokenRecord_issued_at = md_JWSTokenRecord.Fields().ByName("issued_at") fd_JWSTokenRecord_expires_at = md_JWSTokenRecord.Fields().ByName("expires_at") fd_JWSTokenRecord_status = md_JWSTokenRecord.Fields().ByName("status") fd_JWSTokenRecord_first_used_at = md_JWSTokenRecord.Fields().ByName("first_used_at") fd_JWSTokenRecord_last_used_at = md_JWSTokenRecord.Fields().ByName("last_used_at") fd_JWSTokenRecord_invalidated_at = md_JWSTokenRecord.Fields().ByName("invalidated_at") fd_JWSTokenRecord_invalidated_by = md_JWSTokenRecord.Fields().ByName("invalidated_by") } var _ protoreflect.Message = (*fastReflection_JWSTokenRecord)(nil) type fastReflection_JWSTokenRecord JWSTokenRecord func (x *JWSTokenRecord) ProtoReflect() protoreflect.Message { return (*fastReflection_JWSTokenRecord)(x) } func (x *JWSTokenRecord) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_jws_token_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_JWSTokenRecord_messageType fastReflection_JWSTokenRecord_messageType var _ protoreflect.MessageType = fastReflection_JWSTokenRecord_messageType{} type fastReflection_JWSTokenRecord_messageType struct{} func (x fastReflection_JWSTokenRecord_messageType) Zero() protoreflect.Message { return (*fastReflection_JWSTokenRecord)(nil) } func (x fastReflection_JWSTokenRecord_messageType) New() protoreflect.Message { return new(fastReflection_JWSTokenRecord) } func (x fastReflection_JWSTokenRecord_messageType) Descriptor() protoreflect.MessageDescriptor { return md_JWSTokenRecord } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_JWSTokenRecord) Descriptor() protoreflect.MessageDescriptor { return md_JWSTokenRecord } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_JWSTokenRecord) Type() protoreflect.MessageType { return _fastReflection_JWSTokenRecord_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_JWSTokenRecord) New() protoreflect.Message { return new(fastReflection_JWSTokenRecord) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_JWSTokenRecord) Interface() protoreflect.ProtoMessage { return (*JWSTokenRecord)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_JWSTokenRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TokenHash != "" { value := protoreflect.ValueOfString(x.TokenHash) if !f(fd_JWSTokenRecord_token_hash, value) { return } } if x.BearerToken != "" { value := protoreflect.ValueOfString(x.BearerToken) if !f(fd_JWSTokenRecord_bearer_token, value) { return } } if x.IssuerDid != "" { value := protoreflect.ValueOfString(x.IssuerDid) if !f(fd_JWSTokenRecord_issuer_did, value) { return } } if x.AuthorizedAccount != "" { value := protoreflect.ValueOfString(x.AuthorizedAccount) if !f(fd_JWSTokenRecord_authorized_account, value) { return } } if x.IssuedAt != nil { value := protoreflect.ValueOfMessage(x.IssuedAt.ProtoReflect()) if !f(fd_JWSTokenRecord_issued_at, value) { return } } if x.ExpiresAt != nil { value := protoreflect.ValueOfMessage(x.ExpiresAt.ProtoReflect()) if !f(fd_JWSTokenRecord_expires_at, value) { return } } if x.Status != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) if !f(fd_JWSTokenRecord_status, value) { return } } if x.FirstUsedAt != nil { value := protoreflect.ValueOfMessage(x.FirstUsedAt.ProtoReflect()) if !f(fd_JWSTokenRecord_first_used_at, value) { return } } if x.LastUsedAt != nil { value := protoreflect.ValueOfMessage(x.LastUsedAt.ProtoReflect()) if !f(fd_JWSTokenRecord_last_used_at, value) { return } } if x.InvalidatedAt != nil { value := protoreflect.ValueOfMessage(x.InvalidatedAt.ProtoReflect()) if !f(fd_JWSTokenRecord_invalidated_at, value) { return } } if x.InvalidatedBy != "" { value := protoreflect.ValueOfString(x.InvalidatedBy) if !f(fd_JWSTokenRecord_invalidated_by, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_JWSTokenRecord) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.JWSTokenRecord.token_hash": return x.TokenHash != "" case "sourcehub.hub.JWSTokenRecord.bearer_token": return x.BearerToken != "" case "sourcehub.hub.JWSTokenRecord.issuer_did": return x.IssuerDid != "" case "sourcehub.hub.JWSTokenRecord.authorized_account": return x.AuthorizedAccount != "" case "sourcehub.hub.JWSTokenRecord.issued_at": return x.IssuedAt != nil case "sourcehub.hub.JWSTokenRecord.expires_at": return x.ExpiresAt != nil case "sourcehub.hub.JWSTokenRecord.status": return x.Status != 0 case "sourcehub.hub.JWSTokenRecord.first_used_at": return x.FirstUsedAt != nil case "sourcehub.hub.JWSTokenRecord.last_used_at": return x.LastUsedAt != nil case "sourcehub.hub.JWSTokenRecord.invalidated_at": return x.InvalidatedAt != nil case "sourcehub.hub.JWSTokenRecord.invalidated_by": return x.InvalidatedBy != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.JWSTokenRecord")) } panic(fmt.Errorf("message sourcehub.hub.JWSTokenRecord does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSTokenRecord) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.JWSTokenRecord.token_hash": x.TokenHash = "" case "sourcehub.hub.JWSTokenRecord.bearer_token": x.BearerToken = "" case "sourcehub.hub.JWSTokenRecord.issuer_did": x.IssuerDid = "" case "sourcehub.hub.JWSTokenRecord.authorized_account": x.AuthorizedAccount = "" case "sourcehub.hub.JWSTokenRecord.issued_at": x.IssuedAt = nil case "sourcehub.hub.JWSTokenRecord.expires_at": x.ExpiresAt = nil case "sourcehub.hub.JWSTokenRecord.status": x.Status = 0 case "sourcehub.hub.JWSTokenRecord.first_used_at": x.FirstUsedAt = nil case "sourcehub.hub.JWSTokenRecord.last_used_at": x.LastUsedAt = nil case "sourcehub.hub.JWSTokenRecord.invalidated_at": x.InvalidatedAt = nil case "sourcehub.hub.JWSTokenRecord.invalidated_by": x.InvalidatedBy = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.JWSTokenRecord")) } panic(fmt.Errorf("message sourcehub.hub.JWSTokenRecord does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_JWSTokenRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.JWSTokenRecord.token_hash": value := x.TokenHash return protoreflect.ValueOfString(value) case "sourcehub.hub.JWSTokenRecord.bearer_token": value := x.BearerToken return protoreflect.ValueOfString(value) case "sourcehub.hub.JWSTokenRecord.issuer_did": value := x.IssuerDid return protoreflect.ValueOfString(value) case "sourcehub.hub.JWSTokenRecord.authorized_account": value := x.AuthorizedAccount return protoreflect.ValueOfString(value) case "sourcehub.hub.JWSTokenRecord.issued_at": value := x.IssuedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.expires_at": value := x.ExpiresAt return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.status": value := x.Status return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) case "sourcehub.hub.JWSTokenRecord.first_used_at": value := x.FirstUsedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.last_used_at": value := x.LastUsedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.invalidated_at": value := x.InvalidatedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.invalidated_by": value := x.InvalidatedBy return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.JWSTokenRecord")) } panic(fmt.Errorf("message sourcehub.hub.JWSTokenRecord does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSTokenRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.JWSTokenRecord.token_hash": x.TokenHash = value.Interface().(string) case "sourcehub.hub.JWSTokenRecord.bearer_token": x.BearerToken = value.Interface().(string) case "sourcehub.hub.JWSTokenRecord.issuer_did": x.IssuerDid = value.Interface().(string) case "sourcehub.hub.JWSTokenRecord.authorized_account": x.AuthorizedAccount = value.Interface().(string) case "sourcehub.hub.JWSTokenRecord.issued_at": x.IssuedAt = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.hub.JWSTokenRecord.expires_at": x.ExpiresAt = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.hub.JWSTokenRecord.status": x.Status = (JWSTokenStatus)(value.Enum()) case "sourcehub.hub.JWSTokenRecord.first_used_at": x.FirstUsedAt = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.hub.JWSTokenRecord.last_used_at": x.LastUsedAt = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.hub.JWSTokenRecord.invalidated_at": x.InvalidatedAt = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.hub.JWSTokenRecord.invalidated_by": x.InvalidatedBy = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.JWSTokenRecord")) } panic(fmt.Errorf("message sourcehub.hub.JWSTokenRecord does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSTokenRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.JWSTokenRecord.issued_at": if x.IssuedAt == nil { x.IssuedAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.IssuedAt.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.expires_at": if x.ExpiresAt == nil { x.ExpiresAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.ExpiresAt.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.first_used_at": if x.FirstUsedAt == nil { x.FirstUsedAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.FirstUsedAt.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.last_used_at": if x.LastUsedAt == nil { x.LastUsedAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.LastUsedAt.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.invalidated_at": if x.InvalidatedAt == nil { x.InvalidatedAt = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.InvalidatedAt.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.token_hash": panic(fmt.Errorf("field token_hash of message sourcehub.hub.JWSTokenRecord is not mutable")) case "sourcehub.hub.JWSTokenRecord.bearer_token": panic(fmt.Errorf("field bearer_token of message sourcehub.hub.JWSTokenRecord is not mutable")) case "sourcehub.hub.JWSTokenRecord.issuer_did": panic(fmt.Errorf("field issuer_did of message sourcehub.hub.JWSTokenRecord is not mutable")) case "sourcehub.hub.JWSTokenRecord.authorized_account": panic(fmt.Errorf("field authorized_account of message sourcehub.hub.JWSTokenRecord is not mutable")) case "sourcehub.hub.JWSTokenRecord.status": panic(fmt.Errorf("field status of message sourcehub.hub.JWSTokenRecord is not mutable")) case "sourcehub.hub.JWSTokenRecord.invalidated_by": panic(fmt.Errorf("field invalidated_by of message sourcehub.hub.JWSTokenRecord is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.JWSTokenRecord")) } panic(fmt.Errorf("message sourcehub.hub.JWSTokenRecord does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_JWSTokenRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.JWSTokenRecord.token_hash": return protoreflect.ValueOfString("") case "sourcehub.hub.JWSTokenRecord.bearer_token": return protoreflect.ValueOfString("") case "sourcehub.hub.JWSTokenRecord.issuer_did": return protoreflect.ValueOfString("") case "sourcehub.hub.JWSTokenRecord.authorized_account": return protoreflect.ValueOfString("") case "sourcehub.hub.JWSTokenRecord.issued_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.expires_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.status": return protoreflect.ValueOfEnum(0) case "sourcehub.hub.JWSTokenRecord.first_used_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.last_used_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.invalidated_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.hub.JWSTokenRecord.invalidated_by": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.JWSTokenRecord")) } panic(fmt.Errorf("message sourcehub.hub.JWSTokenRecord does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_JWSTokenRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.JWSTokenRecord", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_JWSTokenRecord) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_JWSTokenRecord) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_JWSTokenRecord) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_JWSTokenRecord) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*JWSTokenRecord) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.TokenHash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.BearerToken) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.IssuerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.AuthorizedAccount) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.IssuedAt != nil { l = options.Size(x.IssuedAt) n += 1 + l + runtime.Sov(uint64(l)) } if x.ExpiresAt != nil { l = options.Size(x.ExpiresAt) n += 1 + l + runtime.Sov(uint64(l)) } if x.Status != 0 { n += 1 + runtime.Sov(uint64(x.Status)) } if x.FirstUsedAt != nil { l = options.Size(x.FirstUsedAt) n += 1 + l + runtime.Sov(uint64(l)) } if x.LastUsedAt != nil { l = options.Size(x.LastUsedAt) n += 1 + l + runtime.Sov(uint64(l)) } if x.InvalidatedAt != nil { l = options.Size(x.InvalidatedAt) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.InvalidatedBy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*JWSTokenRecord) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.InvalidatedBy) > 0 { i -= len(x.InvalidatedBy) copy(dAtA[i:], x.InvalidatedBy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvalidatedBy))) i-- dAtA[i] = 0x5a } if x.InvalidatedAt != nil { encoded, err := options.Marshal(x.InvalidatedAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x52 } if x.LastUsedAt != nil { encoded, err := options.Marshal(x.LastUsedAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x4a } if x.FirstUsedAt != nil { encoded, err := options.Marshal(x.FirstUsedAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if x.Status != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) i-- dAtA[i] = 0x38 } if x.ExpiresAt != nil { encoded, err := options.Marshal(x.ExpiresAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } if x.IssuedAt != nil { encoded, err := options.Marshal(x.IssuedAt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if len(x.AuthorizedAccount) > 0 { i -= len(x.AuthorizedAccount) copy(dAtA[i:], x.AuthorizedAccount) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthorizedAccount))) i-- dAtA[i] = 0x22 } if len(x.IssuerDid) > 0 { i -= len(x.IssuerDid) copy(dAtA[i:], x.IssuerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IssuerDid))) i-- dAtA[i] = 0x1a } if len(x.BearerToken) > 0 { i -= len(x.BearerToken) copy(dAtA[i:], x.BearerToken) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BearerToken))) i-- dAtA[i] = 0x12 } if len(x.TokenHash) > 0 { i -= len(x.TokenHash) copy(dAtA[i:], x.TokenHash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TokenHash))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*JWSTokenRecord) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: JWSTokenRecord: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: JWSTokenRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TokenHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.TokenHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BearerToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.BearerToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IssuerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.IssuerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthorizedAccount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.AuthorizedAccount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IssuedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.IssuedAt == nil { x.IssuedAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.IssuedAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.ExpiresAt == nil { x.ExpiresAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExpiresAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 7: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } x.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Status |= JWSTokenStatus(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FirstUsedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.FirstUsedAt == nil { x.FirstUsedAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FirstUsedAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 9: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastUsedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.LastUsedAt == nil { x.LastUsedAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastUsedAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 10: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvalidatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.InvalidatedAt == nil { x.InvalidatedAt = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InvalidatedAt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 11: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvalidatedBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.InvalidatedBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventJWSTokenInvalidated protoreflect.MessageDescriptor fd_EventJWSTokenInvalidated_token_hash protoreflect.FieldDescriptor fd_EventJWSTokenInvalidated_issuer_did protoreflect.FieldDescriptor fd_EventJWSTokenInvalidated_authorized_account protoreflect.FieldDescriptor fd_EventJWSTokenInvalidated_invalidated_by protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_jws_token_proto_init() md_EventJWSTokenInvalidated = File_sourcehub_hub_jws_token_proto.Messages().ByName("EventJWSTokenInvalidated") fd_EventJWSTokenInvalidated_token_hash = md_EventJWSTokenInvalidated.Fields().ByName("token_hash") fd_EventJWSTokenInvalidated_issuer_did = md_EventJWSTokenInvalidated.Fields().ByName("issuer_did") fd_EventJWSTokenInvalidated_authorized_account = md_EventJWSTokenInvalidated.Fields().ByName("authorized_account") fd_EventJWSTokenInvalidated_invalidated_by = md_EventJWSTokenInvalidated.Fields().ByName("invalidated_by") } var _ protoreflect.Message = (*fastReflection_EventJWSTokenInvalidated)(nil) type fastReflection_EventJWSTokenInvalidated EventJWSTokenInvalidated func (x *EventJWSTokenInvalidated) ProtoReflect() protoreflect.Message { return (*fastReflection_EventJWSTokenInvalidated)(x) } func (x *EventJWSTokenInvalidated) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_jws_token_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventJWSTokenInvalidated_messageType fastReflection_EventJWSTokenInvalidated_messageType var _ protoreflect.MessageType = fastReflection_EventJWSTokenInvalidated_messageType{} type fastReflection_EventJWSTokenInvalidated_messageType struct{} func (x fastReflection_EventJWSTokenInvalidated_messageType) Zero() protoreflect.Message { return (*fastReflection_EventJWSTokenInvalidated)(nil) } func (x fastReflection_EventJWSTokenInvalidated_messageType) New() protoreflect.Message { return new(fastReflection_EventJWSTokenInvalidated) } func (x fastReflection_EventJWSTokenInvalidated_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventJWSTokenInvalidated } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventJWSTokenInvalidated) Descriptor() protoreflect.MessageDescriptor { return md_EventJWSTokenInvalidated } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventJWSTokenInvalidated) Type() protoreflect.MessageType { return _fastReflection_EventJWSTokenInvalidated_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventJWSTokenInvalidated) New() protoreflect.Message { return new(fastReflection_EventJWSTokenInvalidated) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventJWSTokenInvalidated) Interface() protoreflect.ProtoMessage { return (*EventJWSTokenInvalidated)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventJWSTokenInvalidated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TokenHash != "" { value := protoreflect.ValueOfString(x.TokenHash) if !f(fd_EventJWSTokenInvalidated_token_hash, value) { return } } if x.IssuerDid != "" { value := protoreflect.ValueOfString(x.IssuerDid) if !f(fd_EventJWSTokenInvalidated_issuer_did, value) { return } } if x.AuthorizedAccount != "" { value := protoreflect.ValueOfString(x.AuthorizedAccount) if !f(fd_EventJWSTokenInvalidated_authorized_account, value) { return } } if x.InvalidatedBy != "" { value := protoreflect.ValueOfString(x.InvalidatedBy) if !f(fd_EventJWSTokenInvalidated_invalidated_by, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventJWSTokenInvalidated) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.EventJWSTokenInvalidated.token_hash": return x.TokenHash != "" case "sourcehub.hub.EventJWSTokenInvalidated.issuer_did": return x.IssuerDid != "" case "sourcehub.hub.EventJWSTokenInvalidated.authorized_account": return x.AuthorizedAccount != "" case "sourcehub.hub.EventJWSTokenInvalidated.invalidated_by": return x.InvalidatedBy != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.EventJWSTokenInvalidated")) } panic(fmt.Errorf("message sourcehub.hub.EventJWSTokenInvalidated does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventJWSTokenInvalidated) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.EventJWSTokenInvalidated.token_hash": x.TokenHash = "" case "sourcehub.hub.EventJWSTokenInvalidated.issuer_did": x.IssuerDid = "" case "sourcehub.hub.EventJWSTokenInvalidated.authorized_account": x.AuthorizedAccount = "" case "sourcehub.hub.EventJWSTokenInvalidated.invalidated_by": x.InvalidatedBy = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.EventJWSTokenInvalidated")) } panic(fmt.Errorf("message sourcehub.hub.EventJWSTokenInvalidated does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventJWSTokenInvalidated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.EventJWSTokenInvalidated.token_hash": value := x.TokenHash return protoreflect.ValueOfString(value) case "sourcehub.hub.EventJWSTokenInvalidated.issuer_did": value := x.IssuerDid return protoreflect.ValueOfString(value) case "sourcehub.hub.EventJWSTokenInvalidated.authorized_account": value := x.AuthorizedAccount return protoreflect.ValueOfString(value) case "sourcehub.hub.EventJWSTokenInvalidated.invalidated_by": value := x.InvalidatedBy return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.EventJWSTokenInvalidated")) } panic(fmt.Errorf("message sourcehub.hub.EventJWSTokenInvalidated does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventJWSTokenInvalidated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.EventJWSTokenInvalidated.token_hash": x.TokenHash = value.Interface().(string) case "sourcehub.hub.EventJWSTokenInvalidated.issuer_did": x.IssuerDid = value.Interface().(string) case "sourcehub.hub.EventJWSTokenInvalidated.authorized_account": x.AuthorizedAccount = value.Interface().(string) case "sourcehub.hub.EventJWSTokenInvalidated.invalidated_by": x.InvalidatedBy = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.EventJWSTokenInvalidated")) } panic(fmt.Errorf("message sourcehub.hub.EventJWSTokenInvalidated does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventJWSTokenInvalidated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.EventJWSTokenInvalidated.token_hash": panic(fmt.Errorf("field token_hash of message sourcehub.hub.EventJWSTokenInvalidated is not mutable")) case "sourcehub.hub.EventJWSTokenInvalidated.issuer_did": panic(fmt.Errorf("field issuer_did of message sourcehub.hub.EventJWSTokenInvalidated is not mutable")) case "sourcehub.hub.EventJWSTokenInvalidated.authorized_account": panic(fmt.Errorf("field authorized_account of message sourcehub.hub.EventJWSTokenInvalidated is not mutable")) case "sourcehub.hub.EventJWSTokenInvalidated.invalidated_by": panic(fmt.Errorf("field invalidated_by of message sourcehub.hub.EventJWSTokenInvalidated is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.EventJWSTokenInvalidated")) } panic(fmt.Errorf("message sourcehub.hub.EventJWSTokenInvalidated does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventJWSTokenInvalidated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.EventJWSTokenInvalidated.token_hash": return protoreflect.ValueOfString("") case "sourcehub.hub.EventJWSTokenInvalidated.issuer_did": return protoreflect.ValueOfString("") case "sourcehub.hub.EventJWSTokenInvalidated.authorized_account": return protoreflect.ValueOfString("") case "sourcehub.hub.EventJWSTokenInvalidated.invalidated_by": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.EventJWSTokenInvalidated")) } panic(fmt.Errorf("message sourcehub.hub.EventJWSTokenInvalidated does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventJWSTokenInvalidated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.EventJWSTokenInvalidated", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventJWSTokenInvalidated) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventJWSTokenInvalidated) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventJWSTokenInvalidated) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventJWSTokenInvalidated) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventJWSTokenInvalidated) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.TokenHash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.IssuerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.AuthorizedAccount) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.InvalidatedBy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventJWSTokenInvalidated) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.InvalidatedBy) > 0 { i -= len(x.InvalidatedBy) copy(dAtA[i:], x.InvalidatedBy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvalidatedBy))) i-- dAtA[i] = 0x22 } if len(x.AuthorizedAccount) > 0 { i -= len(x.AuthorizedAccount) copy(dAtA[i:], x.AuthorizedAccount) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthorizedAccount))) i-- dAtA[i] = 0x1a } if len(x.IssuerDid) > 0 { i -= len(x.IssuerDid) copy(dAtA[i:], x.IssuerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IssuerDid))) i-- dAtA[i] = 0x12 } if len(x.TokenHash) > 0 { i -= len(x.TokenHash) copy(dAtA[i:], x.TokenHash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TokenHash))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventJWSTokenInvalidated) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventJWSTokenInvalidated: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventJWSTokenInvalidated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TokenHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.TokenHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IssuerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.IssuerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthorizedAccount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.AuthorizedAccount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvalidatedBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.InvalidatedBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/jws_token.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // JWSTokenStatus represents the validity status of a JWS token. type JWSTokenStatus int32 const ( // STATUS_UNSPECIFIED is the default/invalid status. JWSTokenStatus_STATUS_UNSPECIFIED JWSTokenStatus = 0 // STATUS_VALID indicates the token is valid and can be used. JWSTokenStatus_STATUS_VALID JWSTokenStatus = 1 // STATUS_INVALID indicates the token has been invalidated. JWSTokenStatus_STATUS_INVALID JWSTokenStatus = 2 ) // Enum value maps for JWSTokenStatus. var ( JWSTokenStatus_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "STATUS_VALID", 2: "STATUS_INVALID", } JWSTokenStatus_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_VALID": 1, "STATUS_INVALID": 2, } ) func (x JWSTokenStatus) Enum() *JWSTokenStatus { p := new(JWSTokenStatus) *p = x return p } func (x JWSTokenStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (JWSTokenStatus) Descriptor() protoreflect.EnumDescriptor { return file_sourcehub_hub_jws_token_proto_enumTypes[0].Descriptor() } func (JWSTokenStatus) Type() protoreflect.EnumType { return &file_sourcehub_hub_jws_token_proto_enumTypes[0] } func (x JWSTokenStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use JWSTokenStatus.Descriptor instead. func (JWSTokenStatus) EnumDescriptor() ([]byte, []int) { return file_sourcehub_hub_jws_token_proto_rawDescGZIP(), []int{0} } // JWSTokenRecord represents a stored JWS token with its metadata. // The bearer_token field contains sensitive credentials and should not be exposed via public endpoints. type JWSTokenRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // token_hash is the unique identifier of the JWS token TokenHash string `protobuf:"bytes,1,opt,name=token_hash,json=tokenHash,proto3" json:"token_hash,omitempty"` // bearer_token is the full JWS token string. BearerToken string `protobuf:"bytes,2,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` // issuer_did is the DID that issued/signed the token. IssuerDid string `protobuf:"bytes,3,opt,name=issuer_did,json=issuerDid,proto3" json:"issuer_did,omitempty"` // authorized_account is the account authorized to use this token. AuthorizedAccount string `protobuf:"bytes,4,opt,name=authorized_account,json=authorizedAccount,proto3" json:"authorized_account,omitempty"` // issued_at is when the token was created. IssuedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"` // expires_at is when the token expires. ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // status is the current validity status of the token. Status JWSTokenStatus `protobuf:"varint,7,opt,name=status,proto3,enum=sourcehub.hub.JWSTokenStatus" json:"status,omitempty"` // first_used_at is when the token was first used in a transaction. FirstUsedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=first_used_at,json=firstUsedAt,proto3" json:"first_used_at,omitempty"` // last_used_at is when the token was last used in a transaction. LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"` // invalidated_at is when the token was manually invalidated (if applicable). InvalidatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=invalidated_at,json=invalidatedAt,proto3" json:"invalidated_at,omitempty"` // invalidated_by is the account that invalidated the token (if applicable). InvalidatedBy string `protobuf:"bytes,11,opt,name=invalidated_by,json=invalidatedBy,proto3" json:"invalidated_by,omitempty"` } func (x *JWSTokenRecord) Reset() { *x = JWSTokenRecord{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_jws_token_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *JWSTokenRecord) String() string { return protoimpl.X.MessageStringOf(x) } func (*JWSTokenRecord) ProtoMessage() {} // Deprecated: Use JWSTokenRecord.ProtoReflect.Descriptor instead. func (*JWSTokenRecord) Descriptor() ([]byte, []int) { return file_sourcehub_hub_jws_token_proto_rawDescGZIP(), []int{0} } func (x *JWSTokenRecord) GetTokenHash() string { if x != nil { return x.TokenHash } return "" } func (x *JWSTokenRecord) GetBearerToken() string { if x != nil { return x.BearerToken } return "" } func (x *JWSTokenRecord) GetIssuerDid() string { if x != nil { return x.IssuerDid } return "" } func (x *JWSTokenRecord) GetAuthorizedAccount() string { if x != nil { return x.AuthorizedAccount } return "" } func (x *JWSTokenRecord) GetIssuedAt() *timestamppb.Timestamp { if x != nil { return x.IssuedAt } return nil } func (x *JWSTokenRecord) GetExpiresAt() *timestamppb.Timestamp { if x != nil { return x.ExpiresAt } return nil } func (x *JWSTokenRecord) GetStatus() JWSTokenStatus { if x != nil { return x.Status } return JWSTokenStatus_STATUS_UNSPECIFIED } func (x *JWSTokenRecord) GetFirstUsedAt() *timestamppb.Timestamp { if x != nil { return x.FirstUsedAt } return nil } func (x *JWSTokenRecord) GetLastUsedAt() *timestamppb.Timestamp { if x != nil { return x.LastUsedAt } return nil } func (x *JWSTokenRecord) GetInvalidatedAt() *timestamppb.Timestamp { if x != nil { return x.InvalidatedAt } return nil } func (x *JWSTokenRecord) GetInvalidatedBy() string { if x != nil { return x.InvalidatedBy } return "" } // EventJWSTokenInvalidated is emitted when a JWS token is invalidated. type EventJWSTokenInvalidated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // token_hash is the unique identifier of the invalidated token. TokenHash string `protobuf:"bytes,1,opt,name=token_hash,json=tokenHash,proto3" json:"token_hash,omitempty"` // issuer_did is the DID that issued the token. IssuerDid string `protobuf:"bytes,2,opt,name=issuer_did,json=issuerDid,proto3" json:"issuer_did,omitempty"` // authorized_account is the account that was authorized to use this token. AuthorizedAccount string `protobuf:"bytes,3,opt,name=authorized_account,json=authorizedAccount,proto3" json:"authorized_account,omitempty"` // invalidated_by is the account that invalidated the token. InvalidatedBy string `protobuf:"bytes,4,opt,name=invalidated_by,json=invalidatedBy,proto3" json:"invalidated_by,omitempty"` } func (x *EventJWSTokenInvalidated) Reset() { *x = EventJWSTokenInvalidated{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_jws_token_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventJWSTokenInvalidated) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventJWSTokenInvalidated) ProtoMessage() {} // Deprecated: Use EventJWSTokenInvalidated.ProtoReflect.Descriptor instead. func (*EventJWSTokenInvalidated) Descriptor() ([]byte, []int) { return file_sourcehub_hub_jws_token_proto_rawDescGZIP(), []int{1} } func (x *EventJWSTokenInvalidated) GetTokenHash() string { if x != nil { return x.TokenHash } return "" } func (x *EventJWSTokenInvalidated) GetIssuerDid() string { if x != nil { return x.IssuerDid } return "" } func (x *EventJWSTokenInvalidated) GetAuthorizedAccount() string { if x != nil { return x.AuthorizedAccount } return "" } func (x *EventJWSTokenInvalidated) GetInvalidatedBy() string { if x != nil { return x.InvalidatedBy } return "" } var File_sourcehub_hub_jws_token_proto protoreflect.FileDescriptor var file_sourcehub_hub_jws_token_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x6a, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x04, 0x0a, 0x0e, 0x4a, 0x57, 0x53, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x4a, 0x57, 0x53, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0b, 0x66, 0x69, 0x72, 0x73, 0x74, 0x55, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, 0x47, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x22, 0xae, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4a, 0x57, 0x53, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x2a, 0x4e, 0x0a, 0x0e, 0x4a, 0x57, 0x53, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x02, 0x42, 0x97, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x42, 0x0d, 0x4a, 0x77, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_jws_token_proto_rawDescOnce sync.Once file_sourcehub_hub_jws_token_proto_rawDescData = file_sourcehub_hub_jws_token_proto_rawDesc ) func file_sourcehub_hub_jws_token_proto_rawDescGZIP() []byte { file_sourcehub_hub_jws_token_proto_rawDescOnce.Do(func() { file_sourcehub_hub_jws_token_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_jws_token_proto_rawDescData) }) return file_sourcehub_hub_jws_token_proto_rawDescData } var file_sourcehub_hub_jws_token_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sourcehub_hub_jws_token_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_hub_jws_token_proto_goTypes = []interface{}{ (JWSTokenStatus)(0), // 0: sourcehub.hub.JWSTokenStatus (*JWSTokenRecord)(nil), // 1: sourcehub.hub.JWSTokenRecord (*EventJWSTokenInvalidated)(nil), // 2: sourcehub.hub.EventJWSTokenInvalidated (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_sourcehub_hub_jws_token_proto_depIdxs = []int32{ 3, // 0: sourcehub.hub.JWSTokenRecord.issued_at:type_name -> google.protobuf.Timestamp 3, // 1: sourcehub.hub.JWSTokenRecord.expires_at:type_name -> google.protobuf.Timestamp 0, // 2: sourcehub.hub.JWSTokenRecord.status:type_name -> sourcehub.hub.JWSTokenStatus 3, // 3: sourcehub.hub.JWSTokenRecord.first_used_at:type_name -> google.protobuf.Timestamp 3, // 4: sourcehub.hub.JWSTokenRecord.last_used_at:type_name -> google.protobuf.Timestamp 3, // 5: sourcehub.hub.JWSTokenRecord.invalidated_at:type_name -> google.protobuf.Timestamp 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name } func init() { file_sourcehub_hub_jws_token_proto_init() } func file_sourcehub_hub_jws_token_proto_init() { if File_sourcehub_hub_jws_token_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_hub_jws_token_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JWSTokenRecord); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_hub_jws_token_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventJWSTokenInvalidated); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_jws_token_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_hub_jws_token_proto_goTypes, DependencyIndexes: file_sourcehub_hub_jws_token_proto_depIdxs, EnumInfos: file_sourcehub_hub_jws_token_proto_enumTypes, MessageInfos: file_sourcehub_hub_jws_token_proto_msgTypes, }.Build() File_sourcehub_hub_jws_token_proto = out.File file_sourcehub_hub_jws_token_proto_rawDesc = nil file_sourcehub_hub_jws_token_proto_goTypes = nil file_sourcehub_hub_jws_token_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/module/module.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package module import ( _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Module protoreflect.MessageDescriptor fd_Module_authority protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_module_module_proto_init() md_Module = File_sourcehub_hub_module_module_proto.Messages().ByName("Module") fd_Module_authority = md_Module.Fields().ByName("authority") } var _ protoreflect.Message = (*fastReflection_Module)(nil) type fastReflection_Module Module func (x *Module) ProtoReflect() protoreflect.Message { return (*fastReflection_Module)(x) } func (x *Module) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_module_module_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Module_messageType fastReflection_Module_messageType var _ protoreflect.MessageType = fastReflection_Module_messageType{} type fastReflection_Module_messageType struct{} func (x fastReflection_Module_messageType) Zero() protoreflect.Message { return (*fastReflection_Module)(nil) } func (x fastReflection_Module_messageType) New() protoreflect.Message { return new(fastReflection_Module) } func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Module) Type() protoreflect.MessageType { return _fastReflection_Module_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Module) New() protoreflect.Message { return new(fastReflection_Module) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { return (*Module)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_Module_authority, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.module.Module.authority": return x.Authority != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.module.Module")) } panic(fmt.Errorf("message sourcehub.hub.module.Module does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.module.Module.authority": x.Authority = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.module.Module")) } panic(fmt.Errorf("message sourcehub.hub.module.Module does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.module.Module.authority": value := x.Authority return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.module.Module")) } panic(fmt.Errorf("message sourcehub.hub.module.Module does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.module.Module.authority": x.Authority = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.module.Module")) } panic(fmt.Errorf("message sourcehub.hub.module.Module does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.module.Module.authority": panic(fmt.Errorf("field authority of message sourcehub.hub.module.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.module.Module")) } panic(fmt.Errorf("message sourcehub.hub.module.Module does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.module.Module.authority": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.module.Module")) } panic(fmt.Errorf("message sourcehub.hub.module.Module does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.module.Module", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Module) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Module) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/module/module.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Module is the config object for the module. type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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 (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_module_module_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Module) String() string { return protoimpl.X.MessageStringOf(x) } func (*Module) ProtoMessage() {} // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { return file_sourcehub_hub_module_module_proto_rawDescGZIP(), []int{0} } func (x *Module) GetAuthority() string { if x != nil { return x.Authority } return "" } var File_sourcehub_hub_module_module_proto protoreflect.FileDescriptor var file_sourcehub_hub_module_module_proto_rawDesc = []byte{ 0x0a, 0x21, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x30, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2a, 0x0a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x68, 0x75, 0x62, 0x42, 0xc0, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x4d, 0xaa, 0x02, 0x14, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xca, 0x02, 0x14, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xe2, 0x02, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_module_module_proto_rawDescOnce sync.Once file_sourcehub_hub_module_module_proto_rawDescData = file_sourcehub_hub_module_module_proto_rawDesc ) func file_sourcehub_hub_module_module_proto_rawDescGZIP() []byte { file_sourcehub_hub_module_module_proto_rawDescOnce.Do(func() { file_sourcehub_hub_module_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_module_module_proto_rawDescData) }) return file_sourcehub_hub_module_module_proto_rawDescData } var file_sourcehub_hub_module_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_hub_module_module_proto_goTypes = []interface{}{ (*Module)(nil), // 0: sourcehub.hub.module.Module } var file_sourcehub_hub_module_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_hub_module_module_proto_init() } func file_sourcehub_hub_module_module_proto_init() { if File_sourcehub_hub_module_module_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_hub_module_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_module_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_hub_module_module_proto_goTypes, DependencyIndexes: file_sourcehub_hub_module_module_proto_depIdxs, MessageInfos: file_sourcehub_hub_module_module_proto_msgTypes, }.Build() File_sourcehub_hub_module_module_proto = out.File file_sourcehub_hub_module_module_proto_rawDesc = nil file_sourcehub_hub_module_module_proto_goTypes = nil file_sourcehub_hub_module_module_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/params.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package hub import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Params protoreflect.MessageDescriptor ) func init() { file_sourcehub_hub_params_proto_init() md_Params = File_sourcehub_hub_params_proto.Messages().ByName("Params") } var _ protoreflect.Message = (*fastReflection_Params)(nil) type fastReflection_Params Params func (x *Params) ProtoReflect() protoreflect.Message { return (*fastReflection_Params)(x) } func (x *Params) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Params_messageType fastReflection_Params_messageType var _ protoreflect.MessageType = fastReflection_Params_messageType{} type fastReflection_Params_messageType struct{} func (x fastReflection_Params_messageType) Zero() protoreflect.Message { return (*fastReflection_Params)(nil) } func (x fastReflection_Params_messageType) New() protoreflect.Message { return new(fastReflection_Params) } func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Params) Type() protoreflect.MessageType { return _fastReflection_Params_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Params) New() protoreflect.Message { return new(fastReflection_Params) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { return (*Params)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.Params")) } panic(fmt.Errorf("message sourcehub.hub.Params does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.Params")) } panic(fmt.Errorf("message sourcehub.hub.Params does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.Params")) } panic(fmt.Errorf("message sourcehub.hub.Params does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.Params")) } panic(fmt.Errorf("message sourcehub.hub.Params does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.Params")) } panic(fmt.Errorf("message sourcehub.hub.Params does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.Params")) } panic(fmt.Errorf("message sourcehub.hub.Params does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.Params", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Params) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Params) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/params.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Params defines the parameters for the module. type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Params) String() string { return protoimpl.X.MessageStringOf(x) } func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { return file_sourcehub_hub_params_proto_rawDescGZIP(), []int{0} } var File_sourcehub_hub_params_proto protoreflect.FileDescriptor var file_sourcehub_hub_params_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x1f, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x95, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_params_proto_rawDescOnce sync.Once file_sourcehub_hub_params_proto_rawDescData = file_sourcehub_hub_params_proto_rawDesc ) func file_sourcehub_hub_params_proto_rawDescGZIP() []byte { file_sourcehub_hub_params_proto_rawDescOnce.Do(func() { file_sourcehub_hub_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_params_proto_rawDescData) }) return file_sourcehub_hub_params_proto_rawDescData } var file_sourcehub_hub_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_hub_params_proto_goTypes = []interface{}{ (*Params)(nil), // 0: sourcehub.hub.Params } var file_sourcehub_hub_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_hub_params_proto_init() } func file_sourcehub_hub_params_proto_init() { if File_sourcehub_hub_params_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_hub_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_params_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_hub_params_proto_goTypes, DependencyIndexes: file_sourcehub_hub_params_proto_depIdxs, MessageInfos: file_sourcehub_hub_params_proto_msgTypes, }.Build() File_sourcehub_hub_params_proto = out.File file_sourcehub_hub_params_proto_rawDesc = nil file_sourcehub_hub_params_proto_goTypes = nil file_sourcehub_hub_params_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/query.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package hub import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { file_sourcehub_hub_query_proto_init() md_QueryParamsRequest = File_sourcehub_hub_query_proto.Messages().ByName("QueryParamsRequest") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) type fastReflection_QueryParamsRequest QueryParamsRequest func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(x) } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} type fastReflection_QueryParamsRequest_messageType struct{} func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(nil) } func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryParamsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { return (*QueryParamsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.QueryParamsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryParamsResponse protoreflect.MessageDescriptor fd_QueryParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_query_proto_init() md_QueryParamsResponse = File_sourcehub_hub_query_proto.Messages().ByName("QueryParamsResponse") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) type fastReflection_QueryParamsResponse QueryParamsResponse func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(x) } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} type fastReflection_QueryParamsResponse_messageType struct{} func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(nil) } func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { return (*QueryParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_QueryParamsResponse_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.QueryParamsResponse.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.QueryParamsResponse.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.QueryParamsResponse.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.QueryParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.QueryParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/query.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_hub_query_proto_rawDescGZIP(), []int{0} } // QueryParamsResponse is response type for the Query/Params RPC method. type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params holds all the parameters of this module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_hub_query_proto_rawDescGZIP(), []int{1} } func (x *QueryParamsResponse) GetParams() *Params { if x != nil { return x.Params } return nil } var File_sourcehub_hub_query_proto protoreflect.FileDescriptor var file_sourcehub_hub_query_proto_rawDesc = []byte{ 0x0a, 0x19, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x85, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x94, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_query_proto_rawDescOnce sync.Once file_sourcehub_hub_query_proto_rawDescData = file_sourcehub_hub_query_proto_rawDesc ) func file_sourcehub_hub_query_proto_rawDescGZIP() []byte { file_sourcehub_hub_query_proto_rawDescOnce.Do(func() { file_sourcehub_hub_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_query_proto_rawDescData) }) return file_sourcehub_hub_query_proto_rawDescData } var file_sourcehub_hub_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_hub_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: sourcehub.hub.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: sourcehub.hub.QueryParamsResponse (*Params)(nil), // 2: sourcehub.hub.Params } var file_sourcehub_hub_query_proto_depIdxs = []int32{ 2, // 0: sourcehub.hub.QueryParamsResponse.params:type_name -> sourcehub.hub.Params 0, // 1: sourcehub.hub.Query.Params:input_type -> sourcehub.hub.QueryParamsRequest 1, // 2: sourcehub.hub.Query.Params:output_type -> sourcehub.hub.QueryParamsResponse 2, // [2:3] is the sub-list for method output_type 1, // [1:2] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcehub_hub_query_proto_init() } func file_sourcehub_hub_query_proto_init() { if File_sourcehub_hub_query_proto != nil { return } file_sourcehub_hub_params_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_hub_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_hub_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_query_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_hub_query_proto_goTypes, DependencyIndexes: file_sourcehub_hub_query_proto_depIdxs, MessageInfos: file_sourcehub_hub_query_proto_msgTypes, }.Build() File_sourcehub_hub_query_proto = out.File file_sourcehub_hub_query_proto_rawDesc = nil file_sourcehub_hub_query_proto_goTypes = nil file_sourcehub_hub_query_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/query_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/hub/query.proto package hub import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Query_Params_FullMethodName = "/sourcehub.hub.Query/Params" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Query defines the gRPC querier service. 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 grpc.ClientConnInterface } func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility. // // Query defines the gRPC querier service. type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) mustEmbedUnimplementedQueryServer() } // UnimplementedQueryServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will // result in compilation errors. type UnsafeQueryServer interface { mustEmbedUnimplementedQueryServer() } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { // If the following call pancis, it indicates UnimplementedQueryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Query_Params_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.hub.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/hub/query.proto", } ================================================ FILE: api/sourcehub/hub/tx.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package hub import ( _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_authority protoreflect.FieldDescriptor fd_MsgUpdateParams_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_tx_proto_init() md_MsgUpdateParams = File_sourcehub_hub_tx_proto.Messages().ByName("MsgUpdateParams") fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) type fastReflection_MsgUpdateParams MsgUpdateParams func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(x) } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} type fastReflection_MsgUpdateParams_messageType struct{} func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(nil) } func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParams_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParams)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_MsgUpdateParams_authority, value) { return } } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_MsgUpdateParams_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.MsgUpdateParams.authority": return x.Authority != "" case "sourcehub.hub.MsgUpdateParams.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.MsgUpdateParams.authority": x.Authority = "" case "sourcehub.hub.MsgUpdateParams.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.MsgUpdateParams.authority": value := x.Authority return protoreflect.ValueOfString(value) case "sourcehub.hub.MsgUpdateParams.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.MsgUpdateParams.authority": x.Authority = value.Interface().(string) case "sourcehub.hub.MsgUpdateParams.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.MsgUpdateParams.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.hub.MsgUpdateParams.authority": panic(fmt.Errorf("field authority of message sourcehub.hub.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParams does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.MsgUpdateParams.authority": return protoreflect.ValueOfString("") case "sourcehub.hub.MsgUpdateParams.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParams does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.MsgUpdateParams", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParams) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateParamsResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_hub_tx_proto_init() md_MsgUpdateParamsResponse = File_sourcehub_hub_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(x) } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} type fastReflection_MsgUpdateParamsResponse_messageType struct{} func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(nil) } func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgInvalidateJWS protoreflect.MessageDescriptor fd_MsgInvalidateJWS_creator protoreflect.FieldDescriptor fd_MsgInvalidateJWS_token_hash protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_tx_proto_init() md_MsgInvalidateJWS = File_sourcehub_hub_tx_proto.Messages().ByName("MsgInvalidateJWS") fd_MsgInvalidateJWS_creator = md_MsgInvalidateJWS.Fields().ByName("creator") fd_MsgInvalidateJWS_token_hash = md_MsgInvalidateJWS.Fields().ByName("token_hash") } var _ protoreflect.Message = (*fastReflection_MsgInvalidateJWS)(nil) type fastReflection_MsgInvalidateJWS MsgInvalidateJWS func (x *MsgInvalidateJWS) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgInvalidateJWS)(x) } func (x *MsgInvalidateJWS) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgInvalidateJWS_messageType fastReflection_MsgInvalidateJWS_messageType var _ protoreflect.MessageType = fastReflection_MsgInvalidateJWS_messageType{} type fastReflection_MsgInvalidateJWS_messageType struct{} func (x fastReflection_MsgInvalidateJWS_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgInvalidateJWS)(nil) } func (x fastReflection_MsgInvalidateJWS_messageType) New() protoreflect.Message { return new(fastReflection_MsgInvalidateJWS) } func (x fastReflection_MsgInvalidateJWS_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgInvalidateJWS } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgInvalidateJWS) Descriptor() protoreflect.MessageDescriptor { return md_MsgInvalidateJWS } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgInvalidateJWS) Type() protoreflect.MessageType { return _fastReflection_MsgInvalidateJWS_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgInvalidateJWS) New() protoreflect.Message { return new(fastReflection_MsgInvalidateJWS) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgInvalidateJWS) Interface() protoreflect.ProtoMessage { return (*MsgInvalidateJWS)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgInvalidateJWS) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_MsgInvalidateJWS_creator, value) { return } } if x.TokenHash != "" { value := protoreflect.ValueOfString(x.TokenHash) if !f(fd_MsgInvalidateJWS_token_hash, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgInvalidateJWS) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWS.creator": return x.Creator != "" case "sourcehub.hub.MsgInvalidateJWS.token_hash": return x.TokenHash != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWS")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWS does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWS) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWS.creator": x.Creator = "" case "sourcehub.hub.MsgInvalidateJWS.token_hash": x.TokenHash = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWS")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWS does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgInvalidateJWS) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.MsgInvalidateJWS.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcehub.hub.MsgInvalidateJWS.token_hash": value := x.TokenHash return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWS")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWS does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWS) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWS.creator": x.Creator = value.Interface().(string) case "sourcehub.hub.MsgInvalidateJWS.token_hash": x.TokenHash = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWS")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWS does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWS) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWS.creator": panic(fmt.Errorf("field creator of message sourcehub.hub.MsgInvalidateJWS is not mutable")) case "sourcehub.hub.MsgInvalidateJWS.token_hash": panic(fmt.Errorf("field token_hash of message sourcehub.hub.MsgInvalidateJWS is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWS")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWS does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgInvalidateJWS) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWS.creator": return protoreflect.ValueOfString("") case "sourcehub.hub.MsgInvalidateJWS.token_hash": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWS")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWS does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgInvalidateJWS) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.MsgInvalidateJWS", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgInvalidateJWS) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWS) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgInvalidateJWS) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgInvalidateJWS) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgInvalidateJWS) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.TokenHash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgInvalidateJWS) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.TokenHash) > 0 { i -= len(x.TokenHash) copy(dAtA[i:], x.TokenHash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TokenHash))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgInvalidateJWS) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInvalidateJWS: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInvalidateJWS: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TokenHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.TokenHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgInvalidateJWSResponse protoreflect.MessageDescriptor fd_MsgInvalidateJWSResponse_success protoreflect.FieldDescriptor ) func init() { file_sourcehub_hub_tx_proto_init() md_MsgInvalidateJWSResponse = File_sourcehub_hub_tx_proto.Messages().ByName("MsgInvalidateJWSResponse") fd_MsgInvalidateJWSResponse_success = md_MsgInvalidateJWSResponse.Fields().ByName("success") } var _ protoreflect.Message = (*fastReflection_MsgInvalidateJWSResponse)(nil) type fastReflection_MsgInvalidateJWSResponse MsgInvalidateJWSResponse func (x *MsgInvalidateJWSResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgInvalidateJWSResponse)(x) } func (x *MsgInvalidateJWSResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_hub_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgInvalidateJWSResponse_messageType fastReflection_MsgInvalidateJWSResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgInvalidateJWSResponse_messageType{} type fastReflection_MsgInvalidateJWSResponse_messageType struct{} func (x fastReflection_MsgInvalidateJWSResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgInvalidateJWSResponse)(nil) } func (x fastReflection_MsgInvalidateJWSResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgInvalidateJWSResponse) } func (x fastReflection_MsgInvalidateJWSResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgInvalidateJWSResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgInvalidateJWSResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgInvalidateJWSResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgInvalidateJWSResponse) Type() protoreflect.MessageType { return _fastReflection_MsgInvalidateJWSResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgInvalidateJWSResponse) New() protoreflect.Message { return new(fastReflection_MsgInvalidateJWSResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgInvalidateJWSResponse) Interface() protoreflect.ProtoMessage { return (*MsgInvalidateJWSResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgInvalidateJWSResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) if !f(fd_MsgInvalidateJWSResponse_success, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgInvalidateJWSResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWSResponse.success": return x.Success != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWSResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWSResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWSResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWSResponse.success": x.Success = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWSResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWSResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgInvalidateJWSResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.hub.MsgInvalidateJWSResponse.success": value := x.Success return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWSResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWSResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWSResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWSResponse.success": x.Success = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWSResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWSResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWSResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWSResponse.success": panic(fmt.Errorf("field success of message sourcehub.hub.MsgInvalidateJWSResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWSResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWSResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgInvalidateJWSResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.hub.MsgInvalidateJWSResponse.success": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.hub.MsgInvalidateJWSResponse")) } panic(fmt.Errorf("message sourcehub.hub.MsgInvalidateJWSResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgInvalidateJWSResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.hub.MsgInvalidateJWSResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgInvalidateJWSResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInvalidateJWSResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgInvalidateJWSResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgInvalidateJWSResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgInvalidateJWSResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Success { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgInvalidateJWSResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Success { i-- if x.Success { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgInvalidateJWSResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInvalidateJWSResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInvalidateJWSResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Success = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/hub/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // MsgUpdateParams is the Msg/UpdateParams request type. type MsgUpdateParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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,omitempty"` } func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { return file_sourcehub_hub_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgUpdateParams) GetAuthority() string { if x != nil { return x.Authority } return "" } func (x *MsgUpdateParams) GetParams() *Params { if x != nil { return x.Params } return nil } // MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. type MsgUpdateParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_hub_tx_proto_rawDescGZIP(), []int{1} } // MsgInvalidateJWS is the Msg/InvalidateJWS request type. // This message allows a user to invalidate a JWS token: // - By providing a JWS extension option with matching DID. // - By being the creator/signer of the message with matching authorized account. type MsgInvalidateJWS struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // creator is the address of the message signer. Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` // token_hash is the hash/identifier of the JWS token to invalidate. TokenHash string `protobuf:"bytes,2,opt,name=token_hash,json=tokenHash,proto3" json:"token_hash,omitempty"` } func (x *MsgInvalidateJWS) Reset() { *x = MsgInvalidateJWS{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgInvalidateJWS) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgInvalidateJWS) ProtoMessage() {} // Deprecated: Use MsgInvalidateJWS.ProtoReflect.Descriptor instead. func (*MsgInvalidateJWS) Descriptor() ([]byte, []int) { return file_sourcehub_hub_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgInvalidateJWS) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *MsgInvalidateJWS) GetTokenHash() string { if x != nil { return x.TokenHash } return "" } // MsgInvalidateJWSResponse defines the response structure for executing a MsgInvalidateJWS message. type MsgInvalidateJWSResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // success indicates whether the invalidation was successful. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } func (x *MsgInvalidateJWSResponse) Reset() { *x = MsgInvalidateJWSResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_hub_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgInvalidateJWSResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgInvalidateJWSResponse) ProtoMessage() {} // Deprecated: Use MsgInvalidateJWSResponse.ProtoReflect.Descriptor instead. func (*MsgInvalidateJWSResponse) Descriptor() ([]byte, []int) { return file_sourcehub_hub_tx_proto_rawDescGZIP(), []int{3} } func (x *MsgInvalidateJWSResponse) GetSuccess() bool { if x != nil { return x.Success } return false } var File_sourcehub_hub_tx_proto protoreflect.FileDescriptor var file_sourcehub_hub_tx_proto_rawDesc = []byte{ 0x0a, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x57, 0x53, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x57, 0x53, 0x22, 0x34, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x57, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0xbf, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x57, 0x53, 0x12, 0x1f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x57, 0x53, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x57, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x91, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x68, 0x75, 0x62, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x68, 0x75, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x48, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x48, 0x75, 0x62, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x48, 0x75, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x48, 0x75, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_hub_tx_proto_rawDescOnce sync.Once file_sourcehub_hub_tx_proto_rawDescData = file_sourcehub_hub_tx_proto_rawDesc ) func file_sourcehub_hub_tx_proto_rawDescGZIP() []byte { file_sourcehub_hub_tx_proto_rawDescOnce.Do(func() { file_sourcehub_hub_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_hub_tx_proto_rawDescData) }) return file_sourcehub_hub_tx_proto_rawDescData } var file_sourcehub_hub_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_sourcehub_hub_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: sourcehub.hub.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.hub.MsgUpdateParamsResponse (*MsgInvalidateJWS)(nil), // 2: sourcehub.hub.MsgInvalidateJWS (*MsgInvalidateJWSResponse)(nil), // 3: sourcehub.hub.MsgInvalidateJWSResponse (*Params)(nil), // 4: sourcehub.hub.Params } var file_sourcehub_hub_tx_proto_depIdxs = []int32{ 4, // 0: sourcehub.hub.MsgUpdateParams.params:type_name -> sourcehub.hub.Params 0, // 1: sourcehub.hub.Msg.UpdateParams:input_type -> sourcehub.hub.MsgUpdateParams 2, // 2: sourcehub.hub.Msg.InvalidateJWS:input_type -> sourcehub.hub.MsgInvalidateJWS 1, // 3: sourcehub.hub.Msg.UpdateParams:output_type -> sourcehub.hub.MsgUpdateParamsResponse 3, // 4: sourcehub.hub.Msg.InvalidateJWS:output_type -> sourcehub.hub.MsgInvalidateJWSResponse 3, // [3:5] is the sub-list for method output_type 1, // [1:3] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcehub_hub_tx_proto_init() } func file_sourcehub_hub_tx_proto_init() { if File_sourcehub_hub_tx_proto != nil { return } file_sourcehub_hub_params_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_hub_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_hub_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_hub_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgInvalidateJWS); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_hub_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgInvalidateJWSResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_hub_tx_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_hub_tx_proto_goTypes, DependencyIndexes: file_sourcehub_hub_tx_proto_depIdxs, MessageInfos: file_sourcehub_hub_tx_proto_msgTypes, }.Build() File_sourcehub_hub_tx_proto = out.File file_sourcehub_hub_tx_proto_rawDesc = nil file_sourcehub_hub_tx_proto_goTypes = nil file_sourcehub_hub_tx_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/hub/tx_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/hub/tx.proto package hub import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Msg_UpdateParams_FullMethodName = "/sourcehub.hub.Msg/UpdateParams" Msg_InvalidateJWS_FullMethodName = "/sourcehub.hub.Msg/InvalidateJWS" ) // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Msg defines the Msg service. 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) // InvalidateJWS allows a user to manually invalidate a JWS token // that they own (same DID) or are authorized to use (same creator account). InvalidateJWS(ctx context.Context, in *MsgInvalidateJWS, opts ...grpc.CallOption) (*MsgInvalidateJWSResponse, error) } type msgClient struct { cc grpc.ClientConnInterface } func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) InvalidateJWS(ctx context.Context, in *MsgInvalidateJWS, opts ...grpc.CallOption) (*MsgInvalidateJWSResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgInvalidateJWSResponse) err := c.cc.Invoke(ctx, Msg_InvalidateJWS_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility. // // Msg defines the 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) // InvalidateJWS allows a user to manually invalidate a JWS token // that they own (same DID) or are authorized to use (same creator account). InvalidateJWS(context.Context, *MsgInvalidateJWS) (*MsgInvalidateJWSResponse, error) mustEmbedUnimplementedMsgServer() } // UnimplementedMsgServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMsgServer struct{} func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } func (UnimplementedMsgServer) InvalidateJWS(context.Context, *MsgInvalidateJWS) (*MsgInvalidateJWSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidateJWS not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will // result in compilation errors. type UnsafeMsgServer interface { mustEmbedUnimplementedMsgServer() } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { // If the following call pancis, it indicates UnimplementedMsgServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Msg_UpdateParams_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_InvalidateJWS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgInvalidateJWS) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).InvalidateJWS(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_InvalidateJWS_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).InvalidateJWS(ctx, req.(*MsgInvalidateJWS)) } return interceptor(ctx, in, info, handler) } // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.hub.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "InvalidateJWS", Handler: _Msg_InvalidateJWS_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/hub/tx.proto", } ================================================ FILE: api/sourcehub/tier/module/v1beta1/module.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package modulev1beta1 import ( _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_Module protoreflect.MessageDescriptor fd_Module_authority protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_module_v1beta1_module_proto_init() md_Module = File_sourcehub_tier_module_v1beta1_module_proto.Messages().ByName("Module") fd_Module_authority = md_Module.Fields().ByName("authority") } var _ protoreflect.Message = (*fastReflection_Module)(nil) type fastReflection_Module Module func (x *Module) ProtoReflect() protoreflect.Message { return (*fastReflection_Module)(x) } func (x *Module) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_module_v1beta1_module_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Module_messageType fastReflection_Module_messageType var _ protoreflect.MessageType = fastReflection_Module_messageType{} type fastReflection_Module_messageType struct{} func (x fastReflection_Module_messageType) Zero() protoreflect.Message { return (*fastReflection_Module)(nil) } func (x fastReflection_Module_messageType) New() protoreflect.Message { return new(fastReflection_Module) } func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { return md_Module } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Module) Type() protoreflect.MessageType { return _fastReflection_Module_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Module) New() protoreflect.Message { return new(fastReflection_Module) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { return (*Module)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_Module_authority, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.module.v1beta1.Module.authority": return x.Authority != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.module.v1beta1.Module")) } panic(fmt.Errorf("message sourcehub.tier.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.module.v1beta1.Module.authority": x.Authority = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.module.v1beta1.Module")) } panic(fmt.Errorf("message sourcehub.tier.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.module.v1beta1.Module.authority": value := x.Authority return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.module.v1beta1.Module")) } panic(fmt.Errorf("message sourcehub.tier.module.v1beta1.Module does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.module.v1beta1.Module.authority": x.Authority = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.module.v1beta1.Module")) } panic(fmt.Errorf("message sourcehub.tier.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.module.v1beta1.Module.authority": panic(fmt.Errorf("field authority of message sourcehub.tier.module.v1beta1.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.module.v1beta1.Module")) } panic(fmt.Errorf("message sourcehub.tier.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.module.v1beta1.Module.authority": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.module.v1beta1.Module")) } panic(fmt.Errorf("message sourcehub.tier.module.v1beta1.Module does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.module.v1beta1.Module", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Module) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Module) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Module) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/tier/module/v1beta1/module.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Module is the config object for the module. type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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 (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_module_v1beta1_module_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Module) String() string { return protoimpl.X.MessageStringOf(x) } func (*Module) ProtoMessage() {} // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { return file_sourcehub_tier_module_v1beta1_module_proto_rawDescGZIP(), []int{0} } func (x *Module) GetAuthority() string { if x != nil { return x.Authority } return "" } var File_sourcehub_tier_module_v1beta1_module_proto protoreflect.FileDescriptor var file_sourcehub_tier_module_v1beta1_module_proto_rawDesc = []byte{ 0x0a, 0x2a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x31, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x2b, 0x0a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x42, 0x85, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x54, 0x4d, 0xaa, 0x02, 0x1d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x29, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x54, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_tier_module_v1beta1_module_proto_rawDescOnce sync.Once file_sourcehub_tier_module_v1beta1_module_proto_rawDescData = file_sourcehub_tier_module_v1beta1_module_proto_rawDesc ) func file_sourcehub_tier_module_v1beta1_module_proto_rawDescGZIP() []byte { file_sourcehub_tier_module_v1beta1_module_proto_rawDescOnce.Do(func() { file_sourcehub_tier_module_v1beta1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_tier_module_v1beta1_module_proto_rawDescData) }) return file_sourcehub_tier_module_v1beta1_module_proto_rawDescData } var file_sourcehub_tier_module_v1beta1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_tier_module_v1beta1_module_proto_goTypes = []interface{}{ (*Module)(nil), // 0: sourcehub.tier.module.v1beta1.Module } var file_sourcehub_tier_module_v1beta1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcehub_tier_module_v1beta1_module_proto_init() } func file_sourcehub_tier_module_v1beta1_module_proto_init() { if File_sourcehub_tier_module_v1beta1_module_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_tier_module_v1beta1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_tier_module_v1beta1_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_tier_module_v1beta1_module_proto_goTypes, DependencyIndexes: file_sourcehub_tier_module_v1beta1_module_proto_depIdxs, MessageInfos: file_sourcehub_tier_module_v1beta1_module_proto_msgTypes, }.Build() File_sourcehub_tier_module_v1beta1_module_proto = out.File file_sourcehub_tier_module_v1beta1_module_proto_rawDesc = nil file_sourcehub_tier_module_v1beta1_module_proto_goTypes = nil file_sourcehub_tier_module_v1beta1_module_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/tier/v1beta1/genesis.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package tierv1beta1 import ( _ "cosmossdk.io/api/amino" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_GenesisState_2_list)(nil) type _GenesisState_2_list struct { list *[]*Lockup } func (x *_GenesisState_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Lockup) (*x.list)[i] = concreteValue } func (x *_GenesisState_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Lockup) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { v := new(Lockup) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_2_list) NewElement() protoreflect.Value { v := new(Lockup) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_2_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_3_list)(nil) type _GenesisState_3_list struct { list *[]*UnlockingLockup } func (x *_GenesisState_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UnlockingLockup) (*x.list)[i] = concreteValue } func (x *_GenesisState_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UnlockingLockup) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { v := new(UnlockingLockup) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_3_list) NewElement() protoreflect.Value { v := new(UnlockingLockup) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_3_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_4_list)(nil) type _GenesisState_4_list struct { list *[]*Lockup } func (x *_GenesisState_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Lockup) (*x.list)[i] = concreteValue } func (x *_GenesisState_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Lockup) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { v := new(Lockup) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_4_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_4_list) NewElement() protoreflect.Value { v := new(Lockup) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_4_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_5_list)(nil) type _GenesisState_5_list struct { list *[]*Developer } func (x *_GenesisState_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Developer) (*x.list)[i] = concreteValue } func (x *_GenesisState_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Developer) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { v := new(Developer) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_5_list) NewElement() protoreflect.Value { v := new(Developer) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_5_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_GenesisState_6_list)(nil) type _GenesisState_6_list struct { list *[]*UserSubscription } func (x *_GenesisState_6_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UserSubscription) (*x.list)[i] = concreteValue } func (x *_GenesisState_6_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UserSubscription) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { v := new(UserSubscription) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_6_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_GenesisState_6_list) NewElement() protoreflect.Value { v := new(UserSubscription) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_GenesisState_6_list) IsValid() bool { return x.list != nil } var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor fd_GenesisState_lockups protoreflect.FieldDescriptor fd_GenesisState_unlockingLockups protoreflect.FieldDescriptor fd_GenesisState_insuranceLockups protoreflect.FieldDescriptor fd_GenesisState_developers protoreflect.FieldDescriptor fd_GenesisState_userSubscriptions protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_genesis_proto_init() md_GenesisState = File_sourcehub_tier_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_lockups = md_GenesisState.Fields().ByName("lockups") fd_GenesisState_unlockingLockups = md_GenesisState.Fields().ByName("unlockingLockups") fd_GenesisState_insuranceLockups = md_GenesisState.Fields().ByName("insuranceLockups") fd_GenesisState_developers = md_GenesisState.Fields().ByName("developers") fd_GenesisState_userSubscriptions = md_GenesisState.Fields().ByName("userSubscriptions") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) type fastReflection_GenesisState GenesisState func (x *GenesisState) ProtoReflect() protoreflect.Message { return (*fastReflection_GenesisState)(x) } func (x *GenesisState) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} type fastReflection_GenesisState_messageType struct{} func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { return (*fastReflection_GenesisState)(nil) } func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { return new(fastReflection_GenesisState) } func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { return md_GenesisState } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { return _fastReflection_GenesisState_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GenesisState) New() protoreflect.Message { return new(fastReflection_GenesisState) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { return (*GenesisState)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_GenesisState_params, value) { return } } if len(x.Lockups) != 0 { value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Lockups}) if !f(fd_GenesisState_lockups, value) { return } } if len(x.UnlockingLockups) != 0 { value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.UnlockingLockups}) if !f(fd_GenesisState_unlockingLockups, value) { return } } if len(x.InsuranceLockups) != 0 { value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.InsuranceLockups}) if !f(fd_GenesisState_insuranceLockups, value) { return } } if len(x.Developers) != 0 { value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.Developers}) if !f(fd_GenesisState_developers, value) { return } } if len(x.UserSubscriptions) != 0 { value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.UserSubscriptions}) if !f(fd_GenesisState_userSubscriptions, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.GenesisState.params": return x.Params != nil case "sourcehub.tier.v1beta1.GenesisState.lockups": return len(x.Lockups) != 0 case "sourcehub.tier.v1beta1.GenesisState.unlockingLockups": return len(x.UnlockingLockups) != 0 case "sourcehub.tier.v1beta1.GenesisState.insuranceLockups": return len(x.InsuranceLockups) != 0 case "sourcehub.tier.v1beta1.GenesisState.developers": return len(x.Developers) != 0 case "sourcehub.tier.v1beta1.GenesisState.userSubscriptions": return len(x.UserSubscriptions) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.GenesisState.params": x.Params = nil case "sourcehub.tier.v1beta1.GenesisState.lockups": x.Lockups = nil case "sourcehub.tier.v1beta1.GenesisState.unlockingLockups": x.UnlockingLockups = nil case "sourcehub.tier.v1beta1.GenesisState.insuranceLockups": x.InsuranceLockups = nil case "sourcehub.tier.v1beta1.GenesisState.developers": x.Developers = nil case "sourcehub.tier.v1beta1.GenesisState.userSubscriptions": x.UserSubscriptions = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.tier.v1beta1.GenesisState.lockups": if len(x.Lockups) == 0 { return protoreflect.ValueOfList(&_GenesisState_2_list{}) } listValue := &_GenesisState_2_list{list: &x.Lockups} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.GenesisState.unlockingLockups": if len(x.UnlockingLockups) == 0 { return protoreflect.ValueOfList(&_GenesisState_3_list{}) } listValue := &_GenesisState_3_list{list: &x.UnlockingLockups} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.GenesisState.insuranceLockups": if len(x.InsuranceLockups) == 0 { return protoreflect.ValueOfList(&_GenesisState_4_list{}) } listValue := &_GenesisState_4_list{list: &x.InsuranceLockups} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.GenesisState.developers": if len(x.Developers) == 0 { return protoreflect.ValueOfList(&_GenesisState_5_list{}) } listValue := &_GenesisState_5_list{list: &x.Developers} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.GenesisState.userSubscriptions": if len(x.UserSubscriptions) == 0 { return protoreflect.ValueOfList(&_GenesisState_6_list{}) } listValue := &_GenesisState_6_list{list: &x.UserSubscriptions} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.GenesisState.params": x.Params = value.Message().Interface().(*Params) case "sourcehub.tier.v1beta1.GenesisState.lockups": lv := value.List() clv := lv.(*_GenesisState_2_list) x.Lockups = *clv.list case "sourcehub.tier.v1beta1.GenesisState.unlockingLockups": lv := value.List() clv := lv.(*_GenesisState_3_list) x.UnlockingLockups = *clv.list case "sourcehub.tier.v1beta1.GenesisState.insuranceLockups": lv := value.List() clv := lv.(*_GenesisState_4_list) x.InsuranceLockups = *clv.list case "sourcehub.tier.v1beta1.GenesisState.developers": lv := value.List() clv := lv.(*_GenesisState_5_list) x.Developers = *clv.list case "sourcehub.tier.v1beta1.GenesisState.userSubscriptions": lv := value.List() clv := lv.(*_GenesisState_6_list) x.UserSubscriptions = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.GenesisState.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.tier.v1beta1.GenesisState.lockups": if x.Lockups == nil { x.Lockups = []*Lockup{} } value := &_GenesisState_2_list{list: &x.Lockups} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.GenesisState.unlockingLockups": if x.UnlockingLockups == nil { x.UnlockingLockups = []*UnlockingLockup{} } value := &_GenesisState_3_list{list: &x.UnlockingLockups} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.GenesisState.insuranceLockups": if x.InsuranceLockups == nil { x.InsuranceLockups = []*Lockup{} } value := &_GenesisState_4_list{list: &x.InsuranceLockups} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.GenesisState.developers": if x.Developers == nil { x.Developers = []*Developer{} } value := &_GenesisState_5_list{list: &x.Developers} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.GenesisState.userSubscriptions": if x.UserSubscriptions == nil { x.UserSubscriptions = []*UserSubscription{} } value := &_GenesisState_6_list{list: &x.UserSubscriptions} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.tier.v1beta1.GenesisState.lockups": list := []*Lockup{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) case "sourcehub.tier.v1beta1.GenesisState.unlockingLockups": list := []*UnlockingLockup{} return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) case "sourcehub.tier.v1beta1.GenesisState.insuranceLockups": list := []*Lockup{} return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) case "sourcehub.tier.v1beta1.GenesisState.developers": list := []*Developer{} return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) case "sourcehub.tier.v1beta1.GenesisState.userSubscriptions": list := []*UserSubscription{} return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.GenesisState")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.GenesisState", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GenesisState) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Lockups) > 0 { for _, e := range x.Lockups { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.UnlockingLockups) > 0 { for _, e := range x.UnlockingLockups { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.InsuranceLockups) > 0 { for _, e := range x.InsuranceLockups { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.Developers) > 0 { for _, e := range x.Developers { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.UserSubscriptions) > 0 { for _, e := range x.UserSubscriptions { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.UserSubscriptions) > 0 { for iNdEx := len(x.UserSubscriptions) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.UserSubscriptions[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } } if len(x.Developers) > 0 { for iNdEx := len(x.Developers) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Developers[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } } if len(x.InsuranceLockups) > 0 { for iNdEx := len(x.InsuranceLockups) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.InsuranceLockups[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } } if len(x.UnlockingLockups) > 0 { for iNdEx := len(x.UnlockingLockups) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.UnlockingLockups[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } } if len(x.Lockups) > 0 { for iNdEx := len(x.Lockups) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Lockups[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GenesisState) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Lockups", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Lockups = append(x.Lockups, &Lockup{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Lockups[len(x.Lockups)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockingLockups", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UnlockingLockups = append(x.UnlockingLockups, &UnlockingLockup{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockingLockups[len(x.UnlockingLockups)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InsuranceLockups", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.InsuranceLockups = append(x.InsuranceLockups, &Lockup{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InsuranceLockups[len(x.InsuranceLockups)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developers", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developers = append(x.Developers, &Developer{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Developers[len(x.Developers)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserSubscriptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UserSubscriptions = append(x.UserSubscriptions, &UserSubscription{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserSubscriptions[len(x.UserSubscriptions)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/tier/v1beta1/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // GenesisState defines the tier module's genesis state. type GenesisState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` Lockups []*Lockup `protobuf:"bytes,2,rep,name=lockups,proto3" json:"lockups,omitempty"` UnlockingLockups []*UnlockingLockup `protobuf:"bytes,3,rep,name=unlockingLockups,proto3" json:"unlockingLockups,omitempty"` InsuranceLockups []*Lockup `protobuf:"bytes,4,rep,name=insuranceLockups,proto3" json:"insuranceLockups,omitempty"` Developers []*Developer `protobuf:"bytes,5,rep,name=developers,proto3" json:"developers,omitempty"` UserSubscriptions []*UserSubscription `protobuf:"bytes,6,rep,name=userSubscriptions,proto3" json:"userSubscriptions,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenesisState) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetParams() *Params { if x != nil { return x.Params } return nil } func (x *GenesisState) GetLockups() []*Lockup { if x != nil { return x.Lockups } return nil } func (x *GenesisState) GetUnlockingLockups() []*UnlockingLockup { if x != nil { return x.UnlockingLockups } return nil } func (x *GenesisState) GetInsuranceLockups() []*Lockup { if x != nil { return x.InsuranceLockups } return nil } func (x *GenesisState) GetDevelopers() []*Developer { if x != nil { return x.Developers } return nil } func (x *GenesisState) GetUserSubscriptions() []*UserSubscription { if x != nil { return x.UserSubscriptions } return nil } var File_sourcehub_tier_v1beta1_genesis_proto protoreflect.FileDescriptor var file_sourcehub_tier_v1beta1_genesis_proto_rawDesc = []byte{ 0x0a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x07, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x5e, 0x0a, 0x10, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x10, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x55, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x4c, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x12, 0x61, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xd9, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x54, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_tier_v1beta1_genesis_proto_rawDescOnce sync.Once file_sourcehub_tier_v1beta1_genesis_proto_rawDescData = file_sourcehub_tier_v1beta1_genesis_proto_rawDesc ) func file_sourcehub_tier_v1beta1_genesis_proto_rawDescGZIP() []byte { file_sourcehub_tier_v1beta1_genesis_proto_rawDescOnce.Do(func() { file_sourcehub_tier_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_tier_v1beta1_genesis_proto_rawDescData) }) return file_sourcehub_tier_v1beta1_genesis_proto_rawDescData } var file_sourcehub_tier_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcehub_tier_v1beta1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: sourcehub.tier.v1beta1.GenesisState (*Params)(nil), // 1: sourcehub.tier.v1beta1.Params (*Lockup)(nil), // 2: sourcehub.tier.v1beta1.Lockup (*UnlockingLockup)(nil), // 3: sourcehub.tier.v1beta1.UnlockingLockup (*Developer)(nil), // 4: sourcehub.tier.v1beta1.Developer (*UserSubscription)(nil), // 5: sourcehub.tier.v1beta1.UserSubscription } var file_sourcehub_tier_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: sourcehub.tier.v1beta1.GenesisState.params:type_name -> sourcehub.tier.v1beta1.Params 2, // 1: sourcehub.tier.v1beta1.GenesisState.lockups:type_name -> sourcehub.tier.v1beta1.Lockup 3, // 2: sourcehub.tier.v1beta1.GenesisState.unlockingLockups:type_name -> sourcehub.tier.v1beta1.UnlockingLockup 2, // 3: sourcehub.tier.v1beta1.GenesisState.insuranceLockups:type_name -> sourcehub.tier.v1beta1.Lockup 4, // 4: sourcehub.tier.v1beta1.GenesisState.developers:type_name -> sourcehub.tier.v1beta1.Developer 5, // 5: sourcehub.tier.v1beta1.GenesisState.userSubscriptions:type_name -> sourcehub.tier.v1beta1.UserSubscription 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name } func init() { file_sourcehub_tier_v1beta1_genesis_proto_init() } func file_sourcehub_tier_v1beta1_genesis_proto_init() { if File_sourcehub_tier_v1beta1_genesis_proto != nil { return } file_sourcehub_tier_v1beta1_lockup_proto_init() file_sourcehub_tier_v1beta1_params_proto_init() file_sourcehub_tier_v1beta1_subscription_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_tier_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_tier_v1beta1_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_tier_v1beta1_genesis_proto_goTypes, DependencyIndexes: file_sourcehub_tier_v1beta1_genesis_proto_depIdxs, MessageInfos: file_sourcehub_tier_v1beta1_genesis_proto_msgTypes, }.Build() File_sourcehub_tier_v1beta1_genesis_proto = out.File file_sourcehub_tier_v1beta1_genesis_proto_rawDesc = nil file_sourcehub_tier_v1beta1_genesis_proto_goTypes = nil file_sourcehub_tier_v1beta1_genesis_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/tier/v1beta1/lockup.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package tierv1beta1 import ( _ "cosmossdk.io/api/amino" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_Lockup protoreflect.MessageDescriptor fd_Lockup_delegator_address protoreflect.FieldDescriptor fd_Lockup_validator_address protoreflect.FieldDescriptor fd_Lockup_amount protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_lockup_proto_init() md_Lockup = File_sourcehub_tier_v1beta1_lockup_proto.Messages().ByName("Lockup") fd_Lockup_delegator_address = md_Lockup.Fields().ByName("delegator_address") fd_Lockup_validator_address = md_Lockup.Fields().ByName("validator_address") fd_Lockup_amount = md_Lockup.Fields().ByName("amount") } var _ protoreflect.Message = (*fastReflection_Lockup)(nil) type fastReflection_Lockup Lockup func (x *Lockup) ProtoReflect() protoreflect.Message { return (*fastReflection_Lockup)(x) } func (x *Lockup) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_lockup_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Lockup_messageType fastReflection_Lockup_messageType var _ protoreflect.MessageType = fastReflection_Lockup_messageType{} type fastReflection_Lockup_messageType struct{} func (x fastReflection_Lockup_messageType) Zero() protoreflect.Message { return (*fastReflection_Lockup)(nil) } func (x fastReflection_Lockup_messageType) New() protoreflect.Message { return new(fastReflection_Lockup) } func (x fastReflection_Lockup_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Lockup } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Lockup) Descriptor() protoreflect.MessageDescriptor { return md_Lockup } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Lockup) Type() protoreflect.MessageType { return _fastReflection_Lockup_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Lockup) New() protoreflect.Message { return new(fastReflection_Lockup) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Lockup) Interface() protoreflect.ProtoMessage { return (*Lockup)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Lockup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_Lockup_delegator_address, value) { return } } if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_Lockup_validator_address, value) { return } } if x.Amount != "" { value := protoreflect.ValueOfString(x.Amount) if !f(fd_Lockup_amount, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Lockup) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.Lockup.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.Lockup.validator_address": return x.ValidatorAddress != "" case "sourcehub.tier.v1beta1.Lockup.amount": return x.Amount != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Lockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Lockup does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Lockup) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Lockup.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.Lockup.validator_address": x.ValidatorAddress = "" case "sourcehub.tier.v1beta1.Lockup.amount": x.Amount = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Lockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Lockup does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Lockup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.Lockup.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.Lockup.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.Lockup.amount": value := x.Amount return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Lockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Lockup does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Lockup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Lockup.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.Lockup.validator_address": x.ValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.Lockup.amount": x.Amount = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Lockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Lockup does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Lockup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Lockup.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.Lockup is not mutable")) case "sourcehub.tier.v1beta1.Lockup.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.Lockup is not mutable")) case "sourcehub.tier.v1beta1.Lockup.amount": panic(fmt.Errorf("field amount of message sourcehub.tier.v1beta1.Lockup is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Lockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Lockup does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Lockup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Lockup.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.Lockup.validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.Lockup.amount": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Lockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Lockup does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Lockup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.Lockup", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Lockup) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Lockup) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Lockup) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Lockup) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Lockup) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Amount) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Lockup) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Amount) > 0 { i -= len(x.Amount) copy(dAtA[i:], x.Amount) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) i-- dAtA[i] = 0x1a } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Lockup) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Lockup: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Lockup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Amount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnlockingLockup protoreflect.MessageDescriptor fd_UnlockingLockup_delegator_address protoreflect.FieldDescriptor fd_UnlockingLockup_validator_address protoreflect.FieldDescriptor fd_UnlockingLockup_creation_height protoreflect.FieldDescriptor fd_UnlockingLockup_amount protoreflect.FieldDescriptor fd_UnlockingLockup_completion_time protoreflect.FieldDescriptor fd_UnlockingLockup_unlock_time protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_lockup_proto_init() md_UnlockingLockup = File_sourcehub_tier_v1beta1_lockup_proto.Messages().ByName("UnlockingLockup") fd_UnlockingLockup_delegator_address = md_UnlockingLockup.Fields().ByName("delegator_address") fd_UnlockingLockup_validator_address = md_UnlockingLockup.Fields().ByName("validator_address") fd_UnlockingLockup_creation_height = md_UnlockingLockup.Fields().ByName("creation_height") fd_UnlockingLockup_amount = md_UnlockingLockup.Fields().ByName("amount") fd_UnlockingLockup_completion_time = md_UnlockingLockup.Fields().ByName("completion_time") fd_UnlockingLockup_unlock_time = md_UnlockingLockup.Fields().ByName("unlock_time") } var _ protoreflect.Message = (*fastReflection_UnlockingLockup)(nil) type fastReflection_UnlockingLockup UnlockingLockup func (x *UnlockingLockup) ProtoReflect() protoreflect.Message { return (*fastReflection_UnlockingLockup)(x) } func (x *UnlockingLockup) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_lockup_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnlockingLockup_messageType fastReflection_UnlockingLockup_messageType var _ protoreflect.MessageType = fastReflection_UnlockingLockup_messageType{} type fastReflection_UnlockingLockup_messageType struct{} func (x fastReflection_UnlockingLockup_messageType) Zero() protoreflect.Message { return (*fastReflection_UnlockingLockup)(nil) } func (x fastReflection_UnlockingLockup_messageType) New() protoreflect.Message { return new(fastReflection_UnlockingLockup) } func (x fastReflection_UnlockingLockup_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockup } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnlockingLockup) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockup } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnlockingLockup) Type() protoreflect.MessageType { return _fastReflection_UnlockingLockup_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnlockingLockup) New() protoreflect.Message { return new(fastReflection_UnlockingLockup) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnlockingLockup) Interface() protoreflect.ProtoMessage { return (*UnlockingLockup)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnlockingLockup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_UnlockingLockup_delegator_address, value) { return } } if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_UnlockingLockup_validator_address, value) { return } } if x.CreationHeight != int64(0) { value := protoreflect.ValueOfInt64(x.CreationHeight) if !f(fd_UnlockingLockup_creation_height, value) { return } } if x.Amount != "" { value := protoreflect.ValueOfString(x.Amount) if !f(fd_UnlockingLockup_amount, value) { return } } if x.CompletionTime != nil { value := protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) if !f(fd_UnlockingLockup_completion_time, value) { return } } if x.UnlockTime != nil { value := protoreflect.ValueOfMessage(x.UnlockTime.ProtoReflect()) if !f(fd_UnlockingLockup_unlock_time, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnlockingLockup) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockup.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.UnlockingLockup.validator_address": return x.ValidatorAddress != "" case "sourcehub.tier.v1beta1.UnlockingLockup.creation_height": return x.CreationHeight != int64(0) case "sourcehub.tier.v1beta1.UnlockingLockup.amount": return x.Amount != "" case "sourcehub.tier.v1beta1.UnlockingLockup.completion_time": return x.CompletionTime != nil case "sourcehub.tier.v1beta1.UnlockingLockup.unlock_time": return x.UnlockTime != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockup does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockup) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockup.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.UnlockingLockup.validator_address": x.ValidatorAddress = "" case "sourcehub.tier.v1beta1.UnlockingLockup.creation_height": x.CreationHeight = int64(0) case "sourcehub.tier.v1beta1.UnlockingLockup.amount": x.Amount = "" case "sourcehub.tier.v1beta1.UnlockingLockup.completion_time": x.CompletionTime = nil case "sourcehub.tier.v1beta1.UnlockingLockup.unlock_time": x.UnlockTime = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockup does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnlockingLockup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockup.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UnlockingLockup.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UnlockingLockup.creation_height": value := x.CreationHeight return protoreflect.ValueOfInt64(value) case "sourcehub.tier.v1beta1.UnlockingLockup.amount": value := x.Amount return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UnlockingLockup.completion_time": value := x.CompletionTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.tier.v1beta1.UnlockingLockup.unlock_time": value := x.UnlockTime return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockup does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockup.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.UnlockingLockup.validator_address": x.ValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.UnlockingLockup.creation_height": x.CreationHeight = value.Int() case "sourcehub.tier.v1beta1.UnlockingLockup.amount": x.Amount = value.Interface().(string) case "sourcehub.tier.v1beta1.UnlockingLockup.completion_time": x.CompletionTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.tier.v1beta1.UnlockingLockup.unlock_time": x.UnlockTime = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockup does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockup.completion_time": if x.CompletionTime == nil { x.CompletionTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) case "sourcehub.tier.v1beta1.UnlockingLockup.unlock_time": if x.UnlockTime == nil { x.UnlockTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.UnlockTime.ProtoReflect()) case "sourcehub.tier.v1beta1.UnlockingLockup.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.UnlockingLockup is not mutable")) case "sourcehub.tier.v1beta1.UnlockingLockup.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.UnlockingLockup is not mutable")) case "sourcehub.tier.v1beta1.UnlockingLockup.creation_height": panic(fmt.Errorf("field creation_height of message sourcehub.tier.v1beta1.UnlockingLockup is not mutable")) case "sourcehub.tier.v1beta1.UnlockingLockup.amount": panic(fmt.Errorf("field amount of message sourcehub.tier.v1beta1.UnlockingLockup is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockup does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnlockingLockup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockup.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UnlockingLockup.validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UnlockingLockup.creation_height": return protoreflect.ValueOfInt64(int64(0)) case "sourcehub.tier.v1beta1.UnlockingLockup.amount": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UnlockingLockup.completion_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.tier.v1beta1.UnlockingLockup.unlock_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockup")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockup does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnlockingLockup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UnlockingLockup", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnlockingLockup) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockup) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnlockingLockup) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnlockingLockup) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnlockingLockup) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationHeight != 0 { n += 1 + runtime.Sov(uint64(x.CreationHeight)) } l = len(x.Amount) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CompletionTime != nil { l = options.Size(x.CompletionTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.UnlockTime != nil { l = options.Size(x.UnlockTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockup) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.UnlockTime != nil { encoded, err := options.Marshal(x.UnlockTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } if x.CompletionTime != nil { encoded, err := options.Marshal(x.CompletionTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if len(x.Amount) > 0 { i -= len(x.Amount) copy(dAtA[i:], x.Amount) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) i-- dAtA[i] = 0x22 } if x.CreationHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) i-- dAtA[i] = 0x18 } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockup) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockup: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } x.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Amount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CompletionTime == nil { x.CompletionTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CompletionTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.UnlockTime == nil { x.UnlockTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/tier/v1beta1/lockup.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Lockup tracks the locked stake of a delegator. type Lockup struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` } func (x *Lockup) Reset() { *x = Lockup{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_lockup_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Lockup) String() string { return protoimpl.X.MessageStringOf(x) } func (*Lockup) ProtoMessage() {} // Deprecated: Use Lockup.ProtoReflect.Descriptor instead. func (*Lockup) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_lockup_proto_rawDescGZIP(), []int{0} } func (x *Lockup) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *Lockup) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } func (x *Lockup) GetAmount() string { if x != nil { return x.Amount } return "" } // UnlockingLockup tracks the unlocking stake of a delegator. type UnlockingLockup struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` CreationHeight int64 `protobuf:"varint,3,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` // The time at which the stake undelegation will be completed. CompletionTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"` // The time after which the unlocking lockup can be completed. UnlockTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=unlock_time,json=unlockTime,proto3" json:"unlock_time,omitempty"` } func (x *UnlockingLockup) Reset() { *x = UnlockingLockup{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_lockup_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnlockingLockup) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnlockingLockup) ProtoMessage() {} // Deprecated: Use UnlockingLockup.ProtoReflect.Descriptor instead. func (*UnlockingLockup) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_lockup_proto_rawDescGZIP(), []int{1} } func (x *UnlockingLockup) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *UnlockingLockup) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } func (x *UnlockingLockup) GetCreationHeight() int64 { if x != nil { return x.CreationHeight } return 0 } func (x *UnlockingLockup) GetAmount() string { if x != nil { return x.Amount } return "" } func (x *UnlockingLockup) GetCompletionTime() *timestamppb.Timestamp { if x != nil { return x.CompletionTime } return nil } func (x *UnlockingLockup) GetUnlockTime() *timestamppb.Timestamp { if x != nil { return x.UnlockTime } return nil } var File_sourcehub_tier_v1beta1_lockup_proto protoreflect.FileDescriptor var file_sourcehub_tier_v1beta1_lockup_proto_rawDesc = []byte{ 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x03, 0x0a, 0x0f, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x42, 0xd8, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x54, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_tier_v1beta1_lockup_proto_rawDescOnce sync.Once file_sourcehub_tier_v1beta1_lockup_proto_rawDescData = file_sourcehub_tier_v1beta1_lockup_proto_rawDesc ) func file_sourcehub_tier_v1beta1_lockup_proto_rawDescGZIP() []byte { file_sourcehub_tier_v1beta1_lockup_proto_rawDescOnce.Do(func() { file_sourcehub_tier_v1beta1_lockup_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_tier_v1beta1_lockup_proto_rawDescData) }) return file_sourcehub_tier_v1beta1_lockup_proto_rawDescData } var file_sourcehub_tier_v1beta1_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_tier_v1beta1_lockup_proto_goTypes = []interface{}{ (*Lockup)(nil), // 0: sourcehub.tier.v1beta1.Lockup (*UnlockingLockup)(nil), // 1: sourcehub.tier.v1beta1.UnlockingLockup (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp } var file_sourcehub_tier_v1beta1_lockup_proto_depIdxs = []int32{ 2, // 0: sourcehub.tier.v1beta1.UnlockingLockup.completion_time:type_name -> google.protobuf.Timestamp 2, // 1: sourcehub.tier.v1beta1.UnlockingLockup.unlock_time:type_name -> google.protobuf.Timestamp 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcehub_tier_v1beta1_lockup_proto_init() } func file_sourcehub_tier_v1beta1_lockup_proto_init() { if File_sourcehub_tier_v1beta1_lockup_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_tier_v1beta1_lockup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Lockup); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_lockup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnlockingLockup); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_tier_v1beta1_lockup_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_tier_v1beta1_lockup_proto_goTypes, DependencyIndexes: file_sourcehub_tier_v1beta1_lockup_proto_depIdxs, MessageInfos: file_sourcehub_tier_v1beta1_lockup_proto_msgTypes, }.Build() File_sourcehub_tier_v1beta1_lockup_proto = out.File file_sourcehub_tier_v1beta1_lockup_proto_rawDesc = nil file_sourcehub_tier_v1beta1_lockup_proto_goTypes = nil file_sourcehub_tier_v1beta1_lockup_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/tier/v1beta1/params.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package tierv1beta1 import ( _ "cosmossdk.io/api/amino" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" io "io" reflect "reflect" sync "sync" ) var _ protoreflect.List = (*_Params_7_list)(nil) type _Params_7_list struct { list *[]*Rate } func (x *_Params_7_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_Params_7_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Params_7_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Rate) (*x.list)[i] = concreteValue } func (x *_Params_7_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Rate) *x.list = append(*x.list, concreteValue) } func (x *_Params_7_list) AppendMutable() protoreflect.Value { v := new(Rate) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Params_7_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_Params_7_list) NewElement() protoreflect.Value { v := new(Rate) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Params_7_list) IsValid() bool { return x.list != nil } var ( md_Params protoreflect.MessageDescriptor fd_Params_epoch_duration protoreflect.FieldDescriptor fd_Params_unlocking_epochs protoreflect.FieldDescriptor fd_Params_developer_pool_fee protoreflect.FieldDescriptor fd_Params_insurance_pool_fee protoreflect.FieldDescriptor fd_Params_insurance_pool_threshold protoreflect.FieldDescriptor fd_Params_process_rewards_interval protoreflect.FieldDescriptor fd_Params_reward_rates protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_params_proto_init() md_Params = File_sourcehub_tier_v1beta1_params_proto.Messages().ByName("Params") fd_Params_epoch_duration = md_Params.Fields().ByName("epoch_duration") fd_Params_unlocking_epochs = md_Params.Fields().ByName("unlocking_epochs") fd_Params_developer_pool_fee = md_Params.Fields().ByName("developer_pool_fee") fd_Params_insurance_pool_fee = md_Params.Fields().ByName("insurance_pool_fee") fd_Params_insurance_pool_threshold = md_Params.Fields().ByName("insurance_pool_threshold") fd_Params_process_rewards_interval = md_Params.Fields().ByName("process_rewards_interval") fd_Params_reward_rates = md_Params.Fields().ByName("reward_rates") } var _ protoreflect.Message = (*fastReflection_Params)(nil) type fastReflection_Params Params func (x *Params) ProtoReflect() protoreflect.Message { return (*fastReflection_Params)(x) } func (x *Params) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Params_messageType fastReflection_Params_messageType var _ protoreflect.MessageType = fastReflection_Params_messageType{} type fastReflection_Params_messageType struct{} func (x fastReflection_Params_messageType) Zero() protoreflect.Message { return (*fastReflection_Params)(nil) } func (x fastReflection_Params_messageType) New() protoreflect.Message { return new(fastReflection_Params) } func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Params) Type() protoreflect.MessageType { return _fastReflection_Params_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Params) New() protoreflect.Message { return new(fastReflection_Params) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { return (*Params)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.EpochDuration != nil { value := protoreflect.ValueOfMessage(x.EpochDuration.ProtoReflect()) if !f(fd_Params_epoch_duration, value) { return } } if x.UnlockingEpochs != int64(0) { value := protoreflect.ValueOfInt64(x.UnlockingEpochs) if !f(fd_Params_unlocking_epochs, value) { return } } if x.DeveloperPoolFee != int64(0) { value := protoreflect.ValueOfInt64(x.DeveloperPoolFee) if !f(fd_Params_developer_pool_fee, value) { return } } if x.InsurancePoolFee != int64(0) { value := protoreflect.ValueOfInt64(x.InsurancePoolFee) if !f(fd_Params_insurance_pool_fee, value) { return } } if x.InsurancePoolThreshold != int64(0) { value := protoreflect.ValueOfInt64(x.InsurancePoolThreshold) if !f(fd_Params_insurance_pool_threshold, value) { return } } if x.ProcessRewardsInterval != int64(0) { value := protoreflect.ValueOfInt64(x.ProcessRewardsInterval) if !f(fd_Params_process_rewards_interval, value) { return } } if len(x.RewardRates) != 0 { value := protoreflect.ValueOfList(&_Params_7_list{list: &x.RewardRates}) if !f(fd_Params_reward_rates, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.Params.epoch_duration": return x.EpochDuration != nil case "sourcehub.tier.v1beta1.Params.unlocking_epochs": return x.UnlockingEpochs != int64(0) case "sourcehub.tier.v1beta1.Params.developer_pool_fee": return x.DeveloperPoolFee != int64(0) case "sourcehub.tier.v1beta1.Params.insurance_pool_fee": return x.InsurancePoolFee != int64(0) case "sourcehub.tier.v1beta1.Params.insurance_pool_threshold": return x.InsurancePoolThreshold != int64(0) case "sourcehub.tier.v1beta1.Params.process_rewards_interval": return x.ProcessRewardsInterval != int64(0) case "sourcehub.tier.v1beta1.Params.reward_rates": return len(x.RewardRates) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Params")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Params does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Params.epoch_duration": x.EpochDuration = nil case "sourcehub.tier.v1beta1.Params.unlocking_epochs": x.UnlockingEpochs = int64(0) case "sourcehub.tier.v1beta1.Params.developer_pool_fee": x.DeveloperPoolFee = int64(0) case "sourcehub.tier.v1beta1.Params.insurance_pool_fee": x.InsurancePoolFee = int64(0) case "sourcehub.tier.v1beta1.Params.insurance_pool_threshold": x.InsurancePoolThreshold = int64(0) case "sourcehub.tier.v1beta1.Params.process_rewards_interval": x.ProcessRewardsInterval = int64(0) case "sourcehub.tier.v1beta1.Params.reward_rates": x.RewardRates = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Params")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Params does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.Params.epoch_duration": value := x.EpochDuration return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.tier.v1beta1.Params.unlocking_epochs": value := x.UnlockingEpochs return protoreflect.ValueOfInt64(value) case "sourcehub.tier.v1beta1.Params.developer_pool_fee": value := x.DeveloperPoolFee return protoreflect.ValueOfInt64(value) case "sourcehub.tier.v1beta1.Params.insurance_pool_fee": value := x.InsurancePoolFee return protoreflect.ValueOfInt64(value) case "sourcehub.tier.v1beta1.Params.insurance_pool_threshold": value := x.InsurancePoolThreshold return protoreflect.ValueOfInt64(value) case "sourcehub.tier.v1beta1.Params.process_rewards_interval": value := x.ProcessRewardsInterval return protoreflect.ValueOfInt64(value) case "sourcehub.tier.v1beta1.Params.reward_rates": if len(x.RewardRates) == 0 { return protoreflect.ValueOfList(&_Params_7_list{}) } listValue := &_Params_7_list{list: &x.RewardRates} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Params")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Params does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Params.epoch_duration": x.EpochDuration = value.Message().Interface().(*durationpb.Duration) case "sourcehub.tier.v1beta1.Params.unlocking_epochs": x.UnlockingEpochs = value.Int() case "sourcehub.tier.v1beta1.Params.developer_pool_fee": x.DeveloperPoolFee = value.Int() case "sourcehub.tier.v1beta1.Params.insurance_pool_fee": x.InsurancePoolFee = value.Int() case "sourcehub.tier.v1beta1.Params.insurance_pool_threshold": x.InsurancePoolThreshold = value.Int() case "sourcehub.tier.v1beta1.Params.process_rewards_interval": x.ProcessRewardsInterval = value.Int() case "sourcehub.tier.v1beta1.Params.reward_rates": lv := value.List() clv := lv.(*_Params_7_list) x.RewardRates = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Params")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Params does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Params.epoch_duration": if x.EpochDuration == nil { x.EpochDuration = new(durationpb.Duration) } return protoreflect.ValueOfMessage(x.EpochDuration.ProtoReflect()) case "sourcehub.tier.v1beta1.Params.reward_rates": if x.RewardRates == nil { x.RewardRates = []*Rate{} } value := &_Params_7_list{list: &x.RewardRates} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.Params.unlocking_epochs": panic(fmt.Errorf("field unlocking_epochs of message sourcehub.tier.v1beta1.Params is not mutable")) case "sourcehub.tier.v1beta1.Params.developer_pool_fee": panic(fmt.Errorf("field developer_pool_fee of message sourcehub.tier.v1beta1.Params is not mutable")) case "sourcehub.tier.v1beta1.Params.insurance_pool_fee": panic(fmt.Errorf("field insurance_pool_fee of message sourcehub.tier.v1beta1.Params is not mutable")) case "sourcehub.tier.v1beta1.Params.insurance_pool_threshold": panic(fmt.Errorf("field insurance_pool_threshold of message sourcehub.tier.v1beta1.Params is not mutable")) case "sourcehub.tier.v1beta1.Params.process_rewards_interval": panic(fmt.Errorf("field process_rewards_interval of message sourcehub.tier.v1beta1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Params")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Params does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Params.epoch_duration": m := new(durationpb.Duration) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.tier.v1beta1.Params.unlocking_epochs": return protoreflect.ValueOfInt64(int64(0)) case "sourcehub.tier.v1beta1.Params.developer_pool_fee": return protoreflect.ValueOfInt64(int64(0)) case "sourcehub.tier.v1beta1.Params.insurance_pool_fee": return protoreflect.ValueOfInt64(int64(0)) case "sourcehub.tier.v1beta1.Params.insurance_pool_threshold": return protoreflect.ValueOfInt64(int64(0)) case "sourcehub.tier.v1beta1.Params.process_rewards_interval": return protoreflect.ValueOfInt64(int64(0)) case "sourcehub.tier.v1beta1.Params.reward_rates": list := []*Rate{} return protoreflect.ValueOfList(&_Params_7_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Params")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Params does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.Params", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Params) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Params) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.EpochDuration != nil { l = options.Size(x.EpochDuration) n += 1 + l + runtime.Sov(uint64(l)) } if x.UnlockingEpochs != 0 { n += 1 + runtime.Sov(uint64(x.UnlockingEpochs)) } if x.DeveloperPoolFee != 0 { n += 1 + runtime.Sov(uint64(x.DeveloperPoolFee)) } if x.InsurancePoolFee != 0 { n += 1 + runtime.Sov(uint64(x.InsurancePoolFee)) } if x.InsurancePoolThreshold != 0 { n += 1 + runtime.Sov(uint64(x.InsurancePoolThreshold)) } if x.ProcessRewardsInterval != 0 { n += 1 + runtime.Sov(uint64(x.ProcessRewardsInterval)) } if len(x.RewardRates) > 0 { for _, e := range x.RewardRates { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.RewardRates) > 0 { for iNdEx := len(x.RewardRates) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.RewardRates[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a } } if x.ProcessRewardsInterval != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessRewardsInterval)) i-- dAtA[i] = 0x30 } if x.InsurancePoolThreshold != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.InsurancePoolThreshold)) i-- dAtA[i] = 0x28 } if x.InsurancePoolFee != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.InsurancePoolFee)) i-- dAtA[i] = 0x20 } if x.DeveloperPoolFee != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.DeveloperPoolFee)) i-- dAtA[i] = 0x18 } if x.UnlockingEpochs != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.UnlockingEpochs)) i-- dAtA[i] = 0x10 } if x.EpochDuration != nil { encoded, err := options.Marshal(x.EpochDuration) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.EpochDuration == nil { x.EpochDuration = &durationpb.Duration{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochDuration); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockingEpochs", wireType) } x.UnlockingEpochs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.UnlockingEpochs |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeveloperPoolFee", wireType) } x.DeveloperPoolFee = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.DeveloperPoolFee |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InsurancePoolFee", wireType) } x.InsurancePoolFee = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.InsurancePoolFee |= int64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InsurancePoolThreshold", wireType) } x.InsurancePoolThreshold = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.InsurancePoolThreshold |= int64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessRewardsInterval", wireType) } x.ProcessRewardsInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.ProcessRewardsInterval |= int64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardRates", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RewardRates = append(x.RewardRates, &Rate{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RewardRates[len(x.RewardRates)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Rate protoreflect.MessageDescriptor fd_Rate_amount protoreflect.FieldDescriptor fd_Rate_rate protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_params_proto_init() md_Rate = File_sourcehub_tier_v1beta1_params_proto.Messages().ByName("Rate") fd_Rate_amount = md_Rate.Fields().ByName("amount") fd_Rate_rate = md_Rate.Fields().ByName("rate") } var _ protoreflect.Message = (*fastReflection_Rate)(nil) type fastReflection_Rate Rate func (x *Rate) ProtoReflect() protoreflect.Message { return (*fastReflection_Rate)(x) } func (x *Rate) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_params_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Rate_messageType fastReflection_Rate_messageType var _ protoreflect.MessageType = fastReflection_Rate_messageType{} type fastReflection_Rate_messageType struct{} func (x fastReflection_Rate_messageType) Zero() protoreflect.Message { return (*fastReflection_Rate)(nil) } func (x fastReflection_Rate_messageType) New() protoreflect.Message { return new(fastReflection_Rate) } func (x fastReflection_Rate_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Rate } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Rate) Descriptor() protoreflect.MessageDescriptor { return md_Rate } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Rate) Type() protoreflect.MessageType { return _fastReflection_Rate_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Rate) New() protoreflect.Message { return new(fastReflection_Rate) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Rate) Interface() protoreflect.ProtoMessage { return (*Rate)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Rate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Amount != "" { value := protoreflect.ValueOfString(x.Amount) if !f(fd_Rate_amount, value) { return } } if x.Rate != int64(0) { value := protoreflect.ValueOfInt64(x.Rate) if !f(fd_Rate_rate, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Rate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.Rate.amount": return x.Amount != "" case "sourcehub.tier.v1beta1.Rate.rate": return x.Rate != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Rate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Rate does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Rate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Rate.amount": x.Amount = "" case "sourcehub.tier.v1beta1.Rate.rate": x.Rate = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Rate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Rate does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Rate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.Rate.amount": value := x.Amount return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.Rate.rate": value := x.Rate return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Rate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Rate does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Rate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Rate.amount": x.Amount = value.Interface().(string) case "sourcehub.tier.v1beta1.Rate.rate": x.Rate = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Rate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Rate does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Rate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Rate.amount": panic(fmt.Errorf("field amount of message sourcehub.tier.v1beta1.Rate is not mutable")) case "sourcehub.tier.v1beta1.Rate.rate": panic(fmt.Errorf("field rate of message sourcehub.tier.v1beta1.Rate is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Rate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Rate does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Rate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Rate.amount": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.Rate.rate": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Rate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Rate does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Rate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.Rate", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Rate) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Rate) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Rate) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Rate) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Rate) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Amount) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Rate != 0 { n += 1 + runtime.Sov(uint64(x.Rate)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Rate) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Rate != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Rate)) i-- dAtA[i] = 0x10 } if len(x.Amount) > 0 { i -= len(x.Amount) copy(dAtA[i:], x.Amount) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Rate) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Rate: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Rate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Amount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) } x.Rate = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Rate |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/tier/v1beta1/params.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Params defines the parameters for the module. type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields EpochDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=epoch_duration,json=epochDuration,proto3" json:"epoch_duration,omitempty"` UnlockingEpochs int64 `protobuf:"varint,2,opt,name=unlocking_epochs,json=unlockingEpochs,proto3" json:"unlocking_epochs,omitempty"` DeveloperPoolFee int64 `protobuf:"varint,3,opt,name=developer_pool_fee,json=developerPoolFee,proto3" json:"developer_pool_fee,omitempty"` InsurancePoolFee int64 `protobuf:"varint,4,opt,name=insurance_pool_fee,json=insurancePoolFee,proto3" json:"insurance_pool_fee,omitempty"` InsurancePoolThreshold int64 `protobuf:"varint,5,opt,name=insurance_pool_threshold,json=insurancePoolThreshold,proto3" json:"insurance_pool_threshold,omitempty"` ProcessRewardsInterval int64 `protobuf:"varint,6,opt,name=process_rewards_interval,json=processRewardsInterval,proto3" json:"process_rewards_interval,omitempty"` RewardRates []*Rate `protobuf:"bytes,7,rep,name=reward_rates,json=rewardRates,proto3" json:"reward_rates,omitempty"` } func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Params) String() string { return protoimpl.X.MessageStringOf(x) } func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_params_proto_rawDescGZIP(), []int{0} } func (x *Params) GetEpochDuration() *durationpb.Duration { if x != nil { return x.EpochDuration } return nil } func (x *Params) GetUnlockingEpochs() int64 { if x != nil { return x.UnlockingEpochs } return 0 } func (x *Params) GetDeveloperPoolFee() int64 { if x != nil { return x.DeveloperPoolFee } return 0 } func (x *Params) GetInsurancePoolFee() int64 { if x != nil { return x.InsurancePoolFee } return 0 } func (x *Params) GetInsurancePoolThreshold() int64 { if x != nil { return x.InsurancePoolThreshold } return 0 } func (x *Params) GetProcessRewardsInterval() int64 { if x != nil { return x.ProcessRewardsInterval } return 0 } func (x *Params) GetRewardRates() []*Rate { if x != nil { return x.RewardRates } return nil } // Rate defines the rate for a specific locked stake. type Rate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // amount of locked stake required for earning rewards at this rate. Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` Rate int64 `protobuf:"varint,2,opt,name=rate,proto3" json:"rate,omitempty"` } func (x *Rate) Reset() { *x = Rate{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_params_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Rate) String() string { return protoimpl.X.MessageStringOf(x) } func (*Rate) ProtoMessage() {} // Deprecated: Use Rate.ProtoReflect.Descriptor instead. func (*Rate) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_params_proto_rawDescGZIP(), []int{1} } func (x *Rate) GetAmount() string { if x != nil { return x.Amount } return "" } func (x *Rate) GetRate() int64 { if x != nil { return x.Rate } return 0 } var File_sourcehub_tier_v1beta1_params_proto protoreflect.FileDescriptor var file_sourcehub_tier_v1beta1_params_proto_rawDesc = []byte{ 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4a, 0x0a, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x1c, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5f, 0x0a, 0x04, 0x52, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x42, 0xd8, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x54, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_tier_v1beta1_params_proto_rawDescOnce sync.Once file_sourcehub_tier_v1beta1_params_proto_rawDescData = file_sourcehub_tier_v1beta1_params_proto_rawDesc ) func file_sourcehub_tier_v1beta1_params_proto_rawDescGZIP() []byte { file_sourcehub_tier_v1beta1_params_proto_rawDescOnce.Do(func() { file_sourcehub_tier_v1beta1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_tier_v1beta1_params_proto_rawDescData) }) return file_sourcehub_tier_v1beta1_params_proto_rawDescData } var file_sourcehub_tier_v1beta1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcehub_tier_v1beta1_params_proto_goTypes = []interface{}{ (*Params)(nil), // 0: sourcehub.tier.v1beta1.Params (*Rate)(nil), // 1: sourcehub.tier.v1beta1.Rate (*durationpb.Duration)(nil), // 2: google.protobuf.Duration } var file_sourcehub_tier_v1beta1_params_proto_depIdxs = []int32{ 2, // 0: sourcehub.tier.v1beta1.Params.epoch_duration:type_name -> google.protobuf.Duration 1, // 1: sourcehub.tier.v1beta1.Params.reward_rates:type_name -> sourcehub.tier.v1beta1.Rate 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcehub_tier_v1beta1_params_proto_init() } func file_sourcehub_tier_v1beta1_params_proto_init() { if File_sourcehub_tier_v1beta1_params_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_tier_v1beta1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Rate); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_tier_v1beta1_params_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_tier_v1beta1_params_proto_goTypes, DependencyIndexes: file_sourcehub_tier_v1beta1_params_proto_depIdxs, MessageInfos: file_sourcehub_tier_v1beta1_params_proto_msgTypes, }.Build() File_sourcehub_tier_v1beta1_params_proto = out.File file_sourcehub_tier_v1beta1_params_proto_rawDesc = nil file_sourcehub_tier_v1beta1_params_proto_goTypes = nil file_sourcehub_tier_v1beta1_params_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/tier/v1beta1/query.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package tierv1beta1 import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" sync "sync" ) var ( md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_QueryParamsRequest = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) type fastReflection_QueryParamsRequest QueryParamsRequest func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(x) } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} type fastReflection_QueryParamsRequest_messageType struct{} func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsRequest)(nil) } func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { return _fastReflection_QueryParamsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { return new(fastReflection_QueryParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { return (*QueryParamsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.QueryParamsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_QueryParamsResponse protoreflect.MessageDescriptor fd_QueryParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_QueryParamsResponse = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) type fastReflection_QueryParamsResponse QueryParamsResponse func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(x) } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} type fastReflection_QueryParamsResponse_messageType struct{} func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_QueryParamsResponse)(nil) } func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_QueryParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { return _fastReflection_QueryParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { return new(fastReflection_QueryParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { return (*QueryParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_QueryParamsResponse_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.QueryParamsResponse.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.QueryParamsResponse.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.QueryParamsResponse.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.QueryParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.QueryParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_QueryParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_LockupRequest protoreflect.MessageDescriptor fd_LockupRequest_delegator_address protoreflect.FieldDescriptor fd_LockupRequest_validator_address protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_LockupRequest = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("LockupRequest") fd_LockupRequest_delegator_address = md_LockupRequest.Fields().ByName("delegator_address") fd_LockupRequest_validator_address = md_LockupRequest.Fields().ByName("validator_address") } var _ protoreflect.Message = (*fastReflection_LockupRequest)(nil) type fastReflection_LockupRequest LockupRequest func (x *LockupRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_LockupRequest)(x) } func (x *LockupRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_LockupRequest_messageType fastReflection_LockupRequest_messageType var _ protoreflect.MessageType = fastReflection_LockupRequest_messageType{} type fastReflection_LockupRequest_messageType struct{} func (x fastReflection_LockupRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_LockupRequest)(nil) } func (x fastReflection_LockupRequest_messageType) New() protoreflect.Message { return new(fastReflection_LockupRequest) } func (x fastReflection_LockupRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_LockupRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_LockupRequest) Descriptor() protoreflect.MessageDescriptor { return md_LockupRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_LockupRequest) Type() protoreflect.MessageType { return _fastReflection_LockupRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_LockupRequest) New() protoreflect.Message { return new(fastReflection_LockupRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_LockupRequest) Interface() protoreflect.ProtoMessage { return (*LockupRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_LockupRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_LockupRequest_delegator_address, value) { return } } if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_LockupRequest_validator_address, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_LockupRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupRequest.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.LockupRequest.validator_address": return x.ValidatorAddress != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupRequest.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.LockupRequest.validator_address": x.ValidatorAddress = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_LockupRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.LockupRequest.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.LockupRequest.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupRequest.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.LockupRequest.validator_address": x.ValidatorAddress = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupRequest.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.LockupRequest is not mutable")) case "sourcehub.tier.v1beta1.LockupRequest.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.LockupRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_LockupRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupRequest.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.LockupRequest.validator_address": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_LockupRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.LockupRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_LockupRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_LockupRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_LockupRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*LockupRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*LockupRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*LockupRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_LockupResponse protoreflect.MessageDescriptor fd_LockupResponse_lockup protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_LockupResponse = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("LockupResponse") fd_LockupResponse_lockup = md_LockupResponse.Fields().ByName("lockup") } var _ protoreflect.Message = (*fastReflection_LockupResponse)(nil) type fastReflection_LockupResponse LockupResponse func (x *LockupResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_LockupResponse)(x) } func (x *LockupResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_LockupResponse_messageType fastReflection_LockupResponse_messageType var _ protoreflect.MessageType = fastReflection_LockupResponse_messageType{} type fastReflection_LockupResponse_messageType struct{} func (x fastReflection_LockupResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_LockupResponse)(nil) } func (x fastReflection_LockupResponse_messageType) New() protoreflect.Message { return new(fastReflection_LockupResponse) } func (x fastReflection_LockupResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_LockupResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_LockupResponse) Descriptor() protoreflect.MessageDescriptor { return md_LockupResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_LockupResponse) Type() protoreflect.MessageType { return _fastReflection_LockupResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_LockupResponse) New() protoreflect.Message { return new(fastReflection_LockupResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_LockupResponse) Interface() protoreflect.ProtoMessage { return (*LockupResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_LockupResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Lockup != nil { value := protoreflect.ValueOfMessage(x.Lockup.ProtoReflect()) if !f(fd_LockupResponse_lockup, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_LockupResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupResponse.lockup": return x.Lockup != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupResponse.lockup": x.Lockup = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_LockupResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.LockupResponse.lockup": value := x.Lockup return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupResponse.lockup": x.Lockup = value.Message().Interface().(*Lockup) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupResponse.lockup": if x.Lockup == nil { x.Lockup = new(Lockup) } return protoreflect.ValueOfMessage(x.Lockup.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_LockupResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupResponse.lockup": m := new(Lockup) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_LockupResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.LockupResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_LockupResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_LockupResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_LockupResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*LockupResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Lockup != nil { l = options.Size(x.Lockup) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*LockupResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Lockup != nil { encoded, err := options.Marshal(x.Lockup) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*LockupResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Lockup", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Lockup == nil { x.Lockup = &Lockup{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Lockup); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_LockupsRequest protoreflect.MessageDescriptor fd_LockupsRequest_delegator_address protoreflect.FieldDescriptor fd_LockupsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_LockupsRequest = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("LockupsRequest") fd_LockupsRequest_delegator_address = md_LockupsRequest.Fields().ByName("delegator_address") fd_LockupsRequest_pagination = md_LockupsRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_LockupsRequest)(nil) type fastReflection_LockupsRequest LockupsRequest func (x *LockupsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_LockupsRequest)(x) } func (x *LockupsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_LockupsRequest_messageType fastReflection_LockupsRequest_messageType var _ protoreflect.MessageType = fastReflection_LockupsRequest_messageType{} type fastReflection_LockupsRequest_messageType struct{} func (x fastReflection_LockupsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_LockupsRequest)(nil) } func (x fastReflection_LockupsRequest_messageType) New() protoreflect.Message { return new(fastReflection_LockupsRequest) } func (x fastReflection_LockupsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_LockupsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_LockupsRequest) Descriptor() protoreflect.MessageDescriptor { return md_LockupsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_LockupsRequest) Type() protoreflect.MessageType { return _fastReflection_LockupsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_LockupsRequest) New() protoreflect.Message { return new(fastReflection_LockupsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_LockupsRequest) Interface() protoreflect.ProtoMessage { return (*LockupsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_LockupsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_LockupsRequest_delegator_address, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_LockupsRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_LockupsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsRequest.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.LockupsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsRequest.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.LockupsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_LockupsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.LockupsRequest.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.LockupsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsRequest.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.LockupsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.tier.v1beta1.LockupsRequest.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.LockupsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_LockupsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsRequest.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.LockupsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_LockupsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.LockupsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_LockupsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_LockupsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_LockupsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*LockupsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*LockupsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*LockupsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_LockupsResponse_1_list)(nil) type _LockupsResponse_1_list struct { list *[]*Lockup } func (x *_LockupsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_LockupsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_LockupsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Lockup) (*x.list)[i] = concreteValue } func (x *_LockupsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Lockup) *x.list = append(*x.list, concreteValue) } func (x *_LockupsResponse_1_list) AppendMutable() protoreflect.Value { v := new(Lockup) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_LockupsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_LockupsResponse_1_list) NewElement() protoreflect.Value { v := new(Lockup) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_LockupsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_LockupsResponse protoreflect.MessageDescriptor fd_LockupsResponse_lockups protoreflect.FieldDescriptor fd_LockupsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_LockupsResponse = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("LockupsResponse") fd_LockupsResponse_lockups = md_LockupsResponse.Fields().ByName("lockups") fd_LockupsResponse_pagination = md_LockupsResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_LockupsResponse)(nil) type fastReflection_LockupsResponse LockupsResponse func (x *LockupsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_LockupsResponse)(x) } func (x *LockupsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_LockupsResponse_messageType fastReflection_LockupsResponse_messageType var _ protoreflect.MessageType = fastReflection_LockupsResponse_messageType{} type fastReflection_LockupsResponse_messageType struct{} func (x fastReflection_LockupsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_LockupsResponse)(nil) } func (x fastReflection_LockupsResponse_messageType) New() protoreflect.Message { return new(fastReflection_LockupsResponse) } func (x fastReflection_LockupsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_LockupsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_LockupsResponse) Descriptor() protoreflect.MessageDescriptor { return md_LockupsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_LockupsResponse) Type() protoreflect.MessageType { return _fastReflection_LockupsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_LockupsResponse) New() protoreflect.Message { return new(fastReflection_LockupsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_LockupsResponse) Interface() protoreflect.ProtoMessage { return (*LockupsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_LockupsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Lockups) != 0 { value := protoreflect.ValueOfList(&_LockupsResponse_1_list{list: &x.Lockups}) if !f(fd_LockupsResponse_lockups, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_LockupsResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_LockupsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsResponse.lockups": return len(x.Lockups) != 0 case "sourcehub.tier.v1beta1.LockupsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsResponse.lockups": x.Lockups = nil case "sourcehub.tier.v1beta1.LockupsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_LockupsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.LockupsResponse.lockups": if len(x.Lockups) == 0 { return protoreflect.ValueOfList(&_LockupsResponse_1_list{}) } listValue := &_LockupsResponse_1_list{list: &x.Lockups} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.LockupsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsResponse.lockups": lv := value.List() clv := lv.(*_LockupsResponse_1_list) x.Lockups = *clv.list case "sourcehub.tier.v1beta1.LockupsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsResponse.lockups": if x.Lockups == nil { x.Lockups = []*Lockup{} } value := &_LockupsResponse_1_list{list: &x.Lockups} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.LockupsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_LockupsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.LockupsResponse.lockups": list := []*Lockup{} return protoreflect.ValueOfList(&_LockupsResponse_1_list{list: &list}) case "sourcehub.tier.v1beta1.LockupsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.LockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.LockupsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_LockupsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.LockupsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_LockupsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LockupsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_LockupsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_LockupsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*LockupsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Lockups) > 0 { for _, e := range x.Lockups { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*LockupsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Lockups) > 0 { for iNdEx := len(x.Lockups) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Lockups[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*LockupsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LockupsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Lockups", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Lockups = append(x.Lockups, &Lockup{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Lockups[len(x.Lockups)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnlockingLockupRequest protoreflect.MessageDescriptor fd_UnlockingLockupRequest_delegator_address protoreflect.FieldDescriptor fd_UnlockingLockupRequest_validator_address protoreflect.FieldDescriptor fd_UnlockingLockupRequest_creation_height protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_UnlockingLockupRequest = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("UnlockingLockupRequest") fd_UnlockingLockupRequest_delegator_address = md_UnlockingLockupRequest.Fields().ByName("delegator_address") fd_UnlockingLockupRequest_validator_address = md_UnlockingLockupRequest.Fields().ByName("validator_address") fd_UnlockingLockupRequest_creation_height = md_UnlockingLockupRequest.Fields().ByName("creation_height") } var _ protoreflect.Message = (*fastReflection_UnlockingLockupRequest)(nil) type fastReflection_UnlockingLockupRequest UnlockingLockupRequest func (x *UnlockingLockupRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_UnlockingLockupRequest)(x) } func (x *UnlockingLockupRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnlockingLockupRequest_messageType fastReflection_UnlockingLockupRequest_messageType var _ protoreflect.MessageType = fastReflection_UnlockingLockupRequest_messageType{} type fastReflection_UnlockingLockupRequest_messageType struct{} func (x fastReflection_UnlockingLockupRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_UnlockingLockupRequest)(nil) } func (x fastReflection_UnlockingLockupRequest_messageType) New() protoreflect.Message { return new(fastReflection_UnlockingLockupRequest) } func (x fastReflection_UnlockingLockupRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnlockingLockupRequest) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnlockingLockupRequest) Type() protoreflect.MessageType { return _fastReflection_UnlockingLockupRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnlockingLockupRequest) New() protoreflect.Message { return new(fastReflection_UnlockingLockupRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnlockingLockupRequest) Interface() protoreflect.ProtoMessage { return (*UnlockingLockupRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnlockingLockupRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_UnlockingLockupRequest_delegator_address, value) { return } } if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_UnlockingLockupRequest_validator_address, value) { return } } if x.CreationHeight != int64(0) { value := protoreflect.ValueOfInt64(x.CreationHeight) if !f(fd_UnlockingLockupRequest_creation_height, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnlockingLockupRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupRequest.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.UnlockingLockupRequest.validator_address": return x.ValidatorAddress != "" case "sourcehub.tier.v1beta1.UnlockingLockupRequest.creation_height": return x.CreationHeight != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupRequest.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.UnlockingLockupRequest.validator_address": x.ValidatorAddress = "" case "sourcehub.tier.v1beta1.UnlockingLockupRequest.creation_height": x.CreationHeight = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnlockingLockupRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupRequest.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UnlockingLockupRequest.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UnlockingLockupRequest.creation_height": value := x.CreationHeight return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupRequest.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.UnlockingLockupRequest.validator_address": x.ValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.UnlockingLockupRequest.creation_height": x.CreationHeight = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupRequest.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.UnlockingLockupRequest is not mutable")) case "sourcehub.tier.v1beta1.UnlockingLockupRequest.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.UnlockingLockupRequest is not mutable")) case "sourcehub.tier.v1beta1.UnlockingLockupRequest.creation_height": panic(fmt.Errorf("field creation_height of message sourcehub.tier.v1beta1.UnlockingLockupRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnlockingLockupRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupRequest.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UnlockingLockupRequest.validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UnlockingLockupRequest.creation_height": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnlockingLockupRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UnlockingLockupRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnlockingLockupRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnlockingLockupRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnlockingLockupRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnlockingLockupRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationHeight != 0 { n += 1 + runtime.Sov(uint64(x.CreationHeight)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.CreationHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) i-- dAtA[i] = 0x18 } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } x.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnlockingLockupResponse protoreflect.MessageDescriptor fd_UnlockingLockupResponse_unlockingLockup protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_UnlockingLockupResponse = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("UnlockingLockupResponse") fd_UnlockingLockupResponse_unlockingLockup = md_UnlockingLockupResponse.Fields().ByName("unlockingLockup") } var _ protoreflect.Message = (*fastReflection_UnlockingLockupResponse)(nil) type fastReflection_UnlockingLockupResponse UnlockingLockupResponse func (x *UnlockingLockupResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_UnlockingLockupResponse)(x) } func (x *UnlockingLockupResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnlockingLockupResponse_messageType fastReflection_UnlockingLockupResponse_messageType var _ protoreflect.MessageType = fastReflection_UnlockingLockupResponse_messageType{} type fastReflection_UnlockingLockupResponse_messageType struct{} func (x fastReflection_UnlockingLockupResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_UnlockingLockupResponse)(nil) } func (x fastReflection_UnlockingLockupResponse_messageType) New() protoreflect.Message { return new(fastReflection_UnlockingLockupResponse) } func (x fastReflection_UnlockingLockupResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnlockingLockupResponse) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnlockingLockupResponse) Type() protoreflect.MessageType { return _fastReflection_UnlockingLockupResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnlockingLockupResponse) New() protoreflect.Message { return new(fastReflection_UnlockingLockupResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnlockingLockupResponse) Interface() protoreflect.ProtoMessage { return (*UnlockingLockupResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnlockingLockupResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.UnlockingLockup != nil { value := protoreflect.ValueOfMessage(x.UnlockingLockup.ProtoReflect()) if !f(fd_UnlockingLockupResponse_unlockingLockup, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnlockingLockupResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupResponse.unlockingLockup": return x.UnlockingLockup != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupResponse.unlockingLockup": x.UnlockingLockup = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnlockingLockupResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupResponse.unlockingLockup": value := x.UnlockingLockup return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupResponse.unlockingLockup": x.UnlockingLockup = value.Message().Interface().(*UnlockingLockup) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupResponse.unlockingLockup": if x.UnlockingLockup == nil { x.UnlockingLockup = new(UnlockingLockup) } return protoreflect.ValueOfMessage(x.UnlockingLockup.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnlockingLockupResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupResponse.unlockingLockup": m := new(UnlockingLockup) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnlockingLockupResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UnlockingLockupResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnlockingLockupResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnlockingLockupResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnlockingLockupResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnlockingLockupResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.UnlockingLockup != nil { l = options.Size(x.UnlockingLockup) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.UnlockingLockup != nil { encoded, err := options.Marshal(x.UnlockingLockup) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockingLockup", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.UnlockingLockup == nil { x.UnlockingLockup = &UnlockingLockup{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockingLockup); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnlockingLockupsRequest protoreflect.MessageDescriptor fd_UnlockingLockupsRequest_delegator_address protoreflect.FieldDescriptor fd_UnlockingLockupsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_UnlockingLockupsRequest = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("UnlockingLockupsRequest") fd_UnlockingLockupsRequest_delegator_address = md_UnlockingLockupsRequest.Fields().ByName("delegator_address") fd_UnlockingLockupsRequest_pagination = md_UnlockingLockupsRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_UnlockingLockupsRequest)(nil) type fastReflection_UnlockingLockupsRequest UnlockingLockupsRequest func (x *UnlockingLockupsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_UnlockingLockupsRequest)(x) } func (x *UnlockingLockupsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnlockingLockupsRequest_messageType fastReflection_UnlockingLockupsRequest_messageType var _ protoreflect.MessageType = fastReflection_UnlockingLockupsRequest_messageType{} type fastReflection_UnlockingLockupsRequest_messageType struct{} func (x fastReflection_UnlockingLockupsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_UnlockingLockupsRequest)(nil) } func (x fastReflection_UnlockingLockupsRequest_messageType) New() protoreflect.Message { return new(fastReflection_UnlockingLockupsRequest) } func (x fastReflection_UnlockingLockupsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnlockingLockupsRequest) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnlockingLockupsRequest) Type() protoreflect.MessageType { return _fastReflection_UnlockingLockupsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnlockingLockupsRequest) New() protoreflect.Message { return new(fastReflection_UnlockingLockupsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnlockingLockupsRequest) Interface() protoreflect.ProtoMessage { return (*UnlockingLockupsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnlockingLockupsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_UnlockingLockupsRequest_delegator_address, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_UnlockingLockupsRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnlockingLockupsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnlockingLockupsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.UnlockingLockupsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnlockingLockupsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UnlockingLockupsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnlockingLockupsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UnlockingLockupsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnlockingLockupsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnlockingLockupsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnlockingLockupsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnlockingLockupsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_UnlockingLockupsResponse_1_list)(nil) type _UnlockingLockupsResponse_1_list struct { list *[]*UnlockingLockup } func (x *_UnlockingLockupsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_UnlockingLockupsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_UnlockingLockupsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UnlockingLockup) (*x.list)[i] = concreteValue } func (x *_UnlockingLockupsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UnlockingLockup) *x.list = append(*x.list, concreteValue) } func (x *_UnlockingLockupsResponse_1_list) AppendMutable() protoreflect.Value { v := new(UnlockingLockup) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_UnlockingLockupsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_UnlockingLockupsResponse_1_list) NewElement() protoreflect.Value { v := new(UnlockingLockup) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_UnlockingLockupsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_UnlockingLockupsResponse protoreflect.MessageDescriptor fd_UnlockingLockupsResponse_unlockingLockups protoreflect.FieldDescriptor fd_UnlockingLockupsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_UnlockingLockupsResponse = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("UnlockingLockupsResponse") fd_UnlockingLockupsResponse_unlockingLockups = md_UnlockingLockupsResponse.Fields().ByName("unlockingLockups") fd_UnlockingLockupsResponse_pagination = md_UnlockingLockupsResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_UnlockingLockupsResponse)(nil) type fastReflection_UnlockingLockupsResponse UnlockingLockupsResponse func (x *UnlockingLockupsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_UnlockingLockupsResponse)(x) } func (x *UnlockingLockupsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnlockingLockupsResponse_messageType fastReflection_UnlockingLockupsResponse_messageType var _ protoreflect.MessageType = fastReflection_UnlockingLockupsResponse_messageType{} type fastReflection_UnlockingLockupsResponse_messageType struct{} func (x fastReflection_UnlockingLockupsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_UnlockingLockupsResponse)(nil) } func (x fastReflection_UnlockingLockupsResponse_messageType) New() protoreflect.Message { return new(fastReflection_UnlockingLockupsResponse) } func (x fastReflection_UnlockingLockupsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnlockingLockupsResponse) Descriptor() protoreflect.MessageDescriptor { return md_UnlockingLockupsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnlockingLockupsResponse) Type() protoreflect.MessageType { return _fastReflection_UnlockingLockupsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnlockingLockupsResponse) New() protoreflect.Message { return new(fastReflection_UnlockingLockupsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnlockingLockupsResponse) Interface() protoreflect.ProtoMessage { return (*UnlockingLockupsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnlockingLockupsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.UnlockingLockups) != 0 { value := protoreflect.ValueOfList(&_UnlockingLockupsResponse_1_list{list: &x.UnlockingLockups}) if !f(fd_UnlockingLockupsResponse_unlockingLockups, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_UnlockingLockupsResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnlockingLockupsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.unlockingLockups": return len(x.UnlockingLockups) != 0 case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.unlockingLockups": x.UnlockingLockups = nil case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnlockingLockupsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.unlockingLockups": if len(x.UnlockingLockups) == 0 { return protoreflect.ValueOfList(&_UnlockingLockupsResponse_1_list{}) } listValue := &_UnlockingLockupsResponse_1_list{list: &x.UnlockingLockups} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.unlockingLockups": lv := value.List() clv := lv.(*_UnlockingLockupsResponse_1_list) x.UnlockingLockups = *clv.list case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.unlockingLockups": if x.UnlockingLockups == nil { x.UnlockingLockups = []*UnlockingLockup{} } value := &_UnlockingLockupsResponse_1_list{list: &x.UnlockingLockups} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnlockingLockupsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.unlockingLockups": list := []*UnlockingLockup{} return protoreflect.ValueOfList(&_UnlockingLockupsResponse_1_list{list: &list}) case "sourcehub.tier.v1beta1.UnlockingLockupsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UnlockingLockupsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UnlockingLockupsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnlockingLockupsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UnlockingLockupsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnlockingLockupsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnlockingLockupsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnlockingLockupsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnlockingLockupsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnlockingLockupsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.UnlockingLockups) > 0 { for _, e := range x.UnlockingLockups { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.UnlockingLockups) > 0 { for iNdEx := len(x.UnlockingLockups) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.UnlockingLockups[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnlockingLockupsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnlockingLockupsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockingLockups", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UnlockingLockups = append(x.UnlockingLockups, &UnlockingLockup{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockingLockups[len(x.UnlockingLockups)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DevelopersRequest protoreflect.MessageDescriptor fd_DevelopersRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_DevelopersRequest = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("DevelopersRequest") fd_DevelopersRequest_pagination = md_DevelopersRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_DevelopersRequest)(nil) type fastReflection_DevelopersRequest DevelopersRequest func (x *DevelopersRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_DevelopersRequest)(x) } func (x *DevelopersRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DevelopersRequest_messageType fastReflection_DevelopersRequest_messageType var _ protoreflect.MessageType = fastReflection_DevelopersRequest_messageType{} type fastReflection_DevelopersRequest_messageType struct{} func (x fastReflection_DevelopersRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_DevelopersRequest)(nil) } func (x fastReflection_DevelopersRequest_messageType) New() protoreflect.Message { return new(fastReflection_DevelopersRequest) } func (x fastReflection_DevelopersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DevelopersRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DevelopersRequest) Descriptor() protoreflect.MessageDescriptor { return md_DevelopersRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DevelopersRequest) Type() protoreflect.MessageType { return _fastReflection_DevelopersRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DevelopersRequest) New() protoreflect.Message { return new(fastReflection_DevelopersRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DevelopersRequest) Interface() protoreflect.ProtoMessage { return (*DevelopersRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DevelopersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_DevelopersRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DevelopersRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DevelopersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.DevelopersRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DevelopersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DevelopersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.DevelopersRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DevelopersRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DevelopersRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DevelopersRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DevelopersRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DevelopersRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DevelopersRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DevelopersRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DevelopersRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_DevelopersResponse_1_list)(nil) type _DevelopersResponse_1_list struct { list *[]*Developer } func (x *_DevelopersResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_DevelopersResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_DevelopersResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Developer) (*x.list)[i] = concreteValue } func (x *_DevelopersResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Developer) *x.list = append(*x.list, concreteValue) } func (x *_DevelopersResponse_1_list) AppendMutable() protoreflect.Value { v := new(Developer) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_DevelopersResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_DevelopersResponse_1_list) NewElement() protoreflect.Value { v := new(Developer) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_DevelopersResponse_1_list) IsValid() bool { return x.list != nil } var ( md_DevelopersResponse protoreflect.MessageDescriptor fd_DevelopersResponse_developers protoreflect.FieldDescriptor fd_DevelopersResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_DevelopersResponse = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("DevelopersResponse") fd_DevelopersResponse_developers = md_DevelopersResponse.Fields().ByName("developers") fd_DevelopersResponse_pagination = md_DevelopersResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_DevelopersResponse)(nil) type fastReflection_DevelopersResponse DevelopersResponse func (x *DevelopersResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_DevelopersResponse)(x) } func (x *DevelopersResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DevelopersResponse_messageType fastReflection_DevelopersResponse_messageType var _ protoreflect.MessageType = fastReflection_DevelopersResponse_messageType{} type fastReflection_DevelopersResponse_messageType struct{} func (x fastReflection_DevelopersResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_DevelopersResponse)(nil) } func (x fastReflection_DevelopersResponse_messageType) New() protoreflect.Message { return new(fastReflection_DevelopersResponse) } func (x fastReflection_DevelopersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DevelopersResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DevelopersResponse) Descriptor() protoreflect.MessageDescriptor { return md_DevelopersResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DevelopersResponse) Type() protoreflect.MessageType { return _fastReflection_DevelopersResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DevelopersResponse) New() protoreflect.Message { return new(fastReflection_DevelopersResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DevelopersResponse) Interface() protoreflect.ProtoMessage { return (*DevelopersResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DevelopersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Developers) != 0 { value := protoreflect.ValueOfList(&_DevelopersResponse_1_list{list: &x.Developers}) if !f(fd_DevelopersResponse_developers, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_DevelopersResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DevelopersResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersResponse.developers": return len(x.Developers) != 0 case "sourcehub.tier.v1beta1.DevelopersResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersResponse.developers": x.Developers = nil case "sourcehub.tier.v1beta1.DevelopersResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DevelopersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.DevelopersResponse.developers": if len(x.Developers) == 0 { return protoreflect.ValueOfList(&_DevelopersResponse_1_list{}) } listValue := &_DevelopersResponse_1_list{list: &x.Developers} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.DevelopersResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersResponse.developers": lv := value.List() clv := lv.(*_DevelopersResponse_1_list) x.Developers = *clv.list case "sourcehub.tier.v1beta1.DevelopersResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersResponse.developers": if x.Developers == nil { x.Developers = []*Developer{} } value := &_DevelopersResponse_1_list{list: &x.Developers} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.DevelopersResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DevelopersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.DevelopersResponse.developers": list := []*Developer{} return protoreflect.ValueOfList(&_DevelopersResponse_1_list{list: &list}) case "sourcehub.tier.v1beta1.DevelopersResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.DevelopersResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.DevelopersResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DevelopersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.DevelopersResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DevelopersResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DevelopersResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DevelopersResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DevelopersResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DevelopersResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Developers) > 0 { for _, e := range x.Developers { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DevelopersResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Developers) > 0 { for iNdEx := len(x.Developers) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Developers[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DevelopersResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DevelopersResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DevelopersResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developers", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developers = append(x.Developers, &Developer{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Developers[len(x.Developers)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UserSubscriptionsRequest protoreflect.MessageDescriptor fd_UserSubscriptionsRequest_developer protoreflect.FieldDescriptor fd_UserSubscriptionsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_UserSubscriptionsRequest = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("UserSubscriptionsRequest") fd_UserSubscriptionsRequest_developer = md_UserSubscriptionsRequest.Fields().ByName("developer") fd_UserSubscriptionsRequest_pagination = md_UserSubscriptionsRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_UserSubscriptionsRequest)(nil) type fastReflection_UserSubscriptionsRequest UserSubscriptionsRequest func (x *UserSubscriptionsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_UserSubscriptionsRequest)(x) } func (x *UserSubscriptionsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UserSubscriptionsRequest_messageType fastReflection_UserSubscriptionsRequest_messageType var _ protoreflect.MessageType = fastReflection_UserSubscriptionsRequest_messageType{} type fastReflection_UserSubscriptionsRequest_messageType struct{} func (x fastReflection_UserSubscriptionsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_UserSubscriptionsRequest)(nil) } func (x fastReflection_UserSubscriptionsRequest_messageType) New() protoreflect.Message { return new(fastReflection_UserSubscriptionsRequest) } func (x fastReflection_UserSubscriptionsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UserSubscriptionsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UserSubscriptionsRequest) Descriptor() protoreflect.MessageDescriptor { return md_UserSubscriptionsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UserSubscriptionsRequest) Type() protoreflect.MessageType { return _fastReflection_UserSubscriptionsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UserSubscriptionsRequest) New() protoreflect.Message { return new(fastReflection_UserSubscriptionsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UserSubscriptionsRequest) Interface() protoreflect.ProtoMessage { return (*UserSubscriptionsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UserSubscriptionsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_UserSubscriptionsRequest_developer, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_UserSubscriptionsRequest_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UserSubscriptionsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.developer": x.Developer = "" case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UserSubscriptionsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.UserSubscriptionsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UserSubscriptionsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UserSubscriptionsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsRequest")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UserSubscriptionsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UserSubscriptionsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UserSubscriptionsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UserSubscriptionsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UserSubscriptionsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UserSubscriptionsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UserSubscriptionsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UserSubscriptionsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserSubscriptionsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserSubscriptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_UserSubscriptionsResponse_1_list)(nil) type _UserSubscriptionsResponse_1_list struct { list *[]*UserSubscription } func (x *_UserSubscriptionsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_UserSubscriptionsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_UserSubscriptionsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UserSubscription) (*x.list)[i] = concreteValue } func (x *_UserSubscriptionsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*UserSubscription) *x.list = append(*x.list, concreteValue) } func (x *_UserSubscriptionsResponse_1_list) AppendMutable() protoreflect.Value { v := new(UserSubscription) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_UserSubscriptionsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_UserSubscriptionsResponse_1_list) NewElement() protoreflect.Value { v := new(UserSubscription) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_UserSubscriptionsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_UserSubscriptionsResponse protoreflect.MessageDescriptor fd_UserSubscriptionsResponse_user_subscriptions protoreflect.FieldDescriptor fd_UserSubscriptionsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_query_proto_init() md_UserSubscriptionsResponse = File_sourcehub_tier_v1beta1_query_proto.Messages().ByName("UserSubscriptionsResponse") fd_UserSubscriptionsResponse_user_subscriptions = md_UserSubscriptionsResponse.Fields().ByName("user_subscriptions") fd_UserSubscriptionsResponse_pagination = md_UserSubscriptionsResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_UserSubscriptionsResponse)(nil) type fastReflection_UserSubscriptionsResponse UserSubscriptionsResponse func (x *UserSubscriptionsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_UserSubscriptionsResponse)(x) } func (x *UserSubscriptionsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UserSubscriptionsResponse_messageType fastReflection_UserSubscriptionsResponse_messageType var _ protoreflect.MessageType = fastReflection_UserSubscriptionsResponse_messageType{} type fastReflection_UserSubscriptionsResponse_messageType struct{} func (x fastReflection_UserSubscriptionsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_UserSubscriptionsResponse)(nil) } func (x fastReflection_UserSubscriptionsResponse_messageType) New() protoreflect.Message { return new(fastReflection_UserSubscriptionsResponse) } func (x fastReflection_UserSubscriptionsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UserSubscriptionsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UserSubscriptionsResponse) Descriptor() protoreflect.MessageDescriptor { return md_UserSubscriptionsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UserSubscriptionsResponse) Type() protoreflect.MessageType { return _fastReflection_UserSubscriptionsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UserSubscriptionsResponse) New() protoreflect.Message { return new(fastReflection_UserSubscriptionsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UserSubscriptionsResponse) Interface() protoreflect.ProtoMessage { return (*UserSubscriptionsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UserSubscriptionsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.UserSubscriptions) != 0 { value := protoreflect.ValueOfList(&_UserSubscriptionsResponse_1_list{list: &x.UserSubscriptions}) if !f(fd_UserSubscriptionsResponse_user_subscriptions, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) if !f(fd_UserSubscriptionsResponse_pagination, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UserSubscriptionsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.user_subscriptions": return len(x.UserSubscriptions) != 0 case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.user_subscriptions": x.UserSubscriptions = nil case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UserSubscriptionsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.user_subscriptions": if len(x.UserSubscriptions) == 0 { return protoreflect.ValueOfList(&_UserSubscriptionsResponse_1_list{}) } listValue := &_UserSubscriptionsResponse_1_list{list: &x.UserSubscriptions} return protoreflect.ValueOfList(listValue) case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.user_subscriptions": lv := value.List() clv := lv.(*_UserSubscriptionsResponse_1_list) x.UserSubscriptions = *clv.list case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.user_subscriptions": if x.UserSubscriptions == nil { x.UserSubscriptions = []*UserSubscription{} } value := &_UserSubscriptionsResponse_1_list{list: &x.UserSubscriptions} return protoreflect.ValueOfList(value) case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UserSubscriptionsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.user_subscriptions": list := []*UserSubscription{} return protoreflect.ValueOfList(&_UserSubscriptionsResponse_1_list{list: &list}) case "sourcehub.tier.v1beta1.UserSubscriptionsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscriptionsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscriptionsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UserSubscriptionsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UserSubscriptionsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UserSubscriptionsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscriptionsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UserSubscriptionsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UserSubscriptionsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UserSubscriptionsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.UserSubscriptions) > 0 { for _, e := range x.UserSubscriptions { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Pagination != nil { l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UserSubscriptionsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.UserSubscriptions) > 0 { for iNdEx := len(x.UserSubscriptions) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.UserSubscriptions[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UserSubscriptionsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserSubscriptionsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserSubscriptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserSubscriptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UserSubscriptions = append(x.UserSubscriptions, &UserSubscription{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserSubscriptions[len(x.UserSubscriptions)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Pagination == nil { x.Pagination = &v1beta1.PageResponse{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/tier/v1beta1/query.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{0} } // QueryParamsResponse is response type for the Query/Params RPC method. type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // params holds all the parameters of this module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{1} } func (x *QueryParamsResponse) GetParams() *Params { if x != nil { return x.Params } return nil } // LockupRequest is the request type for the Query/Lockup RPC method. type LockupRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } func (x *LockupRequest) Reset() { *x = LockupRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *LockupRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*LockupRequest) ProtoMessage() {} // Deprecated: Use LockupRequest.ProtoReflect.Descriptor instead. func (*LockupRequest) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{2} } func (x *LockupRequest) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *LockupRequest) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } // LockupResponse is the response type for the Query/Lockup RPC method. type LockupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Lockup *Lockup `protobuf:"bytes,1,opt,name=lockup,proto3" json:"lockup,omitempty"` } func (x *LockupResponse) Reset() { *x = LockupResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *LockupResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*LockupResponse) ProtoMessage() {} // Deprecated: Use LockupResponse.ProtoReflect.Descriptor instead. func (*LockupResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{3} } func (x *LockupResponse) GetLockup() *Lockup { if x != nil { return x.Lockup } return nil } // LockupsRequest is the request type for the Query/Lockups RPC method. type LockupsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *LockupsRequest) Reset() { *x = LockupsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *LockupsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*LockupsRequest) ProtoMessage() {} // Deprecated: Use LockupsRequest.ProtoReflect.Descriptor instead. func (*LockupsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{4} } func (x *LockupsRequest) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *LockupsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // LockupsResponse is the response type for the Query/Lockups RPC method. type LockupsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Lockups []*Lockup `protobuf:"bytes,1,rep,name=lockups,proto3" json:"lockups,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *LockupsResponse) Reset() { *x = LockupsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *LockupsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*LockupsResponse) ProtoMessage() {} // Deprecated: Use LockupsResponse.ProtoReflect.Descriptor instead. func (*LockupsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{5} } func (x *LockupsResponse) GetLockups() []*Lockup { if x != nil { return x.Lockups } return nil } func (x *LockupsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } // UnlockingLockupRequest is the request type for the Query/UnlockingLockup RPC method. type UnlockingLockupRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` CreationHeight int64 `protobuf:"varint,3,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` } func (x *UnlockingLockupRequest) Reset() { *x = UnlockingLockupRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnlockingLockupRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnlockingLockupRequest) ProtoMessage() {} // Deprecated: Use UnlockingLockupRequest.ProtoReflect.Descriptor instead. func (*UnlockingLockupRequest) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{6} } func (x *UnlockingLockupRequest) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *UnlockingLockupRequest) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } func (x *UnlockingLockupRequest) GetCreationHeight() int64 { if x != nil { return x.CreationHeight } return 0 } // UnlockingLockupResponse is the response type for the Query/UnlockingLockup RPC method. type UnlockingLockupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields UnlockingLockup *UnlockingLockup `protobuf:"bytes,1,opt,name=unlockingLockup,proto3" json:"unlockingLockup,omitempty"` } func (x *UnlockingLockupResponse) Reset() { *x = UnlockingLockupResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnlockingLockupResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnlockingLockupResponse) ProtoMessage() {} // Deprecated: Use UnlockingLockupResponse.ProtoReflect.Descriptor instead. func (*UnlockingLockupResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{7} } func (x *UnlockingLockupResponse) GetUnlockingLockup() *UnlockingLockup { if x != nil { return x.UnlockingLockup } return nil } // UnlockingLockupsRequest is the request type for the Query/UnlockingLockups RPC method. type UnlockingLockupsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *UnlockingLockupsRequest) Reset() { *x = UnlockingLockupsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnlockingLockupsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnlockingLockupsRequest) ProtoMessage() {} // Deprecated: Use UnlockingLockupsRequest.ProtoReflect.Descriptor instead. func (*UnlockingLockupsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{8} } func (x *UnlockingLockupsRequest) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *UnlockingLockupsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // UnlockingLockupsResponse is the response type for the Query/UnlockingLockups RPC method. type UnlockingLockupsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields UnlockingLockups []*UnlockingLockup `protobuf:"bytes,1,rep,name=unlockingLockups,proto3" json:"unlockingLockups,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *UnlockingLockupsResponse) Reset() { *x = UnlockingLockupsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnlockingLockupsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnlockingLockupsResponse) ProtoMessage() {} // Deprecated: Use UnlockingLockupsResponse.ProtoReflect.Descriptor instead. func (*UnlockingLockupsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{9} } func (x *UnlockingLockupsResponse) GetUnlockingLockups() []*UnlockingLockup { if x != nil { return x.UnlockingLockups } return nil } func (x *UnlockingLockupsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } // DevelopersRequest is the request type for the Query/Developers RPC method. type DevelopersRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *DevelopersRequest) Reset() { *x = DevelopersRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DevelopersRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DevelopersRequest) ProtoMessage() {} // Deprecated: Use DevelopersRequest.ProtoReflect.Descriptor instead. func (*DevelopersRequest) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{10} } func (x *DevelopersRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // DevelopersResponse is the response type for the Query/Developers RPC method. type DevelopersResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Developers []*Developer `protobuf:"bytes,1,rep,name=developers,proto3" json:"developers,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *DevelopersResponse) Reset() { *x = DevelopersResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DevelopersResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DevelopersResponse) ProtoMessage() {} // Deprecated: Use DevelopersResponse.ProtoReflect.Descriptor instead. func (*DevelopersResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{11} } func (x *DevelopersResponse) GetDevelopers() []*Developer { if x != nil { return x.Developers } return nil } func (x *DevelopersResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } // UserSubscriptionsRequest is the request type for the Query/UserSubscriptions RPC method. type UserSubscriptionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *UserSubscriptionsRequest) Reset() { *x = UserSubscriptionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UserSubscriptionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*UserSubscriptionsRequest) ProtoMessage() {} // Deprecated: Use UserSubscriptionsRequest.ProtoReflect.Descriptor instead. func (*UserSubscriptionsRequest) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{12} } func (x *UserSubscriptionsRequest) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *UserSubscriptionsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } // UserSubscriptionsResponse is the response type for the Query/UserSubscriptions RPC method. type UserSubscriptionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields UserSubscriptions []*UserSubscription `protobuf:"bytes,1,rep,name=user_subscriptions,json=userSubscriptions,proto3" json:"user_subscriptions,omitempty"` Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (x *UserSubscriptionsResponse) Reset() { *x = UserSubscriptionsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UserSubscriptionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*UserSubscriptionsResponse) ProtoMessage() {} // Deprecated: Use UserSubscriptionsResponse.ProtoReflect.Descriptor instead. func (*UserSubscriptionsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP(), []int{13} } func (x *UserSubscriptionsResponse) GetUserSubscriptions() []*UserSubscription { if x != nil { return x.UserSubscriptions } return nil } func (x *UserSubscriptionsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } return nil } var File_sourcehub_tier_v1beta1_query_proto protoreflect.FileDescriptor var file_sourcehub_tier_v1beta1_query_proto_rawDesc = []byte{ 0x0a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x69, 0x0a, 0x0d, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4e, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x0f, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x72, 0x0a, 0x17, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x8e, 0x01, 0x0a, 0x17, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x10, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc3, 0x01, 0x0a, 0x19, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xaf, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x89, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa7, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x07, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xd7, 0x01, 0x0a, 0x0f, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x12, 0x5b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x7d, 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x54, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_tier_v1beta1_query_proto_rawDescOnce sync.Once file_sourcehub_tier_v1beta1_query_proto_rawDescData = file_sourcehub_tier_v1beta1_query_proto_rawDesc ) func file_sourcehub_tier_v1beta1_query_proto_rawDescGZIP() []byte { file_sourcehub_tier_v1beta1_query_proto_rawDescOnce.Do(func() { file_sourcehub_tier_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_tier_v1beta1_query_proto_rawDescData) }) return file_sourcehub_tier_v1beta1_query_proto_rawDescData } var file_sourcehub_tier_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_sourcehub_tier_v1beta1_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: sourcehub.tier.v1beta1.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: sourcehub.tier.v1beta1.QueryParamsResponse (*LockupRequest)(nil), // 2: sourcehub.tier.v1beta1.LockupRequest (*LockupResponse)(nil), // 3: sourcehub.tier.v1beta1.LockupResponse (*LockupsRequest)(nil), // 4: sourcehub.tier.v1beta1.LockupsRequest (*LockupsResponse)(nil), // 5: sourcehub.tier.v1beta1.LockupsResponse (*UnlockingLockupRequest)(nil), // 6: sourcehub.tier.v1beta1.UnlockingLockupRequest (*UnlockingLockupResponse)(nil), // 7: sourcehub.tier.v1beta1.UnlockingLockupResponse (*UnlockingLockupsRequest)(nil), // 8: sourcehub.tier.v1beta1.UnlockingLockupsRequest (*UnlockingLockupsResponse)(nil), // 9: sourcehub.tier.v1beta1.UnlockingLockupsResponse (*DevelopersRequest)(nil), // 10: sourcehub.tier.v1beta1.DevelopersRequest (*DevelopersResponse)(nil), // 11: sourcehub.tier.v1beta1.DevelopersResponse (*UserSubscriptionsRequest)(nil), // 12: sourcehub.tier.v1beta1.UserSubscriptionsRequest (*UserSubscriptionsResponse)(nil), // 13: sourcehub.tier.v1beta1.UserSubscriptionsResponse (*Params)(nil), // 14: sourcehub.tier.v1beta1.Params (*Lockup)(nil), // 15: sourcehub.tier.v1beta1.Lockup (*v1beta1.PageRequest)(nil), // 16: cosmos.base.query.v1beta1.PageRequest (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse (*UnlockingLockup)(nil), // 18: sourcehub.tier.v1beta1.UnlockingLockup (*Developer)(nil), // 19: sourcehub.tier.v1beta1.Developer (*UserSubscription)(nil), // 20: sourcehub.tier.v1beta1.UserSubscription } var file_sourcehub_tier_v1beta1_query_proto_depIdxs = []int32{ 14, // 0: sourcehub.tier.v1beta1.QueryParamsResponse.params:type_name -> sourcehub.tier.v1beta1.Params 15, // 1: sourcehub.tier.v1beta1.LockupResponse.lockup:type_name -> sourcehub.tier.v1beta1.Lockup 16, // 2: sourcehub.tier.v1beta1.LockupsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 15, // 3: sourcehub.tier.v1beta1.LockupsResponse.lockups:type_name -> sourcehub.tier.v1beta1.Lockup 17, // 4: sourcehub.tier.v1beta1.LockupsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 18, // 5: sourcehub.tier.v1beta1.UnlockingLockupResponse.unlockingLockup:type_name -> sourcehub.tier.v1beta1.UnlockingLockup 16, // 6: sourcehub.tier.v1beta1.UnlockingLockupsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 18, // 7: sourcehub.tier.v1beta1.UnlockingLockupsResponse.unlockingLockups:type_name -> sourcehub.tier.v1beta1.UnlockingLockup 17, // 8: sourcehub.tier.v1beta1.UnlockingLockupsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 16, // 9: sourcehub.tier.v1beta1.DevelopersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 19, // 10: sourcehub.tier.v1beta1.DevelopersResponse.developers:type_name -> sourcehub.tier.v1beta1.Developer 17, // 11: sourcehub.tier.v1beta1.DevelopersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 16, // 12: sourcehub.tier.v1beta1.UserSubscriptionsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 20, // 13: sourcehub.tier.v1beta1.UserSubscriptionsResponse.user_subscriptions:type_name -> sourcehub.tier.v1beta1.UserSubscription 17, // 14: sourcehub.tier.v1beta1.UserSubscriptionsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 0, // 15: sourcehub.tier.v1beta1.Query.Params:input_type -> sourcehub.tier.v1beta1.QueryParamsRequest 2, // 16: sourcehub.tier.v1beta1.Query.Lockup:input_type -> sourcehub.tier.v1beta1.LockupRequest 4, // 17: sourcehub.tier.v1beta1.Query.Lockups:input_type -> sourcehub.tier.v1beta1.LockupsRequest 6, // 18: sourcehub.tier.v1beta1.Query.UnlockingLockup:input_type -> sourcehub.tier.v1beta1.UnlockingLockupRequest 8, // 19: sourcehub.tier.v1beta1.Query.UnlockingLockups:input_type -> sourcehub.tier.v1beta1.UnlockingLockupsRequest 10, // 20: sourcehub.tier.v1beta1.Query.Developers:input_type -> sourcehub.tier.v1beta1.DevelopersRequest 12, // 21: sourcehub.tier.v1beta1.Query.UserSubscriptions:input_type -> sourcehub.tier.v1beta1.UserSubscriptionsRequest 1, // 22: sourcehub.tier.v1beta1.Query.Params:output_type -> sourcehub.tier.v1beta1.QueryParamsResponse 3, // 23: sourcehub.tier.v1beta1.Query.Lockup:output_type -> sourcehub.tier.v1beta1.LockupResponse 5, // 24: sourcehub.tier.v1beta1.Query.Lockups:output_type -> sourcehub.tier.v1beta1.LockupsResponse 7, // 25: sourcehub.tier.v1beta1.Query.UnlockingLockup:output_type -> sourcehub.tier.v1beta1.UnlockingLockupResponse 9, // 26: sourcehub.tier.v1beta1.Query.UnlockingLockups:output_type -> sourcehub.tier.v1beta1.UnlockingLockupsResponse 11, // 27: sourcehub.tier.v1beta1.Query.Developers:output_type -> sourcehub.tier.v1beta1.DevelopersResponse 13, // 28: sourcehub.tier.v1beta1.Query.UserSubscriptions:output_type -> sourcehub.tier.v1beta1.UserSubscriptionsResponse 22, // [22:29] is the sub-list for method output_type 15, // [15:22] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name 15, // [15:15] is the sub-list for extension extendee 0, // [0:15] is the sub-list for field type_name } func init() { file_sourcehub_tier_v1beta1_query_proto_init() } func file_sourcehub_tier_v1beta1_query_proto_init() { if File_sourcehub_tier_v1beta1_query_proto != nil { return } file_sourcehub_tier_v1beta1_lockup_proto_init() file_sourcehub_tier_v1beta1_params_proto_init() file_sourcehub_tier_v1beta1_subscription_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_tier_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LockupRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LockupResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LockupsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LockupsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnlockingLockupRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnlockingLockupResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnlockingLockupsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnlockingLockupsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DevelopersRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DevelopersResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserSubscriptionsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserSubscriptionsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_tier_v1beta1_query_proto_rawDesc, NumEnums: 0, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_tier_v1beta1_query_proto_goTypes, DependencyIndexes: file_sourcehub_tier_v1beta1_query_proto_depIdxs, MessageInfos: file_sourcehub_tier_v1beta1_query_proto_msgTypes, }.Build() File_sourcehub_tier_v1beta1_query_proto = out.File file_sourcehub_tier_v1beta1_query_proto_rawDesc = nil file_sourcehub_tier_v1beta1_query_proto_goTypes = nil file_sourcehub_tier_v1beta1_query_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/tier/v1beta1/query_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/tier/v1beta1/query.proto package tierv1beta1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Query_Params_FullMethodName = "/sourcehub.tier.v1beta1.Query/Params" Query_Lockup_FullMethodName = "/sourcehub.tier.v1beta1.Query/Lockup" Query_Lockups_FullMethodName = "/sourcehub.tier.v1beta1.Query/Lockups" Query_UnlockingLockup_FullMethodName = "/sourcehub.tier.v1beta1.Query/UnlockingLockup" Query_UnlockingLockups_FullMethodName = "/sourcehub.tier.v1beta1.Query/UnlockingLockups" Query_Developers_FullMethodName = "/sourcehub.tier.v1beta1.Query/Developers" Query_UserSubscriptions_FullMethodName = "/sourcehub.tier.v1beta1.Query/UserSubscriptions" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Query defines the gRPC querier service. type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Lockup queries a lockup by delegator and validator address. Lockup(ctx context.Context, in *LockupRequest, opts ...grpc.CallOption) (*LockupResponse, error) // Lockups queries all the lockups of a delegator. Lockups(ctx context.Context, in *LockupsRequest, opts ...grpc.CallOption) (*LockupsResponse, error) // UnlockingLockup queries an unlocking lockup by delegator and validator address. UnlockingLockup(ctx context.Context, in *UnlockingLockupRequest, opts ...grpc.CallOption) (*UnlockingLockupResponse, error) // UnlockingLockups queries all the unlocking lockups of a delegator. UnlockingLockups(ctx context.Context, in *UnlockingLockupsRequest, opts ...grpc.CallOption) (*UnlockingLockupsResponse, error) // Developers queries all registered developers. Developers(ctx context.Context, in *DevelopersRequest, opts ...grpc.CallOption) (*DevelopersResponse, error) // UserSubscriptions queries all user subscriptions for a specific developer. UserSubscriptions(ctx context.Context, in *UserSubscriptionsRequest, opts ...grpc.CallOption) (*UserSubscriptionsResponse, error) } type queryClient struct { cc grpc.ClientConnInterface } func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Lockup(ctx context.Context, in *LockupRequest, opts ...grpc.CallOption) (*LockupResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LockupResponse) err := c.cc.Invoke(ctx, Query_Lockup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Lockups(ctx context.Context, in *LockupsRequest, opts ...grpc.CallOption) (*LockupsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LockupsResponse) err := c.cc.Invoke(ctx, Query_Lockups_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) UnlockingLockup(ctx context.Context, in *UnlockingLockupRequest, opts ...grpc.CallOption) (*UnlockingLockupResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UnlockingLockupResponse) err := c.cc.Invoke(ctx, Query_UnlockingLockup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) UnlockingLockups(ctx context.Context, in *UnlockingLockupsRequest, opts ...grpc.CallOption) (*UnlockingLockupsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UnlockingLockupsResponse) err := c.cc.Invoke(ctx, Query_UnlockingLockups_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Developers(ctx context.Context, in *DevelopersRequest, opts ...grpc.CallOption) (*DevelopersResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DevelopersResponse) err := c.cc.Invoke(ctx, Query_Developers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) UserSubscriptions(ctx context.Context, in *UserSubscriptionsRequest, opts ...grpc.CallOption) (*UserSubscriptionsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UserSubscriptionsResponse) err := c.cc.Invoke(ctx, Query_UserSubscriptions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility. // // Query defines the gRPC querier service. type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Lockup queries a lockup by delegator and validator address. Lockup(context.Context, *LockupRequest) (*LockupResponse, error) // Lockups queries all the lockups of a delegator. Lockups(context.Context, *LockupsRequest) (*LockupsResponse, error) // UnlockingLockup queries an unlocking lockup by delegator and validator address. UnlockingLockup(context.Context, *UnlockingLockupRequest) (*UnlockingLockupResponse, error) // UnlockingLockups queries all the unlocking lockups of a delegator. UnlockingLockups(context.Context, *UnlockingLockupsRequest) (*UnlockingLockupsResponse, error) // Developers queries all registered developers. Developers(context.Context, *DevelopersRequest) (*DevelopersResponse, error) // UserSubscriptions queries all user subscriptions for a specific developer. UserSubscriptions(context.Context, *UserSubscriptionsRequest) (*UserSubscriptionsResponse, error) mustEmbedUnimplementedQueryServer() } // UnimplementedQueryServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } func (UnimplementedQueryServer) Lockup(context.Context, *LockupRequest) (*LockupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Lockup not implemented") } func (UnimplementedQueryServer) Lockups(context.Context, *LockupsRequest) (*LockupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Lockups not implemented") } func (UnimplementedQueryServer) UnlockingLockup(context.Context, *UnlockingLockupRequest) (*UnlockingLockupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnlockingLockup not implemented") } func (UnimplementedQueryServer) UnlockingLockups(context.Context, *UnlockingLockupsRequest) (*UnlockingLockupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnlockingLockups not implemented") } func (UnimplementedQueryServer) Developers(context.Context, *DevelopersRequest) (*DevelopersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Developers not implemented") } func (UnimplementedQueryServer) UserSubscriptions(context.Context, *UserSubscriptionsRequest) (*UserSubscriptionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserSubscriptions not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will // result in compilation errors. type UnsafeQueryServer interface { mustEmbedUnimplementedQueryServer() } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { // If the following call pancis, it indicates UnimplementedQueryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Query_Params_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Lockup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LockupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Lockup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Lockup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Lockup(ctx, req.(*LockupRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Lockups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LockupsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Lockups(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Lockups_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Lockups(ctx, req.(*LockupsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_UnlockingLockup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnlockingLockupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).UnlockingLockup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_UnlockingLockup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UnlockingLockup(ctx, req.(*UnlockingLockupRequest)) } return interceptor(ctx, in, info, handler) } func _Query_UnlockingLockups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnlockingLockupsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).UnlockingLockups(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_UnlockingLockups_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UnlockingLockups(ctx, req.(*UnlockingLockupsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Developers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DevelopersRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Developers(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_Developers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Developers(ctx, req.(*DevelopersRequest)) } return interceptor(ctx, in, info, handler) } func _Query_UserSubscriptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserSubscriptionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).UserSubscriptions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Query_UserSubscriptions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UserSubscriptions(ctx, req.(*UserSubscriptionsRequest)) } return interceptor(ctx, in, info, handler) } // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.tier.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, { MethodName: "Lockup", Handler: _Query_Lockup_Handler, }, { MethodName: "Lockups", Handler: _Query_Lockups_Handler, }, { MethodName: "UnlockingLockup", Handler: _Query_UnlockingLockup_Handler, }, { MethodName: "UnlockingLockups", Handler: _Query_UnlockingLockups_Handler, }, { MethodName: "Developers", Handler: _Query_Developers_Handler, }, { MethodName: "UserSubscriptions", Handler: _Query_UserSubscriptions_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/tier/v1beta1/query.proto", } ================================================ FILE: api/sourcehub/tier/v1beta1/subscription.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package tierv1beta1 import ( _ "cosmossdk.io/api/amino" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_Developer protoreflect.MessageDescriptor fd_Developer_address protoreflect.FieldDescriptor fd_Developer_auto_lock_enabled protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_subscription_proto_init() md_Developer = File_sourcehub_tier_v1beta1_subscription_proto.Messages().ByName("Developer") fd_Developer_address = md_Developer.Fields().ByName("address") fd_Developer_auto_lock_enabled = md_Developer.Fields().ByName("auto_lock_enabled") } var _ protoreflect.Message = (*fastReflection_Developer)(nil) type fastReflection_Developer Developer func (x *Developer) ProtoReflect() protoreflect.Message { return (*fastReflection_Developer)(x) } func (x *Developer) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Developer_messageType fastReflection_Developer_messageType var _ protoreflect.MessageType = fastReflection_Developer_messageType{} type fastReflection_Developer_messageType struct{} func (x fastReflection_Developer_messageType) Zero() protoreflect.Message { return (*fastReflection_Developer)(nil) } func (x fastReflection_Developer_messageType) New() protoreflect.Message { return new(fastReflection_Developer) } func (x fastReflection_Developer_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Developer } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Developer) Descriptor() protoreflect.MessageDescriptor { return md_Developer } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Developer) Type() protoreflect.MessageType { return _fastReflection_Developer_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Developer) New() protoreflect.Message { return new(fastReflection_Developer) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Developer) Interface() protoreflect.ProtoMessage { return (*Developer)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Developer) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Address != "" { value := protoreflect.ValueOfString(x.Address) if !f(fd_Developer_address, value) { return } } if x.AutoLockEnabled != false { value := protoreflect.ValueOfBool(x.AutoLockEnabled) if !f(fd_Developer_auto_lock_enabled, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Developer) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.Developer.address": return x.Address != "" case "sourcehub.tier.v1beta1.Developer.auto_lock_enabled": return x.AutoLockEnabled != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Developer")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Developer does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Developer) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Developer.address": x.Address = "" case "sourcehub.tier.v1beta1.Developer.auto_lock_enabled": x.AutoLockEnabled = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Developer")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Developer does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Developer) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.Developer.address": value := x.Address return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.Developer.auto_lock_enabled": value := x.AutoLockEnabled return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Developer")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Developer does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Developer) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.Developer.address": x.Address = value.Interface().(string) case "sourcehub.tier.v1beta1.Developer.auto_lock_enabled": x.AutoLockEnabled = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Developer")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Developer does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Developer) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Developer.address": panic(fmt.Errorf("field address of message sourcehub.tier.v1beta1.Developer is not mutable")) case "sourcehub.tier.v1beta1.Developer.auto_lock_enabled": panic(fmt.Errorf("field auto_lock_enabled of message sourcehub.tier.v1beta1.Developer is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Developer")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Developer does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Developer) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.Developer.address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.Developer.auto_lock_enabled": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.Developer")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.Developer does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Developer) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.Developer", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Developer) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Developer) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Developer) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Developer) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Developer) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AutoLockEnabled { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Developer) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.AutoLockEnabled { i-- if x.AutoLockEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Developer) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Developer: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Developer: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AutoLockEnabled", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.AutoLockEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UserSubscription protoreflect.MessageDescriptor fd_UserSubscription_developer protoreflect.FieldDescriptor fd_UserSubscription_user_did protoreflect.FieldDescriptor fd_UserSubscription_credit_amount protoreflect.FieldDescriptor fd_UserSubscription_period protoreflect.FieldDescriptor fd_UserSubscription_start_date protoreflect.FieldDescriptor fd_UserSubscription_last_renewed protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_subscription_proto_init() md_UserSubscription = File_sourcehub_tier_v1beta1_subscription_proto.Messages().ByName("UserSubscription") fd_UserSubscription_developer = md_UserSubscription.Fields().ByName("developer") fd_UserSubscription_user_did = md_UserSubscription.Fields().ByName("user_did") fd_UserSubscription_credit_amount = md_UserSubscription.Fields().ByName("credit_amount") fd_UserSubscription_period = md_UserSubscription.Fields().ByName("period") fd_UserSubscription_start_date = md_UserSubscription.Fields().ByName("start_date") fd_UserSubscription_last_renewed = md_UserSubscription.Fields().ByName("last_renewed") } var _ protoreflect.Message = (*fastReflection_UserSubscription)(nil) type fastReflection_UserSubscription UserSubscription func (x *UserSubscription) ProtoReflect() protoreflect.Message { return (*fastReflection_UserSubscription)(x) } func (x *UserSubscription) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UserSubscription_messageType fastReflection_UserSubscription_messageType var _ protoreflect.MessageType = fastReflection_UserSubscription_messageType{} type fastReflection_UserSubscription_messageType struct{} func (x fastReflection_UserSubscription_messageType) Zero() protoreflect.Message { return (*fastReflection_UserSubscription)(nil) } func (x fastReflection_UserSubscription_messageType) New() protoreflect.Message { return new(fastReflection_UserSubscription) } func (x fastReflection_UserSubscription_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UserSubscription } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UserSubscription) Descriptor() protoreflect.MessageDescriptor { return md_UserSubscription } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UserSubscription) Type() protoreflect.MessageType { return _fastReflection_UserSubscription_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UserSubscription) New() protoreflect.Message { return new(fastReflection_UserSubscription) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UserSubscription) Interface() protoreflect.ProtoMessage { return (*UserSubscription)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UserSubscription) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_UserSubscription_developer, value) { return } } if x.UserDid != "" { value := protoreflect.ValueOfString(x.UserDid) if !f(fd_UserSubscription_user_did, value) { return } } if x.CreditAmount != uint64(0) { value := protoreflect.ValueOfUint64(x.CreditAmount) if !f(fd_UserSubscription_credit_amount, value) { return } } if x.Period != uint64(0) { value := protoreflect.ValueOfUint64(x.Period) if !f(fd_UserSubscription_period, value) { return } } if x.StartDate != nil { value := protoreflect.ValueOfMessage(x.StartDate.ProtoReflect()) if !f(fd_UserSubscription_start_date, value) { return } } if x.LastRenewed != nil { value := protoreflect.ValueOfMessage(x.LastRenewed.ProtoReflect()) if !f(fd_UserSubscription_last_renewed, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UserSubscription) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscription.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.UserSubscription.user_did": return x.UserDid != "" case "sourcehub.tier.v1beta1.UserSubscription.credit_amount": return x.CreditAmount != uint64(0) case "sourcehub.tier.v1beta1.UserSubscription.period": return x.Period != uint64(0) case "sourcehub.tier.v1beta1.UserSubscription.start_date": return x.StartDate != nil case "sourcehub.tier.v1beta1.UserSubscription.last_renewed": return x.LastRenewed != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscription does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscription) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscription.developer": x.Developer = "" case "sourcehub.tier.v1beta1.UserSubscription.user_did": x.UserDid = "" case "sourcehub.tier.v1beta1.UserSubscription.credit_amount": x.CreditAmount = uint64(0) case "sourcehub.tier.v1beta1.UserSubscription.period": x.Period = uint64(0) case "sourcehub.tier.v1beta1.UserSubscription.start_date": x.StartDate = nil case "sourcehub.tier.v1beta1.UserSubscription.last_renewed": x.LastRenewed = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscription does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UserSubscription) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.UserSubscription.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UserSubscription.user_did": value := x.UserDid return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.UserSubscription.credit_amount": value := x.CreditAmount return protoreflect.ValueOfUint64(value) case "sourcehub.tier.v1beta1.UserSubscription.period": value := x.Period return protoreflect.ValueOfUint64(value) case "sourcehub.tier.v1beta1.UserSubscription.start_date": value := x.StartDate return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.tier.v1beta1.UserSubscription.last_renewed": value := x.LastRenewed return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscription does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscription) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscription.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.UserSubscription.user_did": x.UserDid = value.Interface().(string) case "sourcehub.tier.v1beta1.UserSubscription.credit_amount": x.CreditAmount = value.Uint() case "sourcehub.tier.v1beta1.UserSubscription.period": x.Period = value.Uint() case "sourcehub.tier.v1beta1.UserSubscription.start_date": x.StartDate = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.tier.v1beta1.UserSubscription.last_renewed": x.LastRenewed = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscription does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscription) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscription.start_date": if x.StartDate == nil { x.StartDate = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.StartDate.ProtoReflect()) case "sourcehub.tier.v1beta1.UserSubscription.last_renewed": if x.LastRenewed == nil { x.LastRenewed = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.LastRenewed.ProtoReflect()) case "sourcehub.tier.v1beta1.UserSubscription.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.UserSubscription is not mutable")) case "sourcehub.tier.v1beta1.UserSubscription.user_did": panic(fmt.Errorf("field user_did of message sourcehub.tier.v1beta1.UserSubscription is not mutable")) case "sourcehub.tier.v1beta1.UserSubscription.credit_amount": panic(fmt.Errorf("field credit_amount of message sourcehub.tier.v1beta1.UserSubscription is not mutable")) case "sourcehub.tier.v1beta1.UserSubscription.period": panic(fmt.Errorf("field period of message sourcehub.tier.v1beta1.UserSubscription is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscription does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UserSubscription) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.UserSubscription.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UserSubscription.user_did": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.UserSubscription.credit_amount": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.tier.v1beta1.UserSubscription.period": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.tier.v1beta1.UserSubscription.start_date": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.tier.v1beta1.UserSubscription.last_renewed": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.UserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.UserSubscription does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UserSubscription) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.UserSubscription", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UserSubscription) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UserSubscription) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UserSubscription) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UserSubscription) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UserSubscription) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.UserDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreditAmount != 0 { n += 1 + runtime.Sov(uint64(x.CreditAmount)) } if x.Period != 0 { n += 1 + runtime.Sov(uint64(x.Period)) } if x.StartDate != nil { l = options.Size(x.StartDate) n += 1 + l + runtime.Sov(uint64(l)) } if x.LastRenewed != nil { l = options.Size(x.LastRenewed) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UserSubscription) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.LastRenewed != nil { encoded, err := options.Marshal(x.LastRenewed) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } if x.StartDate != nil { encoded, err := options.Marshal(x.StartDate) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- dAtA[i] = 0x20 } if x.CreditAmount != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreditAmount)) i-- dAtA[i] = 0x18 } if len(x.UserDid) > 0 { i -= len(x.UserDid) copy(dAtA[i:], x.UserDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserDid))) i-- dAtA[i] = 0x12 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UserSubscription) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UserDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreditAmount", wireType) } x.CreditAmount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CreditAmount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } x.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartDate", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.StartDate == nil { x.StartDate = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartDate); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastRenewed", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.LastRenewed == nil { x.LastRenewed = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastRenewed); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_TotalDevGranted protoreflect.MessageDescriptor fd_TotalDevGranted_developer protoreflect.FieldDescriptor fd_TotalDevGranted_total_granted protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_subscription_proto_init() md_TotalDevGranted = File_sourcehub_tier_v1beta1_subscription_proto.Messages().ByName("TotalDevGranted") fd_TotalDevGranted_developer = md_TotalDevGranted.Fields().ByName("developer") fd_TotalDevGranted_total_granted = md_TotalDevGranted.Fields().ByName("total_granted") } var _ protoreflect.Message = (*fastReflection_TotalDevGranted)(nil) type fastReflection_TotalDevGranted TotalDevGranted func (x *TotalDevGranted) ProtoReflect() protoreflect.Message { return (*fastReflection_TotalDevGranted)(x) } func (x *TotalDevGranted) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_TotalDevGranted_messageType fastReflection_TotalDevGranted_messageType var _ protoreflect.MessageType = fastReflection_TotalDevGranted_messageType{} type fastReflection_TotalDevGranted_messageType struct{} func (x fastReflection_TotalDevGranted_messageType) Zero() protoreflect.Message { return (*fastReflection_TotalDevGranted)(nil) } func (x fastReflection_TotalDevGranted_messageType) New() protoreflect.Message { return new(fastReflection_TotalDevGranted) } func (x fastReflection_TotalDevGranted_messageType) Descriptor() protoreflect.MessageDescriptor { return md_TotalDevGranted } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_TotalDevGranted) Descriptor() protoreflect.MessageDescriptor { return md_TotalDevGranted } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_TotalDevGranted) Type() protoreflect.MessageType { return _fastReflection_TotalDevGranted_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_TotalDevGranted) New() protoreflect.Message { return new(fastReflection_TotalDevGranted) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_TotalDevGranted) Interface() protoreflect.ProtoMessage { return (*TotalDevGranted)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_TotalDevGranted) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_TotalDevGranted_developer, value) { return } } if x.TotalGranted != uint64(0) { value := protoreflect.ValueOfUint64(x.TotalGranted) if !f(fd_TotalDevGranted_total_granted, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_TotalDevGranted) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.TotalDevGranted.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.TotalDevGranted.total_granted": return x.TotalGranted != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.TotalDevGranted")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.TotalDevGranted does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TotalDevGranted) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.TotalDevGranted.developer": x.Developer = "" case "sourcehub.tier.v1beta1.TotalDevGranted.total_granted": x.TotalGranted = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.TotalDevGranted")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.TotalDevGranted does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TotalDevGranted) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.TotalDevGranted.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.TotalDevGranted.total_granted": value := x.TotalGranted return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.TotalDevGranted")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.TotalDevGranted does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TotalDevGranted) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.TotalDevGranted.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.TotalDevGranted.total_granted": x.TotalGranted = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.TotalDevGranted")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.TotalDevGranted does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TotalDevGranted) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.TotalDevGranted.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.TotalDevGranted is not mutable")) case "sourcehub.tier.v1beta1.TotalDevGranted.total_granted": panic(fmt.Errorf("field total_granted of message sourcehub.tier.v1beta1.TotalDevGranted is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.TotalDevGranted")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.TotalDevGranted does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TotalDevGranted) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.TotalDevGranted.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.TotalDevGranted.total_granted": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.TotalDevGranted")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.TotalDevGranted does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_TotalDevGranted) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.TotalDevGranted", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_TotalDevGranted) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TotalDevGranted) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_TotalDevGranted) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_TotalDevGranted) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*TotalDevGranted) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.TotalGranted != 0 { n += 1 + runtime.Sov(uint64(x.TotalGranted)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*TotalDevGranted) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.TotalGranted != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalGranted)) i-- dAtA[i] = 0x10 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*TotalDevGranted) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalDevGranted: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalDevGranted: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalGranted", wireType) } x.TotalGranted = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.TotalGranted |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/tier/v1beta1/subscription.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Developer represents a developer configuration. type Developer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // address is the address of the developer. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. AutoLockEnabled bool `protobuf:"varint,2,opt,name=auto_lock_enabled,json=autoLockEnabled,proto3" json:"auto_lock_enabled,omitempty"` } func (x *Developer) Reset() { *x = Developer{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Developer) String() string { return protoimpl.X.MessageStringOf(x) } func (*Developer) ProtoMessage() {} // Deprecated: Use Developer.ProtoReflect.Descriptor instead. func (*Developer) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_subscription_proto_rawDescGZIP(), []int{0} } func (x *Developer) GetAddress() string { if x != nil { return x.Address } return "" } func (x *Developer) GetAutoLockEnabled() bool { if x != nil { return x.AutoLockEnabled } return false } // UserSubscription represents a user subscribed to a developer. type UserSubscription struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer who registered this user. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the registered user. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` // credit_amount is the credit amount allocated to this user. CreditAmount uint64 `protobuf:"varint,3,opt,name=credit_amount,json=creditAmount,proto3" json:"credit_amount,omitempty"` // period is the subscription period duration in seconds. Period uint64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` // start_date is when the subscription started. StartDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` // last_renewed is when the subscription was last renewed. LastRenewed *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_renewed,json=lastRenewed,proto3" json:"last_renewed,omitempty"` } func (x *UserSubscription) Reset() { *x = UserSubscription{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UserSubscription) String() string { return protoimpl.X.MessageStringOf(x) } func (*UserSubscription) ProtoMessage() {} // Deprecated: Use UserSubscription.ProtoReflect.Descriptor instead. func (*UserSubscription) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_subscription_proto_rawDescGZIP(), []int{1} } func (x *UserSubscription) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *UserSubscription) GetUserDid() string { if x != nil { return x.UserDid } return "" } func (x *UserSubscription) GetCreditAmount() uint64 { if x != nil { return x.CreditAmount } return 0 } func (x *UserSubscription) GetPeriod() uint64 { if x != nil { return x.Period } return 0 } func (x *UserSubscription) GetStartDate() *timestamppb.Timestamp { if x != nil { return x.StartDate } return nil } func (x *UserSubscription) GetLastRenewed() *timestamppb.Timestamp { if x != nil { return x.LastRenewed } return nil } // TotalDevGranted represents the total credit amount granted by a developer to all users. type TotalDevGranted struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // total_granted is the total credit amount granted to all users. TotalGranted uint64 `protobuf:"varint,2,opt,name=total_granted,json=totalGranted,proto3" json:"total_granted,omitempty"` } func (x *TotalDevGranted) Reset() { *x = TotalDevGranted{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TotalDevGranted) String() string { return protoimpl.X.MessageStringOf(x) } func (*TotalDevGranted) ProtoMessage() {} // Deprecated: Use TotalDevGranted.ProtoReflect.Descriptor instead. func (*TotalDevGranted) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_subscription_proto_rawDescGZIP(), []int{2} } func (x *TotalDevGranted) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *TotalDevGranted) GetTotalGranted() uint64 { if x != nil { return x.TotalGranted } return 0 } var File_sourcehub_tier_v1beta1_subscription_proto protoreflect.FileDescriptor var file_sourcehub_tier_v1beta1_subscription_proto_rawDesc = []byte{ 0x0a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x09, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xba, 0x02, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x48, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x65, 0x64, 0x22, 0x6e, 0x0a, 0x0f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x42, 0xde, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x54, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_tier_v1beta1_subscription_proto_rawDescOnce sync.Once file_sourcehub_tier_v1beta1_subscription_proto_rawDescData = file_sourcehub_tier_v1beta1_subscription_proto_rawDesc ) func file_sourcehub_tier_v1beta1_subscription_proto_rawDescGZIP() []byte { file_sourcehub_tier_v1beta1_subscription_proto_rawDescOnce.Do(func() { file_sourcehub_tier_v1beta1_subscription_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_tier_v1beta1_subscription_proto_rawDescData) }) return file_sourcehub_tier_v1beta1_subscription_proto_rawDescData } var file_sourcehub_tier_v1beta1_subscription_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_sourcehub_tier_v1beta1_subscription_proto_goTypes = []interface{}{ (*Developer)(nil), // 0: sourcehub.tier.v1beta1.Developer (*UserSubscription)(nil), // 1: sourcehub.tier.v1beta1.UserSubscription (*TotalDevGranted)(nil), // 2: sourcehub.tier.v1beta1.TotalDevGranted (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_sourcehub_tier_v1beta1_subscription_proto_depIdxs = []int32{ 3, // 0: sourcehub.tier.v1beta1.UserSubscription.start_date:type_name -> google.protobuf.Timestamp 3, // 1: sourcehub.tier.v1beta1.UserSubscription.last_renewed:type_name -> google.protobuf.Timestamp 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcehub_tier_v1beta1_subscription_proto_init() } func file_sourcehub_tier_v1beta1_subscription_proto_init() { if File_sourcehub_tier_v1beta1_subscription_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Developer); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserSubscription); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_subscription_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TotalDevGranted); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_tier_v1beta1_subscription_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcehub_tier_v1beta1_subscription_proto_goTypes, DependencyIndexes: file_sourcehub_tier_v1beta1_subscription_proto_depIdxs, MessageInfos: file_sourcehub_tier_v1beta1_subscription_proto_msgTypes, }.Build() File_sourcehub_tier_v1beta1_subscription_proto = out.File file_sourcehub_tier_v1beta1_subscription_proto_rawDesc = nil file_sourcehub_tier_v1beta1_subscription_proto_goTypes = nil file_sourcehub_tier_v1beta1_subscription_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/tier/v1beta1/tx.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package tierv1beta1 import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( md_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_authority protoreflect.FieldDescriptor fd_MsgUpdateParams_params protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUpdateParams = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) type fastReflection_MsgUpdateParams MsgUpdateParams func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(x) } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} type fastReflection_MsgUpdateParams_messageType struct{} func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParams)(nil) } func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParams } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParams_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { return new(fastReflection_MsgUpdateParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParams)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) if !f(fd_MsgUpdateParams_authority, value) { return } } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_MsgUpdateParams_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateParams.authority": return x.Authority != "" case "sourcehub.tier.v1beta1.MsgUpdateParams.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateParams.authority": x.Authority = "" case "sourcehub.tier.v1beta1.MsgUpdateParams.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateParams.authority": value := x.Authority return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgUpdateParams.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateParams.authority": x.Authority = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgUpdateParams.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateParams.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgUpdateParams.authority": panic(fmt.Errorf("field authority of message sourcehub.tier.v1beta1.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateParams.authority": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgUpdateParams.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParams")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUpdateParams", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParams) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Authority) > 0 { i -= len(x.Authority) copy(dAtA[i:], x.Authority) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateParamsResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUpdateParamsResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(x) } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} type fastReflection_MsgUpdateParamsResponse_messageType struct{} func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateParamsResponse)(nil) } func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { return new(fastReflection_MsgUpdateParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { return (*MsgUpdateParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateParamsResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgLock protoreflect.MessageDescriptor fd_MsgLock_delegator_address protoreflect.FieldDescriptor fd_MsgLock_validator_address protoreflect.FieldDescriptor fd_MsgLock_stake protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgLock = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgLock") fd_MsgLock_delegator_address = md_MsgLock.Fields().ByName("delegator_address") fd_MsgLock_validator_address = md_MsgLock.Fields().ByName("validator_address") fd_MsgLock_stake = md_MsgLock.Fields().ByName("stake") } var _ protoreflect.Message = (*fastReflection_MsgLock)(nil) type fastReflection_MsgLock MsgLock func (x *MsgLock) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgLock)(x) } func (x *MsgLock) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgLock_messageType fastReflection_MsgLock_messageType var _ protoreflect.MessageType = fastReflection_MsgLock_messageType{} type fastReflection_MsgLock_messageType struct{} func (x fastReflection_MsgLock_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgLock)(nil) } func (x fastReflection_MsgLock_messageType) New() protoreflect.Message { return new(fastReflection_MsgLock) } func (x fastReflection_MsgLock_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgLock } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgLock) Descriptor() protoreflect.MessageDescriptor { return md_MsgLock } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgLock) Type() protoreflect.MessageType { return _fastReflection_MsgLock_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgLock) New() protoreflect.Message { return new(fastReflection_MsgLock) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgLock) Interface() protoreflect.ProtoMessage { return (*MsgLock)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgLock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_MsgLock_delegator_address, value) { return } } if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_MsgLock_validator_address, value) { return } } if x.Stake != nil { value := protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) if !f(fd_MsgLock_stake, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgLock) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLock.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.MsgLock.validator_address": return x.ValidatorAddress != "" case "sourcehub.tier.v1beta1.MsgLock.stake": return x.Stake != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLock does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLock) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLock.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.MsgLock.validator_address": x.ValidatorAddress = "" case "sourcehub.tier.v1beta1.MsgLock.stake": x.Stake = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLock does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgLock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgLock.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgLock.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgLock.stake": value := x.Stake return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLock does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLock.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgLock.validator_address": x.ValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgLock.stake": x.Stake = value.Message().Interface().(*v1beta1.Coin) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLock does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLock.stake": if x.Stake == nil { x.Stake = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgLock.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.MsgLock is not mutable")) case "sourcehub.tier.v1beta1.MsgLock.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.MsgLock is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLock does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgLock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLock.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgLock.validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgLock.stake": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLock does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgLock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgLock", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgLock) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLock) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgLock) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgLock) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgLock) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Stake != nil { l = options.Size(x.Stake) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgLock) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Stake != nil { encoded, err := options.Marshal(x.Stake) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgLock) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLock: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Stake == nil { x.Stake = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Stake); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgLockResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgLockResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgLockResponse") } var _ protoreflect.Message = (*fastReflection_MsgLockResponse)(nil) type fastReflection_MsgLockResponse MsgLockResponse func (x *MsgLockResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgLockResponse)(x) } func (x *MsgLockResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgLockResponse_messageType fastReflection_MsgLockResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgLockResponse_messageType{} type fastReflection_MsgLockResponse_messageType struct{} func (x fastReflection_MsgLockResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgLockResponse)(nil) } func (x fastReflection_MsgLockResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgLockResponse) } func (x fastReflection_MsgLockResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgLockResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgLockResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgLockResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgLockResponse) Type() protoreflect.MessageType { return _fastReflection_MsgLockResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgLockResponse) New() protoreflect.Message { return new(fastReflection_MsgLockResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgLockResponse) Interface() protoreflect.ProtoMessage { return (*MsgLockResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgLockResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgLockResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgLockResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgLockResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgLockResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgLockResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgLockResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgLockResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgLockResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgLockResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgLockResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgLockResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLockResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLockResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgLockAuto protoreflect.MessageDescriptor fd_MsgLockAuto_delegator_address protoreflect.FieldDescriptor fd_MsgLockAuto_stake protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgLockAuto = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgLockAuto") fd_MsgLockAuto_delegator_address = md_MsgLockAuto.Fields().ByName("delegator_address") fd_MsgLockAuto_stake = md_MsgLockAuto.Fields().ByName("stake") } var _ protoreflect.Message = (*fastReflection_MsgLockAuto)(nil) type fastReflection_MsgLockAuto MsgLockAuto func (x *MsgLockAuto) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgLockAuto)(x) } func (x *MsgLockAuto) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgLockAuto_messageType fastReflection_MsgLockAuto_messageType var _ protoreflect.MessageType = fastReflection_MsgLockAuto_messageType{} type fastReflection_MsgLockAuto_messageType struct{} func (x fastReflection_MsgLockAuto_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgLockAuto)(nil) } func (x fastReflection_MsgLockAuto_messageType) New() protoreflect.Message { return new(fastReflection_MsgLockAuto) } func (x fastReflection_MsgLockAuto_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgLockAuto } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgLockAuto) Descriptor() protoreflect.MessageDescriptor { return md_MsgLockAuto } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgLockAuto) Type() protoreflect.MessageType { return _fastReflection_MsgLockAuto_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgLockAuto) New() protoreflect.Message { return new(fastReflection_MsgLockAuto) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgLockAuto) Interface() protoreflect.ProtoMessage { return (*MsgLockAuto)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgLockAuto) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_MsgLockAuto_delegator_address, value) { return } } if x.Stake != nil { value := protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) if !f(fd_MsgLockAuto_stake, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgLockAuto) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAuto.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.MsgLockAuto.stake": return x.Stake != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAuto")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAuto does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAuto) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAuto.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.MsgLockAuto.stake": x.Stake = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAuto")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAuto does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgLockAuto) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgLockAuto.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgLockAuto.stake": value := x.Stake return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAuto")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAuto does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAuto) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAuto.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgLockAuto.stake": x.Stake = value.Message().Interface().(*v1beta1.Coin) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAuto")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAuto does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAuto) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAuto.stake": if x.Stake == nil { x.Stake = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgLockAuto.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.MsgLockAuto is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAuto")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAuto does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgLockAuto) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAuto.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgLockAuto.stake": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAuto")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAuto does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgLockAuto) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgLockAuto", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgLockAuto) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAuto) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgLockAuto) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgLockAuto) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgLockAuto) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Stake != nil { l = options.Size(x.Stake) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgLockAuto) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Stake != nil { encoded, err := options.Marshal(x.Stake) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgLockAuto) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLockAuto: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLockAuto: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Stake == nil { x.Stake = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Stake); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgLockAutoResponse protoreflect.MessageDescriptor fd_MsgLockAutoResponse_validator_address protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgLockAutoResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgLockAutoResponse") fd_MsgLockAutoResponse_validator_address = md_MsgLockAutoResponse.Fields().ByName("validator_address") } var _ protoreflect.Message = (*fastReflection_MsgLockAutoResponse)(nil) type fastReflection_MsgLockAutoResponse MsgLockAutoResponse func (x *MsgLockAutoResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgLockAutoResponse)(x) } func (x *MsgLockAutoResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgLockAutoResponse_messageType fastReflection_MsgLockAutoResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgLockAutoResponse_messageType{} type fastReflection_MsgLockAutoResponse_messageType struct{} func (x fastReflection_MsgLockAutoResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgLockAutoResponse)(nil) } func (x fastReflection_MsgLockAutoResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgLockAutoResponse) } func (x fastReflection_MsgLockAutoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgLockAutoResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgLockAutoResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgLockAutoResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgLockAutoResponse) Type() protoreflect.MessageType { return _fastReflection_MsgLockAutoResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgLockAutoResponse) New() protoreflect.Message { return new(fastReflection_MsgLockAutoResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgLockAutoResponse) Interface() protoreflect.ProtoMessage { return (*MsgLockAutoResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgLockAutoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_MsgLockAutoResponse_validator_address, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgLockAutoResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAutoResponse.validator_address": return x.ValidatorAddress != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAutoResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAutoResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAutoResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAutoResponse.validator_address": x.ValidatorAddress = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAutoResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAutoResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgLockAutoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgLockAutoResponse.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAutoResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAutoResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAutoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAutoResponse.validator_address": x.ValidatorAddress = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAutoResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAutoResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAutoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAutoResponse.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.MsgLockAutoResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAutoResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAutoResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgLockAutoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgLockAutoResponse.validator_address": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgLockAutoResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgLockAutoResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgLockAutoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgLockAutoResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgLockAutoResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLockAutoResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgLockAutoResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgLockAutoResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgLockAutoResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgLockAutoResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgLockAutoResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLockAutoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLockAutoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUnlock protoreflect.MessageDescriptor fd_MsgUnlock_delegator_address protoreflect.FieldDescriptor fd_MsgUnlock_validator_address protoreflect.FieldDescriptor fd_MsgUnlock_stake protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUnlock = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUnlock") fd_MsgUnlock_delegator_address = md_MsgUnlock.Fields().ByName("delegator_address") fd_MsgUnlock_validator_address = md_MsgUnlock.Fields().ByName("validator_address") fd_MsgUnlock_stake = md_MsgUnlock.Fields().ByName("stake") } var _ protoreflect.Message = (*fastReflection_MsgUnlock)(nil) type fastReflection_MsgUnlock MsgUnlock func (x *MsgUnlock) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUnlock)(x) } func (x *MsgUnlock) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUnlock_messageType fastReflection_MsgUnlock_messageType var _ protoreflect.MessageType = fastReflection_MsgUnlock_messageType{} type fastReflection_MsgUnlock_messageType struct{} func (x fastReflection_MsgUnlock_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUnlock)(nil) } func (x fastReflection_MsgUnlock_messageType) New() protoreflect.Message { return new(fastReflection_MsgUnlock) } func (x fastReflection_MsgUnlock_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUnlock } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUnlock) Descriptor() protoreflect.MessageDescriptor { return md_MsgUnlock } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUnlock) Type() protoreflect.MessageType { return _fastReflection_MsgUnlock_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUnlock) New() protoreflect.Message { return new(fastReflection_MsgUnlock) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUnlock) Interface() protoreflect.ProtoMessage { return (*MsgUnlock)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUnlock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_MsgUnlock_delegator_address, value) { return } } if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_MsgUnlock_validator_address, value) { return } } if x.Stake != nil { value := protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) if !f(fd_MsgUnlock_stake, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUnlock) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlock.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.MsgUnlock.validator_address": return x.ValidatorAddress != "" case "sourcehub.tier.v1beta1.MsgUnlock.stake": return x.Stake != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlock does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlock) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlock.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.MsgUnlock.validator_address": x.ValidatorAddress = "" case "sourcehub.tier.v1beta1.MsgUnlock.stake": x.Stake = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlock does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUnlock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgUnlock.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgUnlock.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgUnlock.stake": value := x.Stake return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlock does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlock.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgUnlock.validator_address": x.ValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgUnlock.stake": x.Stake = value.Message().Interface().(*v1beta1.Coin) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlock does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlock.stake": if x.Stake == nil { x.Stake = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgUnlock.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.MsgUnlock is not mutable")) case "sourcehub.tier.v1beta1.MsgUnlock.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.MsgUnlock is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlock does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUnlock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlock.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgUnlock.validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgUnlock.stake": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlock")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlock does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUnlock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUnlock", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUnlock) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlock) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUnlock) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUnlock) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUnlock) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Stake != nil { l = options.Size(x.Stake) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUnlock) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Stake != nil { encoded, err := options.Marshal(x.Stake) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUnlock) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlock: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Stake == nil { x.Stake = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Stake); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUnlockResponse protoreflect.MessageDescriptor fd_MsgUnlockResponse_creation_height protoreflect.FieldDescriptor fd_MsgUnlockResponse_completion_time protoreflect.FieldDescriptor fd_MsgUnlockResponse_unlock_time protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUnlockResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUnlockResponse") fd_MsgUnlockResponse_creation_height = md_MsgUnlockResponse.Fields().ByName("creation_height") fd_MsgUnlockResponse_completion_time = md_MsgUnlockResponse.Fields().ByName("completion_time") fd_MsgUnlockResponse_unlock_time = md_MsgUnlockResponse.Fields().ByName("unlock_time") } var _ protoreflect.Message = (*fastReflection_MsgUnlockResponse)(nil) type fastReflection_MsgUnlockResponse MsgUnlockResponse func (x *MsgUnlockResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUnlockResponse)(x) } func (x *MsgUnlockResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUnlockResponse_messageType fastReflection_MsgUnlockResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgUnlockResponse_messageType{} type fastReflection_MsgUnlockResponse_messageType struct{} func (x fastReflection_MsgUnlockResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUnlockResponse)(nil) } func (x fastReflection_MsgUnlockResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgUnlockResponse) } func (x fastReflection_MsgUnlockResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUnlockResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUnlockResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgUnlockResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUnlockResponse) Type() protoreflect.MessageType { return _fastReflection_MsgUnlockResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUnlockResponse) New() protoreflect.Message { return new(fastReflection_MsgUnlockResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUnlockResponse) Interface() protoreflect.ProtoMessage { return (*MsgUnlockResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUnlockResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.CreationHeight != int64(0) { value := protoreflect.ValueOfInt64(x.CreationHeight) if !f(fd_MsgUnlockResponse_creation_height, value) { return } } if x.CompletionTime != nil { value := protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) if !f(fd_MsgUnlockResponse_completion_time, value) { return } } if x.UnlockTime != nil { value := protoreflect.ValueOfMessage(x.UnlockTime.ProtoReflect()) if !f(fd_MsgUnlockResponse_unlock_time, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUnlockResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlockResponse.creation_height": return x.CreationHeight != int64(0) case "sourcehub.tier.v1beta1.MsgUnlockResponse.completion_time": return x.CompletionTime != nil case "sourcehub.tier.v1beta1.MsgUnlockResponse.unlock_time": return x.UnlockTime != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlockResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlockResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlockResponse.creation_height": x.CreationHeight = int64(0) case "sourcehub.tier.v1beta1.MsgUnlockResponse.completion_time": x.CompletionTime = nil case "sourcehub.tier.v1beta1.MsgUnlockResponse.unlock_time": x.UnlockTime = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlockResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUnlockResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgUnlockResponse.creation_height": value := x.CreationHeight return protoreflect.ValueOfInt64(value) case "sourcehub.tier.v1beta1.MsgUnlockResponse.completion_time": value := x.CompletionTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgUnlockResponse.unlock_time": value := x.UnlockTime return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlockResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlockResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlockResponse.creation_height": x.CreationHeight = value.Int() case "sourcehub.tier.v1beta1.MsgUnlockResponse.completion_time": x.CompletionTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcehub.tier.v1beta1.MsgUnlockResponse.unlock_time": x.UnlockTime = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlockResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlockResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlockResponse.completion_time": if x.CompletionTime == nil { x.CompletionTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgUnlockResponse.unlock_time": if x.UnlockTime == nil { x.UnlockTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.UnlockTime.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgUnlockResponse.creation_height": panic(fmt.Errorf("field creation_height of message sourcehub.tier.v1beta1.MsgUnlockResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlockResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUnlockResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUnlockResponse.creation_height": return protoreflect.ValueOfInt64(int64(0)) case "sourcehub.tier.v1beta1.MsgUnlockResponse.completion_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgUnlockResponse.unlock_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUnlockResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUnlockResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUnlockResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUnlockResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUnlockResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUnlockResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUnlockResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUnlockResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUnlockResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.CreationHeight != 0 { n += 1 + runtime.Sov(uint64(x.CreationHeight)) } if x.CompletionTime != nil { l = options.Size(x.CompletionTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.UnlockTime != nil { l = options.Size(x.UnlockTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUnlockResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.UnlockTime != nil { encoded, err := options.Marshal(x.UnlockTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.CompletionTime != nil { encoded, err := options.Marshal(x.CompletionTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.CreationHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUnlockResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlockResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } x.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CompletionTime == nil { x.CompletionTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CompletionTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.UnlockTime == nil { x.UnlockTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRedelegate protoreflect.MessageDescriptor fd_MsgRedelegate_delegator_address protoreflect.FieldDescriptor fd_MsgRedelegate_src_validator_address protoreflect.FieldDescriptor fd_MsgRedelegate_dst_validator_address protoreflect.FieldDescriptor fd_MsgRedelegate_stake protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgRedelegate = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgRedelegate") fd_MsgRedelegate_delegator_address = md_MsgRedelegate.Fields().ByName("delegator_address") fd_MsgRedelegate_src_validator_address = md_MsgRedelegate.Fields().ByName("src_validator_address") fd_MsgRedelegate_dst_validator_address = md_MsgRedelegate.Fields().ByName("dst_validator_address") fd_MsgRedelegate_stake = md_MsgRedelegate.Fields().ByName("stake") } var _ protoreflect.Message = (*fastReflection_MsgRedelegate)(nil) type fastReflection_MsgRedelegate MsgRedelegate func (x *MsgRedelegate) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRedelegate)(x) } func (x *MsgRedelegate) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRedelegate_messageType fastReflection_MsgRedelegate_messageType var _ protoreflect.MessageType = fastReflection_MsgRedelegate_messageType{} type fastReflection_MsgRedelegate_messageType struct{} func (x fastReflection_MsgRedelegate_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRedelegate)(nil) } func (x fastReflection_MsgRedelegate_messageType) New() protoreflect.Message { return new(fastReflection_MsgRedelegate) } func (x fastReflection_MsgRedelegate_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRedelegate } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRedelegate) Descriptor() protoreflect.MessageDescriptor { return md_MsgRedelegate } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRedelegate) Type() protoreflect.MessageType { return _fastReflection_MsgRedelegate_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRedelegate) New() protoreflect.Message { return new(fastReflection_MsgRedelegate) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRedelegate) Interface() protoreflect.ProtoMessage { return (*MsgRedelegate)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRedelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_MsgRedelegate_delegator_address, value) { return } } if x.SrcValidatorAddress != "" { value := protoreflect.ValueOfString(x.SrcValidatorAddress) if !f(fd_MsgRedelegate_src_validator_address, value) { return } } if x.DstValidatorAddress != "" { value := protoreflect.ValueOfString(x.DstValidatorAddress) if !f(fd_MsgRedelegate_dst_validator_address, value) { return } } if x.Stake != nil { value := protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) if !f(fd_MsgRedelegate_stake, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRedelegate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegate.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.MsgRedelegate.src_validator_address": return x.SrcValidatorAddress != "" case "sourcehub.tier.v1beta1.MsgRedelegate.dst_validator_address": return x.DstValidatorAddress != "" case "sourcehub.tier.v1beta1.MsgRedelegate.stake": return x.Stake != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegate does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegate.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.MsgRedelegate.src_validator_address": x.SrcValidatorAddress = "" case "sourcehub.tier.v1beta1.MsgRedelegate.dst_validator_address": x.DstValidatorAddress = "" case "sourcehub.tier.v1beta1.MsgRedelegate.stake": x.Stake = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegate does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRedelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegate.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgRedelegate.src_validator_address": value := x.SrcValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgRedelegate.dst_validator_address": value := x.DstValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgRedelegate.stake": value := x.Stake return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegate does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegate.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgRedelegate.src_validator_address": x.SrcValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgRedelegate.dst_validator_address": x.DstValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgRedelegate.stake": x.Stake = value.Message().Interface().(*v1beta1.Coin) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegate does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegate.stake": if x.Stake == nil { x.Stake = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgRedelegate.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.MsgRedelegate is not mutable")) case "sourcehub.tier.v1beta1.MsgRedelegate.src_validator_address": panic(fmt.Errorf("field src_validator_address of message sourcehub.tier.v1beta1.MsgRedelegate is not mutable")) case "sourcehub.tier.v1beta1.MsgRedelegate.dst_validator_address": panic(fmt.Errorf("field dst_validator_address of message sourcehub.tier.v1beta1.MsgRedelegate is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegate does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRedelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegate.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgRedelegate.src_validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgRedelegate.dst_validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgRedelegate.stake": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegate")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegate does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRedelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgRedelegate", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRedelegate) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegate) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRedelegate) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRedelegate) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRedelegate) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.SrcValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.DstValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Stake != nil { l = options.Size(x.Stake) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRedelegate) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Stake != nil { encoded, err := options.Marshal(x.Stake) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if len(x.DstValidatorAddress) > 0 { i -= len(x.DstValidatorAddress) copy(dAtA[i:], x.DstValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DstValidatorAddress))) i-- dAtA[i] = 0x1a } if len(x.SrcValidatorAddress) > 0 { i -= len(x.SrcValidatorAddress) copy(dAtA[i:], x.SrcValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SrcValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRedelegate) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedelegate: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedelegate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SrcValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.SrcValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DstValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DstValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Stake == nil { x.Stake = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Stake); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRedelegateResponse protoreflect.MessageDescriptor fd_MsgRedelegateResponse_completion_time protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgRedelegateResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgRedelegateResponse") fd_MsgRedelegateResponse_completion_time = md_MsgRedelegateResponse.Fields().ByName("completion_time") } var _ protoreflect.Message = (*fastReflection_MsgRedelegateResponse)(nil) type fastReflection_MsgRedelegateResponse MsgRedelegateResponse func (x *MsgRedelegateResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRedelegateResponse)(x) } func (x *MsgRedelegateResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRedelegateResponse_messageType fastReflection_MsgRedelegateResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgRedelegateResponse_messageType{} type fastReflection_MsgRedelegateResponse_messageType struct{} func (x fastReflection_MsgRedelegateResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRedelegateResponse)(nil) } func (x fastReflection_MsgRedelegateResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgRedelegateResponse) } func (x fastReflection_MsgRedelegateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRedelegateResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRedelegateResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgRedelegateResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRedelegateResponse) Type() protoreflect.MessageType { return _fastReflection_MsgRedelegateResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRedelegateResponse) New() protoreflect.Message { return new(fastReflection_MsgRedelegateResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRedelegateResponse) Interface() protoreflect.ProtoMessage { return (*MsgRedelegateResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRedelegateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.CompletionTime != nil { value := protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) if !f(fd_MsgRedelegateResponse_completion_time, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRedelegateResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegateResponse.completion_time": return x.CompletionTime != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegateResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegateResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegateResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegateResponse.completion_time": x.CompletionTime = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegateResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegateResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRedelegateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegateResponse.completion_time": value := x.CompletionTime return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegateResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegateResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegateResponse.completion_time": x.CompletionTime = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegateResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegateResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegateResponse.completion_time": if x.CompletionTime == nil { x.CompletionTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegateResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegateResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRedelegateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRedelegateResponse.completion_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRedelegateResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRedelegateResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRedelegateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgRedelegateResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRedelegateResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRedelegateResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRedelegateResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRedelegateResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRedelegateResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.CompletionTime != nil { l = options.Size(x.CompletionTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRedelegateResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.CompletionTime != nil { encoded, err := options.Marshal(x.CompletionTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRedelegateResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedelegateResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedelegateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CompletionTime == nil { x.CompletionTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CompletionTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCancelUnlocking protoreflect.MessageDescriptor fd_MsgCancelUnlocking_delegator_address protoreflect.FieldDescriptor fd_MsgCancelUnlocking_validator_address protoreflect.FieldDescriptor fd_MsgCancelUnlocking_stake protoreflect.FieldDescriptor fd_MsgCancelUnlocking_creation_height protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgCancelUnlocking = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgCancelUnlocking") fd_MsgCancelUnlocking_delegator_address = md_MsgCancelUnlocking.Fields().ByName("delegator_address") fd_MsgCancelUnlocking_validator_address = md_MsgCancelUnlocking.Fields().ByName("validator_address") fd_MsgCancelUnlocking_stake = md_MsgCancelUnlocking.Fields().ByName("stake") fd_MsgCancelUnlocking_creation_height = md_MsgCancelUnlocking.Fields().ByName("creation_height") } var _ protoreflect.Message = (*fastReflection_MsgCancelUnlocking)(nil) type fastReflection_MsgCancelUnlocking MsgCancelUnlocking func (x *MsgCancelUnlocking) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCancelUnlocking)(x) } func (x *MsgCancelUnlocking) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCancelUnlocking_messageType fastReflection_MsgCancelUnlocking_messageType var _ protoreflect.MessageType = fastReflection_MsgCancelUnlocking_messageType{} type fastReflection_MsgCancelUnlocking_messageType struct{} func (x fastReflection_MsgCancelUnlocking_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCancelUnlocking)(nil) } func (x fastReflection_MsgCancelUnlocking_messageType) New() protoreflect.Message { return new(fastReflection_MsgCancelUnlocking) } func (x fastReflection_MsgCancelUnlocking_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCancelUnlocking } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCancelUnlocking) Descriptor() protoreflect.MessageDescriptor { return md_MsgCancelUnlocking } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCancelUnlocking) Type() protoreflect.MessageType { return _fastReflection_MsgCancelUnlocking_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCancelUnlocking) New() protoreflect.Message { return new(fastReflection_MsgCancelUnlocking) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCancelUnlocking) Interface() protoreflect.ProtoMessage { return (*MsgCancelUnlocking)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCancelUnlocking) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DelegatorAddress != "" { value := protoreflect.ValueOfString(x.DelegatorAddress) if !f(fd_MsgCancelUnlocking_delegator_address, value) { return } } if x.ValidatorAddress != "" { value := protoreflect.ValueOfString(x.ValidatorAddress) if !f(fd_MsgCancelUnlocking_validator_address, value) { return } } if x.Stake != nil { value := protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) if !f(fd_MsgCancelUnlocking_stake, value) { return } } if x.CreationHeight != int64(0) { value := protoreflect.ValueOfInt64(x.CreationHeight) if !f(fd_MsgCancelUnlocking_creation_height, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCancelUnlocking) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCancelUnlocking.delegator_address": return x.DelegatorAddress != "" case "sourcehub.tier.v1beta1.MsgCancelUnlocking.validator_address": return x.ValidatorAddress != "" case "sourcehub.tier.v1beta1.MsgCancelUnlocking.stake": return x.Stake != nil case "sourcehub.tier.v1beta1.MsgCancelUnlocking.creation_height": return x.CreationHeight != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlocking")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlocking does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlocking) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCancelUnlocking.delegator_address": x.DelegatorAddress = "" case "sourcehub.tier.v1beta1.MsgCancelUnlocking.validator_address": x.ValidatorAddress = "" case "sourcehub.tier.v1beta1.MsgCancelUnlocking.stake": x.Stake = nil case "sourcehub.tier.v1beta1.MsgCancelUnlocking.creation_height": x.CreationHeight = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlocking")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlocking does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCancelUnlocking) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgCancelUnlocking.delegator_address": value := x.DelegatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.validator_address": value := x.ValidatorAddress return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.stake": value := x.Stake return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.creation_height": value := x.CreationHeight return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlocking")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlocking does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlocking) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCancelUnlocking.delegator_address": x.DelegatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.validator_address": x.ValidatorAddress = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.stake": x.Stake = value.Message().Interface().(*v1beta1.Coin) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.creation_height": x.CreationHeight = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlocking")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlocking does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlocking) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCancelUnlocking.stake": if x.Stake == nil { x.Stake = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.Stake.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.delegator_address": panic(fmt.Errorf("field delegator_address of message sourcehub.tier.v1beta1.MsgCancelUnlocking is not mutable")) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.validator_address": panic(fmt.Errorf("field validator_address of message sourcehub.tier.v1beta1.MsgCancelUnlocking is not mutable")) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.creation_height": panic(fmt.Errorf("field creation_height of message sourcehub.tier.v1beta1.MsgCancelUnlocking is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlocking")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlocking does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCancelUnlocking) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCancelUnlocking.delegator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgCancelUnlocking.validator_address": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgCancelUnlocking.stake": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcehub.tier.v1beta1.MsgCancelUnlocking.creation_height": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlocking")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlocking does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCancelUnlocking) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgCancelUnlocking", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCancelUnlocking) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlocking) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCancelUnlocking) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCancelUnlocking) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCancelUnlocking) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.DelegatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ValidatorAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Stake != nil { l = options.Size(x.Stake) n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationHeight != 0 { n += 1 + runtime.Sov(uint64(x.CreationHeight)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCancelUnlocking) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.CreationHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) i-- dAtA[i] = 0x20 } if x.Stake != nil { encoded, err := options.Marshal(x.Stake) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.ValidatorAddress) > 0 { i -= len(x.ValidatorAddress) copy(dAtA[i:], x.ValidatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(x.DelegatorAddress) > 0 { i -= len(x.DelegatorAddress) copy(dAtA[i:], x.DelegatorAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCancelUnlocking) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUnlocking: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUnlocking: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Stake == nil { x.Stake = &v1beta1.Coin{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Stake); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } x.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCancelUnlockingResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgCancelUnlockingResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgCancelUnlockingResponse") } var _ protoreflect.Message = (*fastReflection_MsgCancelUnlockingResponse)(nil) type fastReflection_MsgCancelUnlockingResponse MsgCancelUnlockingResponse func (x *MsgCancelUnlockingResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCancelUnlockingResponse)(x) } func (x *MsgCancelUnlockingResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCancelUnlockingResponse_messageType fastReflection_MsgCancelUnlockingResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgCancelUnlockingResponse_messageType{} type fastReflection_MsgCancelUnlockingResponse_messageType struct{} func (x fastReflection_MsgCancelUnlockingResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCancelUnlockingResponse)(nil) } func (x fastReflection_MsgCancelUnlockingResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgCancelUnlockingResponse) } func (x fastReflection_MsgCancelUnlockingResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCancelUnlockingResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCancelUnlockingResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgCancelUnlockingResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCancelUnlockingResponse) Type() protoreflect.MessageType { return _fastReflection_MsgCancelUnlockingResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCancelUnlockingResponse) New() protoreflect.Message { return new(fastReflection_MsgCancelUnlockingResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCancelUnlockingResponse) Interface() protoreflect.ProtoMessage { return (*MsgCancelUnlockingResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCancelUnlockingResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCancelUnlockingResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlockingResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlockingResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlockingResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlockingResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlockingResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCancelUnlockingResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlockingResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlockingResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlockingResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlockingResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlockingResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlockingResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlockingResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlockingResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCancelUnlockingResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCancelUnlockingResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCancelUnlockingResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCancelUnlockingResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgCancelUnlockingResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCancelUnlockingResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCancelUnlockingResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCancelUnlockingResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCancelUnlockingResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCancelUnlockingResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCancelUnlockingResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCancelUnlockingResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUnlockingResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUnlockingResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCreateDeveloper protoreflect.MessageDescriptor fd_MsgCreateDeveloper_developer protoreflect.FieldDescriptor fd_MsgCreateDeveloper_auto_lock_enabled protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgCreateDeveloper = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgCreateDeveloper") fd_MsgCreateDeveloper_developer = md_MsgCreateDeveloper.Fields().ByName("developer") fd_MsgCreateDeveloper_auto_lock_enabled = md_MsgCreateDeveloper.Fields().ByName("auto_lock_enabled") } var _ protoreflect.Message = (*fastReflection_MsgCreateDeveloper)(nil) type fastReflection_MsgCreateDeveloper MsgCreateDeveloper func (x *MsgCreateDeveloper) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCreateDeveloper)(x) } func (x *MsgCreateDeveloper) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCreateDeveloper_messageType fastReflection_MsgCreateDeveloper_messageType var _ protoreflect.MessageType = fastReflection_MsgCreateDeveloper_messageType{} type fastReflection_MsgCreateDeveloper_messageType struct{} func (x fastReflection_MsgCreateDeveloper_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCreateDeveloper)(nil) } func (x fastReflection_MsgCreateDeveloper_messageType) New() protoreflect.Message { return new(fastReflection_MsgCreateDeveloper) } func (x fastReflection_MsgCreateDeveloper_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreateDeveloper } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCreateDeveloper) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreateDeveloper } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCreateDeveloper) Type() protoreflect.MessageType { return _fastReflection_MsgCreateDeveloper_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCreateDeveloper) New() protoreflect.Message { return new(fastReflection_MsgCreateDeveloper) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCreateDeveloper) Interface() protoreflect.ProtoMessage { return (*MsgCreateDeveloper)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCreateDeveloper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_MsgCreateDeveloper_developer, value) { return } } if x.AutoLockEnabled != false { value := protoreflect.ValueOfBool(x.AutoLockEnabled) if !f(fd_MsgCreateDeveloper_auto_lock_enabled, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreateDeveloper) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCreateDeveloper.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.MsgCreateDeveloper.auto_lock_enabled": return x.AutoLockEnabled != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloper does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloper) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCreateDeveloper.developer": x.Developer = "" case "sourcehub.tier.v1beta1.MsgCreateDeveloper.auto_lock_enabled": x.AutoLockEnabled = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloper does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreateDeveloper) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgCreateDeveloper.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgCreateDeveloper.auto_lock_enabled": value := x.AutoLockEnabled return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloper does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloper) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCreateDeveloper.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgCreateDeveloper.auto_lock_enabled": x.AutoLockEnabled = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloper does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCreateDeveloper.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.MsgCreateDeveloper is not mutable")) case "sourcehub.tier.v1beta1.MsgCreateDeveloper.auto_lock_enabled": panic(fmt.Errorf("field auto_lock_enabled of message sourcehub.tier.v1beta1.MsgCreateDeveloper is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloper does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreateDeveloper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgCreateDeveloper.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgCreateDeveloper.auto_lock_enabled": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloper does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCreateDeveloper) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgCreateDeveloper", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCreateDeveloper) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloper) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCreateDeveloper) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCreateDeveloper) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCreateDeveloper) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AutoLockEnabled { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCreateDeveloper) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.AutoLockEnabled { i-- if x.AutoLockEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCreateDeveloper) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateDeveloper: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateDeveloper: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AutoLockEnabled", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.AutoLockEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgCreateDeveloperResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgCreateDeveloperResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgCreateDeveloperResponse") } var _ protoreflect.Message = (*fastReflection_MsgCreateDeveloperResponse)(nil) type fastReflection_MsgCreateDeveloperResponse MsgCreateDeveloperResponse func (x *MsgCreateDeveloperResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgCreateDeveloperResponse)(x) } func (x *MsgCreateDeveloperResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgCreateDeveloperResponse_messageType fastReflection_MsgCreateDeveloperResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgCreateDeveloperResponse_messageType{} type fastReflection_MsgCreateDeveloperResponse_messageType struct{} func (x fastReflection_MsgCreateDeveloperResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgCreateDeveloperResponse)(nil) } func (x fastReflection_MsgCreateDeveloperResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgCreateDeveloperResponse) } func (x fastReflection_MsgCreateDeveloperResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreateDeveloperResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgCreateDeveloperResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgCreateDeveloperResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgCreateDeveloperResponse) Type() protoreflect.MessageType { return _fastReflection_MsgCreateDeveloperResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgCreateDeveloperResponse) New() protoreflect.Message { return new(fastReflection_MsgCreateDeveloperResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgCreateDeveloperResponse) Interface() protoreflect.ProtoMessage { return (*MsgCreateDeveloperResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgCreateDeveloperResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreateDeveloperResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloperResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloperResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloperResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreateDeveloperResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloperResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloperResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloperResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloperResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloperResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreateDeveloperResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgCreateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgCreateDeveloperResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgCreateDeveloperResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgCreateDeveloperResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgCreateDeveloperResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateDeveloperResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgCreateDeveloperResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgCreateDeveloperResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgCreateDeveloperResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgCreateDeveloperResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgCreateDeveloperResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateDeveloperResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateDeveloperResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateDeveloper protoreflect.MessageDescriptor fd_MsgUpdateDeveloper_developer protoreflect.FieldDescriptor fd_MsgUpdateDeveloper_auto_lock_enabled protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUpdateDeveloper = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUpdateDeveloper") fd_MsgUpdateDeveloper_developer = md_MsgUpdateDeveloper.Fields().ByName("developer") fd_MsgUpdateDeveloper_auto_lock_enabled = md_MsgUpdateDeveloper.Fields().ByName("auto_lock_enabled") } var _ protoreflect.Message = (*fastReflection_MsgUpdateDeveloper)(nil) type fastReflection_MsgUpdateDeveloper MsgUpdateDeveloper func (x *MsgUpdateDeveloper) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateDeveloper)(x) } func (x *MsgUpdateDeveloper) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateDeveloper_messageType fastReflection_MsgUpdateDeveloper_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateDeveloper_messageType{} type fastReflection_MsgUpdateDeveloper_messageType struct{} func (x fastReflection_MsgUpdateDeveloper_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateDeveloper)(nil) } func (x fastReflection_MsgUpdateDeveloper_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateDeveloper) } func (x fastReflection_MsgUpdateDeveloper_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateDeveloper } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateDeveloper) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateDeveloper } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateDeveloper) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateDeveloper_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateDeveloper) New() protoreflect.Message { return new(fastReflection_MsgUpdateDeveloper) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateDeveloper) Interface() protoreflect.ProtoMessage { return (*MsgUpdateDeveloper)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateDeveloper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_MsgUpdateDeveloper_developer, value) { return } } if x.AutoLockEnabled != false { value := protoreflect.ValueOfBool(x.AutoLockEnabled) if !f(fd_MsgUpdateDeveloper_auto_lock_enabled, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateDeveloper) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.auto_lock_enabled": return x.AutoLockEnabled != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloper does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloper) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.developer": x.Developer = "" case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.auto_lock_enabled": x.AutoLockEnabled = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloper does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateDeveloper) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.auto_lock_enabled": value := x.AutoLockEnabled return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloper does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloper) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.auto_lock_enabled": x.AutoLockEnabled = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloper does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.MsgUpdateDeveloper is not mutable")) case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.auto_lock_enabled": panic(fmt.Errorf("field auto_lock_enabled of message sourcehub.tier.v1beta1.MsgUpdateDeveloper is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloper does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateDeveloper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgUpdateDeveloper.auto_lock_enabled": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloper does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateDeveloper) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUpdateDeveloper", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateDeveloper) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloper) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateDeveloper) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateDeveloper) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateDeveloper) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AutoLockEnabled { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateDeveloper) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.AutoLockEnabled { i-- if x.AutoLockEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateDeveloper) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateDeveloper: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateDeveloper: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AutoLockEnabled", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.AutoLockEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateDeveloperResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUpdateDeveloperResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUpdateDeveloperResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateDeveloperResponse)(nil) type fastReflection_MsgUpdateDeveloperResponse MsgUpdateDeveloperResponse func (x *MsgUpdateDeveloperResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateDeveloperResponse)(x) } func (x *MsgUpdateDeveloperResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateDeveloperResponse_messageType fastReflection_MsgUpdateDeveloperResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateDeveloperResponse_messageType{} type fastReflection_MsgUpdateDeveloperResponse_messageType struct{} func (x fastReflection_MsgUpdateDeveloperResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateDeveloperResponse)(nil) } func (x fastReflection_MsgUpdateDeveloperResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateDeveloperResponse) } func (x fastReflection_MsgUpdateDeveloperResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateDeveloperResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateDeveloperResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateDeveloperResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateDeveloperResponse) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateDeveloperResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateDeveloperResponse) New() protoreflect.Message { return new(fastReflection_MsgUpdateDeveloperResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateDeveloperResponse) Interface() protoreflect.ProtoMessage { return (*MsgUpdateDeveloperResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateDeveloperResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateDeveloperResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloperResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateDeveloperResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloperResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloperResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateDeveloperResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateDeveloperResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateDeveloperResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateDeveloperResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateDeveloperResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateDeveloperResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateDeveloperResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateDeveloperResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateDeveloperResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateDeveloperResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateDeveloperResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRemoveDeveloper protoreflect.MessageDescriptor fd_MsgRemoveDeveloper_developer protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgRemoveDeveloper = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgRemoveDeveloper") fd_MsgRemoveDeveloper_developer = md_MsgRemoveDeveloper.Fields().ByName("developer") } var _ protoreflect.Message = (*fastReflection_MsgRemoveDeveloper)(nil) type fastReflection_MsgRemoveDeveloper MsgRemoveDeveloper func (x *MsgRemoveDeveloper) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRemoveDeveloper)(x) } func (x *MsgRemoveDeveloper) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRemoveDeveloper_messageType fastReflection_MsgRemoveDeveloper_messageType var _ protoreflect.MessageType = fastReflection_MsgRemoveDeveloper_messageType{} type fastReflection_MsgRemoveDeveloper_messageType struct{} func (x fastReflection_MsgRemoveDeveloper_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRemoveDeveloper)(nil) } func (x fastReflection_MsgRemoveDeveloper_messageType) New() protoreflect.Message { return new(fastReflection_MsgRemoveDeveloper) } func (x fastReflection_MsgRemoveDeveloper_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveDeveloper } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRemoveDeveloper) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveDeveloper } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRemoveDeveloper) Type() protoreflect.MessageType { return _fastReflection_MsgRemoveDeveloper_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRemoveDeveloper) New() protoreflect.Message { return new(fastReflection_MsgRemoveDeveloper) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRemoveDeveloper) Interface() protoreflect.ProtoMessage { return (*MsgRemoveDeveloper)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRemoveDeveloper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_MsgRemoveDeveloper_developer, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRemoveDeveloper) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveDeveloper.developer": return x.Developer != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloper does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloper) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveDeveloper.developer": x.Developer = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloper does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRemoveDeveloper) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveDeveloper.developer": value := x.Developer return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloper does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloper) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveDeveloper.developer": x.Developer = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloper does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveDeveloper.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.MsgRemoveDeveloper is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloper does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRemoveDeveloper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveDeveloper.developer": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloper")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloper does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRemoveDeveloper) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgRemoveDeveloper", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRemoveDeveloper) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloper) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRemoveDeveloper) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRemoveDeveloper) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRemoveDeveloper) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveDeveloper) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveDeveloper) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveDeveloper: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveDeveloper: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRemoveDeveloperResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgRemoveDeveloperResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgRemoveDeveloperResponse") } var _ protoreflect.Message = (*fastReflection_MsgRemoveDeveloperResponse)(nil) type fastReflection_MsgRemoveDeveloperResponse MsgRemoveDeveloperResponse func (x *MsgRemoveDeveloperResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRemoveDeveloperResponse)(x) } func (x *MsgRemoveDeveloperResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRemoveDeveloperResponse_messageType fastReflection_MsgRemoveDeveloperResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgRemoveDeveloperResponse_messageType{} type fastReflection_MsgRemoveDeveloperResponse_messageType struct{} func (x fastReflection_MsgRemoveDeveloperResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRemoveDeveloperResponse)(nil) } func (x fastReflection_MsgRemoveDeveloperResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgRemoveDeveloperResponse) } func (x fastReflection_MsgRemoveDeveloperResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveDeveloperResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRemoveDeveloperResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveDeveloperResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRemoveDeveloperResponse) Type() protoreflect.MessageType { return _fastReflection_MsgRemoveDeveloperResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRemoveDeveloperResponse) New() protoreflect.Message { return new(fastReflection_MsgRemoveDeveloperResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRemoveDeveloperResponse) Interface() protoreflect.ProtoMessage { return (*MsgRemoveDeveloperResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRemoveDeveloperResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRemoveDeveloperResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloperResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRemoveDeveloperResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloperResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloperResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRemoveDeveloperResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRemoveDeveloperResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRemoveDeveloperResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveDeveloperResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRemoveDeveloperResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRemoveDeveloperResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRemoveDeveloperResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveDeveloperResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveDeveloperResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveDeveloperResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveDeveloperResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgAddUserSubscription protoreflect.MessageDescriptor fd_MsgAddUserSubscription_developer protoreflect.FieldDescriptor fd_MsgAddUserSubscription_user_did protoreflect.FieldDescriptor fd_MsgAddUserSubscription_amount protoreflect.FieldDescriptor fd_MsgAddUserSubscription_period protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgAddUserSubscription = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgAddUserSubscription") fd_MsgAddUserSubscription_developer = md_MsgAddUserSubscription.Fields().ByName("developer") fd_MsgAddUserSubscription_user_did = md_MsgAddUserSubscription.Fields().ByName("user_did") fd_MsgAddUserSubscription_amount = md_MsgAddUserSubscription.Fields().ByName("amount") fd_MsgAddUserSubscription_period = md_MsgAddUserSubscription.Fields().ByName("period") } var _ protoreflect.Message = (*fastReflection_MsgAddUserSubscription)(nil) type fastReflection_MsgAddUserSubscription MsgAddUserSubscription func (x *MsgAddUserSubscription) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgAddUserSubscription)(x) } func (x *MsgAddUserSubscription) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgAddUserSubscription_messageType fastReflection_MsgAddUserSubscription_messageType var _ protoreflect.MessageType = fastReflection_MsgAddUserSubscription_messageType{} type fastReflection_MsgAddUserSubscription_messageType struct{} func (x fastReflection_MsgAddUserSubscription_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgAddUserSubscription)(nil) } func (x fastReflection_MsgAddUserSubscription_messageType) New() protoreflect.Message { return new(fastReflection_MsgAddUserSubscription) } func (x fastReflection_MsgAddUserSubscription_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddUserSubscription } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgAddUserSubscription) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddUserSubscription } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgAddUserSubscription) Type() protoreflect.MessageType { return _fastReflection_MsgAddUserSubscription_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgAddUserSubscription) New() protoreflect.Message { return new(fastReflection_MsgAddUserSubscription) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgAddUserSubscription) Interface() protoreflect.ProtoMessage { return (*MsgAddUserSubscription)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgAddUserSubscription) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_MsgAddUserSubscription_developer, value) { return } } if x.UserDid != "" { value := protoreflect.ValueOfString(x.UserDid) if !f(fd_MsgAddUserSubscription_user_did, value) { return } } if x.Amount != uint64(0) { value := protoreflect.ValueOfUint64(x.Amount) if !f(fd_MsgAddUserSubscription_amount, value) { return } } if x.Period != uint64(0) { value := protoreflect.ValueOfUint64(x.Period) if !f(fd_MsgAddUserSubscription_period, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgAddUserSubscription) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgAddUserSubscription.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.MsgAddUserSubscription.user_did": return x.UserDid != "" case "sourcehub.tier.v1beta1.MsgAddUserSubscription.amount": return x.Amount != uint64(0) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.period": return x.Period != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscription does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscription) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgAddUserSubscription.developer": x.Developer = "" case "sourcehub.tier.v1beta1.MsgAddUserSubscription.user_did": x.UserDid = "" case "sourcehub.tier.v1beta1.MsgAddUserSubscription.amount": x.Amount = uint64(0) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.period": x.Period = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscription does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgAddUserSubscription) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgAddUserSubscription.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.user_did": value := x.UserDid return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.amount": value := x.Amount return protoreflect.ValueOfUint64(value) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.period": value := x.Period return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscription does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscription) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgAddUserSubscription.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.user_did": x.UserDid = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.amount": x.Amount = value.Uint() case "sourcehub.tier.v1beta1.MsgAddUserSubscription.period": x.Period = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscription does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscription) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgAddUserSubscription.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.MsgAddUserSubscription is not mutable")) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.user_did": panic(fmt.Errorf("field user_did of message sourcehub.tier.v1beta1.MsgAddUserSubscription is not mutable")) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.amount": panic(fmt.Errorf("field amount of message sourcehub.tier.v1beta1.MsgAddUserSubscription is not mutable")) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.period": panic(fmt.Errorf("field period of message sourcehub.tier.v1beta1.MsgAddUserSubscription is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscription does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgAddUserSubscription) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgAddUserSubscription.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgAddUserSubscription.user_did": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgAddUserSubscription.amount": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.tier.v1beta1.MsgAddUserSubscription.period": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscription does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgAddUserSubscription) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgAddUserSubscription", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgAddUserSubscription) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscription) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgAddUserSubscription) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgAddUserSubscription) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgAddUserSubscription) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.UserDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Amount != 0 { n += 1 + runtime.Sov(uint64(x.Amount)) } if x.Period != 0 { n += 1 + runtime.Sov(uint64(x.Period)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgAddUserSubscription) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- dAtA[i] = 0x20 } if x.Amount != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount)) i-- dAtA[i] = 0x18 } if len(x.UserDid) > 0 { i -= len(x.UserDid) copy(dAtA[i:], x.UserDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserDid))) i-- dAtA[i] = 0x12 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgAddUserSubscription) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UserDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } x.Amount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Amount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } x.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgAddUserSubscriptionResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgAddUserSubscriptionResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgAddUserSubscriptionResponse") } var _ protoreflect.Message = (*fastReflection_MsgAddUserSubscriptionResponse)(nil) type fastReflection_MsgAddUserSubscriptionResponse MsgAddUserSubscriptionResponse func (x *MsgAddUserSubscriptionResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgAddUserSubscriptionResponse)(x) } func (x *MsgAddUserSubscriptionResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgAddUserSubscriptionResponse_messageType fastReflection_MsgAddUserSubscriptionResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgAddUserSubscriptionResponse_messageType{} type fastReflection_MsgAddUserSubscriptionResponse_messageType struct{} func (x fastReflection_MsgAddUserSubscriptionResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgAddUserSubscriptionResponse)(nil) } func (x fastReflection_MsgAddUserSubscriptionResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgAddUserSubscriptionResponse) } func (x fastReflection_MsgAddUserSubscriptionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddUserSubscriptionResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgAddUserSubscriptionResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgAddUserSubscriptionResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgAddUserSubscriptionResponse) Type() protoreflect.MessageType { return _fastReflection_MsgAddUserSubscriptionResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgAddUserSubscriptionResponse) New() protoreflect.Message { return new(fastReflection_MsgAddUserSubscriptionResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgAddUserSubscriptionResponse) Interface() protoreflect.ProtoMessage { return (*MsgAddUserSubscriptionResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgAddUserSubscriptionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgAddUserSubscriptionResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscriptionResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgAddUserSubscriptionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscriptionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscriptionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgAddUserSubscriptionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgAddUserSubscriptionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgAddUserSubscriptionResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUserSubscriptionResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgAddUserSubscriptionResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgAddUserSubscriptionResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgAddUserSubscriptionResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgAddUserSubscriptionResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgAddUserSubscriptionResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUserSubscriptionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddUserSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateUserSubscription protoreflect.MessageDescriptor fd_MsgUpdateUserSubscription_developer protoreflect.FieldDescriptor fd_MsgUpdateUserSubscription_user_did protoreflect.FieldDescriptor fd_MsgUpdateUserSubscription_amount protoreflect.FieldDescriptor fd_MsgUpdateUserSubscription_period protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUpdateUserSubscription = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUpdateUserSubscription") fd_MsgUpdateUserSubscription_developer = md_MsgUpdateUserSubscription.Fields().ByName("developer") fd_MsgUpdateUserSubscription_user_did = md_MsgUpdateUserSubscription.Fields().ByName("user_did") fd_MsgUpdateUserSubscription_amount = md_MsgUpdateUserSubscription.Fields().ByName("amount") fd_MsgUpdateUserSubscription_period = md_MsgUpdateUserSubscription.Fields().ByName("period") } var _ protoreflect.Message = (*fastReflection_MsgUpdateUserSubscription)(nil) type fastReflection_MsgUpdateUserSubscription MsgUpdateUserSubscription func (x *MsgUpdateUserSubscription) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateUserSubscription)(x) } func (x *MsgUpdateUserSubscription) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateUserSubscription_messageType fastReflection_MsgUpdateUserSubscription_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateUserSubscription_messageType{} type fastReflection_MsgUpdateUserSubscription_messageType struct{} func (x fastReflection_MsgUpdateUserSubscription_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateUserSubscription)(nil) } func (x fastReflection_MsgUpdateUserSubscription_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateUserSubscription) } func (x fastReflection_MsgUpdateUserSubscription_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateUserSubscription } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateUserSubscription) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateUserSubscription } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateUserSubscription) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateUserSubscription_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateUserSubscription) New() protoreflect.Message { return new(fastReflection_MsgUpdateUserSubscription) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateUserSubscription) Interface() protoreflect.ProtoMessage { return (*MsgUpdateUserSubscription)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateUserSubscription) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_MsgUpdateUserSubscription_developer, value) { return } } if x.UserDid != "" { value := protoreflect.ValueOfString(x.UserDid) if !f(fd_MsgUpdateUserSubscription_user_did, value) { return } } if x.Amount != uint64(0) { value := protoreflect.ValueOfUint64(x.Amount) if !f(fd_MsgUpdateUserSubscription_amount, value) { return } } if x.Period != uint64(0) { value := protoreflect.ValueOfUint64(x.Period) if !f(fd_MsgUpdateUserSubscription_period, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateUserSubscription) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.user_did": return x.UserDid != "" case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.amount": return x.Amount != uint64(0) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.period": return x.Period != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscription does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscription) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.developer": x.Developer = "" case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.user_did": x.UserDid = "" case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.amount": x.Amount = uint64(0) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.period": x.Period = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscription does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateUserSubscription) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.user_did": value := x.UserDid return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.amount": value := x.Amount return protoreflect.ValueOfUint64(value) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.period": value := x.Period return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscription does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscription) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.user_did": x.UserDid = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.amount": x.Amount = value.Uint() case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.period": x.Period = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscription does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscription) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.MsgUpdateUserSubscription is not mutable")) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.user_did": panic(fmt.Errorf("field user_did of message sourcehub.tier.v1beta1.MsgUpdateUserSubscription is not mutable")) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.amount": panic(fmt.Errorf("field amount of message sourcehub.tier.v1beta1.MsgUpdateUserSubscription is not mutable")) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.period": panic(fmt.Errorf("field period of message sourcehub.tier.v1beta1.MsgUpdateUserSubscription is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscription does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateUserSubscription) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.user_did": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.amount": return protoreflect.ValueOfUint64(uint64(0)) case "sourcehub.tier.v1beta1.MsgUpdateUserSubscription.period": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscription does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateUserSubscription) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUpdateUserSubscription", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateUserSubscription) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscription) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateUserSubscription) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateUserSubscription) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateUserSubscription) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.UserDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Amount != 0 { n += 1 + runtime.Sov(uint64(x.Amount)) } if x.Period != 0 { n += 1 + runtime.Sov(uint64(x.Period)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateUserSubscription) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Period != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) i-- dAtA[i] = 0x20 } if x.Amount != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount)) i-- dAtA[i] = 0x18 } if len(x.UserDid) > 0 { i -= len(x.UserDid) copy(dAtA[i:], x.UserDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserDid))) i-- dAtA[i] = 0x12 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateUserSubscription) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UserDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } x.Amount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Amount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } x.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgUpdateUserSubscriptionResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgUpdateUserSubscriptionResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgUpdateUserSubscriptionResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateUserSubscriptionResponse)(nil) type fastReflection_MsgUpdateUserSubscriptionResponse MsgUpdateUserSubscriptionResponse func (x *MsgUpdateUserSubscriptionResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgUpdateUserSubscriptionResponse)(x) } func (x *MsgUpdateUserSubscriptionResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgUpdateUserSubscriptionResponse_messageType fastReflection_MsgUpdateUserSubscriptionResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgUpdateUserSubscriptionResponse_messageType{} type fastReflection_MsgUpdateUserSubscriptionResponse_messageType struct{} func (x fastReflection_MsgUpdateUserSubscriptionResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgUpdateUserSubscriptionResponse)(nil) } func (x fastReflection_MsgUpdateUserSubscriptionResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgUpdateUserSubscriptionResponse) } func (x fastReflection_MsgUpdateUserSubscriptionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateUserSubscriptionResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgUpdateUserSubscriptionResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Type() protoreflect.MessageType { return _fastReflection_MsgUpdateUserSubscriptionResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) New() protoreflect.Message { return new(fastReflection_MsgUpdateUserSubscriptionResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Interface() protoreflect.ProtoMessage { return (*MsgUpdateUserSubscriptionResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgUpdateUserSubscriptionResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgUpdateUserSubscriptionResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateUserSubscriptionResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgUpdateUserSubscriptionResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUserSubscriptionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUserSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRemoveUserSubscription protoreflect.MessageDescriptor fd_MsgRemoveUserSubscription_developer protoreflect.FieldDescriptor fd_MsgRemoveUserSubscription_user_did protoreflect.FieldDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgRemoveUserSubscription = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgRemoveUserSubscription") fd_MsgRemoveUserSubscription_developer = md_MsgRemoveUserSubscription.Fields().ByName("developer") fd_MsgRemoveUserSubscription_user_did = md_MsgRemoveUserSubscription.Fields().ByName("user_did") } var _ protoreflect.Message = (*fastReflection_MsgRemoveUserSubscription)(nil) type fastReflection_MsgRemoveUserSubscription MsgRemoveUserSubscription func (x *MsgRemoveUserSubscription) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRemoveUserSubscription)(x) } func (x *MsgRemoveUserSubscription) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRemoveUserSubscription_messageType fastReflection_MsgRemoveUserSubscription_messageType var _ protoreflect.MessageType = fastReflection_MsgRemoveUserSubscription_messageType{} type fastReflection_MsgRemoveUserSubscription_messageType struct{} func (x fastReflection_MsgRemoveUserSubscription_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRemoveUserSubscription)(nil) } func (x fastReflection_MsgRemoveUserSubscription_messageType) New() protoreflect.Message { return new(fastReflection_MsgRemoveUserSubscription) } func (x fastReflection_MsgRemoveUserSubscription_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveUserSubscription } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRemoveUserSubscription) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveUserSubscription } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRemoveUserSubscription) Type() protoreflect.MessageType { return _fastReflection_MsgRemoveUserSubscription_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRemoveUserSubscription) New() protoreflect.Message { return new(fastReflection_MsgRemoveUserSubscription) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRemoveUserSubscription) Interface() protoreflect.ProtoMessage { return (*MsgRemoveUserSubscription)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRemoveUserSubscription) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Developer != "" { value := protoreflect.ValueOfString(x.Developer) if !f(fd_MsgRemoveUserSubscription_developer, value) { return } } if x.UserDid != "" { value := protoreflect.ValueOfString(x.UserDid) if !f(fd_MsgRemoveUserSubscription_user_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRemoveUserSubscription) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.developer": return x.Developer != "" case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.user_did": return x.UserDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscription does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscription) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.developer": x.Developer = "" case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.user_did": x.UserDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscription does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRemoveUserSubscription) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.developer": value := x.Developer return protoreflect.ValueOfString(value) case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.user_did": value := x.UserDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscription does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscription) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.developer": x.Developer = value.Interface().(string) case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.user_did": x.UserDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscription does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscription) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.developer": panic(fmt.Errorf("field developer of message sourcehub.tier.v1beta1.MsgRemoveUserSubscription is not mutable")) case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.user_did": panic(fmt.Errorf("field user_did of message sourcehub.tier.v1beta1.MsgRemoveUserSubscription is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscription does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRemoveUserSubscription) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.developer": return protoreflect.ValueOfString("") case "sourcehub.tier.v1beta1.MsgRemoveUserSubscription.user_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscription")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscription does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRemoveUserSubscription) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgRemoveUserSubscription", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRemoveUserSubscription) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscription) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRemoveUserSubscription) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRemoveUserSubscription) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRemoveUserSubscription) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Developer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.UserDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveUserSubscription) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.UserDid) > 0 { i -= len(x.UserDid) copy(dAtA[i:], x.UserDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserDid))) i-- dAtA[i] = 0x12 } if len(x.Developer) > 0 { i -= len(x.Developer) copy(dAtA[i:], x.Developer) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Developer))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveUserSubscription) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveUserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveUserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.UserDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MsgRemoveUserSubscriptionResponse protoreflect.MessageDescriptor ) func init() { file_sourcehub_tier_v1beta1_tx_proto_init() md_MsgRemoveUserSubscriptionResponse = File_sourcehub_tier_v1beta1_tx_proto.Messages().ByName("MsgRemoveUserSubscriptionResponse") } var _ protoreflect.Message = (*fastReflection_MsgRemoveUserSubscriptionResponse)(nil) type fastReflection_MsgRemoveUserSubscriptionResponse MsgRemoveUserSubscriptionResponse func (x *MsgRemoveUserSubscriptionResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_MsgRemoveUserSubscriptionResponse)(x) } func (x *MsgRemoveUserSubscriptionResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MsgRemoveUserSubscriptionResponse_messageType fastReflection_MsgRemoveUserSubscriptionResponse_messageType var _ protoreflect.MessageType = fastReflection_MsgRemoveUserSubscriptionResponse_messageType{} type fastReflection_MsgRemoveUserSubscriptionResponse_messageType struct{} func (x fastReflection_MsgRemoveUserSubscriptionResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_MsgRemoveUserSubscriptionResponse)(nil) } func (x fastReflection_MsgRemoveUserSubscriptionResponse_messageType) New() protoreflect.Message { return new(fastReflection_MsgRemoveUserSubscriptionResponse) } func (x fastReflection_MsgRemoveUserSubscriptionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveUserSubscriptionResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgRemoveUserSubscriptionResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Type() protoreflect.MessageType { return _fastReflection_MsgRemoveUserSubscriptionResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) New() protoreflect.Message { return new(fastReflection_MsgRemoveUserSubscriptionResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Interface() protoreflect.ProtoMessage { return (*MsgRemoveUserSubscriptionResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse")) } panic(fmt.Errorf("message sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MsgRemoveUserSubscriptionResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgRemoveUserSubscriptionResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveUserSubscriptionResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgRemoveUserSubscriptionResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveUserSubscriptionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveUserSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcehub/tier/v1beta1/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // MsgUpdateParams is the Msg/UpdateParams request type. type MsgUpdateParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // 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"` // NOTE: All parameters must be supplied. Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgUpdateParams) GetAuthority() string { if x != nil { return x.Authority } return "" } func (x *MsgUpdateParams) GetParams() *Params { if x != nil { return x.Params } return nil } // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. type MsgUpdateParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{1} } // MsgLock is the Msg/Lock request type. type MsgLock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Stake *v1beta1.Coin `protobuf:"bytes,3,opt,name=stake,proto3" json:"stake,omitempty"` } func (x *MsgLock) Reset() { *x = MsgLock{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgLock) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgLock) ProtoMessage() {} // Deprecated: Use MsgLock.ProtoReflect.Descriptor instead. func (*MsgLock) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgLock) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *MsgLock) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } func (x *MsgLock) GetStake() *v1beta1.Coin { if x != nil { return x.Stake } return nil } // MsgLockResponse defines the response structure for executing a MsgLock message. type MsgLockResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgLockResponse) Reset() { *x = MsgLockResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgLockResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgLockResponse) ProtoMessage() {} // Deprecated: Use MsgLockResponse.ProtoReflect.Descriptor instead. func (*MsgLockResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{3} } // MsgLockAuto is the Msg/LockAuto request type. type MsgLockAuto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Stake *v1beta1.Coin `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"` } func (x *MsgLockAuto) Reset() { *x = MsgLockAuto{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgLockAuto) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgLockAuto) ProtoMessage() {} // Deprecated: Use MsgLockAuto.ProtoReflect.Descriptor instead. func (*MsgLockAuto) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgLockAuto) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *MsgLockAuto) GetStake() *v1beta1.Coin { if x != nil { return x.Stake } return nil } // MsgLockAutoResponse defines the response structure for executing a MsgLockAuto message. type MsgLockAutoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } func (x *MsgLockAutoResponse) Reset() { *x = MsgLockAutoResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgLockAutoResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgLockAutoResponse) ProtoMessage() {} // Deprecated: Use MsgLockAutoResponse.ProtoReflect.Descriptor instead. func (*MsgLockAutoResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{5} } func (x *MsgLockAutoResponse) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } // MsgUnlock is the Msg/Unlock request type. type MsgUnlock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Stake *v1beta1.Coin `protobuf:"bytes,3,opt,name=stake,proto3" json:"stake,omitempty"` } func (x *MsgUnlock) Reset() { *x = MsgUnlock{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUnlock) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUnlock) ProtoMessage() {} // Deprecated: Use MsgUnlock.ProtoReflect.Descriptor instead. func (*MsgUnlock) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgUnlock) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *MsgUnlock) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } func (x *MsgUnlock) GetStake() *v1beta1.Coin { if x != nil { return x.Stake } return nil } // MsgUnlockResponse defines the response structure for executing a MsgUnlock message. type MsgUnlockResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` CompletionTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"` UnlockTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=unlock_time,json=unlockTime,proto3" json:"unlock_time,omitempty"` } func (x *MsgUnlockResponse) Reset() { *x = MsgUnlockResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUnlockResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUnlockResponse) ProtoMessage() {} // Deprecated: Use MsgUnlockResponse.ProtoReflect.Descriptor instead. func (*MsgUnlockResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{7} } func (x *MsgUnlockResponse) GetCreationHeight() int64 { if x != nil { return x.CreationHeight } return 0 } func (x *MsgUnlockResponse) GetCompletionTime() *timestamppb.Timestamp { if x != nil { return x.CompletionTime } return nil } func (x *MsgUnlockResponse) GetUnlockTime() *timestamppb.Timestamp { if x != nil { return x.UnlockTime } return nil } // MsgRedelegate is the Msg/Redelegate request type. type MsgRedelegate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` SrcValidatorAddress string `protobuf:"bytes,2,opt,name=src_validator_address,json=srcValidatorAddress,proto3" json:"src_validator_address,omitempty"` DstValidatorAddress string `protobuf:"bytes,3,opt,name=dst_validator_address,json=dstValidatorAddress,proto3" json:"dst_validator_address,omitempty"` Stake *v1beta1.Coin `protobuf:"bytes,4,opt,name=stake,proto3" json:"stake,omitempty"` } func (x *MsgRedelegate) Reset() { *x = MsgRedelegate{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRedelegate) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRedelegate) ProtoMessage() {} // Deprecated: Use MsgRedelegate.ProtoReflect.Descriptor instead. func (*MsgRedelegate) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgRedelegate) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *MsgRedelegate) GetSrcValidatorAddress() string { if x != nil { return x.SrcValidatorAddress } return "" } func (x *MsgRedelegate) GetDstValidatorAddress() string { if x != nil { return x.DstValidatorAddress } return "" } func (x *MsgRedelegate) GetStake() *v1beta1.Coin { if x != nil { return x.Stake } return nil } // MsgRedelegateResponse defines the response structure for executing a MsgRedelegate message. type MsgRedelegateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CompletionTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"` } func (x *MsgRedelegateResponse) Reset() { *x = MsgRedelegateResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRedelegateResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRedelegateResponse) ProtoMessage() {} // Deprecated: Use MsgRedelegateResponse.ProtoReflect.Descriptor instead. func (*MsgRedelegateResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{9} } func (x *MsgRedelegateResponse) GetCompletionTime() *timestamppb.Timestamp { if x != nil { return x.CompletionTime } return nil } // MsgCancelUnlocking is the Msg/CancelUnlocking request type. type MsgCancelUnlocking struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // amount is always less than or equal to unlocking delegation entry balance. Stake *v1beta1.Coin `protobuf:"bytes,3,opt,name=stake,proto3" json:"stake,omitempty"` // creation_height is the height which the unlocking took place. CreationHeight int64 `protobuf:"varint,4,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` } func (x *MsgCancelUnlocking) Reset() { *x = MsgCancelUnlocking{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCancelUnlocking) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCancelUnlocking) ProtoMessage() {} // Deprecated: Use MsgCancelUnlocking.ProtoReflect.Descriptor instead. func (*MsgCancelUnlocking) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{10} } func (x *MsgCancelUnlocking) GetDelegatorAddress() string { if x != nil { return x.DelegatorAddress } return "" } func (x *MsgCancelUnlocking) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } func (x *MsgCancelUnlocking) GetStake() *v1beta1.Coin { if x != nil { return x.Stake } return nil } func (x *MsgCancelUnlocking) GetCreationHeight() int64 { if x != nil { return x.CreationHeight } return 0 } // MsgCancelUnlockingResponse defines the response structure for executing a MsgCancelUnlocking message. type MsgCancelUnlockingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgCancelUnlockingResponse) Reset() { *x = MsgCancelUnlockingResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCancelUnlockingResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCancelUnlockingResponse) ProtoMessage() {} // Deprecated: Use MsgCancelUnlockingResponse.ProtoReflect.Descriptor instead. func (*MsgCancelUnlockingResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{11} } // MsgCreateDeveloper is the Msg/CreateDeveloper request type. type MsgCreateDeveloper struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer being created. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. AutoLockEnabled bool `protobuf:"varint,2,opt,name=auto_lock_enabled,json=autoLockEnabled,proto3" json:"auto_lock_enabled,omitempty"` } func (x *MsgCreateDeveloper) Reset() { *x = MsgCreateDeveloper{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCreateDeveloper) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCreateDeveloper) ProtoMessage() {} // Deprecated: Use MsgCreateDeveloper.ProtoReflect.Descriptor instead. func (*MsgCreateDeveloper) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgCreateDeveloper) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *MsgCreateDeveloper) GetAutoLockEnabled() bool { if x != nil { return x.AutoLockEnabled } return false } // MsgCreateDeveloperResponse defines the response structure for executing a MsgCreateDeveloper message. type MsgCreateDeveloperResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgCreateDeveloperResponse) Reset() { *x = MsgCreateDeveloperResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgCreateDeveloperResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgCreateDeveloperResponse) ProtoMessage() {} // Deprecated: Use MsgCreateDeveloperResponse.ProtoReflect.Descriptor instead. func (*MsgCreateDeveloperResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{13} } // MsgUpdateDeveloper is the Msg/UpdateDeveloper request type. type MsgUpdateDeveloper struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer being updated. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. AutoLockEnabled bool `protobuf:"varint,2,opt,name=auto_lock_enabled,json=autoLockEnabled,proto3" json:"auto_lock_enabled,omitempty"` } func (x *MsgUpdateDeveloper) Reset() { *x = MsgUpdateDeveloper{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateDeveloper) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateDeveloper) ProtoMessage() {} // Deprecated: Use MsgUpdateDeveloper.ProtoReflect.Descriptor instead. func (*MsgUpdateDeveloper) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{14} } func (x *MsgUpdateDeveloper) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *MsgUpdateDeveloper) GetAutoLockEnabled() bool { if x != nil { return x.AutoLockEnabled } return false } // MsgUpdateDeveloperResponse defines the response structure for executing a MsgUpdateDeveloper message. type MsgUpdateDeveloperResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgUpdateDeveloperResponse) Reset() { *x = MsgUpdateDeveloperResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateDeveloperResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateDeveloperResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateDeveloperResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateDeveloperResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{15} } // MsgRemoveDeveloper is the Msg/RemoveDeveloper request type. type MsgRemoveDeveloper struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer being removed. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` } func (x *MsgRemoveDeveloper) Reset() { *x = MsgRemoveDeveloper{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRemoveDeveloper) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRemoveDeveloper) ProtoMessage() {} // Deprecated: Use MsgRemoveDeveloper.ProtoReflect.Descriptor instead. func (*MsgRemoveDeveloper) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{16} } func (x *MsgRemoveDeveloper) GetDeveloper() string { if x != nil { return x.Developer } return "" } // MsgRemoveDeveloperResponse defines the response structure for executing a MsgRemoveDeveloper message. type MsgRemoveDeveloperResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgRemoveDeveloperResponse) Reset() { *x = MsgRemoveDeveloperResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRemoveDeveloperResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRemoveDeveloperResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveDeveloperResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveDeveloperResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{17} } // MsgAddUserSubscription is the Msg/AddUserSubscription request type. type MsgAddUserSubscription struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer adding the subscription. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the user being added to the subscription. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` // amount is the credit amount to be allocated to the user per period. Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // period is the subscription period duration in seconds. Period uint64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` } func (x *MsgAddUserSubscription) Reset() { *x = MsgAddUserSubscription{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgAddUserSubscription) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgAddUserSubscription) ProtoMessage() {} // Deprecated: Use MsgAddUserSubscription.ProtoReflect.Descriptor instead. func (*MsgAddUserSubscription) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{18} } func (x *MsgAddUserSubscription) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *MsgAddUserSubscription) GetUserDid() string { if x != nil { return x.UserDid } return "" } func (x *MsgAddUserSubscription) GetAmount() uint64 { if x != nil { return x.Amount } return 0 } func (x *MsgAddUserSubscription) GetPeriod() uint64 { if x != nil { return x.Period } return 0 } // MsgAddUserSubscriptionResponse defines the response structure for executing a MsgAddUserSubscription message. type MsgAddUserSubscriptionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgAddUserSubscriptionResponse) Reset() { *x = MsgAddUserSubscriptionResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgAddUserSubscriptionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgAddUserSubscriptionResponse) ProtoMessage() {} // Deprecated: Use MsgAddUserSubscriptionResponse.ProtoReflect.Descriptor instead. func (*MsgAddUserSubscriptionResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{19} } // MsgUpdateUserSubscription is the Msg/UpdateUserSubscription request type. type MsgUpdateUserSubscription struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer updating the subscription. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the user whose subscription is being updated. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` // amount is the new credit amount to be allocated to the user per period. Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // period is the new subscription period duration in seconds. Period uint64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` } func (x *MsgUpdateUserSubscription) Reset() { *x = MsgUpdateUserSubscription{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateUserSubscription) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateUserSubscription) ProtoMessage() {} // Deprecated: Use MsgUpdateUserSubscription.ProtoReflect.Descriptor instead. func (*MsgUpdateUserSubscription) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{20} } func (x *MsgUpdateUserSubscription) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *MsgUpdateUserSubscription) GetUserDid() string { if x != nil { return x.UserDid } return "" } func (x *MsgUpdateUserSubscription) GetAmount() uint64 { if x != nil { return x.Amount } return 0 } func (x *MsgUpdateUserSubscription) GetPeriod() uint64 { if x != nil { return x.Period } return 0 } // MsgUpdateUserSubscriptionResponse defines the response structure for executing a MsgUpdateUserSubscription message. type MsgUpdateUserSubscriptionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgUpdateUserSubscriptionResponse) Reset() { *x = MsgUpdateUserSubscriptionResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgUpdateUserSubscriptionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgUpdateUserSubscriptionResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateUserSubscriptionResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateUserSubscriptionResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{21} } // MsgRemoveUserSubscription is the Msg/RemoveUserSubscription request type. // This message removes the user subscription and expires the associated allowance at the end of the current period. type MsgRemoveUserSubscription struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // developer is the address of the developer removing the subscription. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the user whose subscription is being removed. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` } func (x *MsgRemoveUserSubscription) Reset() { *x = MsgRemoveUserSubscription{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRemoveUserSubscription) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRemoveUserSubscription) ProtoMessage() {} // Deprecated: Use MsgRemoveUserSubscription.ProtoReflect.Descriptor instead. func (*MsgRemoveUserSubscription) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{22} } func (x *MsgRemoveUserSubscription) GetDeveloper() string { if x != nil { return x.Developer } return "" } func (x *MsgRemoveUserSubscription) GetUserDid() string { if x != nil { return x.UserDid } return "" } // MsgRemoveUserSubscriptionResponse defines the response structure for executing a MsgRemoveUserSubscription message. type MsgRemoveUserSubscriptionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MsgRemoveUserSubscriptionResponse) Reset() { *x = MsgRemoveUserSubscriptionResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcehub_tier_v1beta1_tx_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MsgRemoveUserSubscriptionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MsgRemoveUserSubscriptionResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveUserSubscriptionResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveUserSubscriptionResponse) Descriptor() ([]byte, []int) { return file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP(), []int{23} } var File_sourcehub_tier_v1beta1_tx_proto protoreflect.FileDescriptor var file_sourcehub_tier_v1beta1_tx_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x78, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x3a, 0x16, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x6f, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x3a, 0x16, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x65, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf6, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x3a, 0x16, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xd8, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x73, 0x72, 0x63, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x73, 0x72, 0x63, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x64, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x64, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x3a, 0x16, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x6b, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x16, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x44, 0x69, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbf, 0x0a, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x68, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x04, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x1a, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x6f, 0x12, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x6f, 0x1a, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0a, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x36, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd4, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2e, 0x54, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x5c, 0x54, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x3a, 0x3a, 0x54, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcehub_tier_v1beta1_tx_proto_rawDescOnce sync.Once file_sourcehub_tier_v1beta1_tx_proto_rawDescData = file_sourcehub_tier_v1beta1_tx_proto_rawDesc ) func file_sourcehub_tier_v1beta1_tx_proto_rawDescGZIP() []byte { file_sourcehub_tier_v1beta1_tx_proto_rawDescOnce.Do(func() { file_sourcehub_tier_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcehub_tier_v1beta1_tx_proto_rawDescData) }) return file_sourcehub_tier_v1beta1_tx_proto_rawDescData } var file_sourcehub_tier_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_sourcehub_tier_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: sourcehub.tier.v1beta1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: sourcehub.tier.v1beta1.MsgUpdateParamsResponse (*MsgLock)(nil), // 2: sourcehub.tier.v1beta1.MsgLock (*MsgLockResponse)(nil), // 3: sourcehub.tier.v1beta1.MsgLockResponse (*MsgLockAuto)(nil), // 4: sourcehub.tier.v1beta1.MsgLockAuto (*MsgLockAutoResponse)(nil), // 5: sourcehub.tier.v1beta1.MsgLockAutoResponse (*MsgUnlock)(nil), // 6: sourcehub.tier.v1beta1.MsgUnlock (*MsgUnlockResponse)(nil), // 7: sourcehub.tier.v1beta1.MsgUnlockResponse (*MsgRedelegate)(nil), // 8: sourcehub.tier.v1beta1.MsgRedelegate (*MsgRedelegateResponse)(nil), // 9: sourcehub.tier.v1beta1.MsgRedelegateResponse (*MsgCancelUnlocking)(nil), // 10: sourcehub.tier.v1beta1.MsgCancelUnlocking (*MsgCancelUnlockingResponse)(nil), // 11: sourcehub.tier.v1beta1.MsgCancelUnlockingResponse (*MsgCreateDeveloper)(nil), // 12: sourcehub.tier.v1beta1.MsgCreateDeveloper (*MsgCreateDeveloperResponse)(nil), // 13: sourcehub.tier.v1beta1.MsgCreateDeveloperResponse (*MsgUpdateDeveloper)(nil), // 14: sourcehub.tier.v1beta1.MsgUpdateDeveloper (*MsgUpdateDeveloperResponse)(nil), // 15: sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse (*MsgRemoveDeveloper)(nil), // 16: sourcehub.tier.v1beta1.MsgRemoveDeveloper (*MsgRemoveDeveloperResponse)(nil), // 17: sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse (*MsgAddUserSubscription)(nil), // 18: sourcehub.tier.v1beta1.MsgAddUserSubscription (*MsgAddUserSubscriptionResponse)(nil), // 19: sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse (*MsgUpdateUserSubscription)(nil), // 20: sourcehub.tier.v1beta1.MsgUpdateUserSubscription (*MsgUpdateUserSubscriptionResponse)(nil), // 21: sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse (*MsgRemoveUserSubscription)(nil), // 22: sourcehub.tier.v1beta1.MsgRemoveUserSubscription (*MsgRemoveUserSubscriptionResponse)(nil), // 23: sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse (*Params)(nil), // 24: sourcehub.tier.v1beta1.Params (*v1beta1.Coin)(nil), // 25: cosmos.base.v1beta1.Coin (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp } var file_sourcehub_tier_v1beta1_tx_proto_depIdxs = []int32{ 24, // 0: sourcehub.tier.v1beta1.MsgUpdateParams.params:type_name -> sourcehub.tier.v1beta1.Params 25, // 1: sourcehub.tier.v1beta1.MsgLock.stake:type_name -> cosmos.base.v1beta1.Coin 25, // 2: sourcehub.tier.v1beta1.MsgLockAuto.stake:type_name -> cosmos.base.v1beta1.Coin 25, // 3: sourcehub.tier.v1beta1.MsgUnlock.stake:type_name -> cosmos.base.v1beta1.Coin 26, // 4: sourcehub.tier.v1beta1.MsgUnlockResponse.completion_time:type_name -> google.protobuf.Timestamp 26, // 5: sourcehub.tier.v1beta1.MsgUnlockResponse.unlock_time:type_name -> google.protobuf.Timestamp 25, // 6: sourcehub.tier.v1beta1.MsgRedelegate.stake:type_name -> cosmos.base.v1beta1.Coin 26, // 7: sourcehub.tier.v1beta1.MsgRedelegateResponse.completion_time:type_name -> google.protobuf.Timestamp 25, // 8: sourcehub.tier.v1beta1.MsgCancelUnlocking.stake:type_name -> cosmos.base.v1beta1.Coin 0, // 9: sourcehub.tier.v1beta1.Msg.UpdateParams:input_type -> sourcehub.tier.v1beta1.MsgUpdateParams 2, // 10: sourcehub.tier.v1beta1.Msg.Lock:input_type -> sourcehub.tier.v1beta1.MsgLock 4, // 11: sourcehub.tier.v1beta1.Msg.LockAuto:input_type -> sourcehub.tier.v1beta1.MsgLockAuto 6, // 12: sourcehub.tier.v1beta1.Msg.Unlock:input_type -> sourcehub.tier.v1beta1.MsgUnlock 8, // 13: sourcehub.tier.v1beta1.Msg.Redelegate:input_type -> sourcehub.tier.v1beta1.MsgRedelegate 10, // 14: sourcehub.tier.v1beta1.Msg.CancelUnlocking:input_type -> sourcehub.tier.v1beta1.MsgCancelUnlocking 12, // 15: sourcehub.tier.v1beta1.Msg.CreateDeveloper:input_type -> sourcehub.tier.v1beta1.MsgCreateDeveloper 14, // 16: sourcehub.tier.v1beta1.Msg.UpdateDeveloper:input_type -> sourcehub.tier.v1beta1.MsgUpdateDeveloper 16, // 17: sourcehub.tier.v1beta1.Msg.RemoveDeveloper:input_type -> sourcehub.tier.v1beta1.MsgRemoveDeveloper 18, // 18: sourcehub.tier.v1beta1.Msg.AddUserSubscription:input_type -> sourcehub.tier.v1beta1.MsgAddUserSubscription 20, // 19: sourcehub.tier.v1beta1.Msg.UpdateUserSubscription:input_type -> sourcehub.tier.v1beta1.MsgUpdateUserSubscription 22, // 20: sourcehub.tier.v1beta1.Msg.RemoveUserSubscription:input_type -> sourcehub.tier.v1beta1.MsgRemoveUserSubscription 1, // 21: sourcehub.tier.v1beta1.Msg.UpdateParams:output_type -> sourcehub.tier.v1beta1.MsgUpdateParamsResponse 3, // 22: sourcehub.tier.v1beta1.Msg.Lock:output_type -> sourcehub.tier.v1beta1.MsgLockResponse 5, // 23: sourcehub.tier.v1beta1.Msg.LockAuto:output_type -> sourcehub.tier.v1beta1.MsgLockAutoResponse 7, // 24: sourcehub.tier.v1beta1.Msg.Unlock:output_type -> sourcehub.tier.v1beta1.MsgUnlockResponse 9, // 25: sourcehub.tier.v1beta1.Msg.Redelegate:output_type -> sourcehub.tier.v1beta1.MsgRedelegateResponse 11, // 26: sourcehub.tier.v1beta1.Msg.CancelUnlocking:output_type -> sourcehub.tier.v1beta1.MsgCancelUnlockingResponse 13, // 27: sourcehub.tier.v1beta1.Msg.CreateDeveloper:output_type -> sourcehub.tier.v1beta1.MsgCreateDeveloperResponse 15, // 28: sourcehub.tier.v1beta1.Msg.UpdateDeveloper:output_type -> sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse 17, // 29: sourcehub.tier.v1beta1.Msg.RemoveDeveloper:output_type -> sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse 19, // 30: sourcehub.tier.v1beta1.Msg.AddUserSubscription:output_type -> sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse 21, // 31: sourcehub.tier.v1beta1.Msg.UpdateUserSubscription:output_type -> sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse 23, // 32: sourcehub.tier.v1beta1.Msg.RemoveUserSubscription:output_type -> sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse 21, // [21:33] is the sub-list for method output_type 9, // [9:21] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name 9, // [9:9] is the sub-list for extension extendee 0, // [0:9] is the sub-list for field type_name } func init() { file_sourcehub_tier_v1beta1_tx_proto_init() } func file_sourcehub_tier_v1beta1_tx_proto_init() { if File_sourcehub_tier_v1beta1_tx_proto != nil { return } file_sourcehub_tier_v1beta1_params_proto_init() if !protoimpl.UnsafeEnabled { file_sourcehub_tier_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLock); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLockResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLockAuto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLockAutoResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUnlock); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUnlockResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRedelegate); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRedelegateResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCancelUnlocking); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCancelUnlockingResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreateDeveloper); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreateDeveloperResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateDeveloper); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateDeveloperResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveDeveloper); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveDeveloperResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAddUserSubscription); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAddUserSubscriptionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateUserSubscription); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateUserSubscriptionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveUserSubscription); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcehub_tier_v1beta1_tx_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveUserSubscriptionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcehub_tier_v1beta1_tx_proto_rawDesc, NumEnums: 0, NumMessages: 24, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcehub_tier_v1beta1_tx_proto_goTypes, DependencyIndexes: file_sourcehub_tier_v1beta1_tx_proto_depIdxs, MessageInfos: file_sourcehub_tier_v1beta1_tx_proto_msgTypes, }.Build() File_sourcehub_tier_v1beta1_tx_proto = out.File file_sourcehub_tier_v1beta1_tx_proto_rawDesc = nil file_sourcehub_tier_v1beta1_tx_proto_goTypes = nil file_sourcehub_tier_v1beta1_tx_proto_depIdxs = nil } ================================================ FILE: api/sourcehub/tier/v1beta1/tx_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sourcehub/tier/v1beta1/tx.proto package tierv1beta1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Msg_UpdateParams_FullMethodName = "/sourcehub.tier.v1beta1.Msg/UpdateParams" Msg_Lock_FullMethodName = "/sourcehub.tier.v1beta1.Msg/Lock" Msg_LockAuto_FullMethodName = "/sourcehub.tier.v1beta1.Msg/LockAuto" Msg_Unlock_FullMethodName = "/sourcehub.tier.v1beta1.Msg/Unlock" Msg_Redelegate_FullMethodName = "/sourcehub.tier.v1beta1.Msg/Redelegate" Msg_CancelUnlocking_FullMethodName = "/sourcehub.tier.v1beta1.Msg/CancelUnlocking" Msg_CreateDeveloper_FullMethodName = "/sourcehub.tier.v1beta1.Msg/CreateDeveloper" Msg_UpdateDeveloper_FullMethodName = "/sourcehub.tier.v1beta1.Msg/UpdateDeveloper" Msg_RemoveDeveloper_FullMethodName = "/sourcehub.tier.v1beta1.Msg/RemoveDeveloper" Msg_AddUserSubscription_FullMethodName = "/sourcehub.tier.v1beta1.Msg/AddUserSubscription" Msg_UpdateUserSubscription_FullMethodName = "/sourcehub.tier.v1beta1.Msg/UpdateUserSubscription" Msg_RemoveUserSubscription_FullMethodName = "/sourcehub.tier.v1beta1.Msg/RemoveUserSubscription" ) // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // Msg defines the Msg service. 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) // Lock defines a (developer) operation for locking a stake. Lock(ctx context.Context, in *MsgLock, opts ...grpc.CallOption) (*MsgLockResponse, error) // LockAuto defines a (developer) operation for locking a stake with automatic validator selection. LockAuto(ctx context.Context, in *MsgLockAuto, opts ...grpc.CallOption) (*MsgLockAutoResponse, error) // Unlock defines a (developer) operation for unlocking a stake. Unlock(ctx context.Context, in *MsgUnlock, opts ...grpc.CallOption) (*MsgUnlockResponse, error) // Redelegate defines a (developer) operation for re-delegating a stake. Redelegate(ctx context.Context, in *MsgRedelegate, opts ...grpc.CallOption) (*MsgRedelegateResponse, error) // CancelUnlocking defines a (developer) operation for canceling an unlocking stake. CancelUnlocking(ctx context.Context, in *MsgCancelUnlocking, opts ...grpc.CallOption) (*MsgCancelUnlockingResponse, error) // CreateDeveloper defines a (developer) operation for creating a new developer record. CreateDeveloper(ctx context.Context, in *MsgCreateDeveloper, opts ...grpc.CallOption) (*MsgCreateDeveloperResponse, error) // UpdateDeveloper defines a (developer) operation for updating an existing developer record. UpdateDeveloper(ctx context.Context, in *MsgUpdateDeveloper, opts ...grpc.CallOption) (*MsgUpdateDeveloperResponse, error) // RemoveDeveloper defines a (developer) operation for removing a developer record. RemoveDeveloper(ctx context.Context, in *MsgRemoveDeveloper, opts ...grpc.CallOption) (*MsgRemoveDeveloperResponse, error) // AddUserSubscription defines a (developer) operation for adding a user subscription. AddUserSubscription(ctx context.Context, in *MsgAddUserSubscription, opts ...grpc.CallOption) (*MsgAddUserSubscriptionResponse, error) // UpdateUserSubscription defines a (developer) operation for updating a user subscription. UpdateUserSubscription(ctx context.Context, in *MsgUpdateUserSubscription, opts ...grpc.CallOption) (*MsgUpdateUserSubscriptionResponse, error) // RemoveUserSubscription defines a (developer) operation for removing a user subscription. // This expires the allowance at the end of the current period rather than immediately revoking it. RemoveUserSubscription(ctx context.Context, in *MsgRemoveUserSubscription, opts ...grpc.CallOption) (*MsgRemoveUserSubscriptionResponse, error) } type msgClient struct { cc grpc.ClientConnInterface } func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) Lock(ctx context.Context, in *MsgLock, opts ...grpc.CallOption) (*MsgLockResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgLockResponse) err := c.cc.Invoke(ctx, Msg_Lock_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) LockAuto(ctx context.Context, in *MsgLockAuto, opts ...grpc.CallOption) (*MsgLockAutoResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgLockAutoResponse) err := c.cc.Invoke(ctx, Msg_LockAuto_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) Unlock(ctx context.Context, in *MsgUnlock, opts ...grpc.CallOption) (*MsgUnlockResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUnlockResponse) err := c.cc.Invoke(ctx, Msg_Unlock_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) Redelegate(ctx context.Context, in *MsgRedelegate, opts ...grpc.CallOption) (*MsgRedelegateResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgRedelegateResponse) err := c.cc.Invoke(ctx, Msg_Redelegate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CancelUnlocking(ctx context.Context, in *MsgCancelUnlocking, opts ...grpc.CallOption) (*MsgCancelUnlockingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgCancelUnlockingResponse) err := c.cc.Invoke(ctx, Msg_CancelUnlocking_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CreateDeveloper(ctx context.Context, in *MsgCreateDeveloper, opts ...grpc.CallOption) (*MsgCreateDeveloperResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgCreateDeveloperResponse) err := c.cc.Invoke(ctx, Msg_CreateDeveloper_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) UpdateDeveloper(ctx context.Context, in *MsgUpdateDeveloper, opts ...grpc.CallOption) (*MsgUpdateDeveloperResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUpdateDeveloperResponse) err := c.cc.Invoke(ctx, Msg_UpdateDeveloper_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RemoveDeveloper(ctx context.Context, in *MsgRemoveDeveloper, opts ...grpc.CallOption) (*MsgRemoveDeveloperResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgRemoveDeveloperResponse) err := c.cc.Invoke(ctx, Msg_RemoveDeveloper_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) AddUserSubscription(ctx context.Context, in *MsgAddUserSubscription, opts ...grpc.CallOption) (*MsgAddUserSubscriptionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgAddUserSubscriptionResponse) err := c.cc.Invoke(ctx, Msg_AddUserSubscription_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) UpdateUserSubscription(ctx context.Context, in *MsgUpdateUserSubscription, opts ...grpc.CallOption) (*MsgUpdateUserSubscriptionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgUpdateUserSubscriptionResponse) err := c.cc.Invoke(ctx, Msg_UpdateUserSubscription_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RemoveUserSubscription(ctx context.Context, in *MsgRemoveUserSubscription, opts ...grpc.CallOption) (*MsgRemoveUserSubscriptionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgRemoveUserSubscriptionResponse) err := c.cc.Invoke(ctx, Msg_RemoveUserSubscription_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility. // // Msg defines the 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) // Lock defines a (developer) operation for locking a stake. Lock(context.Context, *MsgLock) (*MsgLockResponse, error) // LockAuto defines a (developer) operation for locking a stake with automatic validator selection. LockAuto(context.Context, *MsgLockAuto) (*MsgLockAutoResponse, error) // Unlock defines a (developer) operation for unlocking a stake. Unlock(context.Context, *MsgUnlock) (*MsgUnlockResponse, error) // Redelegate defines a (developer) operation for re-delegating a stake. Redelegate(context.Context, *MsgRedelegate) (*MsgRedelegateResponse, error) // CancelUnlocking defines a (developer) operation for canceling an unlocking stake. CancelUnlocking(context.Context, *MsgCancelUnlocking) (*MsgCancelUnlockingResponse, error) // CreateDeveloper defines a (developer) operation for creating a new developer record. CreateDeveloper(context.Context, *MsgCreateDeveloper) (*MsgCreateDeveloperResponse, error) // UpdateDeveloper defines a (developer) operation for updating an existing developer record. UpdateDeveloper(context.Context, *MsgUpdateDeveloper) (*MsgUpdateDeveloperResponse, error) // RemoveDeveloper defines a (developer) operation for removing a developer record. RemoveDeveloper(context.Context, *MsgRemoveDeveloper) (*MsgRemoveDeveloperResponse, error) // AddUserSubscription defines a (developer) operation for adding a user subscription. AddUserSubscription(context.Context, *MsgAddUserSubscription) (*MsgAddUserSubscriptionResponse, error) // UpdateUserSubscription defines a (developer) operation for updating a user subscription. UpdateUserSubscription(context.Context, *MsgUpdateUserSubscription) (*MsgUpdateUserSubscriptionResponse, error) // RemoveUserSubscription defines a (developer) operation for removing a user subscription. // This expires the allowance at the end of the current period rather than immediately revoking it. RemoveUserSubscription(context.Context, *MsgRemoveUserSubscription) (*MsgRemoveUserSubscriptionResponse, error) mustEmbedUnimplementedMsgServer() } // UnimplementedMsgServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMsgServer struct{} func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } func (UnimplementedMsgServer) Lock(context.Context, *MsgLock) (*MsgLockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented") } func (UnimplementedMsgServer) LockAuto(context.Context, *MsgLockAuto) (*MsgLockAutoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LockAuto not implemented") } func (UnimplementedMsgServer) Unlock(context.Context, *MsgUnlock) (*MsgUnlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented") } func (UnimplementedMsgServer) Redelegate(context.Context, *MsgRedelegate) (*MsgRedelegateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Redelegate not implemented") } func (UnimplementedMsgServer) CancelUnlocking(context.Context, *MsgCancelUnlocking) (*MsgCancelUnlockingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelUnlocking not implemented") } func (UnimplementedMsgServer) CreateDeveloper(context.Context, *MsgCreateDeveloper) (*MsgCreateDeveloperResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDeveloper not implemented") } func (UnimplementedMsgServer) UpdateDeveloper(context.Context, *MsgUpdateDeveloper) (*MsgUpdateDeveloperResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateDeveloper not implemented") } func (UnimplementedMsgServer) RemoveDeveloper(context.Context, *MsgRemoveDeveloper) (*MsgRemoveDeveloperResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveDeveloper not implemented") } func (UnimplementedMsgServer) AddUserSubscription(context.Context, *MsgAddUserSubscription) (*MsgAddUserSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddUserSubscription not implemented") } func (UnimplementedMsgServer) UpdateUserSubscription(context.Context, *MsgUpdateUserSubscription) (*MsgUpdateUserSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSubscription not implemented") } func (UnimplementedMsgServer) RemoveUserSubscription(context.Context, *MsgRemoveUserSubscription) (*MsgRemoveUserSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveUserSubscription not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will // result in compilation errors. type UnsafeMsgServer interface { mustEmbedUnimplementedMsgServer() } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { // If the following call pancis, it indicates UnimplementedMsgServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } 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: Msg_UpdateParams_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgLock) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).Lock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_Lock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Lock(ctx, req.(*MsgLock)) } return interceptor(ctx, in, info, handler) } func _Msg_LockAuto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgLockAuto) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).LockAuto(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_LockAuto_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).LockAuto(ctx, req.(*MsgLockAuto)) } return interceptor(ctx, in, info, handler) } func _Msg_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUnlock) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).Unlock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_Unlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Unlock(ctx, req.(*MsgUnlock)) } return interceptor(ctx, in, info, handler) } func _Msg_Redelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRedelegate) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).Redelegate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_Redelegate_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Redelegate(ctx, req.(*MsgRedelegate)) } return interceptor(ctx, in, info, handler) } func _Msg_CancelUnlocking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCancelUnlocking) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CancelUnlocking(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_CancelUnlocking_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CancelUnlocking(ctx, req.(*MsgCancelUnlocking)) } return interceptor(ctx, in, info, handler) } func _Msg_CreateDeveloper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreateDeveloper) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CreateDeveloper(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_CreateDeveloper_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreateDeveloper(ctx, req.(*MsgCreateDeveloper)) } return interceptor(ctx, in, info, handler) } func _Msg_UpdateDeveloper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateDeveloper) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).UpdateDeveloper(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_UpdateDeveloper_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateDeveloper(ctx, req.(*MsgUpdateDeveloper)) } return interceptor(ctx, in, info, handler) } func _Msg_RemoveDeveloper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveDeveloper) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RemoveDeveloper(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_RemoveDeveloper_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RemoveDeveloper(ctx, req.(*MsgRemoveDeveloper)) } return interceptor(ctx, in, info, handler) } func _Msg_AddUserSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAddUserSubscription) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).AddUserSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_AddUserSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AddUserSubscription(ctx, req.(*MsgAddUserSubscription)) } return interceptor(ctx, in, info, handler) } func _Msg_UpdateUserSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateUserSubscription) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).UpdateUserSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_UpdateUserSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateUserSubscription(ctx, req.(*MsgUpdateUserSubscription)) } return interceptor(ctx, in, info, handler) } func _Msg_RemoveUserSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveUserSubscription) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RemoveUserSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Msg_RemoveUserSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RemoveUserSubscription(ctx, req.(*MsgRemoveUserSubscription)) } return interceptor(ctx, in, info, handler) } // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.tier.v1beta1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "Lock", Handler: _Msg_Lock_Handler, }, { MethodName: "LockAuto", Handler: _Msg_LockAuto_Handler, }, { MethodName: "Unlock", Handler: _Msg_Unlock_Handler, }, { MethodName: "Redelegate", Handler: _Msg_Redelegate_Handler, }, { MethodName: "CancelUnlocking", Handler: _Msg_CancelUnlocking_Handler, }, { MethodName: "CreateDeveloper", Handler: _Msg_CreateDeveloper_Handler, }, { MethodName: "UpdateDeveloper", Handler: _Msg_UpdateDeveloper_Handler, }, { MethodName: "RemoveDeveloper", Handler: _Msg_RemoveDeveloper_Handler, }, { MethodName: "AddUserSubscription", Handler: _Msg_AddUserSubscription_Handler, }, { MethodName: "UpdateUserSubscription", Handler: _Msg_UpdateUserSubscription_Handler, }, { MethodName: "RemoveUserSubscription", Handler: _Msg_RemoveUserSubscription_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/tier/v1beta1/tx.proto", } ================================================ FILE: api/sourcenetwork/acp_core/access_decision.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) var _ protoreflect.List = (*_AccessDecision_5_list)(nil) type _AccessDecision_5_list struct { list *[]*Operation } func (x *_AccessDecision_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_AccessDecision_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_AccessDecision_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Operation) (*x.list)[i] = concreteValue } func (x *_AccessDecision_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Operation) *x.list = append(*x.list, concreteValue) } func (x *_AccessDecision_5_list) AppendMutable() protoreflect.Value { v := new(Operation) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_AccessDecision_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_AccessDecision_5_list) NewElement() protoreflect.Value { v := new(Operation) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_AccessDecision_5_list) IsValid() bool { return x.list != nil } var ( md_AccessDecision protoreflect.MessageDescriptor fd_AccessDecision_id protoreflect.FieldDescriptor fd_AccessDecision_policy_id protoreflect.FieldDescriptor fd_AccessDecision_creator protoreflect.FieldDescriptor fd_AccessDecision_creator_acc_sequence protoreflect.FieldDescriptor fd_AccessDecision_operations protoreflect.FieldDescriptor fd_AccessDecision_actor protoreflect.FieldDescriptor fd_AccessDecision_params protoreflect.FieldDescriptor fd_AccessDecision_creation_time protoreflect.FieldDescriptor fd_AccessDecision_issued_height protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_access_decision_proto_init() md_AccessDecision = File_sourcenetwork_acp_core_access_decision_proto.Messages().ByName("AccessDecision") fd_AccessDecision_id = md_AccessDecision.Fields().ByName("id") fd_AccessDecision_policy_id = md_AccessDecision.Fields().ByName("policy_id") fd_AccessDecision_creator = md_AccessDecision.Fields().ByName("creator") fd_AccessDecision_creator_acc_sequence = md_AccessDecision.Fields().ByName("creator_acc_sequence") fd_AccessDecision_operations = md_AccessDecision.Fields().ByName("operations") fd_AccessDecision_actor = md_AccessDecision.Fields().ByName("actor") fd_AccessDecision_params = md_AccessDecision.Fields().ByName("params") fd_AccessDecision_creation_time = md_AccessDecision.Fields().ByName("creation_time") fd_AccessDecision_issued_height = md_AccessDecision.Fields().ByName("issued_height") } var _ protoreflect.Message = (*fastReflection_AccessDecision)(nil) type fastReflection_AccessDecision AccessDecision func (x *AccessDecision) ProtoReflect() protoreflect.Message { return (*fastReflection_AccessDecision)(x) } func (x *AccessDecision) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AccessDecision_messageType fastReflection_AccessDecision_messageType var _ protoreflect.MessageType = fastReflection_AccessDecision_messageType{} type fastReflection_AccessDecision_messageType struct{} func (x fastReflection_AccessDecision_messageType) Zero() protoreflect.Message { return (*fastReflection_AccessDecision)(nil) } func (x fastReflection_AccessDecision_messageType) New() protoreflect.Message { return new(fastReflection_AccessDecision) } func (x fastReflection_AccessDecision_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AccessDecision } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AccessDecision) Descriptor() protoreflect.MessageDescriptor { return md_AccessDecision } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AccessDecision) Type() protoreflect.MessageType { return _fastReflection_AccessDecision_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AccessDecision) New() protoreflect.Message { return new(fastReflection_AccessDecision) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AccessDecision) Interface() protoreflect.ProtoMessage { return (*AccessDecision)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AccessDecision) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_AccessDecision_id, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_AccessDecision_policy_id, value) { return } } if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_AccessDecision_creator, value) { return } } if x.CreatorAccSequence != uint64(0) { value := protoreflect.ValueOfUint64(x.CreatorAccSequence) if !f(fd_AccessDecision_creator_acc_sequence, value) { return } } if len(x.Operations) != 0 { value := protoreflect.ValueOfList(&_AccessDecision_5_list{list: &x.Operations}) if !f(fd_AccessDecision_operations, value) { return } } if x.Actor != "" { value := protoreflect.ValueOfString(x.Actor) if !f(fd_AccessDecision_actor, value) { return } } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_AccessDecision_params, value) { return } } if x.CreationTime != nil { value := protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) if !f(fd_AccessDecision_creation_time, value) { return } } if x.IssuedHeight != uint64(0) { value := protoreflect.ValueOfUint64(x.IssuedHeight) if !f(fd_AccessDecision_issued_height, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AccessDecision) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.AccessDecision.id": return x.Id != "" case "sourcenetwork.acp_core.AccessDecision.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.AccessDecision.creator": return x.Creator != "" case "sourcenetwork.acp_core.AccessDecision.creator_acc_sequence": return x.CreatorAccSequence != uint64(0) case "sourcenetwork.acp_core.AccessDecision.operations": return len(x.Operations) != 0 case "sourcenetwork.acp_core.AccessDecision.actor": return x.Actor != "" case "sourcenetwork.acp_core.AccessDecision.params": return x.Params != nil case "sourcenetwork.acp_core.AccessDecision.creation_time": return x.CreationTime != nil case "sourcenetwork.acp_core.AccessDecision.issued_height": return x.IssuedHeight != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessDecision")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessDecision does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.AccessDecision.id": x.Id = "" case "sourcenetwork.acp_core.AccessDecision.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.AccessDecision.creator": x.Creator = "" case "sourcenetwork.acp_core.AccessDecision.creator_acc_sequence": x.CreatorAccSequence = uint64(0) case "sourcenetwork.acp_core.AccessDecision.operations": x.Operations = nil case "sourcenetwork.acp_core.AccessDecision.actor": x.Actor = "" case "sourcenetwork.acp_core.AccessDecision.params": x.Params = nil case "sourcenetwork.acp_core.AccessDecision.creation_time": x.CreationTime = nil case "sourcenetwork.acp_core.AccessDecision.issued_height": x.IssuedHeight = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessDecision")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessDecision does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AccessDecision) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.AccessDecision.id": value := x.Id return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.AccessDecision.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.AccessDecision.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.AccessDecision.creator_acc_sequence": value := x.CreatorAccSequence return protoreflect.ValueOfUint64(value) case "sourcenetwork.acp_core.AccessDecision.operations": if len(x.Operations) == 0 { return protoreflect.ValueOfList(&_AccessDecision_5_list{}) } listValue := &_AccessDecision_5_list{list: &x.Operations} return protoreflect.ValueOfList(listValue) case "sourcenetwork.acp_core.AccessDecision.actor": value := x.Actor return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.AccessDecision.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.AccessDecision.creation_time": value := x.CreationTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.AccessDecision.issued_height": value := x.IssuedHeight return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessDecision")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessDecision does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.AccessDecision.id": x.Id = value.Interface().(string) case "sourcenetwork.acp_core.AccessDecision.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.AccessDecision.creator": x.Creator = value.Interface().(string) case "sourcenetwork.acp_core.AccessDecision.creator_acc_sequence": x.CreatorAccSequence = value.Uint() case "sourcenetwork.acp_core.AccessDecision.operations": lv := value.List() clv := lv.(*_AccessDecision_5_list) x.Operations = *clv.list case "sourcenetwork.acp_core.AccessDecision.actor": x.Actor = value.Interface().(string) case "sourcenetwork.acp_core.AccessDecision.params": x.Params = value.Message().Interface().(*DecisionParams) case "sourcenetwork.acp_core.AccessDecision.creation_time": x.CreationTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcenetwork.acp_core.AccessDecision.issued_height": x.IssuedHeight = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessDecision")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessDecision does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.AccessDecision.operations": if x.Operations == nil { x.Operations = []*Operation{} } value := &_AccessDecision_5_list{list: &x.Operations} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.AccessDecision.params": if x.Params == nil { x.Params = new(DecisionParams) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "sourcenetwork.acp_core.AccessDecision.creation_time": if x.CreationTime == nil { x.CreationTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) case "sourcenetwork.acp_core.AccessDecision.id": panic(fmt.Errorf("field id of message sourcenetwork.acp_core.AccessDecision is not mutable")) case "sourcenetwork.acp_core.AccessDecision.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.AccessDecision is not mutable")) case "sourcenetwork.acp_core.AccessDecision.creator": panic(fmt.Errorf("field creator of message sourcenetwork.acp_core.AccessDecision is not mutable")) case "sourcenetwork.acp_core.AccessDecision.creator_acc_sequence": panic(fmt.Errorf("field creator_acc_sequence of message sourcenetwork.acp_core.AccessDecision is not mutable")) case "sourcenetwork.acp_core.AccessDecision.actor": panic(fmt.Errorf("field actor of message sourcenetwork.acp_core.AccessDecision is not mutable")) case "sourcenetwork.acp_core.AccessDecision.issued_height": panic(fmt.Errorf("field issued_height of message sourcenetwork.acp_core.AccessDecision is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessDecision")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessDecision does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AccessDecision) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.AccessDecision.id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.AccessDecision.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.AccessDecision.creator": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.AccessDecision.creator_acc_sequence": return protoreflect.ValueOfUint64(uint64(0)) case "sourcenetwork.acp_core.AccessDecision.operations": list := []*Operation{} return protoreflect.ValueOfList(&_AccessDecision_5_list{list: &list}) case "sourcenetwork.acp_core.AccessDecision.actor": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.AccessDecision.params": m := new(DecisionParams) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.AccessDecision.creation_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.AccessDecision.issued_height": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessDecision")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessDecision does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AccessDecision) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.AccessDecision", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AccessDecision) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessDecision) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AccessDecision) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AccessDecision) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AccessDecision) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreatorAccSequence != 0 { n += 1 + runtime.Sov(uint64(x.CreatorAccSequence)) } if len(x.Operations) > 0 { for _, e := range x.Operations { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } l = len(x.Actor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationTime != nil { l = options.Size(x.CreationTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.IssuedHeight != 0 { n += 1 + runtime.Sov(uint64(x.IssuedHeight)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AccessDecision) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.IssuedHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.IssuedHeight)) i-- dAtA[i] = 0x48 } if x.CreationTime != nil { encoded, err := options.Marshal(x.CreationTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x42 } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a } if len(x.Actor) > 0 { i -= len(x.Actor) copy(dAtA[i:], x.Actor) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Actor))) i-- dAtA[i] = 0x32 } if len(x.Operations) > 0 { for iNdEx := len(x.Operations) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Operations[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } } if x.CreatorAccSequence != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatorAccSequence)) i-- dAtA[i] = 0x20 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AccessDecision) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessDecision: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessDecision: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatorAccSequence", wireType) } x.CreatorAccSequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.CreatorAccSequence |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Operations = append(x.Operations, &Operation{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Operations[len(x.Operations)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &DecisionParams{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTime == nil { x.CreationTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 9: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IssuedHeight", wireType) } x.IssuedHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.IssuedHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DecisionParams protoreflect.MessageDescriptor fd_DecisionParams_decision_expiration_delta protoreflect.FieldDescriptor fd_DecisionParams_proof_expiration_delta protoreflect.FieldDescriptor fd_DecisionParams_ticket_expiration_delta protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_access_decision_proto_init() md_DecisionParams = File_sourcenetwork_acp_core_access_decision_proto.Messages().ByName("DecisionParams") fd_DecisionParams_decision_expiration_delta = md_DecisionParams.Fields().ByName("decision_expiration_delta") fd_DecisionParams_proof_expiration_delta = md_DecisionParams.Fields().ByName("proof_expiration_delta") fd_DecisionParams_ticket_expiration_delta = md_DecisionParams.Fields().ByName("ticket_expiration_delta") } var _ protoreflect.Message = (*fastReflection_DecisionParams)(nil) type fastReflection_DecisionParams DecisionParams func (x *DecisionParams) ProtoReflect() protoreflect.Message { return (*fastReflection_DecisionParams)(x) } func (x *DecisionParams) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DecisionParams_messageType fastReflection_DecisionParams_messageType var _ protoreflect.MessageType = fastReflection_DecisionParams_messageType{} type fastReflection_DecisionParams_messageType struct{} func (x fastReflection_DecisionParams_messageType) Zero() protoreflect.Message { return (*fastReflection_DecisionParams)(nil) } func (x fastReflection_DecisionParams_messageType) New() protoreflect.Message { return new(fastReflection_DecisionParams) } func (x fastReflection_DecisionParams_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DecisionParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DecisionParams) Descriptor() protoreflect.MessageDescriptor { return md_DecisionParams } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DecisionParams) Type() protoreflect.MessageType { return _fastReflection_DecisionParams_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DecisionParams) New() protoreflect.Message { return new(fastReflection_DecisionParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DecisionParams) Interface() protoreflect.ProtoMessage { return (*DecisionParams)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DecisionParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DecisionExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.DecisionExpirationDelta) if !f(fd_DecisionParams_decision_expiration_delta, value) { return } } if x.ProofExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.ProofExpirationDelta) if !f(fd_DecisionParams_proof_expiration_delta, value) { return } } if x.TicketExpirationDelta != uint64(0) { value := protoreflect.ValueOfUint64(x.TicketExpirationDelta) if !f(fd_DecisionParams_ticket_expiration_delta, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DecisionParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.DecisionParams.decision_expiration_delta": return x.DecisionExpirationDelta != uint64(0) case "sourcenetwork.acp_core.DecisionParams.proof_expiration_delta": return x.ProofExpirationDelta != uint64(0) case "sourcenetwork.acp_core.DecisionParams.ticket_expiration_delta": return x.TicketExpirationDelta != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DecisionParams")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DecisionParams does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.DecisionParams.decision_expiration_delta": x.DecisionExpirationDelta = uint64(0) case "sourcenetwork.acp_core.DecisionParams.proof_expiration_delta": x.ProofExpirationDelta = uint64(0) case "sourcenetwork.acp_core.DecisionParams.ticket_expiration_delta": x.TicketExpirationDelta = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DecisionParams")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DecisionParams does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DecisionParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.DecisionParams.decision_expiration_delta": value := x.DecisionExpirationDelta return protoreflect.ValueOfUint64(value) case "sourcenetwork.acp_core.DecisionParams.proof_expiration_delta": value := x.ProofExpirationDelta return protoreflect.ValueOfUint64(value) case "sourcenetwork.acp_core.DecisionParams.ticket_expiration_delta": value := x.TicketExpirationDelta return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DecisionParams")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DecisionParams does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.DecisionParams.decision_expiration_delta": x.DecisionExpirationDelta = value.Uint() case "sourcenetwork.acp_core.DecisionParams.proof_expiration_delta": x.ProofExpirationDelta = value.Uint() case "sourcenetwork.acp_core.DecisionParams.ticket_expiration_delta": x.TicketExpirationDelta = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DecisionParams")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DecisionParams does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DecisionParams.decision_expiration_delta": panic(fmt.Errorf("field decision_expiration_delta of message sourcenetwork.acp_core.DecisionParams is not mutable")) case "sourcenetwork.acp_core.DecisionParams.proof_expiration_delta": panic(fmt.Errorf("field proof_expiration_delta of message sourcenetwork.acp_core.DecisionParams is not mutable")) case "sourcenetwork.acp_core.DecisionParams.ticket_expiration_delta": panic(fmt.Errorf("field ticket_expiration_delta of message sourcenetwork.acp_core.DecisionParams is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DecisionParams")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DecisionParams does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DecisionParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DecisionParams.decision_expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) case "sourcenetwork.acp_core.DecisionParams.proof_expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) case "sourcenetwork.acp_core.DecisionParams.ticket_expiration_delta": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DecisionParams")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DecisionParams does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DecisionParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.DecisionParams", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DecisionParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DecisionParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DecisionParams) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DecisionParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DecisionParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.DecisionExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.DecisionExpirationDelta)) } if x.ProofExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.ProofExpirationDelta)) } if x.TicketExpirationDelta != 0 { n += 1 + runtime.Sov(uint64(x.TicketExpirationDelta)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DecisionParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.TicketExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.TicketExpirationDelta)) i-- dAtA[i] = 0x18 } if x.ProofExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.ProofExpirationDelta)) i-- dAtA[i] = 0x10 } if x.DecisionExpirationDelta != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.DecisionExpirationDelta)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DecisionParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DecisionParams: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DecisionParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionExpirationDelta", wireType) } x.DecisionExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.DecisionExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofExpirationDelta", wireType) } x.ProofExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.ProofExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TicketExpirationDelta", wireType) } x.TicketExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.TicketExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_AccessRequest_1_list)(nil) type _AccessRequest_1_list struct { list *[]*Operation } func (x *_AccessRequest_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_AccessRequest_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_AccessRequest_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Operation) (*x.list)[i] = concreteValue } func (x *_AccessRequest_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Operation) *x.list = append(*x.list, concreteValue) } func (x *_AccessRequest_1_list) AppendMutable() protoreflect.Value { v := new(Operation) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_AccessRequest_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_AccessRequest_1_list) NewElement() protoreflect.Value { v := new(Operation) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_AccessRequest_1_list) IsValid() bool { return x.list != nil } var ( md_AccessRequest protoreflect.MessageDescriptor fd_AccessRequest_operations protoreflect.FieldDescriptor fd_AccessRequest_actor protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_access_decision_proto_init() md_AccessRequest = File_sourcenetwork_acp_core_access_decision_proto.Messages().ByName("AccessRequest") fd_AccessRequest_operations = md_AccessRequest.Fields().ByName("operations") fd_AccessRequest_actor = md_AccessRequest.Fields().ByName("actor") } var _ protoreflect.Message = (*fastReflection_AccessRequest)(nil) type fastReflection_AccessRequest AccessRequest func (x *AccessRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_AccessRequest)(x) } func (x *AccessRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AccessRequest_messageType fastReflection_AccessRequest_messageType var _ protoreflect.MessageType = fastReflection_AccessRequest_messageType{} type fastReflection_AccessRequest_messageType struct{} func (x fastReflection_AccessRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_AccessRequest)(nil) } func (x fastReflection_AccessRequest_messageType) New() protoreflect.Message { return new(fastReflection_AccessRequest) } func (x fastReflection_AccessRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AccessRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AccessRequest) Descriptor() protoreflect.MessageDescriptor { return md_AccessRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AccessRequest) Type() protoreflect.MessageType { return _fastReflection_AccessRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AccessRequest) New() protoreflect.Message { return new(fastReflection_AccessRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AccessRequest) Interface() protoreflect.ProtoMessage { return (*AccessRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AccessRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Operations) != 0 { value := protoreflect.ValueOfList(&_AccessRequest_1_list{list: &x.Operations}) if !f(fd_AccessRequest_operations, value) { return } } if x.Actor != nil { value := protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) if !f(fd_AccessRequest_actor, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AccessRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.AccessRequest.operations": return len(x.Operations) != 0 case "sourcenetwork.acp_core.AccessRequest.actor": return x.Actor != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.AccessRequest.operations": x.Operations = nil case "sourcenetwork.acp_core.AccessRequest.actor": x.Actor = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AccessRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.AccessRequest.operations": if len(x.Operations) == 0 { return protoreflect.ValueOfList(&_AccessRequest_1_list{}) } listValue := &_AccessRequest_1_list{list: &x.Operations} return protoreflect.ValueOfList(listValue) case "sourcenetwork.acp_core.AccessRequest.actor": value := x.Actor return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.AccessRequest.operations": lv := value.List() clv := lv.(*_AccessRequest_1_list) x.Operations = *clv.list case "sourcenetwork.acp_core.AccessRequest.actor": x.Actor = value.Message().Interface().(*Actor) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.AccessRequest.operations": if x.Operations == nil { x.Operations = []*Operation{} } value := &_AccessRequest_1_list{list: &x.Operations} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.AccessRequest.actor": if x.Actor == nil { x.Actor = new(Actor) } return protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AccessRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.AccessRequest.operations": list := []*Operation{} return protoreflect.ValueOfList(&_AccessRequest_1_list{list: &list}) case "sourcenetwork.acp_core.AccessRequest.actor": m := new(Actor) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AccessRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.AccessRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AccessRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AccessRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AccessRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AccessRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Operations) > 0 { for _, e := range x.Operations { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.Actor != nil { l = options.Size(x.Actor) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AccessRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Actor != nil { encoded, err := options.Marshal(x.Actor) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.Operations) > 0 { for iNdEx := len(x.Operations) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Operations[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AccessRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Operations = append(x.Operations, &Operation{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Operations[len(x.Operations)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Actor == nil { x.Actor = &Actor{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Actor); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Operation protoreflect.MessageDescriptor fd_Operation_object protoreflect.FieldDescriptor fd_Operation_permission protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_access_decision_proto_init() md_Operation = File_sourcenetwork_acp_core_access_decision_proto.Messages().ByName("Operation") fd_Operation_object = md_Operation.Fields().ByName("object") fd_Operation_permission = md_Operation.Fields().ByName("permission") } var _ protoreflect.Message = (*fastReflection_Operation)(nil) type fastReflection_Operation Operation func (x *Operation) ProtoReflect() protoreflect.Message { return (*fastReflection_Operation)(x) } func (x *Operation) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Operation_messageType fastReflection_Operation_messageType var _ protoreflect.MessageType = fastReflection_Operation_messageType{} type fastReflection_Operation_messageType struct{} func (x fastReflection_Operation_messageType) Zero() protoreflect.Message { return (*fastReflection_Operation)(nil) } func (x fastReflection_Operation_messageType) New() protoreflect.Message { return new(fastReflection_Operation) } func (x fastReflection_Operation_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Operation } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Operation) Descriptor() protoreflect.MessageDescriptor { return md_Operation } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Operation) Type() protoreflect.MessageType { return _fastReflection_Operation_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Operation) New() protoreflect.Message { return new(fastReflection_Operation) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Operation) Interface() protoreflect.ProtoMessage { return (*Operation)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Operation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_Operation_object, value) { return } } if x.Permission != "" { value := protoreflect.ValueOfString(x.Permission) if !f(fd_Operation_permission, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Operation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Operation.object": return x.Object != nil case "sourcenetwork.acp_core.Operation.permission": return x.Permission != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Operation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Operation does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Operation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Operation.object": x.Object = nil case "sourcenetwork.acp_core.Operation.permission": x.Permission = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Operation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Operation does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Operation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Operation.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.Operation.permission": value := x.Permission return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Operation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Operation does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Operation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Operation.object": x.Object = value.Message().Interface().(*Object) case "sourcenetwork.acp_core.Operation.permission": x.Permission = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Operation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Operation does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Operation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Operation.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.Operation.permission": panic(fmt.Errorf("field permission of message sourcenetwork.acp_core.Operation is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Operation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Operation does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Operation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Operation.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.Operation.permission": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Operation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Operation does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Operation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Operation", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Operation) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Operation) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Operation) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Operation) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Operation) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Permission) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Operation) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Permission) > 0 { i -= len(x.Permission) copy(dAtA[i:], x.Permission) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permission))) i-- dAtA[i] = 0x12 } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Operation) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Operation: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Permission = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/access_decision.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // AccessDecision models the result of evaluating a set of AccessRequests for an Actor type AccessDecision struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` // used as part of id generation Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` // used as part of id generation CreatorAccSequence uint64 `protobuf:"varint,4,opt,name=creator_acc_sequence,json=creatorAccSequence,proto3" json:"creator_acc_sequence,omitempty"` // used as part of id generation Operations []*Operation `protobuf:"bytes,5,rep,name=operations,proto3" json:"operations,omitempty"` // used as part of id generation Actor string `protobuf:"bytes,6,opt,name=actor,proto3" json:"actor,omitempty"` // used as part of id generation Params *DecisionParams `protobuf:"bytes,7,opt,name=params,proto3" json:"params,omitempty"` // used as part of id generation CreationTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // issued_height stores the block height when the Decision was evaluated IssuedHeight uint64 `protobuf:"varint,9,opt,name=issued_height,json=issuedHeight,proto3" json:"issued_height,omitempty"` } func (x *AccessDecision) Reset() { *x = AccessDecision{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AccessDecision) String() string { return protoimpl.X.MessageStringOf(x) } func (*AccessDecision) ProtoMessage() {} // Deprecated: Use AccessDecision.ProtoReflect.Descriptor instead. func (*AccessDecision) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_access_decision_proto_rawDescGZIP(), []int{0} } func (x *AccessDecision) GetId() string { if x != nil { return x.Id } return "" } func (x *AccessDecision) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *AccessDecision) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *AccessDecision) GetCreatorAccSequence() uint64 { if x != nil { return x.CreatorAccSequence } return 0 } func (x *AccessDecision) GetOperations() []*Operation { if x != nil { return x.Operations } return nil } func (x *AccessDecision) GetActor() string { if x != nil { return x.Actor } return "" } func (x *AccessDecision) GetParams() *DecisionParams { if x != nil { return x.Params } return nil } func (x *AccessDecision) GetCreationTime() *timestamppb.Timestamp { if x != nil { return x.CreationTime } return nil } func (x *AccessDecision) GetIssuedHeight() uint64 { if x != nil { return x.IssuedHeight } return 0 } // DecisionParams stores auxiliary information regarding the validity of a decision type DecisionParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // number of blocks a Decision is valid for DecisionExpirationDelta uint64 `protobuf:"varint,1,opt,name=decision_expiration_delta,json=decisionExpirationDelta,proto3" json:"decision_expiration_delta,omitempty"` // number of blocks a DecisionProof is valid for ProofExpirationDelta uint64 `protobuf:"varint,2,opt,name=proof_expiration_delta,json=proofExpirationDelta,proto3" json:"proof_expiration_delta,omitempty"` // number of blocks an AccessTicket is valid for TicketExpirationDelta uint64 `protobuf:"varint,3,opt,name=ticket_expiration_delta,json=ticketExpirationDelta,proto3" json:"ticket_expiration_delta,omitempty"` } func (x *DecisionParams) Reset() { *x = DecisionParams{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DecisionParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*DecisionParams) ProtoMessage() {} // Deprecated: Use DecisionParams.ProtoReflect.Descriptor instead. func (*DecisionParams) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_access_decision_proto_rawDescGZIP(), []int{1} } func (x *DecisionParams) GetDecisionExpirationDelta() uint64 { if x != nil { return x.DecisionExpirationDelta } return 0 } func (x *DecisionParams) GetProofExpirationDelta() uint64 { if x != nil { return x.ProofExpirationDelta } return 0 } func (x *DecisionParams) GetTicketExpirationDelta() uint64 { if x != nil { return x.TicketExpirationDelta } return 0 } // AccessRequest represents the wish to perform a set of operations by an actor type AccessRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` // actor requesting operations Actor *Actor `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"` } func (x *AccessRequest) Reset() { *x = AccessRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AccessRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*AccessRequest) ProtoMessage() {} // Deprecated: Use AccessRequest.ProtoReflect.Descriptor instead. func (*AccessRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_access_decision_proto_rawDescGZIP(), []int{2} } func (x *AccessRequest) GetOperations() []*Operation { if x != nil { return x.Operations } return nil } func (x *AccessRequest) GetActor() *Actor { if x != nil { return x.Actor } return nil } // Operation represents an action over an object. type Operation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // target object for operation Object *Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` // permission required to perform operation Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"` } func (x *Operation) Reset() { *x = Operation{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_access_decision_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Operation) String() string { return protoimpl.X.MessageStringOf(x) } func (*Operation) ProtoMessage() {} // Deprecated: Use Operation.ProtoReflect.Descriptor instead. func (*Operation) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_access_decision_proto_rawDescGZIP(), []int{3} } func (x *Operation) GetObject() *Object { if x != nil { return x.Object } return nil } func (x *Operation) GetPermission() string { if x != nil { return x.Permission } return "" } var File_sourcenetwork_acp_core_access_decision_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_access_decision_proto_rawDesc = []byte{ 0x0a, 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x03, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x22, 0x87, 0x01, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x63, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xe5, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x13, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_access_decision_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_access_decision_proto_rawDescData = file_sourcenetwork_acp_core_access_decision_proto_rawDesc ) func file_sourcenetwork_acp_core_access_decision_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_access_decision_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_access_decision_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_access_decision_proto_rawDescData) }) return file_sourcenetwork_acp_core_access_decision_proto_rawDescData } var file_sourcenetwork_acp_core_access_decision_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_sourcenetwork_acp_core_access_decision_proto_goTypes = []interface{}{ (*AccessDecision)(nil), // 0: sourcenetwork.acp_core.AccessDecision (*DecisionParams)(nil), // 1: sourcenetwork.acp_core.DecisionParams (*AccessRequest)(nil), // 2: sourcenetwork.acp_core.AccessRequest (*Operation)(nil), // 3: sourcenetwork.acp_core.Operation (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp (*Actor)(nil), // 5: sourcenetwork.acp_core.Actor (*Object)(nil), // 6: sourcenetwork.acp_core.Object } var file_sourcenetwork_acp_core_access_decision_proto_depIdxs = []int32{ 3, // 0: sourcenetwork.acp_core.AccessDecision.operations:type_name -> sourcenetwork.acp_core.Operation 1, // 1: sourcenetwork.acp_core.AccessDecision.params:type_name -> sourcenetwork.acp_core.DecisionParams 4, // 2: sourcenetwork.acp_core.AccessDecision.creation_time:type_name -> google.protobuf.Timestamp 3, // 3: sourcenetwork.acp_core.AccessRequest.operations:type_name -> sourcenetwork.acp_core.Operation 5, // 4: sourcenetwork.acp_core.AccessRequest.actor:type_name -> sourcenetwork.acp_core.Actor 6, // 5: sourcenetwork.acp_core.Operation.object:type_name -> sourcenetwork.acp_core.Object 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_access_decision_proto_init() } func file_sourcenetwork_acp_core_access_decision_proto_init() { if File_sourcenetwork_acp_core_access_decision_proto != nil { return } file_sourcenetwork_acp_core_relationship_proto_init() if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_access_decision_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccessDecision); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_access_decision_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DecisionParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_access_decision_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccessRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_access_decision_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Operation); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_access_decision_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_access_decision_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_access_decision_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_access_decision_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_access_decision_proto = out.File file_sourcenetwork_acp_core_access_decision_proto_rawDesc = nil file_sourcenetwork_acp_core_access_decision_proto_goTypes = nil file_sourcenetwork_acp_core_access_decision_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/access_ticket.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" ) var ( md_AccessTicket protoreflect.MessageDescriptor fd_AccessTicket_version_denominator protoreflect.FieldDescriptor fd_AccessTicket_decision_id protoreflect.FieldDescriptor fd_AccessTicket_decision protoreflect.FieldDescriptor fd_AccessTicket_decision_proof protoreflect.FieldDescriptor fd_AccessTicket_signature protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_access_ticket_proto_init() md_AccessTicket = File_sourcenetwork_acp_core_access_ticket_proto.Messages().ByName("AccessTicket") fd_AccessTicket_version_denominator = md_AccessTicket.Fields().ByName("version_denominator") fd_AccessTicket_decision_id = md_AccessTicket.Fields().ByName("decision_id") fd_AccessTicket_decision = md_AccessTicket.Fields().ByName("decision") fd_AccessTicket_decision_proof = md_AccessTicket.Fields().ByName("decision_proof") fd_AccessTicket_signature = md_AccessTicket.Fields().ByName("signature") } var _ protoreflect.Message = (*fastReflection_AccessTicket)(nil) type fastReflection_AccessTicket AccessTicket func (x *AccessTicket) ProtoReflect() protoreflect.Message { return (*fastReflection_AccessTicket)(x) } func (x *AccessTicket) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_access_ticket_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AccessTicket_messageType fastReflection_AccessTicket_messageType var _ protoreflect.MessageType = fastReflection_AccessTicket_messageType{} type fastReflection_AccessTicket_messageType struct{} func (x fastReflection_AccessTicket_messageType) Zero() protoreflect.Message { return (*fastReflection_AccessTicket)(nil) } func (x fastReflection_AccessTicket_messageType) New() protoreflect.Message { return new(fastReflection_AccessTicket) } func (x fastReflection_AccessTicket_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AccessTicket } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AccessTicket) Descriptor() protoreflect.MessageDescriptor { return md_AccessTicket } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AccessTicket) Type() protoreflect.MessageType { return _fastReflection_AccessTicket_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AccessTicket) New() protoreflect.Message { return new(fastReflection_AccessTicket) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AccessTicket) Interface() protoreflect.ProtoMessage { return (*AccessTicket)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AccessTicket) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.VersionDenominator != "" { value := protoreflect.ValueOfString(x.VersionDenominator) if !f(fd_AccessTicket_version_denominator, value) { return } } if x.DecisionId != "" { value := protoreflect.ValueOfString(x.DecisionId) if !f(fd_AccessTicket_decision_id, value) { return } } if x.Decision != nil { value := protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) if !f(fd_AccessTicket_decision, value) { return } } if len(x.DecisionProof) != 0 { value := protoreflect.ValueOfBytes(x.DecisionProof) if !f(fd_AccessTicket_decision_proof, value) { return } } if len(x.Signature) != 0 { value := protoreflect.ValueOfBytes(x.Signature) if !f(fd_AccessTicket_signature, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AccessTicket) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.AccessTicket.version_denominator": return x.VersionDenominator != "" case "sourcenetwork.acp_core.AccessTicket.decision_id": return x.DecisionId != "" case "sourcenetwork.acp_core.AccessTicket.decision": return x.Decision != nil case "sourcenetwork.acp_core.AccessTicket.decision_proof": return len(x.DecisionProof) != 0 case "sourcenetwork.acp_core.AccessTicket.signature": return len(x.Signature) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessTicket")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessTicket does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.AccessTicket.version_denominator": x.VersionDenominator = "" case "sourcenetwork.acp_core.AccessTicket.decision_id": x.DecisionId = "" case "sourcenetwork.acp_core.AccessTicket.decision": x.Decision = nil case "sourcenetwork.acp_core.AccessTicket.decision_proof": x.DecisionProof = nil case "sourcenetwork.acp_core.AccessTicket.signature": x.Signature = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessTicket")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessTicket does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AccessTicket) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.AccessTicket.version_denominator": value := x.VersionDenominator return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.AccessTicket.decision_id": value := x.DecisionId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.AccessTicket.decision": value := x.Decision return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.AccessTicket.decision_proof": value := x.DecisionProof return protoreflect.ValueOfBytes(value) case "sourcenetwork.acp_core.AccessTicket.signature": value := x.Signature return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessTicket")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessTicket does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.AccessTicket.version_denominator": x.VersionDenominator = value.Interface().(string) case "sourcenetwork.acp_core.AccessTicket.decision_id": x.DecisionId = value.Interface().(string) case "sourcenetwork.acp_core.AccessTicket.decision": x.Decision = value.Message().Interface().(*AccessDecision) case "sourcenetwork.acp_core.AccessTicket.decision_proof": x.DecisionProof = value.Bytes() case "sourcenetwork.acp_core.AccessTicket.signature": x.Signature = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessTicket")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessTicket does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.AccessTicket.decision": if x.Decision == nil { x.Decision = new(AccessDecision) } return protoreflect.ValueOfMessage(x.Decision.ProtoReflect()) case "sourcenetwork.acp_core.AccessTicket.version_denominator": panic(fmt.Errorf("field version_denominator of message sourcenetwork.acp_core.AccessTicket is not mutable")) case "sourcenetwork.acp_core.AccessTicket.decision_id": panic(fmt.Errorf("field decision_id of message sourcenetwork.acp_core.AccessTicket is not mutable")) case "sourcenetwork.acp_core.AccessTicket.decision_proof": panic(fmt.Errorf("field decision_proof of message sourcenetwork.acp_core.AccessTicket is not mutable")) case "sourcenetwork.acp_core.AccessTicket.signature": panic(fmt.Errorf("field signature of message sourcenetwork.acp_core.AccessTicket is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessTicket")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessTicket does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AccessTicket) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.AccessTicket.version_denominator": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.AccessTicket.decision_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.AccessTicket.decision": m := new(AccessDecision) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.AccessTicket.decision_proof": return protoreflect.ValueOfBytes(nil) case "sourcenetwork.acp_core.AccessTicket.signature": return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AccessTicket")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AccessTicket does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AccessTicket) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.AccessTicket", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AccessTicket) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccessTicket) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AccessTicket) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AccessTicket) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AccessTicket) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.VersionDenominator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.DecisionId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Decision != nil { l = options.Size(x.Decision) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.DecisionProof) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Signature) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AccessTicket) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Signature) > 0 { i -= len(x.Signature) copy(dAtA[i:], x.Signature) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) i-- dAtA[i] = 0x2a } if len(x.DecisionProof) > 0 { i -= len(x.DecisionProof) copy(dAtA[i:], x.DecisionProof) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DecisionProof))) i-- dAtA[i] = 0x22 } if x.Decision != nil { encoded, err := options.Marshal(x.Decision) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.DecisionId) > 0 { i -= len(x.DecisionId) copy(dAtA[i:], x.DecisionId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DecisionId))) i-- dAtA[i] = 0x12 } if len(x.VersionDenominator) > 0 { i -= len(x.VersionDenominator) copy(dAtA[i:], x.VersionDenominator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VersionDenominator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AccessTicket) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessTicket: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccessTicket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VersionDenominator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.VersionDenominator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DecisionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decision", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Decision == nil { x.Decision = &AccessDecision{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Decision); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionProof", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DecisionProof = append(x.DecisionProof[:0], dAtA[iNdEx:postIndex]...) if x.DecisionProof == nil { x.DecisionProof = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) if x.Signature == nil { x.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/access_ticket.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Represents a Capability token containing an opaque proof and a set of Operations // the Actor is allowed to perform. // Tickets should be verified by a Reference Monitor before granting access to the requested operations. type AccessTicket struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // identified the ticket version VersionDenominator string `protobuf:"bytes,1,opt,name=version_denominator,json=versionDenominator,proto3" json:"version_denominator,omitempty"` DecisionId string `protobuf:"bytes,2,opt,name=decision_id,json=decisionId,proto3" json:"decision_id,omitempty"` Decision *AccessDecision `protobuf:"bytes,3,opt,name=decision,proto3" json:"decision,omitempty"` // proof of existance that the given decision exists in the chain // validation strategy is dependent on ticket version DecisionProof []byte `protobuf:"bytes,4,opt,name=decision_proof,json=decisionProof,proto3" json:"decision_proof,omitempty"` // signature of ticket which must match actor pkey in the access decision Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } func (x *AccessTicket) Reset() { *x = AccessTicket{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_access_ticket_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AccessTicket) String() string { return protoimpl.X.MessageStringOf(x) } func (*AccessTicket) ProtoMessage() {} // Deprecated: Use AccessTicket.ProtoReflect.Descriptor instead. func (*AccessTicket) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_access_ticket_proto_rawDescGZIP(), []int{0} } func (x *AccessTicket) GetVersionDenominator() string { if x != nil { return x.VersionDenominator } return "" } func (x *AccessTicket) GetDecisionId() string { if x != nil { return x.DecisionId } return "" } func (x *AccessTicket) GetDecision() *AccessDecision { if x != nil { return x.Decision } return nil } func (x *AccessTicket) GetDecisionProof() []byte { if x != nil { return x.DecisionProof } return nil } func (x *AccessTicket) GetSignature() []byte { if x != nil { return x.Signature } return nil } var File_sourcenetwork_acp_core_access_ticket_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_access_ticket_proto_rawDesc = []byte{ 0x0a, 0x2a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe9, 0x01, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0xe3, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x11, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_access_ticket_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_access_ticket_proto_rawDescData = file_sourcenetwork_acp_core_access_ticket_proto_rawDesc ) func file_sourcenetwork_acp_core_access_ticket_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_access_ticket_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_access_ticket_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_access_ticket_proto_rawDescData) }) return file_sourcenetwork_acp_core_access_ticket_proto_rawDescData } var file_sourcenetwork_acp_core_access_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcenetwork_acp_core_access_ticket_proto_goTypes = []interface{}{ (*AccessTicket)(nil), // 0: sourcenetwork.acp_core.AccessTicket (*AccessDecision)(nil), // 1: sourcenetwork.acp_core.AccessDecision } var file_sourcenetwork_acp_core_access_ticket_proto_depIdxs = []int32{ 1, // 0: sourcenetwork.acp_core.AccessTicket.decision:type_name -> sourcenetwork.acp_core.AccessDecision 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_access_ticket_proto_init() } func file_sourcenetwork_acp_core_access_ticket_proto_init() { if File_sourcenetwork_acp_core_access_ticket_proto != nil { return } file_sourcenetwork_acp_core_access_decision_proto_init() if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_access_ticket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccessTicket); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_access_ticket_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_access_ticket_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_access_ticket_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_access_ticket_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_access_ticket_proto = out.File file_sourcenetwork_acp_core_access_ticket_proto_rawDesc = nil file_sourcenetwork_acp_core_access_ticket_proto_goTypes = nil file_sourcenetwork_acp_core_access_ticket_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/engine.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sort "sort" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) var _ protoreflect.Map = (*_CreatePolicyRequest_4_map)(nil) type _CreatePolicyRequest_4_map struct { m *map[string]string } func (x *_CreatePolicyRequest_4_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_CreatePolicyRequest_4_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_CreatePolicyRequest_4_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_CreatePolicyRequest_4_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_CreatePolicyRequest_4_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_CreatePolicyRequest_4_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_CreatePolicyRequest_4_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_CreatePolicyRequest_4_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_CreatePolicyRequest_4_map) IsValid() bool { return x.m != nil } var ( md_CreatePolicyRequest protoreflect.MessageDescriptor fd_CreatePolicyRequest_policy protoreflect.FieldDescriptor fd_CreatePolicyRequest_marshal_type protoreflect.FieldDescriptor fd_CreatePolicyRequest_creation_time protoreflect.FieldDescriptor fd_CreatePolicyRequest_metadata protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_CreatePolicyRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("CreatePolicyRequest") fd_CreatePolicyRequest_policy = md_CreatePolicyRequest.Fields().ByName("policy") fd_CreatePolicyRequest_marshal_type = md_CreatePolicyRequest.Fields().ByName("marshal_type") fd_CreatePolicyRequest_creation_time = md_CreatePolicyRequest.Fields().ByName("creation_time") fd_CreatePolicyRequest_metadata = md_CreatePolicyRequest.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_CreatePolicyRequest)(nil) type fastReflection_CreatePolicyRequest CreatePolicyRequest func (x *CreatePolicyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_CreatePolicyRequest)(x) } func (x *CreatePolicyRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_CreatePolicyRequest_messageType fastReflection_CreatePolicyRequest_messageType var _ protoreflect.MessageType = fastReflection_CreatePolicyRequest_messageType{} type fastReflection_CreatePolicyRequest_messageType struct{} func (x fastReflection_CreatePolicyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_CreatePolicyRequest)(nil) } func (x fastReflection_CreatePolicyRequest_messageType) New() protoreflect.Message { return new(fastReflection_CreatePolicyRequest) } func (x fastReflection_CreatePolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_CreatePolicyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_CreatePolicyRequest) Descriptor() protoreflect.MessageDescriptor { return md_CreatePolicyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_CreatePolicyRequest) Type() protoreflect.MessageType { return _fastReflection_CreatePolicyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_CreatePolicyRequest) New() protoreflect.Message { return new(fastReflection_CreatePolicyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_CreatePolicyRequest) Interface() protoreflect.ProtoMessage { return (*CreatePolicyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_CreatePolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != "" { value := protoreflect.ValueOfString(x.Policy) if !f(fd_CreatePolicyRequest_policy, value) { return } } if x.MarshalType != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MarshalType)) if !f(fd_CreatePolicyRequest_marshal_type, value) { return } } if x.CreationTime != nil { value := protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) if !f(fd_CreatePolicyRequest_creation_time, value) { return } } if len(x.Metadata) != 0 { value := protoreflect.ValueOfMap(&_CreatePolicyRequest_4_map{m: &x.Metadata}) if !f(fd_CreatePolicyRequest_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_CreatePolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyRequest.policy": return x.Policy != "" case "sourcenetwork.acp_core.CreatePolicyRequest.marshal_type": return x.MarshalType != 0 case "sourcenetwork.acp_core.CreatePolicyRequest.creation_time": return x.CreationTime != nil case "sourcenetwork.acp_core.CreatePolicyRequest.metadata": return len(x.Metadata) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyRequest.policy": x.Policy = "" case "sourcenetwork.acp_core.CreatePolicyRequest.marshal_type": x.MarshalType = 0 case "sourcenetwork.acp_core.CreatePolicyRequest.creation_time": x.CreationTime = nil case "sourcenetwork.acp_core.CreatePolicyRequest.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_CreatePolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.CreatePolicyRequest.policy": value := x.Policy return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.CreatePolicyRequest.marshal_type": value := x.MarshalType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) case "sourcenetwork.acp_core.CreatePolicyRequest.creation_time": value := x.CreationTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.CreatePolicyRequest.metadata": if len(x.Metadata) == 0 { return protoreflect.ValueOfMap(&_CreatePolicyRequest_4_map{}) } mapValue := &_CreatePolicyRequest_4_map{m: &x.Metadata} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyRequest.policy": x.Policy = value.Interface().(string) case "sourcenetwork.acp_core.CreatePolicyRequest.marshal_type": x.MarshalType = (PolicyMarshalingType)(value.Enum()) case "sourcenetwork.acp_core.CreatePolicyRequest.creation_time": x.CreationTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcenetwork.acp_core.CreatePolicyRequest.metadata": mv := value.Map() cmv := mv.(*_CreatePolicyRequest_4_map) x.Metadata = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyRequest.creation_time": if x.CreationTime == nil { x.CreationTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) case "sourcenetwork.acp_core.CreatePolicyRequest.metadata": if x.Metadata == nil { x.Metadata = make(map[string]string) } value := &_CreatePolicyRequest_4_map{m: &x.Metadata} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.CreatePolicyRequest.policy": panic(fmt.Errorf("field policy of message sourcenetwork.acp_core.CreatePolicyRequest is not mutable")) case "sourcenetwork.acp_core.CreatePolicyRequest.marshal_type": panic(fmt.Errorf("field marshal_type of message sourcenetwork.acp_core.CreatePolicyRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_CreatePolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyRequest.policy": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.CreatePolicyRequest.marshal_type": return protoreflect.ValueOfEnum(0) case "sourcenetwork.acp_core.CreatePolicyRequest.creation_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.CreatePolicyRequest.metadata": m := make(map[string]string) return protoreflect.ValueOfMap(&_CreatePolicyRequest_4_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_CreatePolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.CreatePolicyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_CreatePolicyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_CreatePolicyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_CreatePolicyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*CreatePolicyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Policy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.MarshalType != 0 { n += 1 + runtime.Sov(uint64(x.MarshalType)) } if x.CreationTime != nil { l = options.Size(x.CreationTime) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Metadata) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Metadata[k] SiZeMaP(k, v) } } else { for k, v := range x.Metadata { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*CreatePolicyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Metadata) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForMetadata := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { keysForMetadata = append(keysForMetadata, string(k)) } sort.Slice(keysForMetadata, func(i, j int) bool { return keysForMetadata[i] < keysForMetadata[j] }) for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { v := x.Metadata[string(keysForMetadata[iNdEx])] out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Metadata { v := x.Metadata[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if x.CreationTime != nil { encoded, err := options.Marshal(x.CreationTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.MarshalType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MarshalType)) i-- dAtA[i] = 0x10 } if len(x.Policy) > 0 { i -= len(x.Policy) copy(dAtA[i:], x.Policy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Policy))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*CreatePolicyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CreatePolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CreatePolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } x.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.MarshalType |= PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTime == nil { x.CreationTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Metadata[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.Map = (*_CreatePolicyResponse_2_map)(nil) type _CreatePolicyResponse_2_map struct { m *map[string]string } func (x *_CreatePolicyResponse_2_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_CreatePolicyResponse_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_CreatePolicyResponse_2_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_CreatePolicyResponse_2_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_CreatePolicyResponse_2_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_CreatePolicyResponse_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_CreatePolicyResponse_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_CreatePolicyResponse_2_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_CreatePolicyResponse_2_map) IsValid() bool { return x.m != nil } var ( md_CreatePolicyResponse protoreflect.MessageDescriptor fd_CreatePolicyResponse_policy protoreflect.FieldDescriptor fd_CreatePolicyResponse_metadata protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_CreatePolicyResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("CreatePolicyResponse") fd_CreatePolicyResponse_policy = md_CreatePolicyResponse.Fields().ByName("policy") fd_CreatePolicyResponse_metadata = md_CreatePolicyResponse.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_CreatePolicyResponse)(nil) type fastReflection_CreatePolicyResponse CreatePolicyResponse func (x *CreatePolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_CreatePolicyResponse)(x) } func (x *CreatePolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_CreatePolicyResponse_messageType fastReflection_CreatePolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_CreatePolicyResponse_messageType{} type fastReflection_CreatePolicyResponse_messageType struct{} func (x fastReflection_CreatePolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_CreatePolicyResponse)(nil) } func (x fastReflection_CreatePolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_CreatePolicyResponse) } func (x fastReflection_CreatePolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_CreatePolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_CreatePolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_CreatePolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_CreatePolicyResponse) Type() protoreflect.MessageType { return _fastReflection_CreatePolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_CreatePolicyResponse) New() protoreflect.Message { return new(fastReflection_CreatePolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_CreatePolicyResponse) Interface() protoreflect.ProtoMessage { return (*CreatePolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_CreatePolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != nil { value := protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) if !f(fd_CreatePolicyResponse_policy, value) { return } } if len(x.Metadata) != 0 { value := protoreflect.ValueOfMap(&_CreatePolicyResponse_2_map{m: &x.Metadata}) if !f(fd_CreatePolicyResponse_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_CreatePolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyResponse.policy": return x.Policy != nil case "sourcenetwork.acp_core.CreatePolicyResponse.metadata": return len(x.Metadata) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyResponse.policy": x.Policy = nil case "sourcenetwork.acp_core.CreatePolicyResponse.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_CreatePolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.CreatePolicyResponse.policy": value := x.Policy return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.CreatePolicyResponse.metadata": if len(x.Metadata) == 0 { return protoreflect.ValueOfMap(&_CreatePolicyResponse_2_map{}) } mapValue := &_CreatePolicyResponse_2_map{m: &x.Metadata} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyResponse.policy": x.Policy = value.Message().Interface().(*Policy) case "sourcenetwork.acp_core.CreatePolicyResponse.metadata": mv := value.Map() cmv := mv.(*_CreatePolicyResponse_2_map) x.Metadata = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyResponse.policy": if x.Policy == nil { x.Policy = new(Policy) } return protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) case "sourcenetwork.acp_core.CreatePolicyResponse.metadata": if x.Metadata == nil { x.Metadata = make(map[string]string) } value := &_CreatePolicyResponse_2_map{m: &x.Metadata} return protoreflect.ValueOfMap(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_CreatePolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.CreatePolicyResponse.policy": m := new(Policy) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.CreatePolicyResponse.metadata": m := make(map[string]string) return protoreflect.ValueOfMap(&_CreatePolicyResponse_2_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.CreatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.CreatePolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_CreatePolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.CreatePolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_CreatePolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_CreatePolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_CreatePolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_CreatePolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*CreatePolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Policy != nil { l = options.Size(x.Policy) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Metadata) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Metadata[k] SiZeMaP(k, v) } } else { for k, v := range x.Metadata { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*CreatePolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Metadata) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForMetadata := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { keysForMetadata = append(keysForMetadata, string(k)) } sort.Slice(keysForMetadata, func(i, j int) bool { return keysForMetadata[i] < keysForMetadata[j] }) for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { v := x.Metadata[string(keysForMetadata[iNdEx])] out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Metadata { v := x.Metadata[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if x.Policy != nil { encoded, err := options.Marshal(x.Policy) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*CreatePolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CreatePolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CreatePolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Policy == nil { x.Policy = &Policy{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Policy); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Metadata[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.Map = (*_SetRelationshipRequest_4_map)(nil) type _SetRelationshipRequest_4_map struct { m *map[string]string } func (x *_SetRelationshipRequest_4_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_SetRelationshipRequest_4_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_SetRelationshipRequest_4_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_SetRelationshipRequest_4_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_SetRelationshipRequest_4_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_SetRelationshipRequest_4_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_SetRelationshipRequest_4_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_SetRelationshipRequest_4_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_SetRelationshipRequest_4_map) IsValid() bool { return x.m != nil } var ( md_SetRelationshipRequest protoreflect.MessageDescriptor fd_SetRelationshipRequest_policy_id protoreflect.FieldDescriptor fd_SetRelationshipRequest_creation_time protoreflect.FieldDescriptor fd_SetRelationshipRequest_relationship protoreflect.FieldDescriptor fd_SetRelationshipRequest_metadata protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_SetRelationshipRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("SetRelationshipRequest") fd_SetRelationshipRequest_policy_id = md_SetRelationshipRequest.Fields().ByName("policy_id") fd_SetRelationshipRequest_creation_time = md_SetRelationshipRequest.Fields().ByName("creation_time") fd_SetRelationshipRequest_relationship = md_SetRelationshipRequest.Fields().ByName("relationship") fd_SetRelationshipRequest_metadata = md_SetRelationshipRequest.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_SetRelationshipRequest)(nil) type fastReflection_SetRelationshipRequest SetRelationshipRequest func (x *SetRelationshipRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_SetRelationshipRequest)(x) } func (x *SetRelationshipRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SetRelationshipRequest_messageType fastReflection_SetRelationshipRequest_messageType var _ protoreflect.MessageType = fastReflection_SetRelationshipRequest_messageType{} type fastReflection_SetRelationshipRequest_messageType struct{} func (x fastReflection_SetRelationshipRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_SetRelationshipRequest)(nil) } func (x fastReflection_SetRelationshipRequest_messageType) New() protoreflect.Message { return new(fastReflection_SetRelationshipRequest) } func (x fastReflection_SetRelationshipRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SetRelationshipRequest) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SetRelationshipRequest) Type() protoreflect.MessageType { return _fastReflection_SetRelationshipRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SetRelationshipRequest) New() protoreflect.Message { return new(fastReflection_SetRelationshipRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SetRelationshipRequest) Interface() protoreflect.ProtoMessage { return (*SetRelationshipRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SetRelationshipRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_SetRelationshipRequest_policy_id, value) { return } } if x.CreationTime != nil { value := protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) if !f(fd_SetRelationshipRequest_creation_time, value) { return } } if x.Relationship != nil { value := protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) if !f(fd_SetRelationshipRequest_relationship, value) { return } } if len(x.Metadata) != 0 { value := protoreflect.ValueOfMap(&_SetRelationshipRequest_4_map{m: &x.Metadata}) if !f(fd_SetRelationshipRequest_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SetRelationshipRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.SetRelationshipRequest.creation_time": return x.CreationTime != nil case "sourcenetwork.acp_core.SetRelationshipRequest.relationship": return x.Relationship != nil case "sourcenetwork.acp_core.SetRelationshipRequest.metadata": return len(x.Metadata) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.SetRelationshipRequest.creation_time": x.CreationTime = nil case "sourcenetwork.acp_core.SetRelationshipRequest.relationship": x.Relationship = nil case "sourcenetwork.acp_core.SetRelationshipRequest.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SetRelationshipRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.SetRelationshipRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.SetRelationshipRequest.creation_time": value := x.CreationTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.SetRelationshipRequest.relationship": value := x.Relationship return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.SetRelationshipRequest.metadata": if len(x.Metadata) == 0 { return protoreflect.ValueOfMap(&_SetRelationshipRequest_4_map{}) } mapValue := &_SetRelationshipRequest_4_map{m: &x.Metadata} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.SetRelationshipRequest.creation_time": x.CreationTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcenetwork.acp_core.SetRelationshipRequest.relationship": x.Relationship = value.Message().Interface().(*Relationship) case "sourcenetwork.acp_core.SetRelationshipRequest.metadata": mv := value.Map() cmv := mv.(*_SetRelationshipRequest_4_map) x.Metadata = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipRequest.creation_time": if x.CreationTime == nil { x.CreationTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) case "sourcenetwork.acp_core.SetRelationshipRequest.relationship": if x.Relationship == nil { x.Relationship = new(Relationship) } return protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) case "sourcenetwork.acp_core.SetRelationshipRequest.metadata": if x.Metadata == nil { x.Metadata = make(map[string]string) } value := &_SetRelationshipRequest_4_map{m: &x.Metadata} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.SetRelationshipRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.SetRelationshipRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SetRelationshipRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.SetRelationshipRequest.creation_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.SetRelationshipRequest.relationship": m := new(Relationship) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.SetRelationshipRequest.metadata": m := make(map[string]string) return protoreflect.ValueOfMap(&_SetRelationshipRequest_4_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SetRelationshipRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.SetRelationshipRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SetRelationshipRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SetRelationshipRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SetRelationshipRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SetRelationshipRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationTime != nil { l = options.Size(x.CreationTime) n += 1 + l + runtime.Sov(uint64(l)) } if x.Relationship != nil { l = options.Size(x.Relationship) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Metadata) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Metadata[k] SiZeMaP(k, v) } } else { for k, v := range x.Metadata { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Metadata) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForMetadata := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { keysForMetadata = append(keysForMetadata, string(k)) } sort.Slice(keysForMetadata, func(i, j int) bool { return keysForMetadata[i] < keysForMetadata[j] }) for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { v := x.Metadata[string(keysForMetadata[iNdEx])] out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Metadata { v := x.Metadata[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if x.Relationship != nil { encoded, err := options.Marshal(x.Relationship) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.CreationTime != nil { encoded, err := options.Marshal(x.CreationTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTime == nil { x.CreationTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Relationship == nil { x.Relationship = &Relationship{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relationship); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Metadata[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SetRelationshipResponse protoreflect.MessageDescriptor fd_SetRelationshipResponse_record_existed protoreflect.FieldDescriptor fd_SetRelationshipResponse_record protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_SetRelationshipResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("SetRelationshipResponse") fd_SetRelationshipResponse_record_existed = md_SetRelationshipResponse.Fields().ByName("record_existed") fd_SetRelationshipResponse_record = md_SetRelationshipResponse.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_SetRelationshipResponse)(nil) type fastReflection_SetRelationshipResponse SetRelationshipResponse func (x *SetRelationshipResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_SetRelationshipResponse)(x) } func (x *SetRelationshipResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SetRelationshipResponse_messageType fastReflection_SetRelationshipResponse_messageType var _ protoreflect.MessageType = fastReflection_SetRelationshipResponse_messageType{} type fastReflection_SetRelationshipResponse_messageType struct{} func (x fastReflection_SetRelationshipResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_SetRelationshipResponse)(nil) } func (x fastReflection_SetRelationshipResponse_messageType) New() protoreflect.Message { return new(fastReflection_SetRelationshipResponse) } func (x fastReflection_SetRelationshipResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SetRelationshipResponse) Descriptor() protoreflect.MessageDescriptor { return md_SetRelationshipResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SetRelationshipResponse) Type() protoreflect.MessageType { return _fastReflection_SetRelationshipResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SetRelationshipResponse) New() protoreflect.Message { return new(fastReflection_SetRelationshipResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SetRelationshipResponse) Interface() protoreflect.ProtoMessage { return (*SetRelationshipResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SetRelationshipResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RecordExisted != false { value := protoreflect.ValueOfBool(x.RecordExisted) if !f(fd_SetRelationshipResponse_record_existed, value) { return } } if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_SetRelationshipResponse_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SetRelationshipResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipResponse.record_existed": return x.RecordExisted != false case "sourcenetwork.acp_core.SetRelationshipResponse.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipResponse.record_existed": x.RecordExisted = false case "sourcenetwork.acp_core.SetRelationshipResponse.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SetRelationshipResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.SetRelationshipResponse.record_existed": value := x.RecordExisted return protoreflect.ValueOfBool(value) case "sourcenetwork.acp_core.SetRelationshipResponse.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipResponse.record_existed": x.RecordExisted = value.Bool() case "sourcenetwork.acp_core.SetRelationshipResponse.record": x.Record = value.Message().Interface().(*RelationshipRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipResponse.record": if x.Record == nil { x.Record = new(RelationshipRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) case "sourcenetwork.acp_core.SetRelationshipResponse.record_existed": panic(fmt.Errorf("field record_existed of message sourcenetwork.acp_core.SetRelationshipResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SetRelationshipResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SetRelationshipResponse.record_existed": return protoreflect.ValueOfBool(false) case "sourcenetwork.acp_core.SetRelationshipResponse.record": m := new(RelationshipRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetRelationshipResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SetRelationshipResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.SetRelationshipResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SetRelationshipResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetRelationshipResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SetRelationshipResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SetRelationshipResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SetRelationshipResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RecordExisted { n += 2 } if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.RecordExisted { i-- if x.RecordExisted { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SetRelationshipResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRelationshipResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecordExisted", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.RecordExisted = bool(v != 0) case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &RelationshipRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DeleteRelationshipRequest protoreflect.MessageDescriptor fd_DeleteRelationshipRequest_policy_id protoreflect.FieldDescriptor fd_DeleteRelationshipRequest_relationship protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_DeleteRelationshipRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("DeleteRelationshipRequest") fd_DeleteRelationshipRequest_policy_id = md_DeleteRelationshipRequest.Fields().ByName("policy_id") fd_DeleteRelationshipRequest_relationship = md_DeleteRelationshipRequest.Fields().ByName("relationship") } var _ protoreflect.Message = (*fastReflection_DeleteRelationshipRequest)(nil) type fastReflection_DeleteRelationshipRequest DeleteRelationshipRequest func (x *DeleteRelationshipRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_DeleteRelationshipRequest)(x) } func (x *DeleteRelationshipRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DeleteRelationshipRequest_messageType fastReflection_DeleteRelationshipRequest_messageType var _ protoreflect.MessageType = fastReflection_DeleteRelationshipRequest_messageType{} type fastReflection_DeleteRelationshipRequest_messageType struct{} func (x fastReflection_DeleteRelationshipRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_DeleteRelationshipRequest)(nil) } func (x fastReflection_DeleteRelationshipRequest_messageType) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipRequest) } func (x fastReflection_DeleteRelationshipRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DeleteRelationshipRequest) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DeleteRelationshipRequest) Type() protoreflect.MessageType { return _fastReflection_DeleteRelationshipRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DeleteRelationshipRequest) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DeleteRelationshipRequest) Interface() protoreflect.ProtoMessage { return (*DeleteRelationshipRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DeleteRelationshipRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_DeleteRelationshipRequest_policy_id, value) { return } } if x.Relationship != nil { value := protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) if !f(fd_DeleteRelationshipRequest_relationship, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DeleteRelationshipRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.DeleteRelationshipRequest.relationship": return x.Relationship != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.DeleteRelationshipRequest.relationship": x.Relationship = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DeleteRelationshipRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.DeleteRelationshipRequest.relationship": value := x.Relationship return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.DeleteRelationshipRequest.relationship": x.Relationship = value.Message().Interface().(*Relationship) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipRequest.relationship": if x.Relationship == nil { x.Relationship = new(Relationship) } return protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) case "sourcenetwork.acp_core.DeleteRelationshipRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.DeleteRelationshipRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DeleteRelationshipRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.DeleteRelationshipRequest.relationship": m := new(Relationship) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DeleteRelationshipRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.DeleteRelationshipRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DeleteRelationshipRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DeleteRelationshipRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DeleteRelationshipRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DeleteRelationshipRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Relationship != nil { l = options.Size(x.Relationship) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Relationship != nil { encoded, err := options.Marshal(x.Relationship) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Relationship == nil { x.Relationship = &Relationship{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relationship); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DeleteRelationshipResponse protoreflect.MessageDescriptor fd_DeleteRelationshipResponse_record_found protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_DeleteRelationshipResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("DeleteRelationshipResponse") fd_DeleteRelationshipResponse_record_found = md_DeleteRelationshipResponse.Fields().ByName("record_found") } var _ protoreflect.Message = (*fastReflection_DeleteRelationshipResponse)(nil) type fastReflection_DeleteRelationshipResponse DeleteRelationshipResponse func (x *DeleteRelationshipResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_DeleteRelationshipResponse)(x) } func (x *DeleteRelationshipResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DeleteRelationshipResponse_messageType fastReflection_DeleteRelationshipResponse_messageType var _ protoreflect.MessageType = fastReflection_DeleteRelationshipResponse_messageType{} type fastReflection_DeleteRelationshipResponse_messageType struct{} func (x fastReflection_DeleteRelationshipResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_DeleteRelationshipResponse)(nil) } func (x fastReflection_DeleteRelationshipResponse_messageType) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipResponse) } func (x fastReflection_DeleteRelationshipResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DeleteRelationshipResponse) Descriptor() protoreflect.MessageDescriptor { return md_DeleteRelationshipResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DeleteRelationshipResponse) Type() protoreflect.MessageType { return _fastReflection_DeleteRelationshipResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DeleteRelationshipResponse) New() protoreflect.Message { return new(fastReflection_DeleteRelationshipResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DeleteRelationshipResponse) Interface() protoreflect.ProtoMessage { return (*DeleteRelationshipResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DeleteRelationshipResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RecordFound != false { value := protoreflect.ValueOfBool(x.RecordFound) if !f(fd_DeleteRelationshipResponse_record_found, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DeleteRelationshipResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipResponse.record_found": return x.RecordFound != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipResponse.record_found": x.RecordFound = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DeleteRelationshipResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipResponse.record_found": value := x.RecordFound return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipResponse.record_found": x.RecordFound = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipResponse.record_found": panic(fmt.Errorf("field record_found of message sourcenetwork.acp_core.DeleteRelationshipResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DeleteRelationshipResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeleteRelationshipResponse.record_found": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeleteRelationshipResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeleteRelationshipResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DeleteRelationshipResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.DeleteRelationshipResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DeleteRelationshipResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeleteRelationshipResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DeleteRelationshipResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DeleteRelationshipResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DeleteRelationshipResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.RecordFound { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RecordFound { i-- if x.RecordFound { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DeleteRelationshipResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeleteRelationshipResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecordFound", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.RecordFound = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.Map = (*_RegisterObjectRequest_4_map)(nil) type _RegisterObjectRequest_4_map struct { m *map[string]string } func (x *_RegisterObjectRequest_4_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_RegisterObjectRequest_4_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_RegisterObjectRequest_4_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_RegisterObjectRequest_4_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_RegisterObjectRequest_4_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_RegisterObjectRequest_4_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_RegisterObjectRequest_4_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_RegisterObjectRequest_4_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_RegisterObjectRequest_4_map) IsValid() bool { return x.m != nil } var ( md_RegisterObjectRequest protoreflect.MessageDescriptor fd_RegisterObjectRequest_policy_id protoreflect.FieldDescriptor fd_RegisterObjectRequest_object protoreflect.FieldDescriptor fd_RegisterObjectRequest_creation_time protoreflect.FieldDescriptor fd_RegisterObjectRequest_metadata protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_RegisterObjectRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("RegisterObjectRequest") fd_RegisterObjectRequest_policy_id = md_RegisterObjectRequest.Fields().ByName("policy_id") fd_RegisterObjectRequest_object = md_RegisterObjectRequest.Fields().ByName("object") fd_RegisterObjectRequest_creation_time = md_RegisterObjectRequest.Fields().ByName("creation_time") fd_RegisterObjectRequest_metadata = md_RegisterObjectRequest.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_RegisterObjectRequest)(nil) type fastReflection_RegisterObjectRequest RegisterObjectRequest func (x *RegisterObjectRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_RegisterObjectRequest)(x) } func (x *RegisterObjectRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RegisterObjectRequest_messageType fastReflection_RegisterObjectRequest_messageType var _ protoreflect.MessageType = fastReflection_RegisterObjectRequest_messageType{} type fastReflection_RegisterObjectRequest_messageType struct{} func (x fastReflection_RegisterObjectRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_RegisterObjectRequest)(nil) } func (x fastReflection_RegisterObjectRequest_messageType) New() protoreflect.Message { return new(fastReflection_RegisterObjectRequest) } func (x fastReflection_RegisterObjectRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RegisterObjectRequest) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RegisterObjectRequest) Type() protoreflect.MessageType { return _fastReflection_RegisterObjectRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RegisterObjectRequest) New() protoreflect.Message { return new(fastReflection_RegisterObjectRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RegisterObjectRequest) Interface() protoreflect.ProtoMessage { return (*RegisterObjectRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RegisterObjectRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_RegisterObjectRequest_policy_id, value) { return } } if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_RegisterObjectRequest_object, value) { return } } if x.CreationTime != nil { value := protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) if !f(fd_RegisterObjectRequest_creation_time, value) { return } } if len(x.Metadata) != 0 { value := protoreflect.ValueOfMap(&_RegisterObjectRequest_4_map{m: &x.Metadata}) if !f(fd_RegisterObjectRequest_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RegisterObjectRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.RegisterObjectRequest.object": return x.Object != nil case "sourcenetwork.acp_core.RegisterObjectRequest.creation_time": return x.CreationTime != nil case "sourcenetwork.acp_core.RegisterObjectRequest.metadata": return len(x.Metadata) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.RegisterObjectRequest.object": x.Object = nil case "sourcenetwork.acp_core.RegisterObjectRequest.creation_time": x.CreationTime = nil case "sourcenetwork.acp_core.RegisterObjectRequest.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RegisterObjectRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.RegisterObjectRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.RegisterObjectRequest.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.RegisterObjectRequest.creation_time": value := x.CreationTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.RegisterObjectRequest.metadata": if len(x.Metadata) == 0 { return protoreflect.ValueOfMap(&_RegisterObjectRequest_4_map{}) } mapValue := &_RegisterObjectRequest_4_map{m: &x.Metadata} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.RegisterObjectRequest.object": x.Object = value.Message().Interface().(*Object) case "sourcenetwork.acp_core.RegisterObjectRequest.creation_time": x.CreationTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcenetwork.acp_core.RegisterObjectRequest.metadata": mv := value.Map() cmv := mv.(*_RegisterObjectRequest_4_map) x.Metadata = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectRequest.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.RegisterObjectRequest.creation_time": if x.CreationTime == nil { x.CreationTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) case "sourcenetwork.acp_core.RegisterObjectRequest.metadata": if x.Metadata == nil { x.Metadata = make(map[string]string) } value := &_RegisterObjectRequest_4_map{m: &x.Metadata} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.RegisterObjectRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.RegisterObjectRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RegisterObjectRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.RegisterObjectRequest.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.RegisterObjectRequest.creation_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.RegisterObjectRequest.metadata": m := make(map[string]string) return protoreflect.ValueOfMap(&_RegisterObjectRequest_4_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RegisterObjectRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.RegisterObjectRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RegisterObjectRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RegisterObjectRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RegisterObjectRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RegisterObjectRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationTime != nil { l = options.Size(x.CreationTime) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Metadata) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Metadata[k] SiZeMaP(k, v) } } else { for k, v := range x.Metadata { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Metadata) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForMetadata := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { keysForMetadata = append(keysForMetadata, string(k)) } sort.Slice(keysForMetadata, func(i, j int) bool { return keysForMetadata[i] < keysForMetadata[j] }) for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { v := x.Metadata[string(keysForMetadata[iNdEx])] out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Metadata { v := x.Metadata[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if x.CreationTime != nil { encoded, err := options.Marshal(x.CreationTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTime == nil { x.CreationTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Metadata[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RegisterObjectResponse protoreflect.MessageDescriptor fd_RegisterObjectResponse_result protoreflect.FieldDescriptor fd_RegisterObjectResponse_record protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_RegisterObjectResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("RegisterObjectResponse") fd_RegisterObjectResponse_result = md_RegisterObjectResponse.Fields().ByName("result") fd_RegisterObjectResponse_record = md_RegisterObjectResponse.Fields().ByName("record") } var _ protoreflect.Message = (*fastReflection_RegisterObjectResponse)(nil) type fastReflection_RegisterObjectResponse RegisterObjectResponse func (x *RegisterObjectResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_RegisterObjectResponse)(x) } func (x *RegisterObjectResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RegisterObjectResponse_messageType fastReflection_RegisterObjectResponse_messageType var _ protoreflect.MessageType = fastReflection_RegisterObjectResponse_messageType{} type fastReflection_RegisterObjectResponse_messageType struct{} func (x fastReflection_RegisterObjectResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_RegisterObjectResponse)(nil) } func (x fastReflection_RegisterObjectResponse_messageType) New() protoreflect.Message { return new(fastReflection_RegisterObjectResponse) } func (x fastReflection_RegisterObjectResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RegisterObjectResponse) Descriptor() protoreflect.MessageDescriptor { return md_RegisterObjectResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RegisterObjectResponse) Type() protoreflect.MessageType { return _fastReflection_RegisterObjectResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RegisterObjectResponse) New() protoreflect.Message { return new(fastReflection_RegisterObjectResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RegisterObjectResponse) Interface() protoreflect.ProtoMessage { return (*RegisterObjectResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RegisterObjectResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Result != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Result)) if !f(fd_RegisterObjectResponse_result, value) { return } } if x.Record != nil { value := protoreflect.ValueOfMessage(x.Record.ProtoReflect()) if !f(fd_RegisterObjectResponse_record, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RegisterObjectResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectResponse.result": return x.Result != 0 case "sourcenetwork.acp_core.RegisterObjectResponse.record": return x.Record != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectResponse.result": x.Result = 0 case "sourcenetwork.acp_core.RegisterObjectResponse.record": x.Record = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RegisterObjectResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.RegisterObjectResponse.result": value := x.Result return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) case "sourcenetwork.acp_core.RegisterObjectResponse.record": value := x.Record return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectResponse.result": x.Result = (RegistrationResult)(value.Enum()) case "sourcenetwork.acp_core.RegisterObjectResponse.record": x.Record = value.Message().Interface().(*RelationshipRecord) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectResponse.record": if x.Record == nil { x.Record = new(RelationshipRecord) } return protoreflect.ValueOfMessage(x.Record.ProtoReflect()) case "sourcenetwork.acp_core.RegisterObjectResponse.result": panic(fmt.Errorf("field result of message sourcenetwork.acp_core.RegisterObjectResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RegisterObjectResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RegisterObjectResponse.result": return protoreflect.ValueOfEnum(0) case "sourcenetwork.acp_core.RegisterObjectResponse.record": m := new(RelationshipRecord) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RegisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RegisterObjectResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RegisterObjectResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.RegisterObjectResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RegisterObjectResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RegisterObjectResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RegisterObjectResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RegisterObjectResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RegisterObjectResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Result != 0 { n += 1 + runtime.Sov(uint64(x.Result)) } if x.Record != nil { l = options.Size(x.Record) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Record != nil { encoded, err := options.Marshal(x.Record) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.Result != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Result)) i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RegisterObjectResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterObjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } x.Result = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Result |= RegistrationResult(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Record == nil { x.Record = &RelationshipRecord{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Record); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnregisterObjectRequest protoreflect.MessageDescriptor fd_UnregisterObjectRequest_policy_id protoreflect.FieldDescriptor fd_UnregisterObjectRequest_object protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_UnregisterObjectRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("UnregisterObjectRequest") fd_UnregisterObjectRequest_policy_id = md_UnregisterObjectRequest.Fields().ByName("policy_id") fd_UnregisterObjectRequest_object = md_UnregisterObjectRequest.Fields().ByName("object") } var _ protoreflect.Message = (*fastReflection_UnregisterObjectRequest)(nil) type fastReflection_UnregisterObjectRequest UnregisterObjectRequest func (x *UnregisterObjectRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_UnregisterObjectRequest)(x) } func (x *UnregisterObjectRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnregisterObjectRequest_messageType fastReflection_UnregisterObjectRequest_messageType var _ protoreflect.MessageType = fastReflection_UnregisterObjectRequest_messageType{} type fastReflection_UnregisterObjectRequest_messageType struct{} func (x fastReflection_UnregisterObjectRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_UnregisterObjectRequest)(nil) } func (x fastReflection_UnregisterObjectRequest_messageType) New() protoreflect.Message { return new(fastReflection_UnregisterObjectRequest) } func (x fastReflection_UnregisterObjectRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnregisterObjectRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnregisterObjectRequest) Descriptor() protoreflect.MessageDescriptor { return md_UnregisterObjectRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnregisterObjectRequest) Type() protoreflect.MessageType { return _fastReflection_UnregisterObjectRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnregisterObjectRequest) New() protoreflect.Message { return new(fastReflection_UnregisterObjectRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnregisterObjectRequest) Interface() protoreflect.ProtoMessage { return (*UnregisterObjectRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnregisterObjectRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_UnregisterObjectRequest_policy_id, value) { return } } if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_UnregisterObjectRequest_object, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnregisterObjectRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.UnregisterObjectRequest.object": return x.Object != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.UnregisterObjectRequest.object": x.Object = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnregisterObjectRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.UnregisterObjectRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.UnregisterObjectRequest.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.UnregisterObjectRequest.object": x.Object = value.Message().Interface().(*Object) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectRequest.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.UnregisterObjectRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.UnregisterObjectRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnregisterObjectRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.UnregisterObjectRequest.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnregisterObjectRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.UnregisterObjectRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnregisterObjectRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnregisterObjectRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnregisterObjectRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnregisterObjectRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnregisterObjectRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnregisterObjectRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnregisterObjectRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnregisterObjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_UnregisterObjectResponse protoreflect.MessageDescriptor fd_UnregisterObjectResponse_found protoreflect.FieldDescriptor fd_UnregisterObjectResponse_relationships_removed protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_UnregisterObjectResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("UnregisterObjectResponse") fd_UnregisterObjectResponse_found = md_UnregisterObjectResponse.Fields().ByName("found") fd_UnregisterObjectResponse_relationships_removed = md_UnregisterObjectResponse.Fields().ByName("relationships_removed") } var _ protoreflect.Message = (*fastReflection_UnregisterObjectResponse)(nil) type fastReflection_UnregisterObjectResponse UnregisterObjectResponse func (x *UnregisterObjectResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_UnregisterObjectResponse)(x) } func (x *UnregisterObjectResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_UnregisterObjectResponse_messageType fastReflection_UnregisterObjectResponse_messageType var _ protoreflect.MessageType = fastReflection_UnregisterObjectResponse_messageType{} type fastReflection_UnregisterObjectResponse_messageType struct{} func (x fastReflection_UnregisterObjectResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_UnregisterObjectResponse)(nil) } func (x fastReflection_UnregisterObjectResponse_messageType) New() protoreflect.Message { return new(fastReflection_UnregisterObjectResponse) } func (x fastReflection_UnregisterObjectResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_UnregisterObjectResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_UnregisterObjectResponse) Descriptor() protoreflect.MessageDescriptor { return md_UnregisterObjectResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_UnregisterObjectResponse) Type() protoreflect.MessageType { return _fastReflection_UnregisterObjectResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_UnregisterObjectResponse) New() protoreflect.Message { return new(fastReflection_UnregisterObjectResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_UnregisterObjectResponse) Interface() protoreflect.ProtoMessage { return (*UnregisterObjectResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UnregisterObjectResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Found != false { value := protoreflect.ValueOfBool(x.Found) if !f(fd_UnregisterObjectResponse_found, value) { return } } if x.RelationshipsRemoved != uint64(0) { value := protoreflect.ValueOfUint64(x.RelationshipsRemoved) if !f(fd_UnregisterObjectResponse_relationships_removed, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_UnregisterObjectResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectResponse.found": return x.Found != false case "sourcenetwork.acp_core.UnregisterObjectResponse.relationships_removed": return x.RelationshipsRemoved != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectResponse.found": x.Found = false case "sourcenetwork.acp_core.UnregisterObjectResponse.relationships_removed": x.RelationshipsRemoved = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UnregisterObjectResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.UnregisterObjectResponse.found": value := x.Found return protoreflect.ValueOfBool(value) case "sourcenetwork.acp_core.UnregisterObjectResponse.relationships_removed": value := x.RelationshipsRemoved return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectResponse.found": x.Found = value.Bool() case "sourcenetwork.acp_core.UnregisterObjectResponse.relationships_removed": x.RelationshipsRemoved = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectResponse.found": panic(fmt.Errorf("field found of message sourcenetwork.acp_core.UnregisterObjectResponse is not mutable")) case "sourcenetwork.acp_core.UnregisterObjectResponse.relationships_removed": panic(fmt.Errorf("field relationships_removed of message sourcenetwork.acp_core.UnregisterObjectResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UnregisterObjectResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.UnregisterObjectResponse.found": return protoreflect.ValueOfBool(false) case "sourcenetwork.acp_core.UnregisterObjectResponse.relationships_removed": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.UnregisterObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.UnregisterObjectResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_UnregisterObjectResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.UnregisterObjectResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_UnregisterObjectResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UnregisterObjectResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_UnregisterObjectResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_UnregisterObjectResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*UnregisterObjectResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Found { n += 2 } if x.RelationshipsRemoved != 0 { n += 1 + runtime.Sov(uint64(x.RelationshipsRemoved)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*UnregisterObjectResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.RelationshipsRemoved != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.RelationshipsRemoved)) i-- dAtA[i] = 0x10 } if x.Found { i-- if x.Found { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*UnregisterObjectResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnregisterObjectResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnregisterObjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Found", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Found = bool(v != 0) case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelationshipsRemoved", wireType) } x.RelationshipsRemoved = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.RelationshipsRemoved |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GetObjectRegistrationRequest protoreflect.MessageDescriptor fd_GetObjectRegistrationRequest_policy_id protoreflect.FieldDescriptor fd_GetObjectRegistrationRequest_object protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_GetObjectRegistrationRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("GetObjectRegistrationRequest") fd_GetObjectRegistrationRequest_policy_id = md_GetObjectRegistrationRequest.Fields().ByName("policy_id") fd_GetObjectRegistrationRequest_object = md_GetObjectRegistrationRequest.Fields().ByName("object") } var _ protoreflect.Message = (*fastReflection_GetObjectRegistrationRequest)(nil) type fastReflection_GetObjectRegistrationRequest GetObjectRegistrationRequest func (x *GetObjectRegistrationRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_GetObjectRegistrationRequest)(x) } func (x *GetObjectRegistrationRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GetObjectRegistrationRequest_messageType fastReflection_GetObjectRegistrationRequest_messageType var _ protoreflect.MessageType = fastReflection_GetObjectRegistrationRequest_messageType{} type fastReflection_GetObjectRegistrationRequest_messageType struct{} func (x fastReflection_GetObjectRegistrationRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_GetObjectRegistrationRequest)(nil) } func (x fastReflection_GetObjectRegistrationRequest_messageType) New() protoreflect.Message { return new(fastReflection_GetObjectRegistrationRequest) } func (x fastReflection_GetObjectRegistrationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GetObjectRegistrationRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GetObjectRegistrationRequest) Descriptor() protoreflect.MessageDescriptor { return md_GetObjectRegistrationRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GetObjectRegistrationRequest) Type() protoreflect.MessageType { return _fastReflection_GetObjectRegistrationRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GetObjectRegistrationRequest) New() protoreflect.Message { return new(fastReflection_GetObjectRegistrationRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GetObjectRegistrationRequest) Interface() protoreflect.ProtoMessage { return (*GetObjectRegistrationRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GetObjectRegistrationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_GetObjectRegistrationRequest_policy_id, value) { return } } if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_GetObjectRegistrationRequest_object, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GetObjectRegistrationRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.GetObjectRegistrationRequest.object": return x.Object != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.GetObjectRegistrationRequest.object": x.Object = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GetObjectRegistrationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.GetObjectRegistrationRequest.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.GetObjectRegistrationRequest.object": x.Object = value.Message().Interface().(*Object) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationRequest.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.GetObjectRegistrationRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.GetObjectRegistrationRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GetObjectRegistrationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.GetObjectRegistrationRequest.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GetObjectRegistrationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.GetObjectRegistrationRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GetObjectRegistrationRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GetObjectRegistrationRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GetObjectRegistrationRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GetObjectRegistrationRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GetObjectRegistrationRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GetObjectRegistrationRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetObjectRegistrationRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetObjectRegistrationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GetObjectRegistrationResponse protoreflect.MessageDescriptor fd_GetObjectRegistrationResponse_is_registered protoreflect.FieldDescriptor fd_GetObjectRegistrationResponse_owner_id protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_GetObjectRegistrationResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("GetObjectRegistrationResponse") fd_GetObjectRegistrationResponse_is_registered = md_GetObjectRegistrationResponse.Fields().ByName("is_registered") fd_GetObjectRegistrationResponse_owner_id = md_GetObjectRegistrationResponse.Fields().ByName("owner_id") } var _ protoreflect.Message = (*fastReflection_GetObjectRegistrationResponse)(nil) type fastReflection_GetObjectRegistrationResponse GetObjectRegistrationResponse func (x *GetObjectRegistrationResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_GetObjectRegistrationResponse)(x) } func (x *GetObjectRegistrationResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GetObjectRegistrationResponse_messageType fastReflection_GetObjectRegistrationResponse_messageType var _ protoreflect.MessageType = fastReflection_GetObjectRegistrationResponse_messageType{} type fastReflection_GetObjectRegistrationResponse_messageType struct{} func (x fastReflection_GetObjectRegistrationResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_GetObjectRegistrationResponse)(nil) } func (x fastReflection_GetObjectRegistrationResponse_messageType) New() protoreflect.Message { return new(fastReflection_GetObjectRegistrationResponse) } func (x fastReflection_GetObjectRegistrationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GetObjectRegistrationResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GetObjectRegistrationResponse) Descriptor() protoreflect.MessageDescriptor { return md_GetObjectRegistrationResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GetObjectRegistrationResponse) Type() protoreflect.MessageType { return _fastReflection_GetObjectRegistrationResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GetObjectRegistrationResponse) New() protoreflect.Message { return new(fastReflection_GetObjectRegistrationResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GetObjectRegistrationResponse) Interface() protoreflect.ProtoMessage { return (*GetObjectRegistrationResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GetObjectRegistrationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.IsRegistered != false { value := protoreflect.ValueOfBool(x.IsRegistered) if !f(fd_GetObjectRegistrationResponse_is_registered, value) { return } } if x.OwnerId != "" { value := protoreflect.ValueOfString(x.OwnerId) if !f(fd_GetObjectRegistrationResponse_owner_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GetObjectRegistrationResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationResponse.is_registered": return x.IsRegistered != false case "sourcenetwork.acp_core.GetObjectRegistrationResponse.owner_id": return x.OwnerId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationResponse.is_registered": x.IsRegistered = false case "sourcenetwork.acp_core.GetObjectRegistrationResponse.owner_id": x.OwnerId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GetObjectRegistrationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationResponse.is_registered": value := x.IsRegistered return protoreflect.ValueOfBool(value) case "sourcenetwork.acp_core.GetObjectRegistrationResponse.owner_id": value := x.OwnerId return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationResponse.is_registered": x.IsRegistered = value.Bool() case "sourcenetwork.acp_core.GetObjectRegistrationResponse.owner_id": x.OwnerId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationResponse.is_registered": panic(fmt.Errorf("field is_registered of message sourcenetwork.acp_core.GetObjectRegistrationResponse is not mutable")) case "sourcenetwork.acp_core.GetObjectRegistrationResponse.owner_id": panic(fmt.Errorf("field owner_id of message sourcenetwork.acp_core.GetObjectRegistrationResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GetObjectRegistrationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetObjectRegistrationResponse.is_registered": return protoreflect.ValueOfBool(false) case "sourcenetwork.acp_core.GetObjectRegistrationResponse.owner_id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetObjectRegistrationResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetObjectRegistrationResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GetObjectRegistrationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.GetObjectRegistrationResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GetObjectRegistrationResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetObjectRegistrationResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GetObjectRegistrationResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GetObjectRegistrationResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GetObjectRegistrationResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.IsRegistered { n += 2 } l = len(x.OwnerId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GetObjectRegistrationResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.OwnerId) > 0 { i -= len(x.OwnerId) copy(dAtA[i:], x.OwnerId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerId))) i-- dAtA[i] = 0x12 } if x.IsRegistered { i-- if x.IsRegistered { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GetObjectRegistrationResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetObjectRegistrationResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetObjectRegistrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsRegistered", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.IsRegistered = bool(v != 0) case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.OwnerId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_FilterRelationshipsRequest protoreflect.MessageDescriptor fd_FilterRelationshipsRequest_policy_id protoreflect.FieldDescriptor fd_FilterRelationshipsRequest_selector protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_FilterRelationshipsRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("FilterRelationshipsRequest") fd_FilterRelationshipsRequest_policy_id = md_FilterRelationshipsRequest.Fields().ByName("policy_id") fd_FilterRelationshipsRequest_selector = md_FilterRelationshipsRequest.Fields().ByName("selector") } var _ protoreflect.Message = (*fastReflection_FilterRelationshipsRequest)(nil) type fastReflection_FilterRelationshipsRequest FilterRelationshipsRequest func (x *FilterRelationshipsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_FilterRelationshipsRequest)(x) } func (x *FilterRelationshipsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FilterRelationshipsRequest_messageType fastReflection_FilterRelationshipsRequest_messageType var _ protoreflect.MessageType = fastReflection_FilterRelationshipsRequest_messageType{} type fastReflection_FilterRelationshipsRequest_messageType struct{} func (x fastReflection_FilterRelationshipsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_FilterRelationshipsRequest)(nil) } func (x fastReflection_FilterRelationshipsRequest_messageType) New() protoreflect.Message { return new(fastReflection_FilterRelationshipsRequest) } func (x fastReflection_FilterRelationshipsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FilterRelationshipsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FilterRelationshipsRequest) Descriptor() protoreflect.MessageDescriptor { return md_FilterRelationshipsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FilterRelationshipsRequest) Type() protoreflect.MessageType { return _fastReflection_FilterRelationshipsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FilterRelationshipsRequest) New() protoreflect.Message { return new(fastReflection_FilterRelationshipsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FilterRelationshipsRequest) Interface() protoreflect.ProtoMessage { return (*FilterRelationshipsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FilterRelationshipsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_FilterRelationshipsRequest_policy_id, value) { return } } if x.Selector != nil { value := protoreflect.ValueOfMessage(x.Selector.ProtoReflect()) if !f(fd_FilterRelationshipsRequest_selector, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FilterRelationshipsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.FilterRelationshipsRequest.selector": return x.Selector != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.FilterRelationshipsRequest.selector": x.Selector = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FilterRelationshipsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.FilterRelationshipsRequest.selector": value := x.Selector return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.FilterRelationshipsRequest.selector": x.Selector = value.Message().Interface().(*RelationshipSelector) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsRequest.selector": if x.Selector == nil { x.Selector = new(RelationshipSelector) } return protoreflect.ValueOfMessage(x.Selector.ProtoReflect()) case "sourcenetwork.acp_core.FilterRelationshipsRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.FilterRelationshipsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FilterRelationshipsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.FilterRelationshipsRequest.selector": m := new(RelationshipSelector) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FilterRelationshipsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.FilterRelationshipsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FilterRelationshipsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FilterRelationshipsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FilterRelationshipsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FilterRelationshipsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Selector != nil { l = options.Size(x.Selector) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FilterRelationshipsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Selector != nil { encoded, err := options.Marshal(x.Selector) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FilterRelationshipsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FilterRelationshipsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FilterRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Selector == nil { x.Selector = &RelationshipSelector{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Selector); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_FilterRelationshipsResponse_1_list)(nil) type _FilterRelationshipsResponse_1_list struct { list *[]*RelationshipRecord } func (x *_FilterRelationshipsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_FilterRelationshipsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_FilterRelationshipsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RelationshipRecord) (*x.list)[i] = concreteValue } func (x *_FilterRelationshipsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RelationshipRecord) *x.list = append(*x.list, concreteValue) } func (x *_FilterRelationshipsResponse_1_list) AppendMutable() protoreflect.Value { v := new(RelationshipRecord) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_FilterRelationshipsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_FilterRelationshipsResponse_1_list) NewElement() protoreflect.Value { v := new(RelationshipRecord) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_FilterRelationshipsResponse_1_list) IsValid() bool { return x.list != nil } var ( md_FilterRelationshipsResponse protoreflect.MessageDescriptor fd_FilterRelationshipsResponse_records protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_FilterRelationshipsResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("FilterRelationshipsResponse") fd_FilterRelationshipsResponse_records = md_FilterRelationshipsResponse.Fields().ByName("records") } var _ protoreflect.Message = (*fastReflection_FilterRelationshipsResponse)(nil) type fastReflection_FilterRelationshipsResponse FilterRelationshipsResponse func (x *FilterRelationshipsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_FilterRelationshipsResponse)(x) } func (x *FilterRelationshipsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_FilterRelationshipsResponse_messageType fastReflection_FilterRelationshipsResponse_messageType var _ protoreflect.MessageType = fastReflection_FilterRelationshipsResponse_messageType{} type fastReflection_FilterRelationshipsResponse_messageType struct{} func (x fastReflection_FilterRelationshipsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_FilterRelationshipsResponse)(nil) } func (x fastReflection_FilterRelationshipsResponse_messageType) New() protoreflect.Message { return new(fastReflection_FilterRelationshipsResponse) } func (x fastReflection_FilterRelationshipsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_FilterRelationshipsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_FilterRelationshipsResponse) Descriptor() protoreflect.MessageDescriptor { return md_FilterRelationshipsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_FilterRelationshipsResponse) Type() protoreflect.MessageType { return _fastReflection_FilterRelationshipsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_FilterRelationshipsResponse) New() protoreflect.Message { return new(fastReflection_FilterRelationshipsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_FilterRelationshipsResponse) Interface() protoreflect.ProtoMessage { return (*FilterRelationshipsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_FilterRelationshipsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Records) != 0 { value := protoreflect.ValueOfList(&_FilterRelationshipsResponse_1_list{list: &x.Records}) if !f(fd_FilterRelationshipsResponse_records, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_FilterRelationshipsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsResponse.records": return len(x.Records) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsResponse.records": x.Records = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_FilterRelationshipsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsResponse.records": if len(x.Records) == 0 { return protoreflect.ValueOfList(&_FilterRelationshipsResponse_1_list{}) } listValue := &_FilterRelationshipsResponse_1_list{list: &x.Records} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsResponse.records": lv := value.List() clv := lv.(*_FilterRelationshipsResponse_1_list) x.Records = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsResponse.records": if x.Records == nil { x.Records = []*RelationshipRecord{} } value := &_FilterRelationshipsResponse_1_list{list: &x.Records} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_FilterRelationshipsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.FilterRelationshipsResponse.records": list := []*RelationshipRecord{} return protoreflect.ValueOfList(&_FilterRelationshipsResponse_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.FilterRelationshipsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.FilterRelationshipsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_FilterRelationshipsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.FilterRelationshipsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_FilterRelationshipsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_FilterRelationshipsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_FilterRelationshipsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_FilterRelationshipsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*FilterRelationshipsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Records) > 0 { for _, e := range x.Records { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*FilterRelationshipsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Records) > 0 { for iNdEx := len(x.Records) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Records[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*FilterRelationshipsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FilterRelationshipsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FilterRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Records = append(x.Records, &RelationshipRecord{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Records[len(x.Records)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GetPolicyRequest protoreflect.MessageDescriptor fd_GetPolicyRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_GetPolicyRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("GetPolicyRequest") fd_GetPolicyRequest_id = md_GetPolicyRequest.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_GetPolicyRequest)(nil) type fastReflection_GetPolicyRequest GetPolicyRequest func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_GetPolicyRequest)(x) } func (x *GetPolicyRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GetPolicyRequest_messageType fastReflection_GetPolicyRequest_messageType var _ protoreflect.MessageType = fastReflection_GetPolicyRequest_messageType{} type fastReflection_GetPolicyRequest_messageType struct{} func (x fastReflection_GetPolicyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_GetPolicyRequest)(nil) } func (x fastReflection_GetPolicyRequest_messageType) New() protoreflect.Message { return new(fastReflection_GetPolicyRequest) } func (x fastReflection_GetPolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GetPolicyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GetPolicyRequest) Descriptor() protoreflect.MessageDescriptor { return md_GetPolicyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GetPolicyRequest) Type() protoreflect.MessageType { return _fastReflection_GetPolicyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GetPolicyRequest) New() protoreflect.Message { return new(fastReflection_GetPolicyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GetPolicyRequest) Interface() protoreflect.ProtoMessage { return (*GetPolicyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GetPolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_GetPolicyRequest_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GetPolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyRequest.id": return x.Id != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyRequest.id": x.Id = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GetPolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.GetPolicyRequest.id": value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyRequest.id": x.Id = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyRequest.id": panic(fmt.Errorf("field id of message sourcenetwork.acp_core.GetPolicyRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GetPolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyRequest.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GetPolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.GetPolicyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GetPolicyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GetPolicyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GetPolicyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GetPolicyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GetPolicyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GetPolicyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetPolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GetPolicyResponse protoreflect.MessageDescriptor fd_GetPolicyResponse_policy protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_GetPolicyResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("GetPolicyResponse") fd_GetPolicyResponse_policy = md_GetPolicyResponse.Fields().ByName("policy") } var _ protoreflect.Message = (*fastReflection_GetPolicyResponse)(nil) type fastReflection_GetPolicyResponse GetPolicyResponse func (x *GetPolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_GetPolicyResponse)(x) } func (x *GetPolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GetPolicyResponse_messageType fastReflection_GetPolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_GetPolicyResponse_messageType{} type fastReflection_GetPolicyResponse_messageType struct{} func (x fastReflection_GetPolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_GetPolicyResponse)(nil) } func (x fastReflection_GetPolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_GetPolicyResponse) } func (x fastReflection_GetPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GetPolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GetPolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_GetPolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GetPolicyResponse) Type() protoreflect.MessageType { return _fastReflection_GetPolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GetPolicyResponse) New() protoreflect.Message { return new(fastReflection_GetPolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GetPolicyResponse) Interface() protoreflect.ProtoMessage { return (*GetPolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GetPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != nil { value := protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) if !f(fd_GetPolicyResponse_policy, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GetPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyResponse.policy": return x.Policy != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyResponse.policy": x.Policy = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GetPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.GetPolicyResponse.policy": value := x.Policy return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyResponse.policy": x.Policy = value.Message().Interface().(*Policy) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyResponse.policy": if x.Policy == nil { x.Policy = new(Policy) } return protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GetPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetPolicyResponse.policy": m := new(Policy) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetPolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetPolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GetPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.GetPolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GetPolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetPolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GetPolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GetPolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GetPolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Policy != nil { l = options.Size(x.Policy) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GetPolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Policy != nil { encoded, err := options.Marshal(x.Policy) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GetPolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Policy == nil { x.Policy = &Policy{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Policy); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ListPoliciesRequest protoreflect.MessageDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_ListPoliciesRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("ListPoliciesRequest") } var _ protoreflect.Message = (*fastReflection_ListPoliciesRequest)(nil) type fastReflection_ListPoliciesRequest ListPoliciesRequest func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_ListPoliciesRequest)(x) } func (x *ListPoliciesRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ListPoliciesRequest_messageType fastReflection_ListPoliciesRequest_messageType var _ protoreflect.MessageType = fastReflection_ListPoliciesRequest_messageType{} type fastReflection_ListPoliciesRequest_messageType struct{} func (x fastReflection_ListPoliciesRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_ListPoliciesRequest)(nil) } func (x fastReflection_ListPoliciesRequest_messageType) New() protoreflect.Message { return new(fastReflection_ListPoliciesRequest) } func (x fastReflection_ListPoliciesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ListPoliciesRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ListPoliciesRequest) Descriptor() protoreflect.MessageDescriptor { return md_ListPoliciesRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ListPoliciesRequest) Type() protoreflect.MessageType { return _fastReflection_ListPoliciesRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ListPoliciesRequest) New() protoreflect.Message { return new(fastReflection_ListPoliciesRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ListPoliciesRequest) Interface() protoreflect.ProtoMessage { return (*ListPoliciesRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ListPoliciesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ListPoliciesRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ListPoliciesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ListPoliciesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ListPoliciesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ListPoliciesRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ListPoliciesRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ListPoliciesRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ListPoliciesRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ListPoliciesRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ListPoliciesRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ListPoliciesRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListPoliciesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListPoliciesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_ListPoliciesResponse_1_list)(nil) type _ListPoliciesResponse_1_list struct { list *[]*Policy } func (x *_ListPoliciesResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_ListPoliciesResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_ListPoliciesResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Policy) (*x.list)[i] = concreteValue } func (x *_ListPoliciesResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Policy) *x.list = append(*x.list, concreteValue) } func (x *_ListPoliciesResponse_1_list) AppendMutable() protoreflect.Value { v := new(Policy) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ListPoliciesResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_ListPoliciesResponse_1_list) NewElement() protoreflect.Value { v := new(Policy) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ListPoliciesResponse_1_list) IsValid() bool { return x.list != nil } var ( md_ListPoliciesResponse protoreflect.MessageDescriptor fd_ListPoliciesResponse_policies protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_ListPoliciesResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("ListPoliciesResponse") fd_ListPoliciesResponse_policies = md_ListPoliciesResponse.Fields().ByName("policies") } var _ protoreflect.Message = (*fastReflection_ListPoliciesResponse)(nil) type fastReflection_ListPoliciesResponse ListPoliciesResponse func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_ListPoliciesResponse)(x) } func (x *ListPoliciesResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ListPoliciesResponse_messageType fastReflection_ListPoliciesResponse_messageType var _ protoreflect.MessageType = fastReflection_ListPoliciesResponse_messageType{} type fastReflection_ListPoliciesResponse_messageType struct{} func (x fastReflection_ListPoliciesResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_ListPoliciesResponse)(nil) } func (x fastReflection_ListPoliciesResponse_messageType) New() protoreflect.Message { return new(fastReflection_ListPoliciesResponse) } func (x fastReflection_ListPoliciesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ListPoliciesResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ListPoliciesResponse) Descriptor() protoreflect.MessageDescriptor { return md_ListPoliciesResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ListPoliciesResponse) Type() protoreflect.MessageType { return _fastReflection_ListPoliciesResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ListPoliciesResponse) New() protoreflect.Message { return new(fastReflection_ListPoliciesResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ListPoliciesResponse) Interface() protoreflect.ProtoMessage { return (*ListPoliciesResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ListPoliciesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Policies) != 0 { value := protoreflect.ValueOfList(&_ListPoliciesResponse_1_list{list: &x.Policies}) if !f(fd_ListPoliciesResponse_policies, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ListPoliciesResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ListPoliciesResponse.policies": return len(x.Policies) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ListPoliciesResponse.policies": x.Policies = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ListPoliciesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ListPoliciesResponse.policies": if len(x.Policies) == 0 { return protoreflect.ValueOfList(&_ListPoliciesResponse_1_list{}) } listValue := &_ListPoliciesResponse_1_list{list: &x.Policies} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ListPoliciesResponse.policies": lv := value.List() clv := lv.(*_ListPoliciesResponse_1_list) x.Policies = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ListPoliciesResponse.policies": if x.Policies == nil { x.Policies = []*Policy{} } value := &_ListPoliciesResponse_1_list{list: &x.Policies} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ListPoliciesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ListPoliciesResponse.policies": list := []*Policy{} return protoreflect.ValueOfList(&_ListPoliciesResponse_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ListPoliciesResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ListPoliciesResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ListPoliciesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ListPoliciesResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ListPoliciesResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ListPoliciesResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ListPoliciesResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ListPoliciesResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ListPoliciesResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Policies) > 0 { for _, e := range x.Policies { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ListPoliciesResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Policies) > 0 { for iNdEx := len(x.Policies) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Policies[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ListPoliciesResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListPoliciesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListPoliciesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policies", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Policies = append(x.Policies, &Policy{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Policies[len(x.Policies)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DeletePolicyRequest protoreflect.MessageDescriptor fd_DeletePolicyRequest_id protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_DeletePolicyRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("DeletePolicyRequest") fd_DeletePolicyRequest_id = md_DeletePolicyRequest.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_DeletePolicyRequest)(nil) type fastReflection_DeletePolicyRequest DeletePolicyRequest func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_DeletePolicyRequest)(x) } func (x *DeletePolicyRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DeletePolicyRequest_messageType fastReflection_DeletePolicyRequest_messageType var _ protoreflect.MessageType = fastReflection_DeletePolicyRequest_messageType{} type fastReflection_DeletePolicyRequest_messageType struct{} func (x fastReflection_DeletePolicyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_DeletePolicyRequest)(nil) } func (x fastReflection_DeletePolicyRequest_messageType) New() protoreflect.Message { return new(fastReflection_DeletePolicyRequest) } func (x fastReflection_DeletePolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DeletePolicyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DeletePolicyRequest) Descriptor() protoreflect.MessageDescriptor { return md_DeletePolicyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DeletePolicyRequest) Type() protoreflect.MessageType { return _fastReflection_DeletePolicyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DeletePolicyRequest) New() protoreflect.Message { return new(fastReflection_DeletePolicyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DeletePolicyRequest) Interface() protoreflect.ProtoMessage { return (*DeletePolicyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DeletePolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_DeletePolicyRequest_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DeletePolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyRequest.id": return x.Id != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyRequest.id": x.Id = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DeletePolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.DeletePolicyRequest.id": value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyRequest.id": x.Id = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyRequest.id": panic(fmt.Errorf("field id of message sourcenetwork.acp_core.DeletePolicyRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DeletePolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyRequest.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DeletePolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.DeletePolicyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DeletePolicyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DeletePolicyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DeletePolicyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DeletePolicyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DeletePolicyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DeletePolicyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeletePolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeletePolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_DeletePolicyResponse protoreflect.MessageDescriptor fd_DeletePolicyResponse_found protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_DeletePolicyResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("DeletePolicyResponse") fd_DeletePolicyResponse_found = md_DeletePolicyResponse.Fields().ByName("found") } var _ protoreflect.Message = (*fastReflection_DeletePolicyResponse)(nil) type fastReflection_DeletePolicyResponse DeletePolicyResponse func (x *DeletePolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_DeletePolicyResponse)(x) } func (x *DeletePolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_DeletePolicyResponse_messageType fastReflection_DeletePolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_DeletePolicyResponse_messageType{} type fastReflection_DeletePolicyResponse_messageType struct{} func (x fastReflection_DeletePolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_DeletePolicyResponse)(nil) } func (x fastReflection_DeletePolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_DeletePolicyResponse) } func (x fastReflection_DeletePolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_DeletePolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_DeletePolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_DeletePolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_DeletePolicyResponse) Type() protoreflect.MessageType { return _fastReflection_DeletePolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_DeletePolicyResponse) New() protoreflect.Message { return new(fastReflection_DeletePolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_DeletePolicyResponse) Interface() protoreflect.ProtoMessage { return (*DeletePolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DeletePolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Found != false { value := protoreflect.ValueOfBool(x.Found) if !f(fd_DeletePolicyResponse_found, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_DeletePolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyResponse.found": return x.Found != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyResponse.found": x.Found = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DeletePolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.DeletePolicyResponse.found": value := x.Found return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyResponse.found": x.Found = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyResponse.found": panic(fmt.Errorf("field found of message sourcenetwork.acp_core.DeletePolicyResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DeletePolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.DeletePolicyResponse.found": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.DeletePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.DeletePolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_DeletePolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.DeletePolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_DeletePolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DeletePolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_DeletePolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_DeletePolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*DeletePolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Found { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*DeletePolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Found { i-- if x.Found { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*DeletePolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeletePolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DeletePolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Found", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Found = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_TransferObjectRequest protoreflect.MessageDescriptor fd_TransferObjectRequest_policy_id protoreflect.FieldDescriptor fd_TransferObjectRequest_object protoreflect.FieldDescriptor fd_TransferObjectRequest_new_owner protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_TransferObjectRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("TransferObjectRequest") fd_TransferObjectRequest_policy_id = md_TransferObjectRequest.Fields().ByName("policy_id") fd_TransferObjectRequest_object = md_TransferObjectRequest.Fields().ByName("object") fd_TransferObjectRequest_new_owner = md_TransferObjectRequest.Fields().ByName("new_owner") } var _ protoreflect.Message = (*fastReflection_TransferObjectRequest)(nil) type fastReflection_TransferObjectRequest TransferObjectRequest func (x *TransferObjectRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_TransferObjectRequest)(x) } func (x *TransferObjectRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_TransferObjectRequest_messageType fastReflection_TransferObjectRequest_messageType var _ protoreflect.MessageType = fastReflection_TransferObjectRequest_messageType{} type fastReflection_TransferObjectRequest_messageType struct{} func (x fastReflection_TransferObjectRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_TransferObjectRequest)(nil) } func (x fastReflection_TransferObjectRequest_messageType) New() protoreflect.Message { return new(fastReflection_TransferObjectRequest) } func (x fastReflection_TransferObjectRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_TransferObjectRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_TransferObjectRequest) Descriptor() protoreflect.MessageDescriptor { return md_TransferObjectRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_TransferObjectRequest) Type() protoreflect.MessageType { return _fastReflection_TransferObjectRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_TransferObjectRequest) New() protoreflect.Message { return new(fastReflection_TransferObjectRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_TransferObjectRequest) Interface() protoreflect.ProtoMessage { return (*TransferObjectRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_TransferObjectRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_TransferObjectRequest_policy_id, value) { return } } if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_TransferObjectRequest_object, value) { return } } if x.NewOwner != nil { value := protoreflect.ValueOfMessage(x.NewOwner.ProtoReflect()) if !f(fd_TransferObjectRequest_new_owner, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_TransferObjectRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.TransferObjectRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.TransferObjectRequest.object": return x.Object != nil case "sourcenetwork.acp_core.TransferObjectRequest.new_owner": return x.NewOwner != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.TransferObjectRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.TransferObjectRequest.object": x.Object = nil case "sourcenetwork.acp_core.TransferObjectRequest.new_owner": x.NewOwner = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TransferObjectRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.TransferObjectRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.TransferObjectRequest.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.TransferObjectRequest.new_owner": value := x.NewOwner return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.TransferObjectRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.TransferObjectRequest.object": x.Object = value.Message().Interface().(*Object) case "sourcenetwork.acp_core.TransferObjectRequest.new_owner": x.NewOwner = value.Message().Interface().(*Actor) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.TransferObjectRequest.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.TransferObjectRequest.new_owner": if x.NewOwner == nil { x.NewOwner = new(Actor) } return protoreflect.ValueOfMessage(x.NewOwner.ProtoReflect()) case "sourcenetwork.acp_core.TransferObjectRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.TransferObjectRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TransferObjectRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.TransferObjectRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.TransferObjectRequest.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.TransferObjectRequest.new_owner": m := new(Actor) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_TransferObjectRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.TransferObjectRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_TransferObjectRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_TransferObjectRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_TransferObjectRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*TransferObjectRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.NewOwner != nil { l = options.Size(x.NewOwner) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*TransferObjectRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.NewOwner != nil { encoded, err := options.Marshal(x.NewOwner) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*TransferObjectRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferObjectRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferObjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.NewOwner == nil { x.NewOwner = &Actor{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NewOwner); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_TransferObjectResponse protoreflect.MessageDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_TransferObjectResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("TransferObjectResponse") } var _ protoreflect.Message = (*fastReflection_TransferObjectResponse)(nil) type fastReflection_TransferObjectResponse TransferObjectResponse func (x *TransferObjectResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_TransferObjectResponse)(x) } func (x *TransferObjectResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_TransferObjectResponse_messageType fastReflection_TransferObjectResponse_messageType var _ protoreflect.MessageType = fastReflection_TransferObjectResponse_messageType{} type fastReflection_TransferObjectResponse_messageType struct{} func (x fastReflection_TransferObjectResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_TransferObjectResponse)(nil) } func (x fastReflection_TransferObjectResponse_messageType) New() protoreflect.Message { return new(fastReflection_TransferObjectResponse) } func (x fastReflection_TransferObjectResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_TransferObjectResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_TransferObjectResponse) Descriptor() protoreflect.MessageDescriptor { return md_TransferObjectResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_TransferObjectResponse) Type() protoreflect.MessageType { return _fastReflection_TransferObjectResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_TransferObjectResponse) New() protoreflect.Message { return new(fastReflection_TransferObjectResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_TransferObjectResponse) Interface() protoreflect.ProtoMessage { return (*TransferObjectResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_TransferObjectResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_TransferObjectResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TransferObjectResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TransferObjectResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.TransferObjectResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.TransferObjectResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_TransferObjectResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.TransferObjectResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_TransferObjectResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TransferObjectResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_TransferObjectResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_TransferObjectResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*TransferObjectResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*TransferObjectResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*TransferObjectResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferObjectResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferObjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ValidatePolicyRequest protoreflect.MessageDescriptor fd_ValidatePolicyRequest_policy protoreflect.FieldDescriptor fd_ValidatePolicyRequest_marshal_type protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_ValidatePolicyRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("ValidatePolicyRequest") fd_ValidatePolicyRequest_policy = md_ValidatePolicyRequest.Fields().ByName("policy") fd_ValidatePolicyRequest_marshal_type = md_ValidatePolicyRequest.Fields().ByName("marshal_type") } var _ protoreflect.Message = (*fastReflection_ValidatePolicyRequest)(nil) type fastReflection_ValidatePolicyRequest ValidatePolicyRequest func (x *ValidatePolicyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_ValidatePolicyRequest)(x) } func (x *ValidatePolicyRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ValidatePolicyRequest_messageType fastReflection_ValidatePolicyRequest_messageType var _ protoreflect.MessageType = fastReflection_ValidatePolicyRequest_messageType{} type fastReflection_ValidatePolicyRequest_messageType struct{} func (x fastReflection_ValidatePolicyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_ValidatePolicyRequest)(nil) } func (x fastReflection_ValidatePolicyRequest_messageType) New() protoreflect.Message { return new(fastReflection_ValidatePolicyRequest) } func (x fastReflection_ValidatePolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ValidatePolicyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ValidatePolicyRequest) Descriptor() protoreflect.MessageDescriptor { return md_ValidatePolicyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ValidatePolicyRequest) Type() protoreflect.MessageType { return _fastReflection_ValidatePolicyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ValidatePolicyRequest) New() protoreflect.Message { return new(fastReflection_ValidatePolicyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ValidatePolicyRequest) Interface() protoreflect.ProtoMessage { return (*ValidatePolicyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ValidatePolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != "" { value := protoreflect.ValueOfString(x.Policy) if !f(fd_ValidatePolicyRequest_policy, value) { return } } if x.MarshalType != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MarshalType)) if !f(fd_ValidatePolicyRequest_marshal_type, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ValidatePolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyRequest.policy": return x.Policy != "" case "sourcenetwork.acp_core.ValidatePolicyRequest.marshal_type": return x.MarshalType != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyRequest.policy": x.Policy = "" case "sourcenetwork.acp_core.ValidatePolicyRequest.marshal_type": x.MarshalType = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ValidatePolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ValidatePolicyRequest.policy": value := x.Policy return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ValidatePolicyRequest.marshal_type": value := x.MarshalType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyRequest.policy": x.Policy = value.Interface().(string) case "sourcenetwork.acp_core.ValidatePolicyRequest.marshal_type": x.MarshalType = (PolicyMarshalingType)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyRequest.policy": panic(fmt.Errorf("field policy of message sourcenetwork.acp_core.ValidatePolicyRequest is not mutable")) case "sourcenetwork.acp_core.ValidatePolicyRequest.marshal_type": panic(fmt.Errorf("field marshal_type of message sourcenetwork.acp_core.ValidatePolicyRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ValidatePolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyRequest.policy": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ValidatePolicyRequest.marshal_type": return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ValidatePolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ValidatePolicyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ValidatePolicyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ValidatePolicyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ValidatePolicyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ValidatePolicyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Policy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.MarshalType != 0 { n += 1 + runtime.Sov(uint64(x.MarshalType)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ValidatePolicyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.MarshalType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MarshalType)) i-- dAtA[i] = 0x10 } if len(x.Policy) > 0 { i -= len(x.Policy) copy(dAtA[i:], x.Policy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Policy))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ValidatePolicyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatePolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatePolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } x.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.MarshalType |= PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ValidatePolicyResponse protoreflect.MessageDescriptor fd_ValidatePolicyResponse_valid protoreflect.FieldDescriptor fd_ValidatePolicyResponse_error_msg protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_ValidatePolicyResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("ValidatePolicyResponse") fd_ValidatePolicyResponse_valid = md_ValidatePolicyResponse.Fields().ByName("valid") fd_ValidatePolicyResponse_error_msg = md_ValidatePolicyResponse.Fields().ByName("error_msg") } var _ protoreflect.Message = (*fastReflection_ValidatePolicyResponse)(nil) type fastReflection_ValidatePolicyResponse ValidatePolicyResponse func (x *ValidatePolicyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_ValidatePolicyResponse)(x) } func (x *ValidatePolicyResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ValidatePolicyResponse_messageType fastReflection_ValidatePolicyResponse_messageType var _ protoreflect.MessageType = fastReflection_ValidatePolicyResponse_messageType{} type fastReflection_ValidatePolicyResponse_messageType struct{} func (x fastReflection_ValidatePolicyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_ValidatePolicyResponse)(nil) } func (x fastReflection_ValidatePolicyResponse_messageType) New() protoreflect.Message { return new(fastReflection_ValidatePolicyResponse) } func (x fastReflection_ValidatePolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ValidatePolicyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ValidatePolicyResponse) Descriptor() protoreflect.MessageDescriptor { return md_ValidatePolicyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ValidatePolicyResponse) Type() protoreflect.MessageType { return _fastReflection_ValidatePolicyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ValidatePolicyResponse) New() protoreflect.Message { return new(fastReflection_ValidatePolicyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ValidatePolicyResponse) Interface() protoreflect.ProtoMessage { return (*ValidatePolicyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ValidatePolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Valid != false { value := protoreflect.ValueOfBool(x.Valid) if !f(fd_ValidatePolicyResponse_valid, value) { return } } if x.ErrorMsg != "" { value := protoreflect.ValueOfString(x.ErrorMsg) if !f(fd_ValidatePolicyResponse_error_msg, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ValidatePolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyResponse.valid": return x.Valid != false case "sourcenetwork.acp_core.ValidatePolicyResponse.error_msg": return x.ErrorMsg != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyResponse.valid": x.Valid = false case "sourcenetwork.acp_core.ValidatePolicyResponse.error_msg": x.ErrorMsg = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ValidatePolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ValidatePolicyResponse.valid": value := x.Valid return protoreflect.ValueOfBool(value) case "sourcenetwork.acp_core.ValidatePolicyResponse.error_msg": value := x.ErrorMsg return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyResponse.valid": x.Valid = value.Bool() case "sourcenetwork.acp_core.ValidatePolicyResponse.error_msg": x.ErrorMsg = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyResponse.valid": panic(fmt.Errorf("field valid of message sourcenetwork.acp_core.ValidatePolicyResponse is not mutable")) case "sourcenetwork.acp_core.ValidatePolicyResponse.error_msg": panic(fmt.Errorf("field error_msg of message sourcenetwork.acp_core.ValidatePolicyResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ValidatePolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ValidatePolicyResponse.valid": return protoreflect.ValueOfBool(false) case "sourcenetwork.acp_core.ValidatePolicyResponse.error_msg": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ValidatePolicyResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ValidatePolicyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ValidatePolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ValidatePolicyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ValidatePolicyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ValidatePolicyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ValidatePolicyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ValidatePolicyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ValidatePolicyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Valid { n += 2 } l = len(x.ErrorMsg) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ValidatePolicyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ErrorMsg) > 0 { i -= len(x.ErrorMsg) copy(dAtA[i:], x.ErrorMsg) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ErrorMsg))) i-- dAtA[i] = 0x12 } if x.Valid { i-- if x.Valid { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ValidatePolicyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatePolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatePolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Valid = bool(v != 0) case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ErrorMsg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SetParamsRequest protoreflect.MessageDescriptor fd_SetParamsRequest_params protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_SetParamsRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("SetParamsRequest") fd_SetParamsRequest_params = md_SetParamsRequest.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_SetParamsRequest)(nil) type fastReflection_SetParamsRequest SetParamsRequest func (x *SetParamsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_SetParamsRequest)(x) } func (x *SetParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SetParamsRequest_messageType fastReflection_SetParamsRequest_messageType var _ protoreflect.MessageType = fastReflection_SetParamsRequest_messageType{} type fastReflection_SetParamsRequest_messageType struct{} func (x fastReflection_SetParamsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_SetParamsRequest)(nil) } func (x fastReflection_SetParamsRequest_messageType) New() protoreflect.Message { return new(fastReflection_SetParamsRequest) } func (x fastReflection_SetParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SetParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SetParamsRequest) Descriptor() protoreflect.MessageDescriptor { return md_SetParamsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SetParamsRequest) Type() protoreflect.MessageType { return _fastReflection_SetParamsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SetParamsRequest) New() protoreflect.Message { return new(fastReflection_SetParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SetParamsRequest) Interface() protoreflect.ProtoMessage { return (*SetParamsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SetParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_SetParamsRequest_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SetParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.SetParamsRequest.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.SetParamsRequest.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SetParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.SetParamsRequest.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.SetParamsRequest.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SetParamsRequest.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SetParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SetParamsRequest.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SetParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.SetParamsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SetParamsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SetParamsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SetParamsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SetParamsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SetParamsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SetParamsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SetParamsResponse protoreflect.MessageDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_SetParamsResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("SetParamsResponse") } var _ protoreflect.Message = (*fastReflection_SetParamsResponse)(nil) type fastReflection_SetParamsResponse SetParamsResponse func (x *SetParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_SetParamsResponse)(x) } func (x *SetParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SetParamsResponse_messageType fastReflection_SetParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_SetParamsResponse_messageType{} type fastReflection_SetParamsResponse_messageType struct{} func (x fastReflection_SetParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_SetParamsResponse)(nil) } func (x fastReflection_SetParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_SetParamsResponse) } func (x fastReflection_SetParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SetParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SetParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_SetParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SetParamsResponse) Type() protoreflect.MessageType { return _fastReflection_SetParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SetParamsResponse) New() protoreflect.Message { return new(fastReflection_SetParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SetParamsResponse) Interface() protoreflect.ProtoMessage { return (*SetParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SetParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SetParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SetParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SetParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SetParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SetParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.SetParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SetParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SetParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SetParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SetParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SetParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SetParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SetParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GetParamsRequest protoreflect.MessageDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_GetParamsRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("GetParamsRequest") } var _ protoreflect.Message = (*fastReflection_GetParamsRequest)(nil) type fastReflection_GetParamsRequest GetParamsRequest func (x *GetParamsRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_GetParamsRequest)(x) } func (x *GetParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GetParamsRequest_messageType fastReflection_GetParamsRequest_messageType var _ protoreflect.MessageType = fastReflection_GetParamsRequest_messageType{} type fastReflection_GetParamsRequest_messageType struct{} func (x fastReflection_GetParamsRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_GetParamsRequest)(nil) } func (x fastReflection_GetParamsRequest_messageType) New() protoreflect.Message { return new(fastReflection_GetParamsRequest) } func (x fastReflection_GetParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GetParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GetParamsRequest) Descriptor() protoreflect.MessageDescriptor { return md_GetParamsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GetParamsRequest) Type() protoreflect.MessageType { return _fastReflection_GetParamsRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GetParamsRequest) New() protoreflect.Message { return new(fastReflection_GetParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GetParamsRequest) Interface() protoreflect.ProtoMessage { return (*GetParamsRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GetParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GetParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GetParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GetParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GetParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.GetParamsRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GetParamsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GetParamsRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GetParamsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GetParamsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GetParamsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GetParamsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_GetParamsResponse protoreflect.MessageDescriptor fd_GetParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_GetParamsResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("GetParamsResponse") fd_GetParamsResponse_params = md_GetParamsResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_GetParamsResponse)(nil) type fastReflection_GetParamsResponse GetParamsResponse func (x *GetParamsResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_GetParamsResponse)(x) } func (x *GetParamsResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_GetParamsResponse_messageType fastReflection_GetParamsResponse_messageType var _ protoreflect.MessageType = fastReflection_GetParamsResponse_messageType{} type fastReflection_GetParamsResponse_messageType struct{} func (x fastReflection_GetParamsResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_GetParamsResponse)(nil) } func (x fastReflection_GetParamsResponse_messageType) New() protoreflect.Message { return new(fastReflection_GetParamsResponse) } func (x fastReflection_GetParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_GetParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_GetParamsResponse) Descriptor() protoreflect.MessageDescriptor { return md_GetParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_GetParamsResponse) Type() protoreflect.MessageType { return _fastReflection_GetParamsResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_GetParamsResponse) New() protoreflect.Message { return new(fastReflection_GetParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_GetParamsResponse) Interface() protoreflect.ProtoMessage { return (*GetParamsResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GetParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_GetParamsResponse_params, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_GetParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.GetParamsResponse.params": return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.GetParamsResponse.params": x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GetParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.GetParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.GetParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetParamsResponse.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GetParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.GetParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.GetParamsResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.GetParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_GetParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.GetParamsResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_GetParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GetParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_GetParamsResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_GetParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*GetParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*GetParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*GetParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Params == nil { x.Params = &Params{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_VerifyAccessRequestRequest protoreflect.MessageDescriptor fd_VerifyAccessRequestRequest_policy_id protoreflect.FieldDescriptor fd_VerifyAccessRequestRequest_access_request protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_VerifyAccessRequestRequest = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("VerifyAccessRequestRequest") fd_VerifyAccessRequestRequest_policy_id = md_VerifyAccessRequestRequest.Fields().ByName("policy_id") fd_VerifyAccessRequestRequest_access_request = md_VerifyAccessRequestRequest.Fields().ByName("access_request") } var _ protoreflect.Message = (*fastReflection_VerifyAccessRequestRequest)(nil) type fastReflection_VerifyAccessRequestRequest VerifyAccessRequestRequest func (x *VerifyAccessRequestRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_VerifyAccessRequestRequest)(x) } func (x *VerifyAccessRequestRequest) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_VerifyAccessRequestRequest_messageType fastReflection_VerifyAccessRequestRequest_messageType var _ protoreflect.MessageType = fastReflection_VerifyAccessRequestRequest_messageType{} type fastReflection_VerifyAccessRequestRequest_messageType struct{} func (x fastReflection_VerifyAccessRequestRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_VerifyAccessRequestRequest)(nil) } func (x fastReflection_VerifyAccessRequestRequest_messageType) New() protoreflect.Message { return new(fastReflection_VerifyAccessRequestRequest) } func (x fastReflection_VerifyAccessRequestRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_VerifyAccessRequestRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_VerifyAccessRequestRequest) Descriptor() protoreflect.MessageDescriptor { return md_VerifyAccessRequestRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_VerifyAccessRequestRequest) Type() protoreflect.MessageType { return _fastReflection_VerifyAccessRequestRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_VerifyAccessRequestRequest) New() protoreflect.Message { return new(fastReflection_VerifyAccessRequestRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_VerifyAccessRequestRequest) Interface() protoreflect.ProtoMessage { return (*VerifyAccessRequestRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_VerifyAccessRequestRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_VerifyAccessRequestRequest_policy_id, value) { return } } if x.AccessRequest != nil { value := protoreflect.ValueOfMessage(x.AccessRequest.ProtoReflect()) if !f(fd_VerifyAccessRequestRequest_access_request, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_VerifyAccessRequestRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestRequest.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.VerifyAccessRequestRequest.access_request": return x.AccessRequest != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestRequest.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.VerifyAccessRequestRequest.access_request": x.AccessRequest = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_VerifyAccessRequestRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestRequest.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.VerifyAccessRequestRequest.access_request": value := x.AccessRequest return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestRequest.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.VerifyAccessRequestRequest.access_request": x.AccessRequest = value.Message().Interface().(*AccessRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestRequest.access_request": if x.AccessRequest == nil { x.AccessRequest = new(AccessRequest) } return protoreflect.ValueOfMessage(x.AccessRequest.ProtoReflect()) case "sourcenetwork.acp_core.VerifyAccessRequestRequest.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.VerifyAccessRequestRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_VerifyAccessRequestRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestRequest.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.VerifyAccessRequestRequest.access_request": m := new(AccessRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestRequest")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_VerifyAccessRequestRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.VerifyAccessRequestRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_VerifyAccessRequestRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_VerifyAccessRequestRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_VerifyAccessRequestRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*VerifyAccessRequestRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.AccessRequest != nil { l = options.Size(x.AccessRequest) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*VerifyAccessRequestRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.AccessRequest != nil { encoded, err := options.Marshal(x.AccessRequest) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*VerifyAccessRequestRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerifyAccessRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerifyAccessRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccessRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AccessRequest == nil { x.AccessRequest = &AccessRequest{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AccessRequest); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_VerifyAccessRequestResponse protoreflect.MessageDescriptor fd_VerifyAccessRequestResponse_valid protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_engine_proto_init() md_VerifyAccessRequestResponse = File_sourcenetwork_acp_core_engine_proto.Messages().ByName("VerifyAccessRequestResponse") fd_VerifyAccessRequestResponse_valid = md_VerifyAccessRequestResponse.Fields().ByName("valid") } var _ protoreflect.Message = (*fastReflection_VerifyAccessRequestResponse)(nil) type fastReflection_VerifyAccessRequestResponse VerifyAccessRequestResponse func (x *VerifyAccessRequestResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_VerifyAccessRequestResponse)(x) } func (x *VerifyAccessRequestResponse) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_VerifyAccessRequestResponse_messageType fastReflection_VerifyAccessRequestResponse_messageType var _ protoreflect.MessageType = fastReflection_VerifyAccessRequestResponse_messageType{} type fastReflection_VerifyAccessRequestResponse_messageType struct{} func (x fastReflection_VerifyAccessRequestResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_VerifyAccessRequestResponse)(nil) } func (x fastReflection_VerifyAccessRequestResponse_messageType) New() protoreflect.Message { return new(fastReflection_VerifyAccessRequestResponse) } func (x fastReflection_VerifyAccessRequestResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_VerifyAccessRequestResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_VerifyAccessRequestResponse) Descriptor() protoreflect.MessageDescriptor { return md_VerifyAccessRequestResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_VerifyAccessRequestResponse) Type() protoreflect.MessageType { return _fastReflection_VerifyAccessRequestResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_VerifyAccessRequestResponse) New() protoreflect.Message { return new(fastReflection_VerifyAccessRequestResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_VerifyAccessRequestResponse) Interface() protoreflect.ProtoMessage { return (*VerifyAccessRequestResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_VerifyAccessRequestResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Valid != false { value := protoreflect.ValueOfBool(x.Valid) if !f(fd_VerifyAccessRequestResponse_valid, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_VerifyAccessRequestResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestResponse.valid": return x.Valid != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestResponse.valid": x.Valid = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_VerifyAccessRequestResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestResponse.valid": value := x.Valid return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestResponse.valid": x.Valid = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestResponse.valid": panic(fmt.Errorf("field valid of message sourcenetwork.acp_core.VerifyAccessRequestResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_VerifyAccessRequestResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.VerifyAccessRequestResponse.valid": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.VerifyAccessRequestResponse")) } panic(fmt.Errorf("message sourcenetwork.acp_core.VerifyAccessRequestResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_VerifyAccessRequestResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.VerifyAccessRequestResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_VerifyAccessRequestResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerifyAccessRequestResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_VerifyAccessRequestResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_VerifyAccessRequestResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*VerifyAccessRequestResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Valid { n += 2 } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*VerifyAccessRequestResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Valid { i-- if x.Valid { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*VerifyAccessRequestResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerifyAccessRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerifyAccessRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Valid = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/engine.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type CreatePolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType PolicyMarshalingType `protobuf:"varint,2,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` CreationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // metadata is a map of attributes which can be used to store // caller supplied satellite data Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *CreatePolicyRequest) Reset() { *x = CreatePolicyRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreatePolicyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreatePolicyRequest) ProtoMessage() {} // Deprecated: Use CreatePolicyRequest.ProtoReflect.Descriptor instead. func (*CreatePolicyRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{0} } func (x *CreatePolicyRequest) GetPolicy() string { if x != nil { return x.Policy } return "" } func (x *CreatePolicyRequest) GetMarshalType() PolicyMarshalingType { if x != nil { return x.MarshalType } return PolicyMarshalingType_UNKNOWN } func (x *CreatePolicyRequest) GetCreationTime() *timestamppb.Timestamp { if x != nil { return x.CreationTime } return nil } func (x *CreatePolicyRequest) GetMetadata() map[string]string { if x != nil { return x.Metadata } return nil } type CreatePolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *CreatePolicyResponse) Reset() { *x = CreatePolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreatePolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreatePolicyResponse) ProtoMessage() {} // Deprecated: Use CreatePolicyResponse.ProtoReflect.Descriptor instead. func (*CreatePolicyResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{1} } func (x *CreatePolicyResponse) GetPolicy() *Policy { if x != nil { return x.Policy } return nil } func (x *CreatePolicyResponse) GetMetadata() map[string]string { if x != nil { return x.Metadata } return nil } type SetRelationshipRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` CreationTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` Relationship *Relationship `protobuf:"bytes,3,opt,name=relationship,proto3" json:"relationship,omitempty"` // metadata is a map of attributes which can be used to store // caller supplied satellite data Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *SetRelationshipRequest) Reset() { *x = SetRelationshipRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetRelationshipRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetRelationshipRequest) ProtoMessage() {} // Deprecated: Use SetRelationshipRequest.ProtoReflect.Descriptor instead. func (*SetRelationshipRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{2} } func (x *SetRelationshipRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *SetRelationshipRequest) GetCreationTime() *timestamppb.Timestamp { if x != nil { return x.CreationTime } return nil } func (x *SetRelationshipRequest) GetRelationship() *Relationship { if x != nil { return x.Relationship } return nil } func (x *SetRelationshipRequest) GetMetadata() map[string]string { if x != nil { return x.Metadata } return nil } type SetRelationshipResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Indicates whether the given Relationship previously existed, ie the Tx was a no op RecordExisted bool `protobuf:"varint,1,opt,name=record_existed,json=recordExisted,proto3" json:"record_existed,omitempty"` Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (x *SetRelationshipResponse) Reset() { *x = SetRelationshipResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetRelationshipResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetRelationshipResponse) ProtoMessage() {} // Deprecated: Use SetRelationshipResponse.ProtoReflect.Descriptor instead. func (*SetRelationshipResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{3} } func (x *SetRelationshipResponse) GetRecordExisted() bool { if x != nil { return x.RecordExisted } return false } func (x *SetRelationshipResponse) GetRecord() *RelationshipRecord { if x != nil { return x.Record } return nil } type DeleteRelationshipRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Relationship *Relationship `protobuf:"bytes,2,opt,name=relationship,proto3" json:"relationship,omitempty"` } func (x *DeleteRelationshipRequest) Reset() { *x = DeleteRelationshipRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteRelationshipRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteRelationshipRequest) ProtoMessage() {} // Deprecated: Use DeleteRelationshipRequest.ProtoReflect.Descriptor instead. func (*DeleteRelationshipRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{4} } func (x *DeleteRelationshipRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *DeleteRelationshipRequest) GetRelationship() *Relationship { if x != nil { return x.Relationship } return nil } type DeleteRelationshipResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RecordFound bool `protobuf:"varint,1,opt,name=record_found,json=recordFound,proto3" json:"record_found,omitempty"` } func (x *DeleteRelationshipResponse) Reset() { *x = DeleteRelationshipResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteRelationshipResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteRelationshipResponse) ProtoMessage() {} // Deprecated: Use DeleteRelationshipResponse.ProtoReflect.Descriptor instead. func (*DeleteRelationshipResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{5} } func (x *DeleteRelationshipResponse) GetRecordFound() bool { if x != nil { return x.RecordFound } return false } type RegisterObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Object *Object `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` CreationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // metadata is a map of attributes which can be used to store // caller supplied satellite data Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *RegisterObjectRequest) Reset() { *x = RegisterObjectRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegisterObjectRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegisterObjectRequest) ProtoMessage() {} // Deprecated: Use RegisterObjectRequest.ProtoReflect.Descriptor instead. func (*RegisterObjectRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{6} } func (x *RegisterObjectRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *RegisterObjectRequest) GetObject() *Object { if x != nil { return x.Object } return nil } func (x *RegisterObjectRequest) GetCreationTime() *timestamppb.Timestamp { if x != nil { return x.CreationTime } return nil } func (x *RegisterObjectRequest) GetMetadata() map[string]string { if x != nil { return x.Metadata } return nil } type RegisterObjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result RegistrationResult `protobuf:"varint,1,opt,name=result,proto3,enum=sourcenetwork.acp_core.RegistrationResult" json:"result,omitempty"` Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (x *RegisterObjectResponse) Reset() { *x = RegisterObjectResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegisterObjectResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegisterObjectResponse) ProtoMessage() {} // Deprecated: Use RegisterObjectResponse.ProtoReflect.Descriptor instead. func (*RegisterObjectResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{7} } func (x *RegisterObjectResponse) GetResult() RegistrationResult { if x != nil { return x.Result } return RegistrationResult_NoOp } func (x *RegisterObjectResponse) GetRecord() *RelationshipRecord { if x != nil { return x.Record } return nil } type UnregisterObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Object *Object `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` } func (x *UnregisterObjectRequest) Reset() { *x = UnregisterObjectRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnregisterObjectRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnregisterObjectRequest) ProtoMessage() {} // Deprecated: Use UnregisterObjectRequest.ProtoReflect.Descriptor instead. func (*UnregisterObjectRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{8} } func (x *UnregisterObjectRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *UnregisterObjectRequest) GetObject() *Object { if x != nil { return x.Object } return nil } type UnregisterObjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` RelationshipsRemoved uint64 `protobuf:"varint,2,opt,name=relationships_removed,json=relationshipsRemoved,proto3" json:"relationships_removed,omitempty"` } func (x *UnregisterObjectResponse) Reset() { *x = UnregisterObjectResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnregisterObjectResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnregisterObjectResponse) ProtoMessage() {} // Deprecated: Use UnregisterObjectResponse.ProtoReflect.Descriptor instead. func (*UnregisterObjectResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{9} } func (x *UnregisterObjectResponse) GetFound() bool { if x != nil { return x.Found } return false } func (x *UnregisterObjectResponse) GetRelationshipsRemoved() uint64 { if x != nil { return x.RelationshipsRemoved } return 0 } type GetObjectRegistrationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Object *Object `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` } func (x *GetObjectRegistrationRequest) Reset() { *x = GetObjectRegistrationRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetObjectRegistrationRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetObjectRegistrationRequest) ProtoMessage() {} // Deprecated: Use GetObjectRegistrationRequest.ProtoReflect.Descriptor instead. func (*GetObjectRegistrationRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{10} } func (x *GetObjectRegistrationRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *GetObjectRegistrationRequest) GetObject() *Object { if x != nil { return x.Object } return nil } type GetObjectRegistrationResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields IsRegistered bool `protobuf:"varint,1,opt,name=is_registered,json=isRegistered,proto3" json:"is_registered,omitempty"` OwnerId string `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` } func (x *GetObjectRegistrationResponse) Reset() { *x = GetObjectRegistrationResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetObjectRegistrationResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetObjectRegistrationResponse) ProtoMessage() {} // Deprecated: Use GetObjectRegistrationResponse.ProtoReflect.Descriptor instead. func (*GetObjectRegistrationResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{11} } func (x *GetObjectRegistrationResponse) GetIsRegistered() bool { if x != nil { return x.IsRegistered } return false } func (x *GetObjectRegistrationResponse) GetOwnerId() string { if x != nil { return x.OwnerId } return "" } type FilterRelationshipsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Selector *RelationshipSelector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` } func (x *FilterRelationshipsRequest) Reset() { *x = FilterRelationshipsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FilterRelationshipsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*FilterRelationshipsRequest) ProtoMessage() {} // Deprecated: Use FilterRelationshipsRequest.ProtoReflect.Descriptor instead. func (*FilterRelationshipsRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{12} } func (x *FilterRelationshipsRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *FilterRelationshipsRequest) GetSelector() *RelationshipSelector { if x != nil { return x.Selector } return nil } type FilterRelationshipsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Records []*RelationshipRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` } func (x *FilterRelationshipsResponse) Reset() { *x = FilterRelationshipsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FilterRelationshipsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*FilterRelationshipsResponse) ProtoMessage() {} // Deprecated: Use FilterRelationshipsResponse.ProtoReflect.Descriptor instead. func (*FilterRelationshipsResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{13} } func (x *FilterRelationshipsResponse) GetRecords() []*RelationshipRecord { if x != nil { return x.Records } return nil } type GetPolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // id of the Policy to be fetched Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *GetPolicyRequest) Reset() { *x = GetPolicyRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetPolicyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetPolicyRequest) ProtoMessage() {} // Deprecated: Use GetPolicyRequest.ProtoReflect.Descriptor instead. func (*GetPolicyRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{14} } func (x *GetPolicyRequest) GetId() string { if x != nil { return x.Id } return "" } type GetPolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` } func (x *GetPolicyResponse) Reset() { *x = GetPolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetPolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetPolicyResponse) ProtoMessage() {} // Deprecated: Use GetPolicyResponse.ProtoReflect.Descriptor instead. func (*GetPolicyResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{15} } func (x *GetPolicyResponse) GetPolicy() *Policy { if x != nil { return x.Policy } return nil } type ListPoliciesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *ListPoliciesRequest) Reset() { *x = ListPoliciesRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListPoliciesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListPoliciesRequest) ProtoMessage() {} // Deprecated: Use ListPoliciesRequest.ProtoReflect.Descriptor instead. func (*ListPoliciesRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{16} } type ListPoliciesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policies []*Policy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` } func (x *ListPoliciesResponse) Reset() { *x = ListPoliciesResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListPoliciesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListPoliciesResponse) ProtoMessage() {} // Deprecated: Use ListPoliciesResponse.ProtoReflect.Descriptor instead. func (*ListPoliciesResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{17} } func (x *ListPoliciesResponse) GetPolicies() []*Policy { if x != nil { return x.Policies } return nil } type DeletePolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *DeletePolicyRequest) Reset() { *x = DeletePolicyRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeletePolicyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeletePolicyRequest) ProtoMessage() {} // Deprecated: Use DeletePolicyRequest.ProtoReflect.Descriptor instead. func (*DeletePolicyRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{18} } func (x *DeletePolicyRequest) GetId() string { if x != nil { return x.Id } return "" } type DeletePolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` } func (x *DeletePolicyResponse) Reset() { *x = DeletePolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeletePolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeletePolicyResponse) ProtoMessage() {} // Deprecated: Use DeletePolicyResponse.ProtoReflect.Descriptor instead. func (*DeletePolicyResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{19} } func (x *DeletePolicyResponse) GetFound() bool { if x != nil { return x.Found } return false } type TransferObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Object *Object `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` NewOwner *Actor `protobuf:"bytes,3,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` } func (x *TransferObjectRequest) Reset() { *x = TransferObjectRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TransferObjectRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TransferObjectRequest) ProtoMessage() {} // Deprecated: Use TransferObjectRequest.ProtoReflect.Descriptor instead. func (*TransferObjectRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{20} } func (x *TransferObjectRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *TransferObjectRequest) GetObject() *Object { if x != nil { return x.Object } return nil } func (x *TransferObjectRequest) GetNewOwner() *Actor { if x != nil { return x.NewOwner } return nil } type TransferObjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TransferObjectResponse) Reset() { *x = TransferObjectResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TransferObjectResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TransferObjectResponse) ProtoMessage() {} // Deprecated: Use TransferObjectResponse.ProtoReflect.Descriptor instead. func (*TransferObjectResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{21} } type ValidatePolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType PolicyMarshalingType `protobuf:"varint,2,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (x *ValidatePolicyRequest) Reset() { *x = ValidatePolicyRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ValidatePolicyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ValidatePolicyRequest) ProtoMessage() {} // Deprecated: Use ValidatePolicyRequest.ProtoReflect.Descriptor instead. func (*ValidatePolicyRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{22} } func (x *ValidatePolicyRequest) GetPolicy() string { if x != nil { return x.Policy } return "" } func (x *ValidatePolicyRequest) GetMarshalType() PolicyMarshalingType { if x != nil { return x.MarshalType } return PolicyMarshalingType_UNKNOWN } type ValidatePolicyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` } func (x *ValidatePolicyResponse) Reset() { *x = ValidatePolicyResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ValidatePolicyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ValidatePolicyResponse) ProtoMessage() {} // Deprecated: Use ValidatePolicyResponse.ProtoReflect.Descriptor instead. func (*ValidatePolicyResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{23} } func (x *ValidatePolicyResponse) GetValid() bool { if x != nil { return x.Valid } return false } func (x *ValidatePolicyResponse) GetErrorMsg() string { if x != nil { return x.ErrorMsg } return "" } type SetParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *SetParamsRequest) Reset() { *x = SetParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetParamsRequest) ProtoMessage() {} // Deprecated: Use SetParamsRequest.ProtoReflect.Descriptor instead. func (*SetParamsRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{24} } func (x *SetParamsRequest) GetParams() *Params { if x != nil { return x.Params } return nil } type SetParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *SetParamsResponse) Reset() { *x = SetParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetParamsResponse) ProtoMessage() {} // Deprecated: Use SetParamsResponse.ProtoReflect.Descriptor instead. func (*SetParamsResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{25} } type GetParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *GetParamsRequest) Reset() { *x = GetParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetParamsRequest) ProtoMessage() {} // Deprecated: Use GetParamsRequest.ProtoReflect.Descriptor instead. func (*GetParamsRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{26} } type GetParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *GetParamsResponse) Reset() { *x = GetParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetParamsResponse) ProtoMessage() {} // Deprecated: Use GetParamsResponse.ProtoReflect.Descriptor instead. func (*GetParamsResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{27} } func (x *GetParamsResponse) GetParams() *Params { if x != nil { return x.Params } return nil } type VerifyAccessRequestRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` AccessRequest *AccessRequest `protobuf:"bytes,2,opt,name=access_request,json=accessRequest,proto3" json:"access_request,omitempty"` } func (x *VerifyAccessRequestRequest) Reset() { *x = VerifyAccessRequestRequest{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *VerifyAccessRequestRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*VerifyAccessRequestRequest) ProtoMessage() {} // Deprecated: Use VerifyAccessRequestRequest.ProtoReflect.Descriptor instead. func (*VerifyAccessRequestRequest) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{28} } func (x *VerifyAccessRequestRequest) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *VerifyAccessRequestRequest) GetAccessRequest() *AccessRequest { if x != nil { return x.AccessRequest } return nil } type VerifyAccessRequestResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` } func (x *VerifyAccessRequestResponse) Reset() { *x = VerifyAccessRequestResponse{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_engine_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *VerifyAccessRequestResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*VerifyAccessRequestResponse) ProtoMessage() {} // Deprecated: Use VerifyAccessRequestResponse.ProtoReflect.Descriptor instead. func (*VerifyAccessRequestResponse) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_engine_proto_rawDescGZIP(), []int{29} } func (x *VerifyAccessRequestResponse) GetValid() bool { if x != nil { return x.Valid } return false } var File_sourcenetwork_acp_core_engine_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_engine_proto_rawDesc = []byte{ 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe3, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x56, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd7, 0x02, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x58, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0x3f, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xc3, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa0, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x42, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x6e, 0x0a, 0x17, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x18, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x73, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x5f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x63, 0x0a, 0x1b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x22, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x25, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x4a, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x1a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x1b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x32, 0xb4, 0x0d, 0x0a, 0x09, 0x41, 0x43, 0x50, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x69, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x10, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7e, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7e, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xdd, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0b, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_engine_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_engine_proto_rawDescData = file_sourcenetwork_acp_core_engine_proto_rawDesc ) func file_sourcenetwork_acp_core_engine_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_engine_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_engine_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_engine_proto_rawDescData) }) return file_sourcenetwork_acp_core_engine_proto_rawDescData } var file_sourcenetwork_acp_core_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_sourcenetwork_acp_core_engine_proto_goTypes = []interface{}{ (*CreatePolicyRequest)(nil), // 0: sourcenetwork.acp_core.CreatePolicyRequest (*CreatePolicyResponse)(nil), // 1: sourcenetwork.acp_core.CreatePolicyResponse (*SetRelationshipRequest)(nil), // 2: sourcenetwork.acp_core.SetRelationshipRequest (*SetRelationshipResponse)(nil), // 3: sourcenetwork.acp_core.SetRelationshipResponse (*DeleteRelationshipRequest)(nil), // 4: sourcenetwork.acp_core.DeleteRelationshipRequest (*DeleteRelationshipResponse)(nil), // 5: sourcenetwork.acp_core.DeleteRelationshipResponse (*RegisterObjectRequest)(nil), // 6: sourcenetwork.acp_core.RegisterObjectRequest (*RegisterObjectResponse)(nil), // 7: sourcenetwork.acp_core.RegisterObjectResponse (*UnregisterObjectRequest)(nil), // 8: sourcenetwork.acp_core.UnregisterObjectRequest (*UnregisterObjectResponse)(nil), // 9: sourcenetwork.acp_core.UnregisterObjectResponse (*GetObjectRegistrationRequest)(nil), // 10: sourcenetwork.acp_core.GetObjectRegistrationRequest (*GetObjectRegistrationResponse)(nil), // 11: sourcenetwork.acp_core.GetObjectRegistrationResponse (*FilterRelationshipsRequest)(nil), // 12: sourcenetwork.acp_core.FilterRelationshipsRequest (*FilterRelationshipsResponse)(nil), // 13: sourcenetwork.acp_core.FilterRelationshipsResponse (*GetPolicyRequest)(nil), // 14: sourcenetwork.acp_core.GetPolicyRequest (*GetPolicyResponse)(nil), // 15: sourcenetwork.acp_core.GetPolicyResponse (*ListPoliciesRequest)(nil), // 16: sourcenetwork.acp_core.ListPoliciesRequest (*ListPoliciesResponse)(nil), // 17: sourcenetwork.acp_core.ListPoliciesResponse (*DeletePolicyRequest)(nil), // 18: sourcenetwork.acp_core.DeletePolicyRequest (*DeletePolicyResponse)(nil), // 19: sourcenetwork.acp_core.DeletePolicyResponse (*TransferObjectRequest)(nil), // 20: sourcenetwork.acp_core.TransferObjectRequest (*TransferObjectResponse)(nil), // 21: sourcenetwork.acp_core.TransferObjectResponse (*ValidatePolicyRequest)(nil), // 22: sourcenetwork.acp_core.ValidatePolicyRequest (*ValidatePolicyResponse)(nil), // 23: sourcenetwork.acp_core.ValidatePolicyResponse (*SetParamsRequest)(nil), // 24: sourcenetwork.acp_core.SetParamsRequest (*SetParamsResponse)(nil), // 25: sourcenetwork.acp_core.SetParamsResponse (*GetParamsRequest)(nil), // 26: sourcenetwork.acp_core.GetParamsRequest (*GetParamsResponse)(nil), // 27: sourcenetwork.acp_core.GetParamsResponse (*VerifyAccessRequestRequest)(nil), // 28: sourcenetwork.acp_core.VerifyAccessRequestRequest (*VerifyAccessRequestResponse)(nil), // 29: sourcenetwork.acp_core.VerifyAccessRequestResponse nil, // 30: sourcenetwork.acp_core.CreatePolicyRequest.MetadataEntry nil, // 31: sourcenetwork.acp_core.CreatePolicyResponse.MetadataEntry nil, // 32: sourcenetwork.acp_core.SetRelationshipRequest.MetadataEntry nil, // 33: sourcenetwork.acp_core.RegisterObjectRequest.MetadataEntry (PolicyMarshalingType)(0), // 34: sourcenetwork.acp_core.PolicyMarshalingType (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp (*Policy)(nil), // 36: sourcenetwork.acp_core.Policy (*Relationship)(nil), // 37: sourcenetwork.acp_core.Relationship (*RelationshipRecord)(nil), // 38: sourcenetwork.acp_core.RelationshipRecord (*Object)(nil), // 39: sourcenetwork.acp_core.Object (RegistrationResult)(0), // 40: sourcenetwork.acp_core.RegistrationResult (*RelationshipSelector)(nil), // 41: sourcenetwork.acp_core.RelationshipSelector (*Actor)(nil), // 42: sourcenetwork.acp_core.Actor (*Params)(nil), // 43: sourcenetwork.acp_core.Params (*AccessRequest)(nil), // 44: sourcenetwork.acp_core.AccessRequest } var file_sourcenetwork_acp_core_engine_proto_depIdxs = []int32{ 34, // 0: sourcenetwork.acp_core.CreatePolicyRequest.marshal_type:type_name -> sourcenetwork.acp_core.PolicyMarshalingType 35, // 1: sourcenetwork.acp_core.CreatePolicyRequest.creation_time:type_name -> google.protobuf.Timestamp 30, // 2: sourcenetwork.acp_core.CreatePolicyRequest.metadata:type_name -> sourcenetwork.acp_core.CreatePolicyRequest.MetadataEntry 36, // 3: sourcenetwork.acp_core.CreatePolicyResponse.policy:type_name -> sourcenetwork.acp_core.Policy 31, // 4: sourcenetwork.acp_core.CreatePolicyResponse.metadata:type_name -> sourcenetwork.acp_core.CreatePolicyResponse.MetadataEntry 35, // 5: sourcenetwork.acp_core.SetRelationshipRequest.creation_time:type_name -> google.protobuf.Timestamp 37, // 6: sourcenetwork.acp_core.SetRelationshipRequest.relationship:type_name -> sourcenetwork.acp_core.Relationship 32, // 7: sourcenetwork.acp_core.SetRelationshipRequest.metadata:type_name -> sourcenetwork.acp_core.SetRelationshipRequest.MetadataEntry 38, // 8: sourcenetwork.acp_core.SetRelationshipResponse.record:type_name -> sourcenetwork.acp_core.RelationshipRecord 37, // 9: sourcenetwork.acp_core.DeleteRelationshipRequest.relationship:type_name -> sourcenetwork.acp_core.Relationship 39, // 10: sourcenetwork.acp_core.RegisterObjectRequest.object:type_name -> sourcenetwork.acp_core.Object 35, // 11: sourcenetwork.acp_core.RegisterObjectRequest.creation_time:type_name -> google.protobuf.Timestamp 33, // 12: sourcenetwork.acp_core.RegisterObjectRequest.metadata:type_name -> sourcenetwork.acp_core.RegisterObjectRequest.MetadataEntry 40, // 13: sourcenetwork.acp_core.RegisterObjectResponse.result:type_name -> sourcenetwork.acp_core.RegistrationResult 38, // 14: sourcenetwork.acp_core.RegisterObjectResponse.record:type_name -> sourcenetwork.acp_core.RelationshipRecord 39, // 15: sourcenetwork.acp_core.UnregisterObjectRequest.object:type_name -> sourcenetwork.acp_core.Object 39, // 16: sourcenetwork.acp_core.GetObjectRegistrationRequest.object:type_name -> sourcenetwork.acp_core.Object 41, // 17: sourcenetwork.acp_core.FilterRelationshipsRequest.selector:type_name -> sourcenetwork.acp_core.RelationshipSelector 38, // 18: sourcenetwork.acp_core.FilterRelationshipsResponse.records:type_name -> sourcenetwork.acp_core.RelationshipRecord 36, // 19: sourcenetwork.acp_core.GetPolicyResponse.policy:type_name -> sourcenetwork.acp_core.Policy 36, // 20: sourcenetwork.acp_core.ListPoliciesResponse.policies:type_name -> sourcenetwork.acp_core.Policy 39, // 21: sourcenetwork.acp_core.TransferObjectRequest.object:type_name -> sourcenetwork.acp_core.Object 42, // 22: sourcenetwork.acp_core.TransferObjectRequest.new_owner:type_name -> sourcenetwork.acp_core.Actor 34, // 23: sourcenetwork.acp_core.ValidatePolicyRequest.marshal_type:type_name -> sourcenetwork.acp_core.PolicyMarshalingType 43, // 24: sourcenetwork.acp_core.SetParamsRequest.params:type_name -> sourcenetwork.acp_core.Params 43, // 25: sourcenetwork.acp_core.GetParamsResponse.params:type_name -> sourcenetwork.acp_core.Params 44, // 26: sourcenetwork.acp_core.VerifyAccessRequestRequest.access_request:type_name -> sourcenetwork.acp_core.AccessRequest 0, // 27: sourcenetwork.acp_core.ACPEngine.CreatePolicy:input_type -> sourcenetwork.acp_core.CreatePolicyRequest 14, // 28: sourcenetwork.acp_core.ACPEngine.GetPolicy:input_type -> sourcenetwork.acp_core.GetPolicyRequest 16, // 29: sourcenetwork.acp_core.ACPEngine.ListPolicies:input_type -> sourcenetwork.acp_core.ListPoliciesRequest 18, // 30: sourcenetwork.acp_core.ACPEngine.DeletePolicy:input_type -> sourcenetwork.acp_core.DeletePolicyRequest 2, // 31: sourcenetwork.acp_core.ACPEngine.SetRelationship:input_type -> sourcenetwork.acp_core.SetRelationshipRequest 4, // 32: sourcenetwork.acp_core.ACPEngine.DeleteRelationship:input_type -> sourcenetwork.acp_core.DeleteRelationshipRequest 6, // 33: sourcenetwork.acp_core.ACPEngine.RegisterObject:input_type -> sourcenetwork.acp_core.RegisterObjectRequest 8, // 34: sourcenetwork.acp_core.ACPEngine.UnregisterObject:input_type -> sourcenetwork.acp_core.UnregisterObjectRequest 20, // 35: sourcenetwork.acp_core.ACPEngine.TransferObject:input_type -> sourcenetwork.acp_core.TransferObjectRequest 10, // 36: sourcenetwork.acp_core.ACPEngine.GetObjectRegistration:input_type -> sourcenetwork.acp_core.GetObjectRegistrationRequest 12, // 37: sourcenetwork.acp_core.ACPEngine.FilterRelationships:input_type -> sourcenetwork.acp_core.FilterRelationshipsRequest 22, // 38: sourcenetwork.acp_core.ACPEngine.ValidatePolicy:input_type -> sourcenetwork.acp_core.ValidatePolicyRequest 24, // 39: sourcenetwork.acp_core.ACPEngine.SetParams:input_type -> sourcenetwork.acp_core.SetParamsRequest 26, // 40: sourcenetwork.acp_core.ACPEngine.GetParams:input_type -> sourcenetwork.acp_core.GetParamsRequest 28, // 41: sourcenetwork.acp_core.ACPEngine.VerifyAccessRequest:input_type -> sourcenetwork.acp_core.VerifyAccessRequestRequest 1, // 42: sourcenetwork.acp_core.ACPEngine.CreatePolicy:output_type -> sourcenetwork.acp_core.CreatePolicyResponse 15, // 43: sourcenetwork.acp_core.ACPEngine.GetPolicy:output_type -> sourcenetwork.acp_core.GetPolicyResponse 17, // 44: sourcenetwork.acp_core.ACPEngine.ListPolicies:output_type -> sourcenetwork.acp_core.ListPoliciesResponse 19, // 45: sourcenetwork.acp_core.ACPEngine.DeletePolicy:output_type -> sourcenetwork.acp_core.DeletePolicyResponse 3, // 46: sourcenetwork.acp_core.ACPEngine.SetRelationship:output_type -> sourcenetwork.acp_core.SetRelationshipResponse 5, // 47: sourcenetwork.acp_core.ACPEngine.DeleteRelationship:output_type -> sourcenetwork.acp_core.DeleteRelationshipResponse 7, // 48: sourcenetwork.acp_core.ACPEngine.RegisterObject:output_type -> sourcenetwork.acp_core.RegisterObjectResponse 9, // 49: sourcenetwork.acp_core.ACPEngine.UnregisterObject:output_type -> sourcenetwork.acp_core.UnregisterObjectResponse 21, // 50: sourcenetwork.acp_core.ACPEngine.TransferObject:output_type -> sourcenetwork.acp_core.TransferObjectResponse 11, // 51: sourcenetwork.acp_core.ACPEngine.GetObjectRegistration:output_type -> sourcenetwork.acp_core.GetObjectRegistrationResponse 13, // 52: sourcenetwork.acp_core.ACPEngine.FilterRelationships:output_type -> sourcenetwork.acp_core.FilterRelationshipsResponse 23, // 53: sourcenetwork.acp_core.ACPEngine.ValidatePolicy:output_type -> sourcenetwork.acp_core.ValidatePolicyResponse 25, // 54: sourcenetwork.acp_core.ACPEngine.SetParams:output_type -> sourcenetwork.acp_core.SetParamsResponse 27, // 55: sourcenetwork.acp_core.ACPEngine.GetParams:output_type -> sourcenetwork.acp_core.GetParamsResponse 29, // 56: sourcenetwork.acp_core.ACPEngine.VerifyAccessRequest:output_type -> sourcenetwork.acp_core.VerifyAccessRequestResponse 42, // [42:57] is the sub-list for method output_type 27, // [27:42] is the sub-list for method input_type 27, // [27:27] is the sub-list for extension type_name 27, // [27:27] is the sub-list for extension extendee 0, // [0:27] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_engine_proto_init() } func file_sourcenetwork_acp_core_engine_proto_init() { if File_sourcenetwork_acp_core_engine_proto != nil { return } file_sourcenetwork_acp_core_access_decision_proto_init() file_sourcenetwork_acp_core_policy_proto_init() file_sourcenetwork_acp_core_policy_short_proto_init() file_sourcenetwork_acp_core_relationship_proto_init() file_sourcenetwork_acp_core_relationship_selector_proto_init() file_sourcenetwork_acp_core_system_proto_init() if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_engine_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreatePolicyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreatePolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetRelationshipRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetRelationshipResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRelationshipRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRelationshipResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterObjectRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterObjectResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnregisterObjectRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnregisterObjectResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetObjectRegistrationRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetObjectRegistrationResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FilterRelationshipsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FilterRelationshipsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPolicyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPoliciesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPoliciesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeletePolicyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeletePolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TransferObjectRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TransferObjectResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatePolicyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatePolicyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetParamsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetParamsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetParamsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VerifyAccessRequestRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_engine_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VerifyAccessRequestResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_engine_proto_rawDesc, NumEnums: 0, NumMessages: 34, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sourcenetwork_acp_core_engine_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_engine_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_engine_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_engine_proto = out.File file_sourcenetwork_acp_core_engine_proto_rawDesc = nil file_sourcenetwork_acp_core_engine_proto_goTypes = nil file_sourcenetwork_acp_core_engine_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/engine_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: sourcenetwork/acp_core/engine.proto package acp_core import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( ACPEngine_CreatePolicy_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/CreatePolicy" ACPEngine_GetPolicy_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/GetPolicy" ACPEngine_ListPolicies_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/ListPolicies" ACPEngine_DeletePolicy_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/DeletePolicy" ACPEngine_SetRelationship_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/SetRelationship" ACPEngine_DeleteRelationship_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/DeleteRelationship" ACPEngine_RegisterObject_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/RegisterObject" ACPEngine_UnregisterObject_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/UnregisterObject" ACPEngine_TransferObject_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/TransferObject" ACPEngine_GetObjectRegistration_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/GetObjectRegistration" ACPEngine_FilterRelationships_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/FilterRelationships" ACPEngine_ValidatePolicy_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/ValidatePolicy" ACPEngine_SetParams_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/SetParams" ACPEngine_GetParams_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/GetParams" ACPEngine_VerifyAccessRequest_FullMethodName = "/sourcenetwork.acp_core.ACPEngine/VerifyAccessRequest" ) // ACPEngineClient is the client API for ACPEngine service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ACPEngineClient interface { // CreatePolicy adds a new Policy to SourceHub. // The Policy models an aplication's high level access control rules. CreatePolicy(ctx context.Context, in *CreatePolicyRequest, opts ...grpc.CallOption) (*CreatePolicyResponse, error) // GetPolicy returns a Policy with the given ID GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) // ListPolicies returns a set of Policies registered in the system ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) // DeletePolicy removes a Policy and all relationships and objects registered within it. DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) // SetRelationship creates or updates a Relationship within a Policy // A Relationship is a statement which ties together an object and a subject with a "relation", // which means the set of high level rules defined in the Policy will apply to these entities. SetRelationship(ctx context.Context, in *SetRelationshipRequest, opts ...grpc.CallOption) (*SetRelationshipResponse, error) // DelereRelationship removes a Relationship from a Policy. // If the Relationship was not found in a Policy, this Cmd is a no-op. DeleteRelationship(ctx context.Context, in *DeleteRelationshipRequest, opts ...grpc.CallOption) (*DeleteRelationshipResponse, error) // RegisterObject creates a special kind of Relationship within a Policy which ties // the msg's Actor as the owner of the msg's Object. // The Owner has complete control over the set of subjects that are related to their Object, // giving them autonomy to share the object and revoke acces to the object, // much like owners in a Discretionary Access Control model. // // Attempting to register a previously registered Object is an error, // Object IDs are therefore assumed to be unique within a Policy. RegisterObject(ctx context.Context, in *RegisterObjectRequest, opts ...grpc.CallOption) (*RegisterObjectResponse, error) // UnregisterObject let's an Object's Owner effectively "unshare" their Object. // This method wipes all Relationships referencing the given Object. // // A caveat is that after removing the Relationships, a record of the original Object owner // is maintained to prevent an "ownership hijack" attack. // // Suppose Bob owns object Foo, which is shared with Bob but not Eve. // Eve wants to access Foo but was not given permission to, they could "hijack" Bob's object by waiting for Bob to Unregister Foo, // then submitting a RegisterObject Cmd, effectively becoming Foo's new owner. // If Charlie has a copy of the object, Eve could convince Charlie to share his copy, granting Eve access to Foo. // The previous scenario where an unauthorized user is able to claim ownership to data previously unaccessible to them // is an "ownership hijack". UnregisterObject(ctx context.Context, in *UnregisterObjectRequest, opts ...grpc.CallOption) (*UnregisterObjectResponse, error) // TransferObject updates an Object's Owner to some other actor in the system, after which the original owner // loses autonomy over the object and cannot create or modify relationships. TransferObject(ctx context.Context, in *TransferObjectRequest, opts ...grpc.CallOption) (*TransferObjectResponse, error) // GetObjectRegistration returns the registration status of an Object GetObjectRegistration(ctx context.Context, in *GetObjectRegistrationRequest, opts ...grpc.CallOption) (*GetObjectRegistrationResponse, error) // FilterRelationships returns filtered set of Relationships in a Policy. FilterRelationships(ctx context.Context, in *FilterRelationshipsRequest, opts ...grpc.CallOption) (*FilterRelationshipsResponse, error) ValidatePolicy(ctx context.Context, in *ValidatePolicyRequest, opts ...grpc.CallOption) (*ValidatePolicyResponse, error) SetParams(ctx context.Context, in *SetParamsRequest, opts ...grpc.CallOption) (*SetParamsResponse, error) GetParams(ctx context.Context, in *GetParamsRequest, opts ...grpc.CallOption) (*GetParamsResponse, error) VerifyAccessRequest(ctx context.Context, in *VerifyAccessRequestRequest, opts ...grpc.CallOption) (*VerifyAccessRequestResponse, error) } type aCPEngineClient struct { cc grpc.ClientConnInterface } func NewACPEngineClient(cc grpc.ClientConnInterface) ACPEngineClient { return &aCPEngineClient{cc} } func (c *aCPEngineClient) CreatePolicy(ctx context.Context, in *CreatePolicyRequest, opts ...grpc.CallOption) (*CreatePolicyResponse, error) { out := new(CreatePolicyResponse) err := c.cc.Invoke(ctx, ACPEngine_CreatePolicy_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) { out := new(GetPolicyResponse) err := c.cc.Invoke(ctx, ACPEngine_GetPolicy_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) { out := new(ListPoliciesResponse) err := c.cc.Invoke(ctx, ACPEngine_ListPolicies_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) { out := new(DeletePolicyResponse) err := c.cc.Invoke(ctx, ACPEngine_DeletePolicy_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) SetRelationship(ctx context.Context, in *SetRelationshipRequest, opts ...grpc.CallOption) (*SetRelationshipResponse, error) { out := new(SetRelationshipResponse) err := c.cc.Invoke(ctx, ACPEngine_SetRelationship_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) DeleteRelationship(ctx context.Context, in *DeleteRelationshipRequest, opts ...grpc.CallOption) (*DeleteRelationshipResponse, error) { out := new(DeleteRelationshipResponse) err := c.cc.Invoke(ctx, ACPEngine_DeleteRelationship_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) RegisterObject(ctx context.Context, in *RegisterObjectRequest, opts ...grpc.CallOption) (*RegisterObjectResponse, error) { out := new(RegisterObjectResponse) err := c.cc.Invoke(ctx, ACPEngine_RegisterObject_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) UnregisterObject(ctx context.Context, in *UnregisterObjectRequest, opts ...grpc.CallOption) (*UnregisterObjectResponse, error) { out := new(UnregisterObjectResponse) err := c.cc.Invoke(ctx, ACPEngine_UnregisterObject_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) TransferObject(ctx context.Context, in *TransferObjectRequest, opts ...grpc.CallOption) (*TransferObjectResponse, error) { out := new(TransferObjectResponse) err := c.cc.Invoke(ctx, ACPEngine_TransferObject_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) GetObjectRegistration(ctx context.Context, in *GetObjectRegistrationRequest, opts ...grpc.CallOption) (*GetObjectRegistrationResponse, error) { out := new(GetObjectRegistrationResponse) err := c.cc.Invoke(ctx, ACPEngine_GetObjectRegistration_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) FilterRelationships(ctx context.Context, in *FilterRelationshipsRequest, opts ...grpc.CallOption) (*FilterRelationshipsResponse, error) { out := new(FilterRelationshipsResponse) err := c.cc.Invoke(ctx, ACPEngine_FilterRelationships_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) ValidatePolicy(ctx context.Context, in *ValidatePolicyRequest, opts ...grpc.CallOption) (*ValidatePolicyResponse, error) { out := new(ValidatePolicyResponse) err := c.cc.Invoke(ctx, ACPEngine_ValidatePolicy_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) SetParams(ctx context.Context, in *SetParamsRequest, opts ...grpc.CallOption) (*SetParamsResponse, error) { out := new(SetParamsResponse) err := c.cc.Invoke(ctx, ACPEngine_SetParams_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) GetParams(ctx context.Context, in *GetParamsRequest, opts ...grpc.CallOption) (*GetParamsResponse, error) { out := new(GetParamsResponse) err := c.cc.Invoke(ctx, ACPEngine_GetParams_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aCPEngineClient) VerifyAccessRequest(ctx context.Context, in *VerifyAccessRequestRequest, opts ...grpc.CallOption) (*VerifyAccessRequestResponse, error) { out := new(VerifyAccessRequestResponse) err := c.cc.Invoke(ctx, ACPEngine_VerifyAccessRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ACPEngineServer is the server API for ACPEngine service. // All implementations must embed UnimplementedACPEngineServer // for forward compatibility type ACPEngineServer interface { // CreatePolicy adds a new Policy to SourceHub. // The Policy models an aplication's high level access control rules. CreatePolicy(context.Context, *CreatePolicyRequest) (*CreatePolicyResponse, error) // GetPolicy returns a Policy with the given ID GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) // ListPolicies returns a set of Policies registered in the system ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) // DeletePolicy removes a Policy and all relationships and objects registered within it. DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) // SetRelationship creates or updates a Relationship within a Policy // A Relationship is a statement which ties together an object and a subject with a "relation", // which means the set of high level rules defined in the Policy will apply to these entities. SetRelationship(context.Context, *SetRelationshipRequest) (*SetRelationshipResponse, error) // DelereRelationship removes a Relationship from a Policy. // If the Relationship was not found in a Policy, this Cmd is a no-op. DeleteRelationship(context.Context, *DeleteRelationshipRequest) (*DeleteRelationshipResponse, error) // RegisterObject creates a special kind of Relationship within a Policy which ties // the msg's Actor as the owner of the msg's Object. // The Owner has complete control over the set of subjects that are related to their Object, // giving them autonomy to share the object and revoke acces to the object, // much like owners in a Discretionary Access Control model. // // Attempting to register a previously registered Object is an error, // Object IDs are therefore assumed to be unique within a Policy. RegisterObject(context.Context, *RegisterObjectRequest) (*RegisterObjectResponse, error) // UnregisterObject let's an Object's Owner effectively "unshare" their Object. // This method wipes all Relationships referencing the given Object. // // A caveat is that after removing the Relationships, a record of the original Object owner // is maintained to prevent an "ownership hijack" attack. // // Suppose Bob owns object Foo, which is shared with Bob but not Eve. // Eve wants to access Foo but was not given permission to, they could "hijack" Bob's object by waiting for Bob to Unregister Foo, // then submitting a RegisterObject Cmd, effectively becoming Foo's new owner. // If Charlie has a copy of the object, Eve could convince Charlie to share his copy, granting Eve access to Foo. // The previous scenario where an unauthorized user is able to claim ownership to data previously unaccessible to them // is an "ownership hijack". UnregisterObject(context.Context, *UnregisterObjectRequest) (*UnregisterObjectResponse, error) // TransferObject updates an Object's Owner to some other actor in the system, after which the original owner // loses autonomy over the object and cannot create or modify relationships. TransferObject(context.Context, *TransferObjectRequest) (*TransferObjectResponse, error) // GetObjectRegistration returns the registration status of an Object GetObjectRegistration(context.Context, *GetObjectRegistrationRequest) (*GetObjectRegistrationResponse, error) // FilterRelationships returns filtered set of Relationships in a Policy. FilterRelationships(context.Context, *FilterRelationshipsRequest) (*FilterRelationshipsResponse, error) ValidatePolicy(context.Context, *ValidatePolicyRequest) (*ValidatePolicyResponse, error) SetParams(context.Context, *SetParamsRequest) (*SetParamsResponse, error) GetParams(context.Context, *GetParamsRequest) (*GetParamsResponse, error) VerifyAccessRequest(context.Context, *VerifyAccessRequestRequest) (*VerifyAccessRequestResponse, error) mustEmbedUnimplementedACPEngineServer() } // UnimplementedACPEngineServer must be embedded to have forward compatible implementations. type UnimplementedACPEngineServer struct { } func (UnimplementedACPEngineServer) CreatePolicy(context.Context, *CreatePolicyRequest) (*CreatePolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePolicy not implemented") } func (UnimplementedACPEngineServer) GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPolicy not implemented") } func (UnimplementedACPEngineServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPolicies not implemented") } func (UnimplementedACPEngineServer) DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeletePolicy not implemented") } func (UnimplementedACPEngineServer) SetRelationship(context.Context, *SetRelationshipRequest) (*SetRelationshipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetRelationship not implemented") } func (UnimplementedACPEngineServer) DeleteRelationship(context.Context, *DeleteRelationshipRequest) (*DeleteRelationshipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRelationship not implemented") } func (UnimplementedACPEngineServer) RegisterObject(context.Context, *RegisterObjectRequest) (*RegisterObjectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterObject not implemented") } func (UnimplementedACPEngineServer) UnregisterObject(context.Context, *UnregisterObjectRequest) (*UnregisterObjectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnregisterObject not implemented") } func (UnimplementedACPEngineServer) TransferObject(context.Context, *TransferObjectRequest) (*TransferObjectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TransferObject not implemented") } func (UnimplementedACPEngineServer) GetObjectRegistration(context.Context, *GetObjectRegistrationRequest) (*GetObjectRegistrationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetObjectRegistration not implemented") } func (UnimplementedACPEngineServer) FilterRelationships(context.Context, *FilterRelationshipsRequest) (*FilterRelationshipsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FilterRelationships not implemented") } func (UnimplementedACPEngineServer) ValidatePolicy(context.Context, *ValidatePolicyRequest) (*ValidatePolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidatePolicy not implemented") } func (UnimplementedACPEngineServer) SetParams(context.Context, *SetParamsRequest) (*SetParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetParams not implemented") } func (UnimplementedACPEngineServer) GetParams(context.Context, *GetParamsRequest) (*GetParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetParams not implemented") } func (UnimplementedACPEngineServer) VerifyAccessRequest(context.Context, *VerifyAccessRequestRequest) (*VerifyAccessRequestResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VerifyAccessRequest not implemented") } func (UnimplementedACPEngineServer) mustEmbedUnimplementedACPEngineServer() {} // UnsafeACPEngineServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ACPEngineServer will // result in compilation errors. type UnsafeACPEngineServer interface { mustEmbedUnimplementedACPEngineServer() } func RegisterACPEngineServer(s grpc.ServiceRegistrar, srv ACPEngineServer) { s.RegisterService(&ACPEngine_ServiceDesc, srv) } func _ACPEngine_CreatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreatePolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).CreatePolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_CreatePolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).CreatePolicy(ctx, req.(*CreatePolicyRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_GetPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).GetPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_GetPolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).GetPolicy(ctx, req.(*GetPolicyRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_ListPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListPoliciesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).ListPolicies(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_ListPolicies_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).ListPolicies(ctx, req.(*ListPoliciesRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_DeletePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeletePolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).DeletePolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_DeletePolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).DeletePolicy(ctx, req.(*DeletePolicyRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_SetRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetRelationshipRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).SetRelationship(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_SetRelationship_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).SetRelationship(ctx, req.(*SetRelationshipRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_DeleteRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteRelationshipRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).DeleteRelationship(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_DeleteRelationship_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).DeleteRelationship(ctx, req.(*DeleteRelationshipRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_RegisterObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RegisterObjectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).RegisterObject(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_RegisterObject_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).RegisterObject(ctx, req.(*RegisterObjectRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_UnregisterObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnregisterObjectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).UnregisterObject(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_UnregisterObject_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).UnregisterObject(ctx, req.(*UnregisterObjectRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_TransferObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TransferObjectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).TransferObject(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_TransferObject_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).TransferObject(ctx, req.(*TransferObjectRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_GetObjectRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetObjectRegistrationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).GetObjectRegistration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_GetObjectRegistration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).GetObjectRegistration(ctx, req.(*GetObjectRegistrationRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_FilterRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FilterRelationshipsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).FilterRelationships(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_FilterRelationships_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).FilterRelationships(ctx, req.(*FilterRelationshipsRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_ValidatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidatePolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).ValidatePolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_ValidatePolicy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).ValidatePolicy(ctx, req.(*ValidatePolicyRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_SetParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetParamsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).SetParams(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_SetParams_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).SetParams(ctx, req.(*SetParamsRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_GetParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetParamsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).GetParams(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_GetParams_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).GetParams(ctx, req.(*GetParamsRequest)) } return interceptor(ctx, in, info, handler) } func _ACPEngine_VerifyAccessRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(VerifyAccessRequestRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ACPEngineServer).VerifyAccessRequest(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ACPEngine_VerifyAccessRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ACPEngineServer).VerifyAccessRequest(ctx, req.(*VerifyAccessRequestRequest)) } return interceptor(ctx, in, info, handler) } // ACPEngine_ServiceDesc is the grpc.ServiceDesc for ACPEngine service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ACPEngine_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sourcenetwork.acp_core.ACPEngine", HandlerType: (*ACPEngineServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreatePolicy", Handler: _ACPEngine_CreatePolicy_Handler, }, { MethodName: "GetPolicy", Handler: _ACPEngine_GetPolicy_Handler, }, { MethodName: "ListPolicies", Handler: _ACPEngine_ListPolicies_Handler, }, { MethodName: "DeletePolicy", Handler: _ACPEngine_DeletePolicy_Handler, }, { MethodName: "SetRelationship", Handler: _ACPEngine_SetRelationship_Handler, }, { MethodName: "DeleteRelationship", Handler: _ACPEngine_DeleteRelationship_Handler, }, { MethodName: "RegisterObject", Handler: _ACPEngine_RegisterObject_Handler, }, { MethodName: "UnregisterObject", Handler: _ACPEngine_UnregisterObject_Handler, }, { MethodName: "TransferObject", Handler: _ACPEngine_TransferObject_Handler, }, { MethodName: "GetObjectRegistration", Handler: _ACPEngine_GetObjectRegistration_Handler, }, { MethodName: "FilterRelationships", Handler: _ACPEngine_FilterRelationships_Handler, }, { MethodName: "ValidatePolicy", Handler: _ACPEngine_ValidatePolicy_Handler, }, { MethodName: "SetParams", Handler: _ACPEngine_SetParams_Handler, }, { MethodName: "GetParams", Handler: _ACPEngine_GetParams_Handler, }, { MethodName: "VerifyAccessRequest", Handler: _ACPEngine_VerifyAccessRequest_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcenetwork/acp_core/engine.proto", } ================================================ FILE: api/sourcenetwork/acp_core/errors/error_type.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package errors import ( reflect "reflect" sync "sync" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/errors/error_type.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // ErrorType represent families of errors which acp_core can throw. // Concrete errors are refined with additional context data and explanatory messages type ErrorType int32 const ( // UNKNOWN is a catch all bucket for unspecified errors (represents an internal error) ErrorType_UNKNOWN ErrorType = 0 // INTERNAL is a general base error for IO or unexpected system errors ErrorType_INTERNAL ErrorType = 1 // UNAUTHENTICATED signals caller was not authenticated while it was required ErrorType_UNAUTHENTICATED ErrorType = 2 // UNAUTHORIZED is a general error for operations that were // rejected due to insufficient permission unauthorized ErrorType_UNAUTHORIZED ErrorType = 3 // BAD_INPUT is a general base error for input errors ErrorType_BAD_INPUT ErrorType = 4 // OPERATION_FORBIDDEN signals that the operation was not executed // as that would violate part of the Access Control system ErrorType_OPERATION_FORBIDDEN ErrorType = 5 // NOT_FOUND signals that the requested entity was not found in the system ErrorType_NOT_FOUND ErrorType = 6 ) // Enum value maps for ErrorType. var ( ErrorType_name = map[int32]string{ 0: "UNKNOWN", 1: "INTERNAL", 2: "UNAUTHENTICATED", 3: "UNAUTHORIZED", 4: "BAD_INPUT", 5: "OPERATION_FORBIDDEN", 6: "NOT_FOUND", } ErrorType_value = map[string]int32{ "UNKNOWN": 0, "INTERNAL": 1, "UNAUTHENTICATED": 2, "UNAUTHORIZED": 3, "BAD_INPUT": 4, "OPERATION_FORBIDDEN": 5, "NOT_FOUND": 6, } ) func (x ErrorType) Enum() *ErrorType { p := new(ErrorType) *p = x return p } func (x ErrorType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ErrorType) Descriptor() protoreflect.EnumDescriptor { return file_sourcenetwork_acp_core_errors_error_type_proto_enumTypes[0].Descriptor() } func (ErrorType) Type() protoreflect.EnumType { return &file_sourcenetwork_acp_core_errors_error_type_proto_enumTypes[0] } func (x ErrorType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use ErrorType.Descriptor instead. func (ErrorType) EnumDescriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_errors_error_type_proto_rawDescGZIP(), []int{0} } var File_sourcenetwork_acp_core_errors_error_type_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_errors_error_type_proto_rawDesc = []byte{ 0x0a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2a, 0x84, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x41, 0x44, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x42, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x06, 0x42, 0x8b, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x42, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x45, 0xaa, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0xca, 0x02, 0x1c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0xe2, 0x02, 0x28, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_errors_error_type_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_errors_error_type_proto_rawDescData = file_sourcenetwork_acp_core_errors_error_type_proto_rawDesc ) func file_sourcenetwork_acp_core_errors_error_type_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_errors_error_type_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_errors_error_type_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_errors_error_type_proto_rawDescData) }) return file_sourcenetwork_acp_core_errors_error_type_proto_rawDescData } var file_sourcenetwork_acp_core_errors_error_type_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sourcenetwork_acp_core_errors_error_type_proto_goTypes = []interface{}{ (ErrorType)(0), // 0: sourcenetwork.acp_core.errors.ErrorType } var file_sourcenetwork_acp_core_errors_error_type_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_errors_error_type_proto_init() } func file_sourcenetwork_acp_core_errors_error_type_proto_init() { if File_sourcenetwork_acp_core_errors_error_type_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_errors_error_type_proto_rawDesc, NumEnums: 1, NumMessages: 0, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_errors_error_type_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_errors_error_type_proto_depIdxs, EnumInfos: file_sourcenetwork_acp_core_errors_error_type_proto_enumTypes, }.Build() File_sourcenetwork_acp_core_errors_error_type_proto = out.File file_sourcenetwork_acp_core_errors_error_type_proto_rawDesc = nil file_sourcenetwork_acp_core_errors_error_type_proto_goTypes = nil file_sourcenetwork_acp_core_errors_error_type_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/event.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) var ( md_EventPolicyCreated protoreflect.MessageDescriptor fd_EventPolicyCreated_policy_id protoreflect.FieldDescriptor fd_EventPolicyCreated_policy_name protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_event_proto_init() md_EventPolicyCreated = File_sourcenetwork_acp_core_event_proto.Messages().ByName("EventPolicyCreated") fd_EventPolicyCreated_policy_id = md_EventPolicyCreated.Fields().ByName("policy_id") fd_EventPolicyCreated_policy_name = md_EventPolicyCreated.Fields().ByName("policy_name") } var _ protoreflect.Message = (*fastReflection_EventPolicyCreated)(nil) type fastReflection_EventPolicyCreated EventPolicyCreated func (x *EventPolicyCreated) ProtoReflect() protoreflect.Message { return (*fastReflection_EventPolicyCreated)(x) } func (x *EventPolicyCreated) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventPolicyCreated_messageType fastReflection_EventPolicyCreated_messageType var _ protoreflect.MessageType = fastReflection_EventPolicyCreated_messageType{} type fastReflection_EventPolicyCreated_messageType struct{} func (x fastReflection_EventPolicyCreated_messageType) Zero() protoreflect.Message { return (*fastReflection_EventPolicyCreated)(nil) } func (x fastReflection_EventPolicyCreated_messageType) New() protoreflect.Message { return new(fastReflection_EventPolicyCreated) } func (x fastReflection_EventPolicyCreated_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventPolicyCreated } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventPolicyCreated) Descriptor() protoreflect.MessageDescriptor { return md_EventPolicyCreated } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventPolicyCreated) Type() protoreflect.MessageType { return _fastReflection_EventPolicyCreated_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventPolicyCreated) New() protoreflect.Message { return new(fastReflection_EventPolicyCreated) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventPolicyCreated) Interface() protoreflect.ProtoMessage { return (*EventPolicyCreated)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventPolicyCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_EventPolicyCreated_policy_id, value) { return } } if x.PolicyName != "" { value := protoreflect.ValueOfString(x.PolicyName) if !f(fd_EventPolicyCreated_policy_name, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventPolicyCreated) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.EventPolicyCreated.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.EventPolicyCreated.policy_name": return x.PolicyName != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventPolicyCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventPolicyCreated does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPolicyCreated) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.EventPolicyCreated.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.EventPolicyCreated.policy_name": x.PolicyName = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventPolicyCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventPolicyCreated does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventPolicyCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.EventPolicyCreated.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventPolicyCreated.policy_name": value := x.PolicyName return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventPolicyCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventPolicyCreated does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPolicyCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.EventPolicyCreated.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.EventPolicyCreated.policy_name": x.PolicyName = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventPolicyCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventPolicyCreated does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPolicyCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventPolicyCreated.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.EventPolicyCreated is not mutable")) case "sourcenetwork.acp_core.EventPolicyCreated.policy_name": panic(fmt.Errorf("field policy_name of message sourcenetwork.acp_core.EventPolicyCreated is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventPolicyCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventPolicyCreated does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventPolicyCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventPolicyCreated.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventPolicyCreated.policy_name": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventPolicyCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventPolicyCreated does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventPolicyCreated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.EventPolicyCreated", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventPolicyCreated) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventPolicyCreated) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventPolicyCreated) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventPolicyCreated) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventPolicyCreated) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyName) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventPolicyCreated) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.PolicyName) > 0 { i -= len(x.PolicyName) copy(dAtA[i:], x.PolicyName) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyName))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventPolicyCreated) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventPolicyCreated: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventPolicyCreated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventAccessDecisionCreated protoreflect.MessageDescriptor fd_EventAccessDecisionCreated_creator protoreflect.FieldDescriptor fd_EventAccessDecisionCreated_policy_id protoreflect.FieldDescriptor fd_EventAccessDecisionCreated_decision_id protoreflect.FieldDescriptor fd_EventAccessDecisionCreated_actor protoreflect.FieldDescriptor fd_EventAccessDecisionCreated_actor_did protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_event_proto_init() md_EventAccessDecisionCreated = File_sourcenetwork_acp_core_event_proto.Messages().ByName("EventAccessDecisionCreated") fd_EventAccessDecisionCreated_creator = md_EventAccessDecisionCreated.Fields().ByName("creator") fd_EventAccessDecisionCreated_policy_id = md_EventAccessDecisionCreated.Fields().ByName("policy_id") fd_EventAccessDecisionCreated_decision_id = md_EventAccessDecisionCreated.Fields().ByName("decision_id") fd_EventAccessDecisionCreated_actor = md_EventAccessDecisionCreated.Fields().ByName("actor") fd_EventAccessDecisionCreated_actor_did = md_EventAccessDecisionCreated.Fields().ByName("actor_did") } var _ protoreflect.Message = (*fastReflection_EventAccessDecisionCreated)(nil) type fastReflection_EventAccessDecisionCreated EventAccessDecisionCreated func (x *EventAccessDecisionCreated) ProtoReflect() protoreflect.Message { return (*fastReflection_EventAccessDecisionCreated)(x) } func (x *EventAccessDecisionCreated) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventAccessDecisionCreated_messageType fastReflection_EventAccessDecisionCreated_messageType var _ protoreflect.MessageType = fastReflection_EventAccessDecisionCreated_messageType{} type fastReflection_EventAccessDecisionCreated_messageType struct{} func (x fastReflection_EventAccessDecisionCreated_messageType) Zero() protoreflect.Message { return (*fastReflection_EventAccessDecisionCreated)(nil) } func (x fastReflection_EventAccessDecisionCreated_messageType) New() protoreflect.Message { return new(fastReflection_EventAccessDecisionCreated) } func (x fastReflection_EventAccessDecisionCreated_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventAccessDecisionCreated } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventAccessDecisionCreated) Descriptor() protoreflect.MessageDescriptor { return md_EventAccessDecisionCreated } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventAccessDecisionCreated) Type() protoreflect.MessageType { return _fastReflection_EventAccessDecisionCreated_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventAccessDecisionCreated) New() protoreflect.Message { return new(fastReflection_EventAccessDecisionCreated) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventAccessDecisionCreated) Interface() protoreflect.ProtoMessage { return (*EventAccessDecisionCreated)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventAccessDecisionCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) if !f(fd_EventAccessDecisionCreated_creator, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_EventAccessDecisionCreated_policy_id, value) { return } } if x.DecisionId != "" { value := protoreflect.ValueOfString(x.DecisionId) if !f(fd_EventAccessDecisionCreated_decision_id, value) { return } } if x.Actor != "" { value := protoreflect.ValueOfString(x.Actor) if !f(fd_EventAccessDecisionCreated_actor, value) { return } } if x.ActorDid != "" { value := protoreflect.ValueOfString(x.ActorDid) if !f(fd_EventAccessDecisionCreated_actor_did, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventAccessDecisionCreated) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.EventAccessDecisionCreated.creator": return x.Creator != "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.decision_id": return x.DecisionId != "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor": return x.Actor != "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor_did": return x.ActorDid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventAccessDecisionCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventAccessDecisionCreated does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventAccessDecisionCreated) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.EventAccessDecisionCreated.creator": x.Creator = "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.decision_id": x.DecisionId = "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor": x.Actor = "" case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor_did": x.ActorDid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventAccessDecisionCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventAccessDecisionCreated does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventAccessDecisionCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.EventAccessDecisionCreated.creator": value := x.Creator return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventAccessDecisionCreated.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventAccessDecisionCreated.decision_id": value := x.DecisionId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor": value := x.Actor return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor_did": value := x.ActorDid return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventAccessDecisionCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventAccessDecisionCreated does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventAccessDecisionCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.EventAccessDecisionCreated.creator": x.Creator = value.Interface().(string) case "sourcenetwork.acp_core.EventAccessDecisionCreated.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.EventAccessDecisionCreated.decision_id": x.DecisionId = value.Interface().(string) case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor": x.Actor = value.Interface().(string) case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor_did": x.ActorDid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventAccessDecisionCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventAccessDecisionCreated does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventAccessDecisionCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventAccessDecisionCreated.creator": panic(fmt.Errorf("field creator of message sourcenetwork.acp_core.EventAccessDecisionCreated is not mutable")) case "sourcenetwork.acp_core.EventAccessDecisionCreated.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.EventAccessDecisionCreated is not mutable")) case "sourcenetwork.acp_core.EventAccessDecisionCreated.decision_id": panic(fmt.Errorf("field decision_id of message sourcenetwork.acp_core.EventAccessDecisionCreated is not mutable")) case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor": panic(fmt.Errorf("field actor of message sourcenetwork.acp_core.EventAccessDecisionCreated is not mutable")) case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor_did": panic(fmt.Errorf("field actor_did of message sourcenetwork.acp_core.EventAccessDecisionCreated is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventAccessDecisionCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventAccessDecisionCreated does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventAccessDecisionCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventAccessDecisionCreated.creator": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventAccessDecisionCreated.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventAccessDecisionCreated.decision_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventAccessDecisionCreated.actor_did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventAccessDecisionCreated")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventAccessDecisionCreated does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventAccessDecisionCreated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.EventAccessDecisionCreated", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventAccessDecisionCreated) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventAccessDecisionCreated) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventAccessDecisionCreated) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventAccessDecisionCreated) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventAccessDecisionCreated) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.DecisionId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Actor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ActorDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventAccessDecisionCreated) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ActorDid) > 0 { i -= len(x.ActorDid) copy(dAtA[i:], x.ActorDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ActorDid))) i-- dAtA[i] = 0x2a } if len(x.Actor) > 0 { i -= len(x.Actor) copy(dAtA[i:], x.Actor) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Actor))) i-- dAtA[i] = 0x22 } if len(x.DecisionId) > 0 { i -= len(x.DecisionId) copy(dAtA[i:], x.DecisionId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DecisionId))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Creator) > 0 { i -= len(x.Creator) copy(dAtA[i:], x.Creator) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventAccessDecisionCreated) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAccessDecisionCreated: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAccessDecisionCreated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.DecisionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ActorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ActorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventObjectRegistered protoreflect.MessageDescriptor fd_EventObjectRegistered_actor protoreflect.FieldDescriptor fd_EventObjectRegistered_policy_id protoreflect.FieldDescriptor fd_EventObjectRegistered_object_resource protoreflect.FieldDescriptor fd_EventObjectRegistered_object_id protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_event_proto_init() md_EventObjectRegistered = File_sourcenetwork_acp_core_event_proto.Messages().ByName("EventObjectRegistered") fd_EventObjectRegistered_actor = md_EventObjectRegistered.Fields().ByName("actor") fd_EventObjectRegistered_policy_id = md_EventObjectRegistered.Fields().ByName("policy_id") fd_EventObjectRegistered_object_resource = md_EventObjectRegistered.Fields().ByName("object_resource") fd_EventObjectRegistered_object_id = md_EventObjectRegistered.Fields().ByName("object_id") } var _ protoreflect.Message = (*fastReflection_EventObjectRegistered)(nil) type fastReflection_EventObjectRegistered EventObjectRegistered func (x *EventObjectRegistered) ProtoReflect() protoreflect.Message { return (*fastReflection_EventObjectRegistered)(x) } func (x *EventObjectRegistered) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventObjectRegistered_messageType fastReflection_EventObjectRegistered_messageType var _ protoreflect.MessageType = fastReflection_EventObjectRegistered_messageType{} type fastReflection_EventObjectRegistered_messageType struct{} func (x fastReflection_EventObjectRegistered_messageType) Zero() protoreflect.Message { return (*fastReflection_EventObjectRegistered)(nil) } func (x fastReflection_EventObjectRegistered_messageType) New() protoreflect.Message { return new(fastReflection_EventObjectRegistered) } func (x fastReflection_EventObjectRegistered_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventObjectRegistered } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventObjectRegistered) Descriptor() protoreflect.MessageDescriptor { return md_EventObjectRegistered } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventObjectRegistered) Type() protoreflect.MessageType { return _fastReflection_EventObjectRegistered_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventObjectRegistered) New() protoreflect.Message { return new(fastReflection_EventObjectRegistered) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventObjectRegistered) Interface() protoreflect.ProtoMessage { return (*EventObjectRegistered)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventObjectRegistered) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Actor != "" { value := protoreflect.ValueOfString(x.Actor) if !f(fd_EventObjectRegistered_actor, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_EventObjectRegistered_policy_id, value) { return } } if x.ObjectResource != "" { value := protoreflect.ValueOfString(x.ObjectResource) if !f(fd_EventObjectRegistered_object_resource, value) { return } } if x.ObjectId != "" { value := protoreflect.ValueOfString(x.ObjectId) if !f(fd_EventObjectRegistered_object_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventObjectRegistered) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectRegistered.actor": return x.Actor != "" case "sourcenetwork.acp_core.EventObjectRegistered.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.EventObjectRegistered.object_resource": return x.ObjectResource != "" case "sourcenetwork.acp_core.EventObjectRegistered.object_id": return x.ObjectId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectRegistered")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectRegistered does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectRegistered) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectRegistered.actor": x.Actor = "" case "sourcenetwork.acp_core.EventObjectRegistered.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.EventObjectRegistered.object_resource": x.ObjectResource = "" case "sourcenetwork.acp_core.EventObjectRegistered.object_id": x.ObjectId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectRegistered")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectRegistered does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventObjectRegistered) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.EventObjectRegistered.actor": value := x.Actor return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventObjectRegistered.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventObjectRegistered.object_resource": value := x.ObjectResource return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventObjectRegistered.object_id": value := x.ObjectId return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectRegistered")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectRegistered does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectRegistered) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectRegistered.actor": x.Actor = value.Interface().(string) case "sourcenetwork.acp_core.EventObjectRegistered.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.EventObjectRegistered.object_resource": x.ObjectResource = value.Interface().(string) case "sourcenetwork.acp_core.EventObjectRegistered.object_id": x.ObjectId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectRegistered")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectRegistered does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectRegistered) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectRegistered.actor": panic(fmt.Errorf("field actor of message sourcenetwork.acp_core.EventObjectRegistered is not mutable")) case "sourcenetwork.acp_core.EventObjectRegistered.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.EventObjectRegistered is not mutable")) case "sourcenetwork.acp_core.EventObjectRegistered.object_resource": panic(fmt.Errorf("field object_resource of message sourcenetwork.acp_core.EventObjectRegistered is not mutable")) case "sourcenetwork.acp_core.EventObjectRegistered.object_id": panic(fmt.Errorf("field object_id of message sourcenetwork.acp_core.EventObjectRegistered is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectRegistered")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectRegistered does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventObjectRegistered) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectRegistered.actor": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventObjectRegistered.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventObjectRegistered.object_resource": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventObjectRegistered.object_id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectRegistered")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectRegistered does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventObjectRegistered) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.EventObjectRegistered", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventObjectRegistered) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectRegistered) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventObjectRegistered) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventObjectRegistered) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventObjectRegistered) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Actor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ObjectResource) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ObjectId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventObjectRegistered) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ObjectId) > 0 { i -= len(x.ObjectId) copy(dAtA[i:], x.ObjectId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ObjectId))) i-- dAtA[i] = 0x22 } if len(x.ObjectResource) > 0 { i -= len(x.ObjectResource) copy(dAtA[i:], x.ObjectResource) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ObjectResource))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Actor) > 0 { i -= len(x.Actor) copy(dAtA[i:], x.Actor) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Actor))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventObjectRegistered) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventObjectRegistered: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventObjectRegistered: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObjectResource", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ObjectResource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ObjectId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EventObjectUnarchived protoreflect.MessageDescriptor fd_EventObjectUnarchived_actor protoreflect.FieldDescriptor fd_EventObjectUnarchived_policy_id protoreflect.FieldDescriptor fd_EventObjectUnarchived_object_resource protoreflect.FieldDescriptor fd_EventObjectUnarchived_object_id protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_event_proto_init() md_EventObjectUnarchived = File_sourcenetwork_acp_core_event_proto.Messages().ByName("EventObjectUnarchived") fd_EventObjectUnarchived_actor = md_EventObjectUnarchived.Fields().ByName("actor") fd_EventObjectUnarchived_policy_id = md_EventObjectUnarchived.Fields().ByName("policy_id") fd_EventObjectUnarchived_object_resource = md_EventObjectUnarchived.Fields().ByName("object_resource") fd_EventObjectUnarchived_object_id = md_EventObjectUnarchived.Fields().ByName("object_id") } var _ protoreflect.Message = (*fastReflection_EventObjectUnarchived)(nil) type fastReflection_EventObjectUnarchived EventObjectUnarchived func (x *EventObjectUnarchived) ProtoReflect() protoreflect.Message { return (*fastReflection_EventObjectUnarchived)(x) } func (x *EventObjectUnarchived) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_EventObjectUnarchived_messageType fastReflection_EventObjectUnarchived_messageType var _ protoreflect.MessageType = fastReflection_EventObjectUnarchived_messageType{} type fastReflection_EventObjectUnarchived_messageType struct{} func (x fastReflection_EventObjectUnarchived_messageType) Zero() protoreflect.Message { return (*fastReflection_EventObjectUnarchived)(nil) } func (x fastReflection_EventObjectUnarchived_messageType) New() protoreflect.Message { return new(fastReflection_EventObjectUnarchived) } func (x fastReflection_EventObjectUnarchived_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EventObjectUnarchived } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EventObjectUnarchived) Descriptor() protoreflect.MessageDescriptor { return md_EventObjectUnarchived } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EventObjectUnarchived) Type() protoreflect.MessageType { return _fastReflection_EventObjectUnarchived_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EventObjectUnarchived) New() protoreflect.Message { return new(fastReflection_EventObjectUnarchived) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EventObjectUnarchived) Interface() protoreflect.ProtoMessage { return (*EventObjectUnarchived)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EventObjectUnarchived) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Actor != "" { value := protoreflect.ValueOfString(x.Actor) if !f(fd_EventObjectUnarchived_actor, value) { return } } if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_EventObjectUnarchived_policy_id, value) { return } } if x.ObjectResource != "" { value := protoreflect.ValueOfString(x.ObjectResource) if !f(fd_EventObjectUnarchived_object_resource, value) { return } } if x.ObjectId != "" { value := protoreflect.ValueOfString(x.ObjectId) if !f(fd_EventObjectUnarchived_object_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EventObjectUnarchived) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectUnarchived.actor": return x.Actor != "" case "sourcenetwork.acp_core.EventObjectUnarchived.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.EventObjectUnarchived.object_resource": return x.ObjectResource != "" case "sourcenetwork.acp_core.EventObjectUnarchived.object_id": return x.ObjectId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectUnarchived")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectUnarchived does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectUnarchived) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectUnarchived.actor": x.Actor = "" case "sourcenetwork.acp_core.EventObjectUnarchived.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.EventObjectUnarchived.object_resource": x.ObjectResource = "" case "sourcenetwork.acp_core.EventObjectUnarchived.object_id": x.ObjectId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectUnarchived")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectUnarchived does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EventObjectUnarchived) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.EventObjectUnarchived.actor": value := x.Actor return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventObjectUnarchived.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventObjectUnarchived.object_resource": value := x.ObjectResource return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.EventObjectUnarchived.object_id": value := x.ObjectId return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectUnarchived")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectUnarchived does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectUnarchived) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectUnarchived.actor": x.Actor = value.Interface().(string) case "sourcenetwork.acp_core.EventObjectUnarchived.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.EventObjectUnarchived.object_resource": x.ObjectResource = value.Interface().(string) case "sourcenetwork.acp_core.EventObjectUnarchived.object_id": x.ObjectId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectUnarchived")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectUnarchived does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectUnarchived) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectUnarchived.actor": panic(fmt.Errorf("field actor of message sourcenetwork.acp_core.EventObjectUnarchived is not mutable")) case "sourcenetwork.acp_core.EventObjectUnarchived.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.EventObjectUnarchived is not mutable")) case "sourcenetwork.acp_core.EventObjectUnarchived.object_resource": panic(fmt.Errorf("field object_resource of message sourcenetwork.acp_core.EventObjectUnarchived is not mutable")) case "sourcenetwork.acp_core.EventObjectUnarchived.object_id": panic(fmt.Errorf("field object_id of message sourcenetwork.acp_core.EventObjectUnarchived is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectUnarchived")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectUnarchived does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EventObjectUnarchived) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.EventObjectUnarchived.actor": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventObjectUnarchived.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventObjectUnarchived.object_resource": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.EventObjectUnarchived.object_id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.EventObjectUnarchived")) } panic(fmt.Errorf("message sourcenetwork.acp_core.EventObjectUnarchived does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EventObjectUnarchived) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.EventObjectUnarchived", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EventObjectUnarchived) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EventObjectUnarchived) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EventObjectUnarchived) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EventObjectUnarchived) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EventObjectUnarchived) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Actor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ObjectResource) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.ObjectId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EventObjectUnarchived) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.ObjectId) > 0 { i -= len(x.ObjectId) copy(dAtA[i:], x.ObjectId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ObjectId))) i-- dAtA[i] = 0x22 } if len(x.ObjectResource) > 0 { i -= len(x.ObjectResource) copy(dAtA[i:], x.ObjectResource) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ObjectResource))) i-- dAtA[i] = 0x1a } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0x12 } if len(x.Actor) > 0 { i -= len(x.Actor) copy(dAtA[i:], x.Actor) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Actor))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EventObjectUnarchived) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventObjectUnarchived: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventObjectUnarchived: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObjectResource", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ObjectResource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ObjectId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/event.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type EventPolicyCreated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` PolicyName string `protobuf:"bytes,3,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` } func (x *EventPolicyCreated) Reset() { *x = EventPolicyCreated{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventPolicyCreated) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventPolicyCreated) ProtoMessage() {} // Deprecated: Use EventPolicyCreated.ProtoReflect.Descriptor instead. func (*EventPolicyCreated) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_event_proto_rawDescGZIP(), []int{0} } func (x *EventPolicyCreated) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *EventPolicyCreated) GetPolicyName() string { if x != nil { return x.PolicyName } return "" } type EventAccessDecisionCreated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` DecisionId string `protobuf:"bytes,3,opt,name=decision_id,json=decisionId,proto3" json:"decision_id,omitempty"` Actor string `protobuf:"bytes,4,opt,name=actor,proto3" json:"actor,omitempty"` ActorDid string `protobuf:"bytes,5,opt,name=actor_did,json=actorDid,proto3" json:"actor_did,omitempty"` } func (x *EventAccessDecisionCreated) Reset() { *x = EventAccessDecisionCreated{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventAccessDecisionCreated) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventAccessDecisionCreated) ProtoMessage() {} // Deprecated: Use EventAccessDecisionCreated.ProtoReflect.Descriptor instead. func (*EventAccessDecisionCreated) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_event_proto_rawDescGZIP(), []int{1} } func (x *EventAccessDecisionCreated) GetCreator() string { if x != nil { return x.Creator } return "" } func (x *EventAccessDecisionCreated) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *EventAccessDecisionCreated) GetDecisionId() string { if x != nil { return x.DecisionId } return "" } func (x *EventAccessDecisionCreated) GetActor() string { if x != nil { return x.Actor } return "" } func (x *EventAccessDecisionCreated) GetActorDid() string { if x != nil { return x.ActorDid } return "" } type EventObjectRegistered struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` ObjectResource string `protobuf:"bytes,3,opt,name=object_resource,json=objectResource,proto3" json:"object_resource,omitempty"` ObjectId string `protobuf:"bytes,4,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` } func (x *EventObjectRegistered) Reset() { *x = EventObjectRegistered{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventObjectRegistered) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventObjectRegistered) ProtoMessage() {} // Deprecated: Use EventObjectRegistered.ProtoReflect.Descriptor instead. func (*EventObjectRegistered) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_event_proto_rawDescGZIP(), []int{2} } func (x *EventObjectRegistered) GetActor() string { if x != nil { return x.Actor } return "" } func (x *EventObjectRegistered) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *EventObjectRegistered) GetObjectResource() string { if x != nil { return x.ObjectResource } return "" } func (x *EventObjectRegistered) GetObjectId() string { if x != nil { return x.ObjectId } return "" } type EventObjectUnarchived struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` ObjectResource string `protobuf:"bytes,3,opt,name=object_resource,json=objectResource,proto3" json:"object_resource,omitempty"` ObjectId string `protobuf:"bytes,4,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` } func (x *EventObjectUnarchived) Reset() { *x = EventObjectUnarchived{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_event_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EventObjectUnarchived) String() string { return protoimpl.X.MessageStringOf(x) } func (*EventObjectUnarchived) ProtoMessage() {} // Deprecated: Use EventObjectUnarchived.ProtoReflect.Descriptor instead. func (*EventObjectUnarchived) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_event_proto_rawDescGZIP(), []int{3} } func (x *EventObjectUnarchived) GetActor() string { if x != nil { return x.Actor } return "" } func (x *EventObjectUnarchived) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *EventObjectUnarchived) GetObjectResource() string { if x != nil { return x.ObjectResource } return "" } func (x *EventObjectUnarchived) GetObjectId() string { if x != nil { return x.ObjectId } return "" } var File_sourcenetwork_acp_core_event_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_event_proto_rawDesc = []byte{ 0x0a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x52, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x1a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x42, 0xdc, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_event_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_event_proto_rawDescData = file_sourcenetwork_acp_core_event_proto_rawDesc ) func file_sourcenetwork_acp_core_event_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_event_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_event_proto_rawDescData) }) return file_sourcenetwork_acp_core_event_proto_rawDescData } var file_sourcenetwork_acp_core_event_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_sourcenetwork_acp_core_event_proto_goTypes = []interface{}{ (*EventPolicyCreated)(nil), // 0: sourcenetwork.acp_core.EventPolicyCreated (*EventAccessDecisionCreated)(nil), // 1: sourcenetwork.acp_core.EventAccessDecisionCreated (*EventObjectRegistered)(nil), // 2: sourcenetwork.acp_core.EventObjectRegistered (*EventObjectUnarchived)(nil), // 3: sourcenetwork.acp_core.EventObjectUnarchived } var file_sourcenetwork_acp_core_event_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_event_proto_init() } func file_sourcenetwork_acp_core_event_proto_init() { if File_sourcenetwork_acp_core_event_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventPolicyCreated); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventAccessDecisionCreated); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventObjectRegistered); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_event_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventObjectUnarchived); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_event_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_event_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_event_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_event_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_event_proto = out.File file_sourcenetwork_acp_core_event_proto_rawDesc = nil file_sourcenetwork_acp_core_event_proto_goTypes = nil file_sourcenetwork_acp_core_event_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/parsing.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) var ( md_ParserMessage protoreflect.MessageDescriptor fd_ParserMessage_message protoreflect.FieldDescriptor fd_ParserMessage_sevirity protoreflect.FieldDescriptor fd_ParserMessage_line_start protoreflect.FieldDescriptor fd_ParserMessage_column_start protoreflect.FieldDescriptor fd_ParserMessage_line_end protoreflect.FieldDescriptor fd_ParserMessage_column_end protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_parsing_proto_init() md_ParserMessage = File_sourcenetwork_acp_core_parsing_proto.Messages().ByName("ParserMessage") fd_ParserMessage_message = md_ParserMessage.Fields().ByName("message") fd_ParserMessage_sevirity = md_ParserMessage.Fields().ByName("sevirity") fd_ParserMessage_line_start = md_ParserMessage.Fields().ByName("line_start") fd_ParserMessage_column_start = md_ParserMessage.Fields().ByName("column_start") fd_ParserMessage_line_end = md_ParserMessage.Fields().ByName("line_end") fd_ParserMessage_column_end = md_ParserMessage.Fields().ByName("column_end") } var _ protoreflect.Message = (*fastReflection_ParserMessage)(nil) type fastReflection_ParserMessage ParserMessage func (x *ParserMessage) ProtoReflect() protoreflect.Message { return (*fastReflection_ParserMessage)(x) } func (x *ParserMessage) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_parsing_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ParserMessage_messageType fastReflection_ParserMessage_messageType var _ protoreflect.MessageType = fastReflection_ParserMessage_messageType{} type fastReflection_ParserMessage_messageType struct{} func (x fastReflection_ParserMessage_messageType) Zero() protoreflect.Message { return (*fastReflection_ParserMessage)(nil) } func (x fastReflection_ParserMessage_messageType) New() protoreflect.Message { return new(fastReflection_ParserMessage) } func (x fastReflection_ParserMessage_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ParserMessage } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ParserMessage) Descriptor() protoreflect.MessageDescriptor { return md_ParserMessage } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ParserMessage) Type() protoreflect.MessageType { return _fastReflection_ParserMessage_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ParserMessage) New() protoreflect.Message { return new(fastReflection_ParserMessage) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ParserMessage) Interface() protoreflect.ProtoMessage { return (*ParserMessage)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ParserMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Message != "" { value := protoreflect.ValueOfString(x.Message) if !f(fd_ParserMessage_message, value) { return } } if x.Sevirity != "" { value := protoreflect.ValueOfString(x.Sevirity) if !f(fd_ParserMessage_sevirity, value) { return } } if x.LineStart != uint64(0) { value := protoreflect.ValueOfUint64(x.LineStart) if !f(fd_ParserMessage_line_start, value) { return } } if x.ColumnStart != uint64(0) { value := protoreflect.ValueOfUint64(x.ColumnStart) if !f(fd_ParserMessage_column_start, value) { return } } if x.LineEnd != uint64(0) { value := protoreflect.ValueOfUint64(x.LineEnd) if !f(fd_ParserMessage_line_end, value) { return } } if x.ColumnEnd != uint64(0) { value := protoreflect.ValueOfUint64(x.ColumnEnd) if !f(fd_ParserMessage_column_end, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ParserMessage) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ParserMessage.message": return x.Message != "" case "sourcenetwork.acp_core.ParserMessage.sevirity": return x.Sevirity != "" case "sourcenetwork.acp_core.ParserMessage.line_start": return x.LineStart != uint64(0) case "sourcenetwork.acp_core.ParserMessage.column_start": return x.ColumnStart != uint64(0) case "sourcenetwork.acp_core.ParserMessage.line_end": return x.LineEnd != uint64(0) case "sourcenetwork.acp_core.ParserMessage.column_end": return x.ColumnEnd != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserMessage")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserMessage does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserMessage) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ParserMessage.message": x.Message = "" case "sourcenetwork.acp_core.ParserMessage.sevirity": x.Sevirity = "" case "sourcenetwork.acp_core.ParserMessage.line_start": x.LineStart = uint64(0) case "sourcenetwork.acp_core.ParserMessage.column_start": x.ColumnStart = uint64(0) case "sourcenetwork.acp_core.ParserMessage.line_end": x.LineEnd = uint64(0) case "sourcenetwork.acp_core.ParserMessage.column_end": x.ColumnEnd = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserMessage")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserMessage does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ParserMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ParserMessage.message": value := x.Message return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ParserMessage.sevirity": value := x.Sevirity return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ParserMessage.line_start": value := x.LineStart return protoreflect.ValueOfUint64(value) case "sourcenetwork.acp_core.ParserMessage.column_start": value := x.ColumnStart return protoreflect.ValueOfUint64(value) case "sourcenetwork.acp_core.ParserMessage.line_end": value := x.LineEnd return protoreflect.ValueOfUint64(value) case "sourcenetwork.acp_core.ParserMessage.column_end": value := x.ColumnEnd return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserMessage")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserMessage does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ParserMessage.message": x.Message = value.Interface().(string) case "sourcenetwork.acp_core.ParserMessage.sevirity": x.Sevirity = value.Interface().(string) case "sourcenetwork.acp_core.ParserMessage.line_start": x.LineStart = value.Uint() case "sourcenetwork.acp_core.ParserMessage.column_start": x.ColumnStart = value.Uint() case "sourcenetwork.acp_core.ParserMessage.line_end": x.LineEnd = value.Uint() case "sourcenetwork.acp_core.ParserMessage.column_end": x.ColumnEnd = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserMessage")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserMessage does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ParserMessage.message": panic(fmt.Errorf("field message of message sourcenetwork.acp_core.ParserMessage is not mutable")) case "sourcenetwork.acp_core.ParserMessage.sevirity": panic(fmt.Errorf("field sevirity of message sourcenetwork.acp_core.ParserMessage is not mutable")) case "sourcenetwork.acp_core.ParserMessage.line_start": panic(fmt.Errorf("field line_start of message sourcenetwork.acp_core.ParserMessage is not mutable")) case "sourcenetwork.acp_core.ParserMessage.column_start": panic(fmt.Errorf("field column_start of message sourcenetwork.acp_core.ParserMessage is not mutable")) case "sourcenetwork.acp_core.ParserMessage.line_end": panic(fmt.Errorf("field line_end of message sourcenetwork.acp_core.ParserMessage is not mutable")) case "sourcenetwork.acp_core.ParserMessage.column_end": panic(fmt.Errorf("field column_end of message sourcenetwork.acp_core.ParserMessage is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserMessage")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserMessage does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ParserMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ParserMessage.message": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ParserMessage.sevirity": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ParserMessage.line_start": return protoreflect.ValueOfUint64(uint64(0)) case "sourcenetwork.acp_core.ParserMessage.column_start": return protoreflect.ValueOfUint64(uint64(0)) case "sourcenetwork.acp_core.ParserMessage.line_end": return protoreflect.ValueOfUint64(uint64(0)) case "sourcenetwork.acp_core.ParserMessage.column_end": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserMessage")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserMessage does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ParserMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ParserMessage", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ParserMessage) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserMessage) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ParserMessage) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ParserMessage) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ParserMessage) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Message) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Sevirity) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.LineStart != 0 { n += 1 + runtime.Sov(uint64(x.LineStart)) } if x.ColumnStart != 0 { n += 1 + runtime.Sov(uint64(x.ColumnStart)) } if x.LineEnd != 0 { n += 1 + runtime.Sov(uint64(x.LineEnd)) } if x.ColumnEnd != 0 { n += 1 + runtime.Sov(uint64(x.ColumnEnd)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ParserMessage) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.ColumnEnd != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.ColumnEnd)) i-- dAtA[i] = 0x30 } if x.LineEnd != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.LineEnd)) i-- dAtA[i] = 0x28 } if x.ColumnStart != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.ColumnStart)) i-- dAtA[i] = 0x20 } if x.LineStart != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.LineStart)) i-- dAtA[i] = 0x18 } if len(x.Sevirity) > 0 { i -= len(x.Sevirity) copy(dAtA[i:], x.Sevirity) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sevirity))) i-- dAtA[i] = 0x12 } if len(x.Message) > 0 { i -= len(x.Message) copy(dAtA[i:], x.Message) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ParserMessage) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParserMessage: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParserMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sevirity", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Sevirity = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LineStart", wireType) } x.LineStart = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.LineStart |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ColumnStart", wireType) } x.ColumnStart = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.ColumnStart |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LineEnd", wireType) } x.LineEnd = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.LineEnd |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ColumnEnd", wireType) } x.ColumnEnd = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.ColumnEnd |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_ParserReport_2_list)(nil) type _ParserReport_2_list struct { list *[]*ParserMessage } func (x *_ParserReport_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_ParserReport_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_ParserReport_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ParserMessage) (*x.list)[i] = concreteValue } func (x *_ParserReport_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ParserMessage) *x.list = append(*x.list, concreteValue) } func (x *_ParserReport_2_list) AppendMutable() protoreflect.Value { v := new(ParserMessage) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ParserReport_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_ParserReport_2_list) NewElement() protoreflect.Value { v := new(ParserMessage) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ParserReport_2_list) IsValid() bool { return x.list != nil } var ( md_ParserReport protoreflect.MessageDescriptor fd_ParserReport_parser_input protoreflect.FieldDescriptor fd_ParserReport_messages protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_parsing_proto_init() md_ParserReport = File_sourcenetwork_acp_core_parsing_proto.Messages().ByName("ParserReport") fd_ParserReport_parser_input = md_ParserReport.Fields().ByName("parser_input") fd_ParserReport_messages = md_ParserReport.Fields().ByName("messages") } var _ protoreflect.Message = (*fastReflection_ParserReport)(nil) type fastReflection_ParserReport ParserReport func (x *ParserReport) ProtoReflect() protoreflect.Message { return (*fastReflection_ParserReport)(x) } func (x *ParserReport) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_parsing_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ParserReport_messageType fastReflection_ParserReport_messageType var _ protoreflect.MessageType = fastReflection_ParserReport_messageType{} type fastReflection_ParserReport_messageType struct{} func (x fastReflection_ParserReport_messageType) Zero() protoreflect.Message { return (*fastReflection_ParserReport)(nil) } func (x fastReflection_ParserReport_messageType) New() protoreflect.Message { return new(fastReflection_ParserReport) } func (x fastReflection_ParserReport_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ParserReport } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ParserReport) Descriptor() protoreflect.MessageDescriptor { return md_ParserReport } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ParserReport) Type() protoreflect.MessageType { return _fastReflection_ParserReport_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ParserReport) New() protoreflect.Message { return new(fastReflection_ParserReport) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ParserReport) Interface() protoreflect.ProtoMessage { return (*ParserReport)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ParserReport) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.ParserInput != "" { value := protoreflect.ValueOfString(x.ParserInput) if !f(fd_ParserReport_parser_input, value) { return } } if len(x.Messages) != 0 { value := protoreflect.ValueOfList(&_ParserReport_2_list{list: &x.Messages}) if !f(fd_ParserReport_messages, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ParserReport) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ParserReport.parser_input": return x.ParserInput != "" case "sourcenetwork.acp_core.ParserReport.messages": return len(x.Messages) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserReport")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserReport does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserReport) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ParserReport.parser_input": x.ParserInput = "" case "sourcenetwork.acp_core.ParserReport.messages": x.Messages = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserReport")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserReport does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ParserReport) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ParserReport.parser_input": value := x.ParserInput return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ParserReport.messages": if len(x.Messages) == 0 { return protoreflect.ValueOfList(&_ParserReport_2_list{}) } listValue := &_ParserReport_2_list{list: &x.Messages} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserReport")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserReport does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserReport) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ParserReport.parser_input": x.ParserInput = value.Interface().(string) case "sourcenetwork.acp_core.ParserReport.messages": lv := value.List() clv := lv.(*_ParserReport_2_list) x.Messages = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserReport")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserReport does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserReport) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ParserReport.messages": if x.Messages == nil { x.Messages = []*ParserMessage{} } value := &_ParserReport_2_list{list: &x.Messages} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.ParserReport.parser_input": panic(fmt.Errorf("field parser_input of message sourcenetwork.acp_core.ParserReport is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserReport")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserReport does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ParserReport) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ParserReport.parser_input": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ParserReport.messages": list := []*ParserMessage{} return protoreflect.ValueOfList(&_ParserReport_2_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ParserReport")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ParserReport does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ParserReport) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ParserReport", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ParserReport) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ParserReport) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ParserReport) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ParserReport) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ParserReport) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.ParserInput) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Messages) > 0 { for _, e := range x.Messages { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ParserReport) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Messages) > 0 { for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Messages[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } } if len(x.ParserInput) > 0 { i -= len(x.ParserInput) copy(dAtA[i:], x.ParserInput) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ParserInput))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ParserReport) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParserReport: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParserReport: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParserInput", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ParserInput = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Messages = append(x.Messages, &ParserMessage{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/parsing.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Severity int32 const ( Severity_WARNING Severity = 0 Severity_ERROR Severity = 1 ) // Enum value maps for Severity. var ( Severity_name = map[int32]string{ 0: "WARNING", 1: "ERROR", } Severity_value = map[string]int32{ "WARNING": 0, "ERROR": 1, } ) func (x Severity) Enum() *Severity { p := new(Severity) *p = x return p } func (x Severity) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Severity) Descriptor() protoreflect.EnumDescriptor { return file_sourcenetwork_acp_core_parsing_proto_enumTypes[0].Descriptor() } func (Severity) Type() protoreflect.EnumType { return &file_sourcenetwork_acp_core_parsing_proto_enumTypes[0] } func (x Severity) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use Severity.Descriptor instead. func (Severity) EnumDescriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_parsing_proto_rawDescGZIP(), []int{0} } // ParserMessage models a message returned by a parser, which points // to a position in the given text input type ParserMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Sevirity string `protobuf:"bytes,2,opt,name=sevirity,proto3" json:"sevirity,omitempty"` LineStart uint64 `protobuf:"varint,3,opt,name=line_start,json=lineStart,proto3" json:"line_start,omitempty"` ColumnStart uint64 `protobuf:"varint,4,opt,name=column_start,json=columnStart,proto3" json:"column_start,omitempty"` LineEnd uint64 `protobuf:"varint,5,opt,name=line_end,json=lineEnd,proto3" json:"line_end,omitempty"` ColumnEnd uint64 `protobuf:"varint,6,opt,name=column_end,json=columnEnd,proto3" json:"column_end,omitempty"` } func (x *ParserMessage) Reset() { *x = ParserMessage{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_parsing_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ParserMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*ParserMessage) ProtoMessage() {} // Deprecated: Use ParserMessage.ProtoReflect.Descriptor instead. func (*ParserMessage) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_parsing_proto_rawDescGZIP(), []int{0} } func (x *ParserMessage) GetMessage() string { if x != nil { return x.Message } return "" } func (x *ParserMessage) GetSevirity() string { if x != nil { return x.Sevirity } return "" } func (x *ParserMessage) GetLineStart() uint64 { if x != nil { return x.LineStart } return 0 } func (x *ParserMessage) GetColumnStart() uint64 { if x != nil { return x.ColumnStart } return 0 } func (x *ParserMessage) GetLineEnd() uint64 { if x != nil { return x.LineEnd } return 0 } func (x *ParserMessage) GetColumnEnd() uint64 { if x != nil { return x.ColumnEnd } return 0 } // ParserReport contains a set of messages returned while parsing some input type ParserReport struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ParserInput string `protobuf:"bytes,1,opt,name=parser_input,json=parserInput,proto3" json:"parser_input,omitempty"` Messages []*ParserMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` } func (x *ParserReport) Reset() { *x = ParserReport{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_parsing_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ParserReport) String() string { return protoimpl.X.MessageStringOf(x) } func (*ParserReport) ProtoMessage() {} // Deprecated: Use ParserReport.ProtoReflect.Descriptor instead. func (*ParserReport) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_parsing_proto_rawDescGZIP(), []int{1} } func (x *ParserReport) GetParserInput() string { if x != nil { return x.ParserInput } return "" } func (x *ParserReport) GetMessages() []*ParserMessage { if x != nil { return x.Messages } return nil } var File_sourcenetwork_acp_core_parsing_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_parsing_proto_rawDesc = []byte{ 0x0a, 0x24, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x69, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x76, 0x69, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x45, 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x45, 0x6e, 0x64, 0x22, 0x74, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x22, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0c, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_parsing_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_parsing_proto_rawDescData = file_sourcenetwork_acp_core_parsing_proto_rawDesc ) func file_sourcenetwork_acp_core_parsing_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_parsing_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_parsing_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_parsing_proto_rawDescData) }) return file_sourcenetwork_acp_core_parsing_proto_rawDescData } var file_sourcenetwork_acp_core_parsing_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sourcenetwork_acp_core_parsing_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_sourcenetwork_acp_core_parsing_proto_goTypes = []interface{}{ (Severity)(0), // 0: sourcenetwork.acp_core.Severity (*ParserMessage)(nil), // 1: sourcenetwork.acp_core.ParserMessage (*ParserReport)(nil), // 2: sourcenetwork.acp_core.ParserReport } var file_sourcenetwork_acp_core_parsing_proto_depIdxs = []int32{ 1, // 0: sourcenetwork.acp_core.ParserReport.messages:type_name -> sourcenetwork.acp_core.ParserMessage 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_parsing_proto_init() } func file_sourcenetwork_acp_core_parsing_proto_init() { if File_sourcenetwork_acp_core_parsing_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_parsing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParserMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_parsing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParserReport); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_parsing_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_parsing_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_parsing_proto_depIdxs, EnumInfos: file_sourcenetwork_acp_core_parsing_proto_enumTypes, MessageInfos: file_sourcenetwork_acp_core_parsing_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_parsing_proto = out.File file_sourcenetwork_acp_core_parsing_proto_rawDesc = nil file_sourcenetwork_acp_core_parsing_proto_goTypes = nil file_sourcenetwork_acp_core_parsing_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/policy.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sort "sort" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) var _ protoreflect.Map = (*_Policy_5_map)(nil) type _Policy_5_map struct { m *map[string]string } func (x *_Policy_5_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_Policy_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_Policy_5_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_Policy_5_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_Policy_5_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_Policy_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_Policy_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_Policy_5_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_Policy_5_map) IsValid() bool { return x.m != nil } var _ protoreflect.List = (*_Policy_6_list)(nil) type _Policy_6_list struct { list *[]*Resource } func (x *_Policy_6_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_Policy_6_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Policy_6_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Resource) (*x.list)[i] = concreteValue } func (x *_Policy_6_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Resource) *x.list = append(*x.list, concreteValue) } func (x *_Policy_6_list) AppendMutable() protoreflect.Value { v := new(Resource) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Policy_6_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_Policy_6_list) NewElement() protoreflect.Value { v := new(Resource) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Policy_6_list) IsValid() bool { return x.list != nil } var ( md_Policy protoreflect.MessageDescriptor fd_Policy_id protoreflect.FieldDescriptor fd_Policy_name protoreflect.FieldDescriptor fd_Policy_description protoreflect.FieldDescriptor fd_Policy_creation_time protoreflect.FieldDescriptor fd_Policy_attributes protoreflect.FieldDescriptor fd_Policy_resources protoreflect.FieldDescriptor fd_Policy_actor_resource protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_proto_init() md_Policy = File_sourcenetwork_acp_core_policy_proto.Messages().ByName("Policy") fd_Policy_id = md_Policy.Fields().ByName("id") fd_Policy_name = md_Policy.Fields().ByName("name") fd_Policy_description = md_Policy.Fields().ByName("description") fd_Policy_creation_time = md_Policy.Fields().ByName("creation_time") fd_Policy_attributes = md_Policy.Fields().ByName("attributes") fd_Policy_resources = md_Policy.Fields().ByName("resources") fd_Policy_actor_resource = md_Policy.Fields().ByName("actor_resource") } var _ protoreflect.Message = (*fastReflection_Policy)(nil) type fastReflection_Policy Policy func (x *Policy) ProtoReflect() protoreflect.Message { return (*fastReflection_Policy)(x) } func (x *Policy) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Policy_messageType fastReflection_Policy_messageType var _ protoreflect.MessageType = fastReflection_Policy_messageType{} type fastReflection_Policy_messageType struct{} func (x fastReflection_Policy_messageType) Zero() protoreflect.Message { return (*fastReflection_Policy)(nil) } func (x fastReflection_Policy_messageType) New() protoreflect.Message { return new(fastReflection_Policy) } func (x fastReflection_Policy_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Policy } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Policy) Descriptor() protoreflect.MessageDescriptor { return md_Policy } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Policy) Type() protoreflect.MessageType { return _fastReflection_Policy_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Policy) New() protoreflect.Message { return new(fastReflection_Policy) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Policy) Interface() protoreflect.ProtoMessage { return (*Policy)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Policy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_Policy_id, value) { return } } if x.Name != "" { value := protoreflect.ValueOfString(x.Name) if !f(fd_Policy_name, value) { return } } if x.Description != "" { value := protoreflect.ValueOfString(x.Description) if !f(fd_Policy_description, value) { return } } if x.CreationTime != nil { value := protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) if !f(fd_Policy_creation_time, value) { return } } if len(x.Attributes) != 0 { value := protoreflect.ValueOfMap(&_Policy_5_map{m: &x.Attributes}) if !f(fd_Policy_attributes, value) { return } } if len(x.Resources) != 0 { value := protoreflect.ValueOfList(&_Policy_6_list{list: &x.Resources}) if !f(fd_Policy_resources, value) { return } } if x.ActorResource != nil { value := protoreflect.ValueOfMessage(x.ActorResource.ProtoReflect()) if !f(fd_Policy_actor_resource, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Policy) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Policy.id": return x.Id != "" case "sourcenetwork.acp_core.Policy.name": return x.Name != "" case "sourcenetwork.acp_core.Policy.description": return x.Description != "" case "sourcenetwork.acp_core.Policy.creation_time": return x.CreationTime != nil case "sourcenetwork.acp_core.Policy.attributes": return len(x.Attributes) != 0 case "sourcenetwork.acp_core.Policy.resources": return len(x.Resources) != 0 case "sourcenetwork.acp_core.Policy.actor_resource": return x.ActorResource != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Policy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Policy does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Policy) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Policy.id": x.Id = "" case "sourcenetwork.acp_core.Policy.name": x.Name = "" case "sourcenetwork.acp_core.Policy.description": x.Description = "" case "sourcenetwork.acp_core.Policy.creation_time": x.CreationTime = nil case "sourcenetwork.acp_core.Policy.attributes": x.Attributes = nil case "sourcenetwork.acp_core.Policy.resources": x.Resources = nil case "sourcenetwork.acp_core.Policy.actor_resource": x.ActorResource = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Policy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Policy does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Policy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Policy.id": value := x.Id return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Policy.name": value := x.Name return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Policy.description": value := x.Description return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Policy.creation_time": value := x.CreationTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.Policy.attributes": if len(x.Attributes) == 0 { return protoreflect.ValueOfMap(&_Policy_5_map{}) } mapValue := &_Policy_5_map{m: &x.Attributes} return protoreflect.ValueOfMap(mapValue) case "sourcenetwork.acp_core.Policy.resources": if len(x.Resources) == 0 { return protoreflect.ValueOfList(&_Policy_6_list{}) } listValue := &_Policy_6_list{list: &x.Resources} return protoreflect.ValueOfList(listValue) case "sourcenetwork.acp_core.Policy.actor_resource": value := x.ActorResource return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Policy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Policy does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Policy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Policy.id": x.Id = value.Interface().(string) case "sourcenetwork.acp_core.Policy.name": x.Name = value.Interface().(string) case "sourcenetwork.acp_core.Policy.description": x.Description = value.Interface().(string) case "sourcenetwork.acp_core.Policy.creation_time": x.CreationTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcenetwork.acp_core.Policy.attributes": mv := value.Map() cmv := mv.(*_Policy_5_map) x.Attributes = *cmv.m case "sourcenetwork.acp_core.Policy.resources": lv := value.List() clv := lv.(*_Policy_6_list) x.Resources = *clv.list case "sourcenetwork.acp_core.Policy.actor_resource": x.ActorResource = value.Message().Interface().(*ActorResource) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Policy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Policy does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Policy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Policy.creation_time": if x.CreationTime == nil { x.CreationTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) case "sourcenetwork.acp_core.Policy.attributes": if x.Attributes == nil { x.Attributes = make(map[string]string) } value := &_Policy_5_map{m: &x.Attributes} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.Policy.resources": if x.Resources == nil { x.Resources = []*Resource{} } value := &_Policy_6_list{list: &x.Resources} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.Policy.actor_resource": if x.ActorResource == nil { x.ActorResource = new(ActorResource) } return protoreflect.ValueOfMessage(x.ActorResource.ProtoReflect()) case "sourcenetwork.acp_core.Policy.id": panic(fmt.Errorf("field id of message sourcenetwork.acp_core.Policy is not mutable")) case "sourcenetwork.acp_core.Policy.name": panic(fmt.Errorf("field name of message sourcenetwork.acp_core.Policy is not mutable")) case "sourcenetwork.acp_core.Policy.description": panic(fmt.Errorf("field description of message sourcenetwork.acp_core.Policy is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Policy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Policy does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Policy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Policy.id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Policy.name": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Policy.description": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Policy.creation_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.Policy.attributes": m := make(map[string]string) return protoreflect.ValueOfMap(&_Policy_5_map{m: &m}) case "sourcenetwork.acp_core.Policy.resources": list := []*Resource{} return protoreflect.ValueOfList(&_Policy_6_list{list: &list}) case "sourcenetwork.acp_core.Policy.actor_resource": m := new(ActorResource) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Policy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Policy does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Policy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Policy", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Policy) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Policy) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Policy) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Policy) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Policy) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Description) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.CreationTime != nil { l = options.Size(x.CreationTime) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Attributes) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Attributes)) for k := range x.Attributes { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Attributes[k] SiZeMaP(k, v) } } else { for k, v := range x.Attributes { SiZeMaP(k, v) } } } if len(x.Resources) > 0 { for _, e := range x.Resources { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.ActorResource != nil { l = options.Size(x.ActorResource) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Policy) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.ActorResource != nil { encoded, err := options.Marshal(x.ActorResource) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x3a } if len(x.Resources) > 0 { for iNdEx := len(x.Resources) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Resources[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } } if len(x.Attributes) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x2a return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForAttributes := make([]string, 0, len(x.Attributes)) for k := range x.Attributes { keysForAttributes = append(keysForAttributes, string(k)) } sort.Slice(keysForAttributes, func(i, j int) bool { return keysForAttributes[i] < keysForAttributes[j] }) for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- { v := x.Attributes[string(keysForAttributes[iNdEx])] out, err := MaRsHaLmAp(keysForAttributes[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Attributes { v := x.Attributes[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if x.CreationTime != nil { encoded, err := options.Marshal(x.CreationTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if len(x.Description) > 0 { i -= len(x.Description) copy(dAtA[i:], x.Description) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) i-- dAtA[i] = 0x1a } if len(x.Name) > 0 { i -= len(x.Name) copy(dAtA[i:], x.Name) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Policy) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Policy: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTime == nil { x.CreationTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Attributes == nil { x.Attributes = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Attributes[mapkey] = mapvalue iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Resources = append(x.Resources, &Resource{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Resources[len(x.Resources)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ActorResource", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.ActorResource == nil { x.ActorResource = &ActorResource{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ActorResource); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_Resource_3_list)(nil) type _Resource_3_list struct { list *[]*Permission } func (x *_Resource_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_Resource_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Resource_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Permission) (*x.list)[i] = concreteValue } func (x *_Resource_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Permission) *x.list = append(*x.list, concreteValue) } func (x *_Resource_3_list) AppendMutable() protoreflect.Value { v := new(Permission) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Resource_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_Resource_3_list) NewElement() protoreflect.Value { v := new(Permission) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Resource_3_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_Resource_4_list)(nil) type _Resource_4_list struct { list *[]*Relation } func (x *_Resource_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_Resource_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Resource_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Relation) (*x.list)[i] = concreteValue } func (x *_Resource_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Relation) *x.list = append(*x.list, concreteValue) } func (x *_Resource_4_list) AppendMutable() protoreflect.Value { v := new(Relation) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Resource_4_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_Resource_4_list) NewElement() protoreflect.Value { v := new(Relation) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Resource_4_list) IsValid() bool { return x.list != nil } var ( md_Resource protoreflect.MessageDescriptor fd_Resource_name protoreflect.FieldDescriptor fd_Resource_doc protoreflect.FieldDescriptor fd_Resource_permissions protoreflect.FieldDescriptor fd_Resource_relations protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_proto_init() md_Resource = File_sourcenetwork_acp_core_policy_proto.Messages().ByName("Resource") fd_Resource_name = md_Resource.Fields().ByName("name") fd_Resource_doc = md_Resource.Fields().ByName("doc") fd_Resource_permissions = md_Resource.Fields().ByName("permissions") fd_Resource_relations = md_Resource.Fields().ByName("relations") } var _ protoreflect.Message = (*fastReflection_Resource)(nil) type fastReflection_Resource Resource func (x *Resource) ProtoReflect() protoreflect.Message { return (*fastReflection_Resource)(x) } func (x *Resource) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Resource_messageType fastReflection_Resource_messageType var _ protoreflect.MessageType = fastReflection_Resource_messageType{} type fastReflection_Resource_messageType struct{} func (x fastReflection_Resource_messageType) Zero() protoreflect.Message { return (*fastReflection_Resource)(nil) } func (x fastReflection_Resource_messageType) New() protoreflect.Message { return new(fastReflection_Resource) } func (x fastReflection_Resource_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Resource } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Resource) Descriptor() protoreflect.MessageDescriptor { return md_Resource } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Resource) Type() protoreflect.MessageType { return _fastReflection_Resource_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Resource) New() protoreflect.Message { return new(fastReflection_Resource) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Resource) Interface() protoreflect.ProtoMessage { return (*Resource)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Resource) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Name != "" { value := protoreflect.ValueOfString(x.Name) if !f(fd_Resource_name, value) { return } } if x.Doc != "" { value := protoreflect.ValueOfString(x.Doc) if !f(fd_Resource_doc, value) { return } } if len(x.Permissions) != 0 { value := protoreflect.ValueOfList(&_Resource_3_list{list: &x.Permissions}) if !f(fd_Resource_permissions, value) { return } } if len(x.Relations) != 0 { value := protoreflect.ValueOfList(&_Resource_4_list{list: &x.Relations}) if !f(fd_Resource_relations, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Resource) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Resource.name": return x.Name != "" case "sourcenetwork.acp_core.Resource.doc": return x.Doc != "" case "sourcenetwork.acp_core.Resource.permissions": return len(x.Permissions) != 0 case "sourcenetwork.acp_core.Resource.relations": return len(x.Relations) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Resource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Resource does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Resource) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Resource.name": x.Name = "" case "sourcenetwork.acp_core.Resource.doc": x.Doc = "" case "sourcenetwork.acp_core.Resource.permissions": x.Permissions = nil case "sourcenetwork.acp_core.Resource.relations": x.Relations = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Resource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Resource does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Resource) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Resource.name": value := x.Name return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Resource.doc": value := x.Doc return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Resource.permissions": if len(x.Permissions) == 0 { return protoreflect.ValueOfList(&_Resource_3_list{}) } listValue := &_Resource_3_list{list: &x.Permissions} return protoreflect.ValueOfList(listValue) case "sourcenetwork.acp_core.Resource.relations": if len(x.Relations) == 0 { return protoreflect.ValueOfList(&_Resource_4_list{}) } listValue := &_Resource_4_list{list: &x.Relations} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Resource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Resource does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Resource) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Resource.name": x.Name = value.Interface().(string) case "sourcenetwork.acp_core.Resource.doc": x.Doc = value.Interface().(string) case "sourcenetwork.acp_core.Resource.permissions": lv := value.List() clv := lv.(*_Resource_3_list) x.Permissions = *clv.list case "sourcenetwork.acp_core.Resource.relations": lv := value.List() clv := lv.(*_Resource_4_list) x.Relations = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Resource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Resource does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Resource) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Resource.permissions": if x.Permissions == nil { x.Permissions = []*Permission{} } value := &_Resource_3_list{list: &x.Permissions} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.Resource.relations": if x.Relations == nil { x.Relations = []*Relation{} } value := &_Resource_4_list{list: &x.Relations} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.Resource.name": panic(fmt.Errorf("field name of message sourcenetwork.acp_core.Resource is not mutable")) case "sourcenetwork.acp_core.Resource.doc": panic(fmt.Errorf("field doc of message sourcenetwork.acp_core.Resource is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Resource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Resource does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Resource) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Resource.name": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Resource.doc": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Resource.permissions": list := []*Permission{} return protoreflect.ValueOfList(&_Resource_3_list{list: &list}) case "sourcenetwork.acp_core.Resource.relations": list := []*Relation{} return protoreflect.ValueOfList(&_Resource_4_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Resource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Resource does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Resource) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Resource", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Resource) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Resource) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Resource) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Resource) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Resource) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Doc) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Permissions) > 0 { for _, e := range x.Permissions { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.Relations) > 0 { for _, e := range x.Relations { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Resource) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Relations) > 0 { for iNdEx := len(x.Relations) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Relations[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } } if len(x.Permissions) > 0 { for iNdEx := len(x.Permissions) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Permissions[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } } if len(x.Doc) > 0 { i -= len(x.Doc) copy(dAtA[i:], x.Doc) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Doc))) i-- dAtA[i] = 0x12 } if len(x.Name) > 0 { i -= len(x.Name) copy(dAtA[i:], x.Name) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Resource) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Resource: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Doc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Permissions = append(x.Permissions, &Permission{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Permissions[len(x.Permissions)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Relations = append(x.Relations, &Relation{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relations[len(x.Relations)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_Relation_3_list)(nil) type _Relation_3_list struct { list *[]string } func (x *_Relation_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_Relation_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } func (x *_Relation_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_Relation_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_Relation_3_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message Relation at list field Manages as it is not of Message kind")) } func (x *_Relation_3_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_Relation_3_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_Relation_3_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_Relation_4_list)(nil) type _Relation_4_list struct { list *[]*Restriction } func (x *_Relation_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_Relation_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Relation_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Restriction) (*x.list)[i] = concreteValue } func (x *_Relation_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Restriction) *x.list = append(*x.list, concreteValue) } func (x *_Relation_4_list) AppendMutable() protoreflect.Value { v := new(Restriction) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Relation_4_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_Relation_4_list) NewElement() protoreflect.Value { v := new(Restriction) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Relation_4_list) IsValid() bool { return x.list != nil } var ( md_Relation protoreflect.MessageDescriptor fd_Relation_name protoreflect.FieldDescriptor fd_Relation_doc protoreflect.FieldDescriptor fd_Relation_manages protoreflect.FieldDescriptor fd_Relation_vr_types protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_proto_init() md_Relation = File_sourcenetwork_acp_core_policy_proto.Messages().ByName("Relation") fd_Relation_name = md_Relation.Fields().ByName("name") fd_Relation_doc = md_Relation.Fields().ByName("doc") fd_Relation_manages = md_Relation.Fields().ByName("manages") fd_Relation_vr_types = md_Relation.Fields().ByName("vr_types") } var _ protoreflect.Message = (*fastReflection_Relation)(nil) type fastReflection_Relation Relation func (x *Relation) ProtoReflect() protoreflect.Message { return (*fastReflection_Relation)(x) } func (x *Relation) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Relation_messageType fastReflection_Relation_messageType var _ protoreflect.MessageType = fastReflection_Relation_messageType{} type fastReflection_Relation_messageType struct{} func (x fastReflection_Relation_messageType) Zero() protoreflect.Message { return (*fastReflection_Relation)(nil) } func (x fastReflection_Relation_messageType) New() protoreflect.Message { return new(fastReflection_Relation) } func (x fastReflection_Relation_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Relation } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Relation) Descriptor() protoreflect.MessageDescriptor { return md_Relation } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Relation) Type() protoreflect.MessageType { return _fastReflection_Relation_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Relation) New() protoreflect.Message { return new(fastReflection_Relation) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Relation) Interface() protoreflect.ProtoMessage { return (*Relation)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Relation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Name != "" { value := protoreflect.ValueOfString(x.Name) if !f(fd_Relation_name, value) { return } } if x.Doc != "" { value := protoreflect.ValueOfString(x.Doc) if !f(fd_Relation_doc, value) { return } } if len(x.Manages) != 0 { value := protoreflect.ValueOfList(&_Relation_3_list{list: &x.Manages}) if !f(fd_Relation_manages, value) { return } } if len(x.VrTypes) != 0 { value := protoreflect.ValueOfList(&_Relation_4_list{list: &x.VrTypes}) if !f(fd_Relation_vr_types, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Relation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Relation.name": return x.Name != "" case "sourcenetwork.acp_core.Relation.doc": return x.Doc != "" case "sourcenetwork.acp_core.Relation.manages": return len(x.Manages) != 0 case "sourcenetwork.acp_core.Relation.vr_types": return len(x.VrTypes) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relation does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Relation.name": x.Name = "" case "sourcenetwork.acp_core.Relation.doc": x.Doc = "" case "sourcenetwork.acp_core.Relation.manages": x.Manages = nil case "sourcenetwork.acp_core.Relation.vr_types": x.VrTypes = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relation does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Relation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Relation.name": value := x.Name return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Relation.doc": value := x.Doc return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Relation.manages": if len(x.Manages) == 0 { return protoreflect.ValueOfList(&_Relation_3_list{}) } listValue := &_Relation_3_list{list: &x.Manages} return protoreflect.ValueOfList(listValue) case "sourcenetwork.acp_core.Relation.vr_types": if len(x.VrTypes) == 0 { return protoreflect.ValueOfList(&_Relation_4_list{}) } listValue := &_Relation_4_list{list: &x.VrTypes} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relation does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Relation.name": x.Name = value.Interface().(string) case "sourcenetwork.acp_core.Relation.doc": x.Doc = value.Interface().(string) case "sourcenetwork.acp_core.Relation.manages": lv := value.List() clv := lv.(*_Relation_3_list) x.Manages = *clv.list case "sourcenetwork.acp_core.Relation.vr_types": lv := value.List() clv := lv.(*_Relation_4_list) x.VrTypes = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relation does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Relation.manages": if x.Manages == nil { x.Manages = []string{} } value := &_Relation_3_list{list: &x.Manages} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.Relation.vr_types": if x.VrTypes == nil { x.VrTypes = []*Restriction{} } value := &_Relation_4_list{list: &x.VrTypes} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.Relation.name": panic(fmt.Errorf("field name of message sourcenetwork.acp_core.Relation is not mutable")) case "sourcenetwork.acp_core.Relation.doc": panic(fmt.Errorf("field doc of message sourcenetwork.acp_core.Relation is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relation does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Relation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Relation.name": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Relation.doc": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Relation.manages": list := []string{} return protoreflect.ValueOfList(&_Relation_3_list{list: &list}) case "sourcenetwork.acp_core.Relation.vr_types": list := []*Restriction{} return protoreflect.ValueOfList(&_Relation_4_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relation")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relation does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Relation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Relation", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Relation) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relation) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Relation) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Relation) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Relation) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Doc) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Manages) > 0 { for _, s := range x.Manages { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.VrTypes) > 0 { for _, e := range x.VrTypes { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Relation) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.VrTypes) > 0 { for iNdEx := len(x.VrTypes) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.VrTypes[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } } if len(x.Manages) > 0 { for iNdEx := len(x.Manages) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.Manages[iNdEx]) copy(dAtA[i:], x.Manages[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Manages[iNdEx]))) i-- dAtA[i] = 0x1a } } if len(x.Doc) > 0 { i -= len(x.Doc) copy(dAtA[i:], x.Doc) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Doc))) i-- dAtA[i] = 0x12 } if len(x.Name) > 0 { i -= len(x.Name) copy(dAtA[i:], x.Name) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Relation) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Relation: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Relation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Doc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Manages", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Manages = append(x.Manages, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VrTypes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.VrTypes = append(x.VrTypes, &Restriction{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VrTypes[len(x.VrTypes)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Restriction protoreflect.MessageDescriptor fd_Restriction_resource_name protoreflect.FieldDescriptor fd_Restriction_relation_name protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_proto_init() md_Restriction = File_sourcenetwork_acp_core_policy_proto.Messages().ByName("Restriction") fd_Restriction_resource_name = md_Restriction.Fields().ByName("resource_name") fd_Restriction_relation_name = md_Restriction.Fields().ByName("relation_name") } var _ protoreflect.Message = (*fastReflection_Restriction)(nil) type fastReflection_Restriction Restriction func (x *Restriction) ProtoReflect() protoreflect.Message { return (*fastReflection_Restriction)(x) } func (x *Restriction) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Restriction_messageType fastReflection_Restriction_messageType var _ protoreflect.MessageType = fastReflection_Restriction_messageType{} type fastReflection_Restriction_messageType struct{} func (x fastReflection_Restriction_messageType) Zero() protoreflect.Message { return (*fastReflection_Restriction)(nil) } func (x fastReflection_Restriction_messageType) New() protoreflect.Message { return new(fastReflection_Restriction) } func (x fastReflection_Restriction_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Restriction } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Restriction) Descriptor() protoreflect.MessageDescriptor { return md_Restriction } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Restriction) Type() protoreflect.MessageType { return _fastReflection_Restriction_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Restriction) New() protoreflect.Message { return new(fastReflection_Restriction) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Restriction) Interface() protoreflect.ProtoMessage { return (*Restriction)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Restriction) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.ResourceName != "" { value := protoreflect.ValueOfString(x.ResourceName) if !f(fd_Restriction_resource_name, value) { return } } if x.RelationName != "" { value := protoreflect.ValueOfString(x.RelationName) if !f(fd_Restriction_relation_name, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Restriction) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Restriction.resource_name": return x.ResourceName != "" case "sourcenetwork.acp_core.Restriction.relation_name": return x.RelationName != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Restriction")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Restriction does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Restriction) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Restriction.resource_name": x.ResourceName = "" case "sourcenetwork.acp_core.Restriction.relation_name": x.RelationName = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Restriction")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Restriction does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Restriction) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Restriction.resource_name": value := x.ResourceName return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Restriction.relation_name": value := x.RelationName return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Restriction")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Restriction does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Restriction) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Restriction.resource_name": x.ResourceName = value.Interface().(string) case "sourcenetwork.acp_core.Restriction.relation_name": x.RelationName = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Restriction")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Restriction does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Restriction) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Restriction.resource_name": panic(fmt.Errorf("field resource_name of message sourcenetwork.acp_core.Restriction is not mutable")) case "sourcenetwork.acp_core.Restriction.relation_name": panic(fmt.Errorf("field relation_name of message sourcenetwork.acp_core.Restriction is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Restriction")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Restriction does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Restriction) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Restriction.resource_name": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Restriction.relation_name": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Restriction")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Restriction does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Restriction) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Restriction", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Restriction) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Restriction) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Restriction) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Restriction) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Restriction) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.ResourceName) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.RelationName) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Restriction) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.RelationName) > 0 { i -= len(x.RelationName) copy(dAtA[i:], x.RelationName) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RelationName))) i-- dAtA[i] = 0x12 } if len(x.ResourceName) > 0 { i -= len(x.ResourceName) copy(dAtA[i:], x.ResourceName) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ResourceName))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Restriction) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Restriction: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Restriction: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.ResourceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.RelationName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Permission protoreflect.MessageDescriptor fd_Permission_name protoreflect.FieldDescriptor fd_Permission_doc protoreflect.FieldDescriptor fd_Permission_expression protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_proto_init() md_Permission = File_sourcenetwork_acp_core_policy_proto.Messages().ByName("Permission") fd_Permission_name = md_Permission.Fields().ByName("name") fd_Permission_doc = md_Permission.Fields().ByName("doc") fd_Permission_expression = md_Permission.Fields().ByName("expression") } var _ protoreflect.Message = (*fastReflection_Permission)(nil) type fastReflection_Permission Permission func (x *Permission) ProtoReflect() protoreflect.Message { return (*fastReflection_Permission)(x) } func (x *Permission) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Permission_messageType fastReflection_Permission_messageType var _ protoreflect.MessageType = fastReflection_Permission_messageType{} type fastReflection_Permission_messageType struct{} func (x fastReflection_Permission_messageType) Zero() protoreflect.Message { return (*fastReflection_Permission)(nil) } func (x fastReflection_Permission_messageType) New() protoreflect.Message { return new(fastReflection_Permission) } func (x fastReflection_Permission_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Permission } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Permission) Descriptor() protoreflect.MessageDescriptor { return md_Permission } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Permission) Type() protoreflect.MessageType { return _fastReflection_Permission_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Permission) New() protoreflect.Message { return new(fastReflection_Permission) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Permission) Interface() protoreflect.ProtoMessage { return (*Permission)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Permission) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Name != "" { value := protoreflect.ValueOfString(x.Name) if !f(fd_Permission_name, value) { return } } if x.Doc != "" { value := protoreflect.ValueOfString(x.Doc) if !f(fd_Permission_doc, value) { return } } if x.Expression != "" { value := protoreflect.ValueOfString(x.Expression) if !f(fd_Permission_expression, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Permission) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Permission.name": return x.Name != "" case "sourcenetwork.acp_core.Permission.doc": return x.Doc != "" case "sourcenetwork.acp_core.Permission.expression": return x.Expression != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Permission")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Permission does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Permission) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Permission.name": x.Name = "" case "sourcenetwork.acp_core.Permission.doc": x.Doc = "" case "sourcenetwork.acp_core.Permission.expression": x.Expression = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Permission")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Permission does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Permission) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Permission.name": value := x.Name return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Permission.doc": value := x.Doc return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Permission.expression": value := x.Expression return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Permission")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Permission does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Permission) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Permission.name": x.Name = value.Interface().(string) case "sourcenetwork.acp_core.Permission.doc": x.Doc = value.Interface().(string) case "sourcenetwork.acp_core.Permission.expression": x.Expression = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Permission")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Permission does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Permission) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Permission.name": panic(fmt.Errorf("field name of message sourcenetwork.acp_core.Permission is not mutable")) case "sourcenetwork.acp_core.Permission.doc": panic(fmt.Errorf("field doc of message sourcenetwork.acp_core.Permission is not mutable")) case "sourcenetwork.acp_core.Permission.expression": panic(fmt.Errorf("field expression of message sourcenetwork.acp_core.Permission is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Permission")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Permission does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Permission) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Permission.name": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Permission.doc": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Permission.expression": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Permission")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Permission does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Permission) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Permission", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Permission) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Permission) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Permission) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Permission) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Permission) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Doc) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Expression) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Permission) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Expression) > 0 { i -= len(x.Expression) copy(dAtA[i:], x.Expression) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Expression))) i-- dAtA[i] = 0x1a } if len(x.Doc) > 0 { i -= len(x.Doc) copy(dAtA[i:], x.Doc) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Doc))) i-- dAtA[i] = 0x12 } if len(x.Name) > 0 { i -= len(x.Name) copy(dAtA[i:], x.Name) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Permission) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permission: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permission: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Doc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_ActorResource_3_list)(nil) type _ActorResource_3_list struct { list *[]*Relation } func (x *_ActorResource_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_ActorResource_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_ActorResource_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Relation) (*x.list)[i] = concreteValue } func (x *_ActorResource_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Relation) *x.list = append(*x.list, concreteValue) } func (x *_ActorResource_3_list) AppendMutable() protoreflect.Value { v := new(Relation) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ActorResource_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } func (x *_ActorResource_3_list) NewElement() protoreflect.Value { v := new(Relation) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ActorResource_3_list) IsValid() bool { return x.list != nil } var ( md_ActorResource protoreflect.MessageDescriptor fd_ActorResource_name protoreflect.FieldDescriptor fd_ActorResource_doc protoreflect.FieldDescriptor fd_ActorResource_relations protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_proto_init() md_ActorResource = File_sourcenetwork_acp_core_policy_proto.Messages().ByName("ActorResource") fd_ActorResource_name = md_ActorResource.Fields().ByName("name") fd_ActorResource_doc = md_ActorResource.Fields().ByName("doc") fd_ActorResource_relations = md_ActorResource.Fields().ByName("relations") } var _ protoreflect.Message = (*fastReflection_ActorResource)(nil) type fastReflection_ActorResource ActorResource func (x *ActorResource) ProtoReflect() protoreflect.Message { return (*fastReflection_ActorResource)(x) } func (x *ActorResource) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ActorResource_messageType fastReflection_ActorResource_messageType var _ protoreflect.MessageType = fastReflection_ActorResource_messageType{} type fastReflection_ActorResource_messageType struct{} func (x fastReflection_ActorResource_messageType) Zero() protoreflect.Message { return (*fastReflection_ActorResource)(nil) } func (x fastReflection_ActorResource_messageType) New() protoreflect.Message { return new(fastReflection_ActorResource) } func (x fastReflection_ActorResource_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ActorResource } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ActorResource) Descriptor() protoreflect.MessageDescriptor { return md_ActorResource } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ActorResource) Type() protoreflect.MessageType { return _fastReflection_ActorResource_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ActorResource) New() protoreflect.Message { return new(fastReflection_ActorResource) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ActorResource) Interface() protoreflect.ProtoMessage { return (*ActorResource)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ActorResource) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Name != "" { value := protoreflect.ValueOfString(x.Name) if !f(fd_ActorResource_name, value) { return } } if x.Doc != "" { value := protoreflect.ValueOfString(x.Doc) if !f(fd_ActorResource_doc, value) { return } } if len(x.Relations) != 0 { value := protoreflect.ValueOfList(&_ActorResource_3_list{list: &x.Relations}) if !f(fd_ActorResource_relations, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ActorResource) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ActorResource.name": return x.Name != "" case "sourcenetwork.acp_core.ActorResource.doc": return x.Doc != "" case "sourcenetwork.acp_core.ActorResource.relations": return len(x.Relations) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorResource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorResource does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorResource) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ActorResource.name": x.Name = "" case "sourcenetwork.acp_core.ActorResource.doc": x.Doc = "" case "sourcenetwork.acp_core.ActorResource.relations": x.Relations = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorResource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorResource does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ActorResource) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ActorResource.name": value := x.Name return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ActorResource.doc": value := x.Doc return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ActorResource.relations": if len(x.Relations) == 0 { return protoreflect.ValueOfList(&_ActorResource_3_list{}) } listValue := &_ActorResource_3_list{list: &x.Relations} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorResource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorResource does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorResource) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ActorResource.name": x.Name = value.Interface().(string) case "sourcenetwork.acp_core.ActorResource.doc": x.Doc = value.Interface().(string) case "sourcenetwork.acp_core.ActorResource.relations": lv := value.List() clv := lv.(*_ActorResource_3_list) x.Relations = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorResource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorResource does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorResource) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ActorResource.relations": if x.Relations == nil { x.Relations = []*Relation{} } value := &_ActorResource_3_list{list: &x.Relations} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.ActorResource.name": panic(fmt.Errorf("field name of message sourcenetwork.acp_core.ActorResource is not mutable")) case "sourcenetwork.acp_core.ActorResource.doc": panic(fmt.Errorf("field doc of message sourcenetwork.acp_core.ActorResource is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorResource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorResource does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ActorResource) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ActorResource.name": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ActorResource.doc": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ActorResource.relations": list := []*Relation{} return protoreflect.ValueOfList(&_ActorResource_3_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorResource")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorResource does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ActorResource) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ActorResource", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ActorResource) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorResource) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ActorResource) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ActorResource) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ActorResource) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Doc) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Relations) > 0 { for _, e := range x.Relations { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ActorResource) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Relations) > 0 { for iNdEx := len(x.Relations) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Relations[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } } if len(x.Doc) > 0 { i -= len(x.Doc) copy(dAtA[i:], x.Doc) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Doc))) i-- dAtA[i] = 0x12 } if len(x.Name) > 0 { i -= len(x.Name) copy(dAtA[i:], x.Name) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ActorResource) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ActorResource: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ActorResource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Doc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Relations = append(x.Relations, &Relation{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relations[len(x.Relations)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/policy.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Policy represents an ACP module Policy definition. // Each Policy defines a set of high level rules over how the acces control system // should behave. type Policy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` CreationTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` Attributes map[string]string `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Resources []*Resource `protobuf:"bytes,6,rep,name=resources,proto3" json:"resources,omitempty"` ActorResource *ActorResource `protobuf:"bytes,7,opt,name=actor_resource,json=actorResource,proto3" json:"actor_resource,omitempty"` } func (x *Policy) Reset() { *x = Policy{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Policy) String() string { return protoimpl.X.MessageStringOf(x) } func (*Policy) ProtoMessage() {} // Deprecated: Use Policy.ProtoReflect.Descriptor instead. func (*Policy) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_proto_rawDescGZIP(), []int{0} } func (x *Policy) GetId() string { if x != nil { return x.Id } return "" } func (x *Policy) GetName() string { if x != nil { return x.Name } return "" } func (x *Policy) GetDescription() string { if x != nil { return x.Description } return "" } func (x *Policy) GetCreationTime() *timestamppb.Timestamp { if x != nil { return x.CreationTime } return nil } func (x *Policy) GetAttributes() map[string]string { if x != nil { return x.Attributes } return nil } func (x *Policy) GetResources() []*Resource { if x != nil { return x.Resources } return nil } func (x *Policy) GetActorResource() *ActorResource { if x != nil { return x.ActorResource } return nil } // Resource models a namespace for objects in a Policy. // Appications will have multiple entities which they must manage such as files or groups. // A Resource represents a set of entities of a certain type. type Resource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Doc string `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"` Permissions []*Permission `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"` Relations []*Relation `protobuf:"bytes,4,rep,name=relations,proto3" json:"relations,omitempty"` } func (x *Resource) Reset() { *x = Resource{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Resource) String() string { return protoimpl.X.MessageStringOf(x) } func (*Resource) ProtoMessage() {} // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_proto_rawDescGZIP(), []int{1} } func (x *Resource) GetName() string { if x != nil { return x.Name } return "" } func (x *Resource) GetDoc() string { if x != nil { return x.Doc } return "" } func (x *Resource) GetPermissions() []*Permission { if x != nil { return x.Permissions } return nil } func (x *Resource) GetRelations() []*Relation { if x != nil { return x.Relations } return nil } type Relation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Doc string `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"` // list of relations managed by the current relation Manages []string `protobuf:"bytes,3,rep,name=manages,proto3" json:"manages,omitempty"` // value restriction types VrTypes []*Restriction `protobuf:"bytes,4,rep,name=vr_types,json=vrTypes,proto3" json:"vr_types,omitempty"` } func (x *Relation) Reset() { *x = Relation{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Relation) String() string { return protoimpl.X.MessageStringOf(x) } func (*Relation) ProtoMessage() {} // Deprecated: Use Relation.ProtoReflect.Descriptor instead. func (*Relation) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_proto_rawDescGZIP(), []int{2} } func (x *Relation) GetName() string { if x != nil { return x.Name } return "" } func (x *Relation) GetDoc() string { if x != nil { return x.Doc } return "" } func (x *Relation) GetManages() []string { if x != nil { return x.Manages } return nil } func (x *Relation) GetVrTypes() []*Restriction { if x != nil { return x.VrTypes } return nil } // Restriction models a specification which a Relationship's actor // should meet. type Restriction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // resource_name scopes permissible actors resource ResourceName string `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` // relation_name scopes permissible actors relation RelationName string `protobuf:"bytes,2,opt,name=relation_name,json=relationName,proto3" json:"relation_name,omitempty"` } func (x *Restriction) Reset() { *x = Restriction{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Restriction) String() string { return protoimpl.X.MessageStringOf(x) } func (*Restriction) ProtoMessage() {} // Deprecated: Use Restriction.ProtoReflect.Descriptor instead. func (*Restriction) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_proto_rawDescGZIP(), []int{3} } func (x *Restriction) GetResourceName() string { if x != nil { return x.ResourceName } return "" } func (x *Restriction) GetRelationName() string { if x != nil { return x.RelationName } return "" } // Permission models a special type of Relation which is evaluated at runtime. // A permission often maps to an operation defined for a resource which an actor may attempt. type Permission struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Doc string `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"` Expression string `protobuf:"bytes,3,opt,name=expression,proto3" json:"expression,omitempty"` } func (x *Permission) Reset() { *x = Permission{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Permission) String() string { return protoimpl.X.MessageStringOf(x) } func (*Permission) ProtoMessage() {} // Deprecated: Use Permission.ProtoReflect.Descriptor instead. func (*Permission) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_proto_rawDescGZIP(), []int{4} } func (x *Permission) GetName() string { if x != nil { return x.Name } return "" } func (x *Permission) GetDoc() string { if x != nil { return x.Doc } return "" } func (x *Permission) GetExpression() string { if x != nil { return x.Expression } return "" } // ActorResource represents a special Resource which is reserved for Policy actors. type ActorResource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Doc string `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"` Relations []*Relation `protobuf:"bytes,3,rep,name=relations,proto3" json:"relations,omitempty"` } func (x *ActorResource) Reset() { *x = ActorResource{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ActorResource) String() string { return protoimpl.X.MessageStringOf(x) } func (*ActorResource) ProtoMessage() {} // Deprecated: Use ActorResource.ProtoReflect.Descriptor instead. func (*ActorResource) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_proto_rawDescGZIP(), []int{5} } func (x *ActorResource) GetName() string { if x != nil { return x.Name } return "" } func (x *ActorResource) GetDoc() string { if x != nil { return x.Doc } return "" } func (x *ActorResource) GetRelations() []*Relation { if x != nil { return x.Relations } return nil } var File_sourcenetwork_acp_core_policy_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_policy_proto_rawDesc = []byte{ 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x03, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb6, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x44, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x76, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xdd, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_policy_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_policy_proto_rawDescData = file_sourcenetwork_acp_core_policy_proto_rawDesc ) func file_sourcenetwork_acp_core_policy_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_policy_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_policy_proto_rawDescData) }) return file_sourcenetwork_acp_core_policy_proto_rawDescData } var file_sourcenetwork_acp_core_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_sourcenetwork_acp_core_policy_proto_goTypes = []interface{}{ (*Policy)(nil), // 0: sourcenetwork.acp_core.Policy (*Resource)(nil), // 1: sourcenetwork.acp_core.Resource (*Relation)(nil), // 2: sourcenetwork.acp_core.Relation (*Restriction)(nil), // 3: sourcenetwork.acp_core.Restriction (*Permission)(nil), // 4: sourcenetwork.acp_core.Permission (*ActorResource)(nil), // 5: sourcenetwork.acp_core.ActorResource nil, // 6: sourcenetwork.acp_core.Policy.AttributesEntry (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp } var file_sourcenetwork_acp_core_policy_proto_depIdxs = []int32{ 7, // 0: sourcenetwork.acp_core.Policy.creation_time:type_name -> google.protobuf.Timestamp 6, // 1: sourcenetwork.acp_core.Policy.attributes:type_name -> sourcenetwork.acp_core.Policy.AttributesEntry 1, // 2: sourcenetwork.acp_core.Policy.resources:type_name -> sourcenetwork.acp_core.Resource 5, // 3: sourcenetwork.acp_core.Policy.actor_resource:type_name -> sourcenetwork.acp_core.ActorResource 4, // 4: sourcenetwork.acp_core.Resource.permissions:type_name -> sourcenetwork.acp_core.Permission 2, // 5: sourcenetwork.acp_core.Resource.relations:type_name -> sourcenetwork.acp_core.Relation 3, // 6: sourcenetwork.acp_core.Relation.vr_types:type_name -> sourcenetwork.acp_core.Restriction 2, // 7: sourcenetwork.acp_core.ActorResource.relations:type_name -> sourcenetwork.acp_core.Relation 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_policy_proto_init() } func file_sourcenetwork_acp_core_policy_proto_init() { if File_sourcenetwork_acp_core_policy_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Resource); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Relation); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Restriction); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Permission); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActorResource); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_policy_proto_rawDesc, NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_policy_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_policy_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_policy_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_policy_proto = out.File file_sourcenetwork_acp_core_policy_proto_rawDesc = nil file_sourcenetwork_acp_core_policy_proto_goTypes = nil file_sourcenetwork_acp_core_policy_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/policy_definition.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) var ( md_PolicyDefinition protoreflect.MessageDescriptor fd_PolicyDefinition_marshaled_policy protoreflect.FieldDescriptor fd_PolicyDefinition_policy protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_definition_proto_init() md_PolicyDefinition = File_sourcenetwork_acp_core_policy_definition_proto.Messages().ByName("PolicyDefinition") fd_PolicyDefinition_marshaled_policy = md_PolicyDefinition.Fields().ByName("marshaled_policy") fd_PolicyDefinition_policy = md_PolicyDefinition.Fields().ByName("policy") } var _ protoreflect.Message = (*fastReflection_PolicyDefinition)(nil) type fastReflection_PolicyDefinition PolicyDefinition func (x *PolicyDefinition) ProtoReflect() protoreflect.Message { return (*fastReflection_PolicyDefinition)(x) } func (x *PolicyDefinition) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_definition_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PolicyDefinition_messageType fastReflection_PolicyDefinition_messageType var _ protoreflect.MessageType = fastReflection_PolicyDefinition_messageType{} type fastReflection_PolicyDefinition_messageType struct{} func (x fastReflection_PolicyDefinition_messageType) Zero() protoreflect.Message { return (*fastReflection_PolicyDefinition)(nil) } func (x fastReflection_PolicyDefinition_messageType) New() protoreflect.Message { return new(fastReflection_PolicyDefinition) } func (x fastReflection_PolicyDefinition_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PolicyDefinition } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PolicyDefinition) Descriptor() protoreflect.MessageDescriptor { return md_PolicyDefinition } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PolicyDefinition) Type() protoreflect.MessageType { return _fastReflection_PolicyDefinition_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PolicyDefinition) New() protoreflect.Message { return new(fastReflection_PolicyDefinition) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PolicyDefinition) Interface() protoreflect.ProtoMessage { return (*PolicyDefinition)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PolicyDefinition) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Definition != nil { switch o := x.Definition.(type) { case *PolicyDefinition_MarshaledPolicy: v := o.MarshaledPolicy value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyDefinition_marshaled_policy, value) { return } case *PolicyDefinition_Policy: v := o.Policy value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_PolicyDefinition_policy, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PolicyDefinition) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyDefinition.marshaled_policy": if x.Definition == nil { return false } else if _, ok := x.Definition.(*PolicyDefinition_MarshaledPolicy); ok { return true } else { return false } case "sourcenetwork.acp_core.PolicyDefinition.policy": if x.Definition == nil { return false } else if _, ok := x.Definition.(*PolicyDefinition_Policy); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyDefinition")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyDefinition does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyDefinition) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyDefinition.marshaled_policy": x.Definition = nil case "sourcenetwork.acp_core.PolicyDefinition.policy": x.Definition = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyDefinition")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyDefinition does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PolicyDefinition) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.PolicyDefinition.marshaled_policy": if x.Definition == nil { return protoreflect.ValueOfMessage((*MarshaledPolicy)(nil).ProtoReflect()) } else if v, ok := x.Definition.(*PolicyDefinition_MarshaledPolicy); ok { return protoreflect.ValueOfMessage(v.MarshaledPolicy.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*MarshaledPolicy)(nil).ProtoReflect()) } case "sourcenetwork.acp_core.PolicyDefinition.policy": if x.Definition == nil { return protoreflect.ValueOfMessage((*Policy)(nil).ProtoReflect()) } else if v, ok := x.Definition.(*PolicyDefinition_Policy); ok { return protoreflect.ValueOfMessage(v.Policy.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*Policy)(nil).ProtoReflect()) } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyDefinition")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyDefinition does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyDefinition) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyDefinition.marshaled_policy": cv := value.Message().Interface().(*MarshaledPolicy) x.Definition = &PolicyDefinition_MarshaledPolicy{MarshaledPolicy: cv} case "sourcenetwork.acp_core.PolicyDefinition.policy": cv := value.Message().Interface().(*Policy) x.Definition = &PolicyDefinition_Policy{Policy: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyDefinition")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyDefinition does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyDefinition) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyDefinition.marshaled_policy": if x.Definition == nil { value := &MarshaledPolicy{} oneofValue := &PolicyDefinition_MarshaledPolicy{MarshaledPolicy: value} x.Definition = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Definition.(type) { case *PolicyDefinition_MarshaledPolicy: return protoreflect.ValueOfMessage(m.MarshaledPolicy.ProtoReflect()) default: value := &MarshaledPolicy{} oneofValue := &PolicyDefinition_MarshaledPolicy{MarshaledPolicy: value} x.Definition = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.PolicyDefinition.policy": if x.Definition == nil { value := &Policy{} oneofValue := &PolicyDefinition_Policy{Policy: value} x.Definition = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Definition.(type) { case *PolicyDefinition_Policy: return protoreflect.ValueOfMessage(m.Policy.ProtoReflect()) default: value := &Policy{} oneofValue := &PolicyDefinition_Policy{Policy: value} x.Definition = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyDefinition")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyDefinition does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PolicyDefinition) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyDefinition.marshaled_policy": value := &MarshaledPolicy{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.PolicyDefinition.policy": value := &Policy{} return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyDefinition")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyDefinition does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PolicyDefinition) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcenetwork.acp_core.PolicyDefinition.definition": if x.Definition == nil { return nil } switch x.Definition.(type) { case *PolicyDefinition_MarshaledPolicy: return x.Descriptor().Fields().ByName("marshaled_policy") case *PolicyDefinition_Policy: return x.Descriptor().Fields().ByName("policy") } default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.PolicyDefinition", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PolicyDefinition) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyDefinition) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PolicyDefinition) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PolicyDefinition) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PolicyDefinition) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Definition.(type) { case *PolicyDefinition_MarshaledPolicy: if x == nil { break } l = options.Size(x.MarshaledPolicy) n += 1 + l + runtime.Sov(uint64(l)) case *PolicyDefinition_Policy: if x == nil { break } l = options.Size(x.Policy) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PolicyDefinition) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Definition.(type) { case *PolicyDefinition_MarshaledPolicy: encoded, err := options.Marshal(x.MarshaledPolicy) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa case *PolicyDefinition_Policy: encoded, err := options.Marshal(x.Policy) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PolicyDefinition) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyDefinition: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyDefinition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MarshaledPolicy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &MarshaledPolicy{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Definition = &PolicyDefinition_MarshaledPolicy{v} iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &Policy{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Definition = &PolicyDefinition_Policy{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/policy_definition.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // PolicyDefinition represents a Policy defined either as a raw // Policy type or a shortened and marshaled version type PolicyDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Definition: // // *PolicyDefinition_MarshaledPolicy // *PolicyDefinition_Policy Definition isPolicyDefinition_Definition `protobuf_oneof:"definition"` } func (x *PolicyDefinition) Reset() { *x = PolicyDefinition{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_definition_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PolicyDefinition) String() string { return protoimpl.X.MessageStringOf(x) } func (*PolicyDefinition) ProtoMessage() {} // Deprecated: Use PolicyDefinition.ProtoReflect.Descriptor instead. func (*PolicyDefinition) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_definition_proto_rawDescGZIP(), []int{0} } func (x *PolicyDefinition) GetDefinition() isPolicyDefinition_Definition { if x != nil { return x.Definition } return nil } func (x *PolicyDefinition) GetMarshaledPolicy() *MarshaledPolicy { if x, ok := x.GetDefinition().(*PolicyDefinition_MarshaledPolicy); ok { return x.MarshaledPolicy } return nil } func (x *PolicyDefinition) GetPolicy() *Policy { if x, ok := x.GetDefinition().(*PolicyDefinition_Policy); ok { return x.Policy } return nil } type isPolicyDefinition_Definition interface { isPolicyDefinition_Definition() } type PolicyDefinition_MarshaledPolicy struct { MarshaledPolicy *MarshaledPolicy `protobuf:"bytes,1,opt,name=marshaled_policy,json=marshaledPolicy,proto3,oneof"` } type PolicyDefinition_Policy struct { Policy *Policy `protobuf:"bytes,2,opt,name=policy,proto3,oneof"` } func (*PolicyDefinition_MarshaledPolicy) isPolicyDefinition_Definition() {} func (*PolicyDefinition_Policy) isPolicyDefinition_Definition() {} var File_sourcenetwork_acp_core_policy_definition_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_policy_definition_proto_rawDesc = []byte{ 0x0a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x01, 0x0a, 0x10, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x10, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xe7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x15, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_policy_definition_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_policy_definition_proto_rawDescData = file_sourcenetwork_acp_core_policy_definition_proto_rawDesc ) func file_sourcenetwork_acp_core_policy_definition_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_policy_definition_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_policy_definition_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_policy_definition_proto_rawDescData) }) return file_sourcenetwork_acp_core_policy_definition_proto_rawDescData } var file_sourcenetwork_acp_core_policy_definition_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcenetwork_acp_core_policy_definition_proto_goTypes = []interface{}{ (*PolicyDefinition)(nil), // 0: sourcenetwork.acp_core.PolicyDefinition (*MarshaledPolicy)(nil), // 1: sourcenetwork.acp_core.MarshaledPolicy (*Policy)(nil), // 2: sourcenetwork.acp_core.Policy } var file_sourcenetwork_acp_core_policy_definition_proto_depIdxs = []int32{ 1, // 0: sourcenetwork.acp_core.PolicyDefinition.marshaled_policy:type_name -> sourcenetwork.acp_core.MarshaledPolicy 2, // 1: sourcenetwork.acp_core.PolicyDefinition.policy:type_name -> sourcenetwork.acp_core.Policy 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_policy_definition_proto_init() } func file_sourcenetwork_acp_core_policy_definition_proto_init() { if File_sourcenetwork_acp_core_policy_definition_proto != nil { return } file_sourcenetwork_acp_core_policy_proto_init() file_sourcenetwork_acp_core_policy_short_proto_init() if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_policy_definition_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolicyDefinition); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_sourcenetwork_acp_core_policy_definition_proto_msgTypes[0].OneofWrappers = []interface{}{ (*PolicyDefinition_MarshaledPolicy)(nil), (*PolicyDefinition_Policy)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_policy_definition_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_policy_definition_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_policy_definition_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_policy_definition_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_policy_definition_proto = out.File file_sourcenetwork_acp_core_policy_definition_proto_rawDesc = nil file_sourcenetwork_acp_core_policy_definition_proto_goTypes = nil file_sourcenetwork_acp_core_policy_definition_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/policy_record.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sort "sort" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" ) var _ protoreflect.Map = (*_PolicyRecord_3_map)(nil) type _PolicyRecord_3_map struct { m *map[string]string } func (x *_PolicyRecord_3_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_PolicyRecord_3_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_PolicyRecord_3_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_PolicyRecord_3_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_PolicyRecord_3_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_PolicyRecord_3_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_PolicyRecord_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_PolicyRecord_3_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_PolicyRecord_3_map) IsValid() bool { return x.m != nil } var ( md_PolicyRecord protoreflect.MessageDescriptor fd_PolicyRecord_policy protoreflect.FieldDescriptor fd_PolicyRecord_management_graph protoreflect.FieldDescriptor fd_PolicyRecord_metadata protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_record_proto_init() md_PolicyRecord = File_sourcenetwork_acp_core_policy_record_proto.Messages().ByName("PolicyRecord") fd_PolicyRecord_policy = md_PolicyRecord.Fields().ByName("policy") fd_PolicyRecord_management_graph = md_PolicyRecord.Fields().ByName("management_graph") fd_PolicyRecord_metadata = md_PolicyRecord.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_PolicyRecord)(nil) type fastReflection_PolicyRecord PolicyRecord func (x *PolicyRecord) ProtoReflect() protoreflect.Message { return (*fastReflection_PolicyRecord)(x) } func (x *PolicyRecord) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PolicyRecord_messageType fastReflection_PolicyRecord_messageType var _ protoreflect.MessageType = fastReflection_PolicyRecord_messageType{} type fastReflection_PolicyRecord_messageType struct{} func (x fastReflection_PolicyRecord_messageType) Zero() protoreflect.Message { return (*fastReflection_PolicyRecord)(nil) } func (x fastReflection_PolicyRecord_messageType) New() protoreflect.Message { return new(fastReflection_PolicyRecord) } func (x fastReflection_PolicyRecord_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PolicyRecord } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PolicyRecord) Descriptor() protoreflect.MessageDescriptor { return md_PolicyRecord } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PolicyRecord) Type() protoreflect.MessageType { return _fastReflection_PolicyRecord_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PolicyRecord) New() protoreflect.Message { return new(fastReflection_PolicyRecord) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PolicyRecord) Interface() protoreflect.ProtoMessage { return (*PolicyRecord)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PolicyRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != nil { value := protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) if !f(fd_PolicyRecord_policy, value) { return } } if x.ManagementGraph != nil { value := protoreflect.ValueOfMessage(x.ManagementGraph.ProtoReflect()) if !f(fd_PolicyRecord_management_graph, value) { return } } if len(x.Metadata) != 0 { value := protoreflect.ValueOfMap(&_PolicyRecord_3_map{m: &x.Metadata}) if !f(fd_PolicyRecord_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PolicyRecord) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyRecord.policy": return x.Policy != nil case "sourcenetwork.acp_core.PolicyRecord.management_graph": return x.ManagementGraph != nil case "sourcenetwork.acp_core.PolicyRecord.metadata": return len(x.Metadata) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyRecord does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyRecord.policy": x.Policy = nil case "sourcenetwork.acp_core.PolicyRecord.management_graph": x.ManagementGraph = nil case "sourcenetwork.acp_core.PolicyRecord.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyRecord does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PolicyRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.PolicyRecord.policy": value := x.Policy return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.PolicyRecord.management_graph": value := x.ManagementGraph return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.PolicyRecord.metadata": if len(x.Metadata) == 0 { return protoreflect.ValueOfMap(&_PolicyRecord_3_map{}) } mapValue := &_PolicyRecord_3_map{m: &x.Metadata} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyRecord does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyRecord.policy": x.Policy = value.Message().Interface().(*Policy) case "sourcenetwork.acp_core.PolicyRecord.management_graph": x.ManagementGraph = value.Message().Interface().(*ManagementGraph) case "sourcenetwork.acp_core.PolicyRecord.metadata": mv := value.Map() cmv := mv.(*_PolicyRecord_3_map) x.Metadata = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyRecord does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyRecord.policy": if x.Policy == nil { x.Policy = new(Policy) } return protoreflect.ValueOfMessage(x.Policy.ProtoReflect()) case "sourcenetwork.acp_core.PolicyRecord.management_graph": if x.ManagementGraph == nil { x.ManagementGraph = new(ManagementGraph) } return protoreflect.ValueOfMessage(x.ManagementGraph.ProtoReflect()) case "sourcenetwork.acp_core.PolicyRecord.metadata": if x.Metadata == nil { x.Metadata = make(map[string]string) } value := &_PolicyRecord_3_map{m: &x.Metadata} return protoreflect.ValueOfMap(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyRecord does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PolicyRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyRecord.policy": m := new(Policy) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.PolicyRecord.management_graph": m := new(ManagementGraph) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.PolicyRecord.metadata": m := make(map[string]string) return protoreflect.ValueOfMap(&_PolicyRecord_3_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyRecord does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PolicyRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.PolicyRecord", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PolicyRecord) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyRecord) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PolicyRecord) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PolicyRecord) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PolicyRecord) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Policy != nil { l = options.Size(x.Policy) n += 1 + l + runtime.Sov(uint64(l)) } if x.ManagementGraph != nil { l = options.Size(x.ManagementGraph) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Metadata) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Metadata[k] SiZeMaP(k, v) } } else { for k, v := range x.Metadata { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PolicyRecord) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Metadata) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForMetadata := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { keysForMetadata = append(keysForMetadata, string(k)) } sort.Slice(keysForMetadata, func(i, j int) bool { return keysForMetadata[i] < keysForMetadata[j] }) for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { v := x.Metadata[string(keysForMetadata[iNdEx])] out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Metadata { v := x.Metadata[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if x.ManagementGraph != nil { encoded, err := options.Marshal(x.ManagementGraph) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.Policy != nil { encoded, err := options.Marshal(x.Policy) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PolicyRecord) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyRecord: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Policy == nil { x.Policy = &Policy{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Policy); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ManagementGraph", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.ManagementGraph == nil { x.ManagementGraph = &ManagementGraph{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ManagementGraph); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Metadata[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.Map = (*_ManagementGraph_1_map)(nil) type _ManagementGraph_1_map struct { m *map[string]*ManagerNode } func (x *_ManagementGraph_1_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_ManagementGraph_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(mapKey, mapValue) { break } } } func (x *_ManagementGraph_1_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_ManagementGraph_1_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_ManagementGraph_1_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ManagementGraph_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ManagerNode) (*x.m)[concreteKey] = concreteValue } func (x *_ManagementGraph_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if ok { return protoreflect.ValueOfMessage(v.ProtoReflect()) } newValue := new(ManagerNode) (*x.m)[concreteKey] = newValue return protoreflect.ValueOfMessage(newValue.ProtoReflect()) } func (x *_ManagementGraph_1_map) NewValue() protoreflect.Value { v := new(ManagerNode) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ManagementGraph_1_map) IsValid() bool { return x.m != nil } var _ protoreflect.Map = (*_ManagementGraph_2_map)(nil) type _ManagementGraph_2_map struct { m *map[string]*ManagerEdges } func (x *_ManagementGraph_2_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_ManagementGraph_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(mapKey, mapValue) { break } } } func (x *_ManagementGraph_2_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_ManagementGraph_2_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_ManagementGraph_2_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ManagementGraph_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ManagerEdges) (*x.m)[concreteKey] = concreteValue } func (x *_ManagementGraph_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if ok { return protoreflect.ValueOfMessage(v.ProtoReflect()) } newValue := new(ManagerEdges) (*x.m)[concreteKey] = newValue return protoreflect.ValueOfMessage(newValue.ProtoReflect()) } func (x *_ManagementGraph_2_map) NewValue() protoreflect.Value { v := new(ManagerEdges) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ManagementGraph_2_map) IsValid() bool { return x.m != nil } var _ protoreflect.Map = (*_ManagementGraph_3_map)(nil) type _ManagementGraph_3_map struct { m *map[string]*ManagerEdges } func (x *_ManagementGraph_3_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_ManagementGraph_3_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(mapKey, mapValue) { break } } } func (x *_ManagementGraph_3_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_ManagementGraph_3_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_ManagementGraph_3_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ManagementGraph_3_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ManagerEdges) (*x.m)[concreteKey] = concreteValue } func (x *_ManagementGraph_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value { keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if ok { return protoreflect.ValueOfMessage(v.ProtoReflect()) } newValue := new(ManagerEdges) (*x.m)[concreteKey] = newValue return protoreflect.ValueOfMessage(newValue.ProtoReflect()) } func (x *_ManagementGraph_3_map) NewValue() protoreflect.Value { v := new(ManagerEdges) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ManagementGraph_3_map) IsValid() bool { return x.m != nil } var ( md_ManagementGraph protoreflect.MessageDescriptor fd_ManagementGraph_nodes protoreflect.FieldDescriptor fd_ManagementGraph_forward_edges protoreflect.FieldDescriptor fd_ManagementGraph_backward_edges protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_record_proto_init() md_ManagementGraph = File_sourcenetwork_acp_core_policy_record_proto.Messages().ByName("ManagementGraph") fd_ManagementGraph_nodes = md_ManagementGraph.Fields().ByName("nodes") fd_ManagementGraph_forward_edges = md_ManagementGraph.Fields().ByName("forward_edges") fd_ManagementGraph_backward_edges = md_ManagementGraph.Fields().ByName("backward_edges") } var _ protoreflect.Message = (*fastReflection_ManagementGraph)(nil) type fastReflection_ManagementGraph ManagementGraph func (x *ManagementGraph) ProtoReflect() protoreflect.Message { return (*fastReflection_ManagementGraph)(x) } func (x *ManagementGraph) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ManagementGraph_messageType fastReflection_ManagementGraph_messageType var _ protoreflect.MessageType = fastReflection_ManagementGraph_messageType{} type fastReflection_ManagementGraph_messageType struct{} func (x fastReflection_ManagementGraph_messageType) Zero() protoreflect.Message { return (*fastReflection_ManagementGraph)(nil) } func (x fastReflection_ManagementGraph_messageType) New() protoreflect.Message { return new(fastReflection_ManagementGraph) } func (x fastReflection_ManagementGraph_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ManagementGraph } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ManagementGraph) Descriptor() protoreflect.MessageDescriptor { return md_ManagementGraph } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ManagementGraph) Type() protoreflect.MessageType { return _fastReflection_ManagementGraph_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ManagementGraph) New() protoreflect.Message { return new(fastReflection_ManagementGraph) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ManagementGraph) Interface() protoreflect.ProtoMessage { return (*ManagementGraph)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ManagementGraph) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Nodes) != 0 { value := protoreflect.ValueOfMap(&_ManagementGraph_1_map{m: &x.Nodes}) if !f(fd_ManagementGraph_nodes, value) { return } } if len(x.ForwardEdges) != 0 { value := protoreflect.ValueOfMap(&_ManagementGraph_2_map{m: &x.ForwardEdges}) if !f(fd_ManagementGraph_forward_edges, value) { return } } if len(x.BackwardEdges) != 0 { value := protoreflect.ValueOfMap(&_ManagementGraph_3_map{m: &x.BackwardEdges}) if !f(fd_ManagementGraph_backward_edges, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ManagementGraph) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ManagementGraph.nodes": return len(x.Nodes) != 0 case "sourcenetwork.acp_core.ManagementGraph.forward_edges": return len(x.ForwardEdges) != 0 case "sourcenetwork.acp_core.ManagementGraph.backward_edges": return len(x.BackwardEdges) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagementGraph")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagementGraph does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagementGraph) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ManagementGraph.nodes": x.Nodes = nil case "sourcenetwork.acp_core.ManagementGraph.forward_edges": x.ForwardEdges = nil case "sourcenetwork.acp_core.ManagementGraph.backward_edges": x.BackwardEdges = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagementGraph")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagementGraph does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ManagementGraph) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ManagementGraph.nodes": if len(x.Nodes) == 0 { return protoreflect.ValueOfMap(&_ManagementGraph_1_map{}) } mapValue := &_ManagementGraph_1_map{m: &x.Nodes} return protoreflect.ValueOfMap(mapValue) case "sourcenetwork.acp_core.ManagementGraph.forward_edges": if len(x.ForwardEdges) == 0 { return protoreflect.ValueOfMap(&_ManagementGraph_2_map{}) } mapValue := &_ManagementGraph_2_map{m: &x.ForwardEdges} return protoreflect.ValueOfMap(mapValue) case "sourcenetwork.acp_core.ManagementGraph.backward_edges": if len(x.BackwardEdges) == 0 { return protoreflect.ValueOfMap(&_ManagementGraph_3_map{}) } mapValue := &_ManagementGraph_3_map{m: &x.BackwardEdges} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagementGraph")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagementGraph does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagementGraph) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ManagementGraph.nodes": mv := value.Map() cmv := mv.(*_ManagementGraph_1_map) x.Nodes = *cmv.m case "sourcenetwork.acp_core.ManagementGraph.forward_edges": mv := value.Map() cmv := mv.(*_ManagementGraph_2_map) x.ForwardEdges = *cmv.m case "sourcenetwork.acp_core.ManagementGraph.backward_edges": mv := value.Map() cmv := mv.(*_ManagementGraph_3_map) x.BackwardEdges = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagementGraph")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagementGraph does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagementGraph) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ManagementGraph.nodes": if x.Nodes == nil { x.Nodes = make(map[string]*ManagerNode) } value := &_ManagementGraph_1_map{m: &x.Nodes} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.ManagementGraph.forward_edges": if x.ForwardEdges == nil { x.ForwardEdges = make(map[string]*ManagerEdges) } value := &_ManagementGraph_2_map{m: &x.ForwardEdges} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.ManagementGraph.backward_edges": if x.BackwardEdges == nil { x.BackwardEdges = make(map[string]*ManagerEdges) } value := &_ManagementGraph_3_map{m: &x.BackwardEdges} return protoreflect.ValueOfMap(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagementGraph")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagementGraph does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ManagementGraph) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ManagementGraph.nodes": m := make(map[string]*ManagerNode) return protoreflect.ValueOfMap(&_ManagementGraph_1_map{m: &m}) case "sourcenetwork.acp_core.ManagementGraph.forward_edges": m := make(map[string]*ManagerEdges) return protoreflect.ValueOfMap(&_ManagementGraph_2_map{m: &m}) case "sourcenetwork.acp_core.ManagementGraph.backward_edges": m := make(map[string]*ManagerEdges) return protoreflect.ValueOfMap(&_ManagementGraph_3_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagementGraph")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagementGraph does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ManagementGraph) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ManagementGraph", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ManagementGraph) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagementGraph) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ManagementGraph) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ManagementGraph) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ManagementGraph) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Nodes) > 0 { SiZeMaP := func(k string, v *ManagerNode) { l := 0 if v != nil { l = options.Size(v) } l += 1 + runtime.Sov(uint64(l)) mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Nodes)) for k := range x.Nodes { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Nodes[k] SiZeMaP(k, v) } } else { for k, v := range x.Nodes { SiZeMaP(k, v) } } } if len(x.ForwardEdges) > 0 { SiZeMaP := func(k string, v *ManagerEdges) { l := 0 if v != nil { l = options.Size(v) } l += 1 + runtime.Sov(uint64(l)) mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.ForwardEdges)) for k := range x.ForwardEdges { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.ForwardEdges[k] SiZeMaP(k, v) } } else { for k, v := range x.ForwardEdges { SiZeMaP(k, v) } } } if len(x.BackwardEdges) > 0 { SiZeMaP := func(k string, v *ManagerEdges) { l := 0 if v != nil { l = options.Size(v) } l += 1 + runtime.Sov(uint64(l)) mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.BackwardEdges)) for k := range x.BackwardEdges { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.BackwardEdges[k] SiZeMaP(k, v) } } else { for k, v := range x.BackwardEdges { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ManagementGraph) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.BackwardEdges) > 0 { MaRsHaLmAp := func(k string, v *ManagerEdges) (protoiface.MarshalOutput, error) { baseI := i encoded, err := options.Marshal(v) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForBackwardEdges := make([]string, 0, len(x.BackwardEdges)) for k := range x.BackwardEdges { keysForBackwardEdges = append(keysForBackwardEdges, string(k)) } sort.Slice(keysForBackwardEdges, func(i, j int) bool { return keysForBackwardEdges[i] < keysForBackwardEdges[j] }) for iNdEx := len(keysForBackwardEdges) - 1; iNdEx >= 0; iNdEx-- { v := x.BackwardEdges[string(keysForBackwardEdges[iNdEx])] out, err := MaRsHaLmAp(keysForBackwardEdges[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.BackwardEdges { v := x.BackwardEdges[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if len(x.ForwardEdges) > 0 { MaRsHaLmAp := func(k string, v *ManagerEdges) (protoiface.MarshalOutput, error) { baseI := i encoded, err := options.Marshal(v) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForForwardEdges := make([]string, 0, len(x.ForwardEdges)) for k := range x.ForwardEdges { keysForForwardEdges = append(keysForForwardEdges, string(k)) } sort.Slice(keysForForwardEdges, func(i, j int) bool { return keysForForwardEdges[i] < keysForForwardEdges[j] }) for iNdEx := len(keysForForwardEdges) - 1; iNdEx >= 0; iNdEx-- { v := x.ForwardEdges[string(keysForForwardEdges[iNdEx])] out, err := MaRsHaLmAp(keysForForwardEdges[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.ForwardEdges { v := x.ForwardEdges[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if len(x.Nodes) > 0 { MaRsHaLmAp := func(k string, v *ManagerNode) (protoiface.MarshalOutput, error) { baseI := i encoded, err := options.Marshal(v) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForNodes := make([]string, 0, len(x.Nodes)) for k := range x.Nodes { keysForNodes = append(keysForNodes, string(k)) } sort.Slice(keysForNodes, func(i, j int) bool { return keysForNodes[i] < keysForNodes[j] }) for iNdEx := len(keysForNodes) - 1; iNdEx >= 0; iNdEx-- { v := x.Nodes[string(keysForNodes[iNdEx])] out, err := MaRsHaLmAp(keysForNodes[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Nodes { v := x.Nodes[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ManagementGraph) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ManagementGraph: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ManagementGraph: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Nodes == nil { x.Nodes = make(map[string]*ManagerNode) } var mapkey string var mapvalue *ManagerNode for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postmsgIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = &ManagerNode{} if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Nodes[mapkey] = mapvalue iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ForwardEdges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.ForwardEdges == nil { x.ForwardEdges = make(map[string]*ManagerEdges) } var mapkey string var mapvalue *ManagerEdges for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postmsgIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = &ManagerEdges{} if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.ForwardEdges[mapkey] = mapvalue iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BackwardEdges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.BackwardEdges == nil { x.BackwardEdges = make(map[string]*ManagerEdges) } var mapkey string var mapvalue *ManagerEdges for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postmsgIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = &ManagerEdges{} if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.BackwardEdges[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ManagerNode protoreflect.MessageDescriptor fd_ManagerNode_id protoreflect.FieldDescriptor fd_ManagerNode_text protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_record_proto_init() md_ManagerNode = File_sourcenetwork_acp_core_policy_record_proto.Messages().ByName("ManagerNode") fd_ManagerNode_id = md_ManagerNode.Fields().ByName("id") fd_ManagerNode_text = md_ManagerNode.Fields().ByName("text") } var _ protoreflect.Message = (*fastReflection_ManagerNode)(nil) type fastReflection_ManagerNode ManagerNode func (x *ManagerNode) ProtoReflect() protoreflect.Message { return (*fastReflection_ManagerNode)(x) } func (x *ManagerNode) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ManagerNode_messageType fastReflection_ManagerNode_messageType var _ protoreflect.MessageType = fastReflection_ManagerNode_messageType{} type fastReflection_ManagerNode_messageType struct{} func (x fastReflection_ManagerNode_messageType) Zero() protoreflect.Message { return (*fastReflection_ManagerNode)(nil) } func (x fastReflection_ManagerNode_messageType) New() protoreflect.Message { return new(fastReflection_ManagerNode) } func (x fastReflection_ManagerNode_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ManagerNode } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ManagerNode) Descriptor() protoreflect.MessageDescriptor { return md_ManagerNode } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ManagerNode) Type() protoreflect.MessageType { return _fastReflection_ManagerNode_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ManagerNode) New() protoreflect.Message { return new(fastReflection_ManagerNode) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ManagerNode) Interface() protoreflect.ProtoMessage { return (*ManagerNode)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ManagerNode) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_ManagerNode_id, value) { return } } if x.Text != "" { value := protoreflect.ValueOfString(x.Text) if !f(fd_ManagerNode_text, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ManagerNode) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerNode.id": return x.Id != "" case "sourcenetwork.acp_core.ManagerNode.text": return x.Text != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerNode")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerNode does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerNode) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerNode.id": x.Id = "" case "sourcenetwork.acp_core.ManagerNode.text": x.Text = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerNode")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerNode does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ManagerNode) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ManagerNode.id": value := x.Id return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ManagerNode.text": value := x.Text return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerNode")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerNode does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerNode) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerNode.id": x.Id = value.Interface().(string) case "sourcenetwork.acp_core.ManagerNode.text": x.Text = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerNode")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerNode does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerNode) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerNode.id": panic(fmt.Errorf("field id of message sourcenetwork.acp_core.ManagerNode is not mutable")) case "sourcenetwork.acp_core.ManagerNode.text": panic(fmt.Errorf("field text of message sourcenetwork.acp_core.ManagerNode is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerNode")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerNode does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ManagerNode) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerNode.id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ManagerNode.text": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerNode")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerNode does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ManagerNode) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ManagerNode", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ManagerNode) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerNode) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ManagerNode) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ManagerNode) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ManagerNode) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Text) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ManagerNode) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Text) > 0 { i -= len(x.Text) copy(dAtA[i:], x.Text) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Text))) i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ManagerNode) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ManagerNode: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ManagerNode: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Text = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.Map = (*_ManagerEdges_1_map)(nil) type _ManagerEdges_1_map struct { m *map[string]bool } func (x *_ManagerEdges_1_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_ManagerEdges_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfBool(v) if !f(mapKey, mapValue) { break } } } func (x *_ManagerEdges_1_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_ManagerEdges_1_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_ManagerEdges_1_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfBool(v) } func (x *_ManagerEdges_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.Bool() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_ManagerEdges_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_ManagerEdges_1_map) NewValue() protoreflect.Value { v := false return protoreflect.ValueOfBool(v) } func (x *_ManagerEdges_1_map) IsValid() bool { return x.m != nil } var ( md_ManagerEdges protoreflect.MessageDescriptor fd_ManagerEdges_edges protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_record_proto_init() md_ManagerEdges = File_sourcenetwork_acp_core_policy_record_proto.Messages().ByName("ManagerEdges") fd_ManagerEdges_edges = md_ManagerEdges.Fields().ByName("edges") } var _ protoreflect.Message = (*fastReflection_ManagerEdges)(nil) type fastReflection_ManagerEdges ManagerEdges func (x *ManagerEdges) ProtoReflect() protoreflect.Message { return (*fastReflection_ManagerEdges)(x) } func (x *ManagerEdges) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ManagerEdges_messageType fastReflection_ManagerEdges_messageType var _ protoreflect.MessageType = fastReflection_ManagerEdges_messageType{} type fastReflection_ManagerEdges_messageType struct{} func (x fastReflection_ManagerEdges_messageType) Zero() protoreflect.Message { return (*fastReflection_ManagerEdges)(nil) } func (x fastReflection_ManagerEdges_messageType) New() protoreflect.Message { return new(fastReflection_ManagerEdges) } func (x fastReflection_ManagerEdges_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ManagerEdges } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ManagerEdges) Descriptor() protoreflect.MessageDescriptor { return md_ManagerEdges } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ManagerEdges) Type() protoreflect.MessageType { return _fastReflection_ManagerEdges_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ManagerEdges) New() protoreflect.Message { return new(fastReflection_ManagerEdges) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ManagerEdges) Interface() protoreflect.ProtoMessage { return (*ManagerEdges)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ManagerEdges) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Edges) != 0 { value := protoreflect.ValueOfMap(&_ManagerEdges_1_map{m: &x.Edges}) if !f(fd_ManagerEdges_edges, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ManagerEdges) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerEdges.edges": return len(x.Edges) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerEdges")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerEdges does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerEdges) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerEdges.edges": x.Edges = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerEdges")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerEdges does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ManagerEdges) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ManagerEdges.edges": if len(x.Edges) == 0 { return protoreflect.ValueOfMap(&_ManagerEdges_1_map{}) } mapValue := &_ManagerEdges_1_map{m: &x.Edges} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerEdges")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerEdges does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerEdges) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerEdges.edges": mv := value.Map() cmv := mv.(*_ManagerEdges_1_map) x.Edges = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerEdges")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerEdges does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerEdges) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerEdges.edges": if x.Edges == nil { x.Edges = make(map[string]bool) } value := &_ManagerEdges_1_map{m: &x.Edges} return protoreflect.ValueOfMap(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerEdges")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerEdges does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ManagerEdges) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ManagerEdges.edges": m := make(map[string]bool) return protoreflect.ValueOfMap(&_ManagerEdges_1_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ManagerEdges")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ManagerEdges does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ManagerEdges) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ManagerEdges", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ManagerEdges) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ManagerEdges) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ManagerEdges) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ManagerEdges) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ManagerEdges) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if len(x.Edges) > 0 { SiZeMaP := func(k string, v bool) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + 1 n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Edges)) for k := range x.Edges { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Edges[k] SiZeMaP(k, v) } } else { for k, v := range x.Edges { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ManagerEdges) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Edges) > 0 { MaRsHaLmAp := func(k string, v bool) (protoiface.MarshalOutput, error) { baseI := i i-- if v { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForEdges := make([]string, 0, len(x.Edges)) for k := range x.Edges { keysForEdges = append(keysForEdges, string(k)) } sort.Slice(keysForEdges, func(i, j int) bool { return keysForEdges[i] < keysForEdges[j] }) for iNdEx := len(keysForEdges) - 1; iNdEx >= 0; iNdEx-- { v := x.Edges[string(keysForEdges[iNdEx])] out, err := MaRsHaLmAp(keysForEdges[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Edges { v := x.Edges[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ManagerEdges) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ManagerEdges: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ManagerEdges: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Edges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Edges == nil { x.Edges = make(map[string]bool) } var mapkey string var mapvalue bool for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapvaluetemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvaluetemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapvalue = bool(mapvaluetemp != 0) } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Edges[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/policy_record.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // PolicyRecord represents a the Policy Document which will be persisted in the data layer type PolicyRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` ManagementGraph *ManagementGraph `protobuf:"bytes,2,opt,name=management_graph,json=managementGraph,proto3" json:"management_graph,omitempty"` // metadata contains any application specific data // which was not supplied by the policy creator directly Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *PolicyRecord) Reset() { *x = PolicyRecord{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PolicyRecord) String() string { return protoimpl.X.MessageStringOf(x) } func (*PolicyRecord) ProtoMessage() {} // Deprecated: Use PolicyRecord.ProtoReflect.Descriptor instead. func (*PolicyRecord) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_record_proto_rawDescGZIP(), []int{0} } func (x *PolicyRecord) GetPolicy() *Policy { if x != nil { return x.Policy } return nil } func (x *PolicyRecord) GetManagementGraph() *ManagementGraph { if x != nil { return x.ManagementGraph } return nil } func (x *PolicyRecord) GetMetadata() map[string]string { if x != nil { return x.Metadata } return nil } // ManagementGraph represents a Policy's Relation Management Graph. // // The ManagementGraph is a directed graph which expresses the notion of Relation Management Authority. // Relation Management Authority is the idea that a certain set of relationships with relation R will be managed by an actor with relation RM. // Thus we can say RM manages R, meaning that if an actor A has a relationship 'actor {A} is a {RM} for {O}' where O is an object, // then Actor A can create relationships 'actor {S} is a {R} for {O}' for any actor S. // // Nodes in the Graph are Relations in a Policy. // Edges point from one Relation to another. // // NOTE: This proto definition should be treated as an *abstract data type*, // meaning that the fields should not be manually editted. type ManagementGraph struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // map of node id to node definition Nodes map[string]*ManagerNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // stores all edges leaving a node ForwardEdges map[string]*ManagerEdges `protobuf:"bytes,2,rep,name=forward_edges,json=forwardEdges,proto3" json:"forward_edges,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // stores all edges pointing to a node BackwardEdges map[string]*ManagerEdges `protobuf:"bytes,3,rep,name=backward_edges,json=backwardEdges,proto3" json:"backward_edges,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ManagementGraph) Reset() { *x = ManagementGraph{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ManagementGraph) String() string { return protoimpl.X.MessageStringOf(x) } func (*ManagementGraph) ProtoMessage() {} // Deprecated: Use ManagementGraph.ProtoReflect.Descriptor instead. func (*ManagementGraph) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_record_proto_rawDescGZIP(), []int{1} } func (x *ManagementGraph) GetNodes() map[string]*ManagerNode { if x != nil { return x.Nodes } return nil } func (x *ManagementGraph) GetForwardEdges() map[string]*ManagerEdges { if x != nil { return x.ForwardEdges } return nil } func (x *ManagementGraph) GetBackwardEdges() map[string]*ManagerEdges { if x != nil { return x.BackwardEdges } return nil } type ManagerNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` } func (x *ManagerNode) Reset() { *x = ManagerNode{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ManagerNode) String() string { return protoimpl.X.MessageStringOf(x) } func (*ManagerNode) ProtoMessage() {} // Deprecated: Use ManagerNode.ProtoReflect.Descriptor instead. func (*ManagerNode) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_record_proto_rawDescGZIP(), []int{2} } func (x *ManagerNode) GetId() string { if x != nil { return x.Id } return "" } func (x *ManagerNode) GetText() string { if x != nil { return x.Text } return "" } type ManagerEdges struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Edges map[string]bool `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } func (x *ManagerEdges) Reset() { *x = ManagerEdges{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_record_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ManagerEdges) String() string { return protoimpl.X.MessageStringOf(x) } func (*ManagerEdges) ProtoMessage() {} // Deprecated: Use ManagerEdges.ProtoReflect.Descriptor instead. func (*ManagerEdges) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_record_proto_rawDescGZIP(), []int{3} } func (x *ManagerEdges) GetEdges() map[string]bool { if x != nil { return x.Edges } return nil } var File_sourcenetwork_acp_core_policy_record_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_policy_record_proto_rawDesc = []byte{ 0x0a, 0x2a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x02, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x52, 0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x0f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcc, 0x04, 0x0a, 0x0f, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x48, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x5e, 0x0a, 0x0d, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x65, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x66, 0x0a, 0x12, 0x42, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, 0x0a, 0x0b, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x0c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x73, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x64, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xe3, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x11, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_policy_record_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_policy_record_proto_rawDescData = file_sourcenetwork_acp_core_policy_record_proto_rawDesc ) func file_sourcenetwork_acp_core_policy_record_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_policy_record_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_policy_record_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_policy_record_proto_rawDescData) }) return file_sourcenetwork_acp_core_policy_record_proto_rawDescData } var file_sourcenetwork_acp_core_policy_record_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_sourcenetwork_acp_core_policy_record_proto_goTypes = []interface{}{ (*PolicyRecord)(nil), // 0: sourcenetwork.acp_core.PolicyRecord (*ManagementGraph)(nil), // 1: sourcenetwork.acp_core.ManagementGraph (*ManagerNode)(nil), // 2: sourcenetwork.acp_core.ManagerNode (*ManagerEdges)(nil), // 3: sourcenetwork.acp_core.ManagerEdges nil, // 4: sourcenetwork.acp_core.PolicyRecord.MetadataEntry nil, // 5: sourcenetwork.acp_core.ManagementGraph.NodesEntry nil, // 6: sourcenetwork.acp_core.ManagementGraph.ForwardEdgesEntry nil, // 7: sourcenetwork.acp_core.ManagementGraph.BackwardEdgesEntry nil, // 8: sourcenetwork.acp_core.ManagerEdges.EdgesEntry (*Policy)(nil), // 9: sourcenetwork.acp_core.Policy } var file_sourcenetwork_acp_core_policy_record_proto_depIdxs = []int32{ 9, // 0: sourcenetwork.acp_core.PolicyRecord.policy:type_name -> sourcenetwork.acp_core.Policy 1, // 1: sourcenetwork.acp_core.PolicyRecord.management_graph:type_name -> sourcenetwork.acp_core.ManagementGraph 4, // 2: sourcenetwork.acp_core.PolicyRecord.metadata:type_name -> sourcenetwork.acp_core.PolicyRecord.MetadataEntry 5, // 3: sourcenetwork.acp_core.ManagementGraph.nodes:type_name -> sourcenetwork.acp_core.ManagementGraph.NodesEntry 6, // 4: sourcenetwork.acp_core.ManagementGraph.forward_edges:type_name -> sourcenetwork.acp_core.ManagementGraph.ForwardEdgesEntry 7, // 5: sourcenetwork.acp_core.ManagementGraph.backward_edges:type_name -> sourcenetwork.acp_core.ManagementGraph.BackwardEdgesEntry 8, // 6: sourcenetwork.acp_core.ManagerEdges.edges:type_name -> sourcenetwork.acp_core.ManagerEdges.EdgesEntry 2, // 7: sourcenetwork.acp_core.ManagementGraph.NodesEntry.value:type_name -> sourcenetwork.acp_core.ManagerNode 3, // 8: sourcenetwork.acp_core.ManagementGraph.ForwardEdgesEntry.value:type_name -> sourcenetwork.acp_core.ManagerEdges 3, // 9: sourcenetwork.acp_core.ManagementGraph.BackwardEdgesEntry.value:type_name -> sourcenetwork.acp_core.ManagerEdges 10, // [10:10] is the sub-list for method output_type 10, // [10:10] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name 10, // [10:10] is the sub-list for extension extendee 0, // [0:10] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_policy_record_proto_init() } func file_sourcenetwork_acp_core_policy_record_proto_init() { if File_sourcenetwork_acp_core_policy_record_proto != nil { return } file_sourcenetwork_acp_core_policy_proto_init() if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_policy_record_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolicyRecord); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_record_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ManagementGraph); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_record_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ManagerNode); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_record_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ManagerEdges); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_policy_record_proto_rawDesc, NumEnums: 0, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_policy_record_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_policy_record_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_policy_record_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_policy_record_proto = out.File file_sourcenetwork_acp_core_policy_record_proto_rawDesc = nil file_sourcenetwork_acp_core_policy_record_proto_goTypes = nil file_sourcenetwork_acp_core_policy_record_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/policy_short.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sort "sort" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) var _ protoreflect.Map = (*_PolicyShort_4_map)(nil) type _PolicyShort_4_map struct { m *map[string]string } func (x *_PolicyShort_4_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_PolicyShort_4_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_PolicyShort_4_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_PolicyShort_4_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_PolicyShort_4_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_PolicyShort_4_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_PolicyShort_4_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_PolicyShort_4_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_PolicyShort_4_map) IsValid() bool { return x.m != nil } var _ protoreflect.Map = (*_PolicyShort_5_map)(nil) type _PolicyShort_5_map struct { m *map[string]*ResourceShort } func (x *_PolicyShort_5_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_PolicyShort_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(mapKey, mapValue) { break } } } func (x *_PolicyShort_5_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_PolicyShort_5_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_PolicyShort_5_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_PolicyShort_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*ResourceShort) (*x.m)[concreteKey] = concreteValue } func (x *_PolicyShort_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if ok { return protoreflect.ValueOfMessage(v.ProtoReflect()) } newValue := new(ResourceShort) (*x.m)[concreteKey] = newValue return protoreflect.ValueOfMessage(newValue.ProtoReflect()) } func (x *_PolicyShort_5_map) NewValue() protoreflect.Value { v := new(ResourceShort) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_PolicyShort_5_map) IsValid() bool { return x.m != nil } var ( md_PolicyShort protoreflect.MessageDescriptor fd_PolicyShort_name protoreflect.FieldDescriptor fd_PolicyShort_description protoreflect.FieldDescriptor fd_PolicyShort_meta protoreflect.FieldDescriptor fd_PolicyShort_resources protoreflect.FieldDescriptor fd_PolicyShort_actor protoreflect.FieldDescriptor fd_PolicyShort_version protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_short_proto_init() md_PolicyShort = File_sourcenetwork_acp_core_policy_short_proto.Messages().ByName("PolicyShort") fd_PolicyShort_name = md_PolicyShort.Fields().ByName("name") fd_PolicyShort_description = md_PolicyShort.Fields().ByName("description") fd_PolicyShort_meta = md_PolicyShort.Fields().ByName("meta") fd_PolicyShort_resources = md_PolicyShort.Fields().ByName("resources") fd_PolicyShort_actor = md_PolicyShort.Fields().ByName("actor") fd_PolicyShort_version = md_PolicyShort.Fields().ByName("version") } var _ protoreflect.Message = (*fastReflection_PolicyShort)(nil) type fastReflection_PolicyShort PolicyShort func (x *PolicyShort) ProtoReflect() protoreflect.Message { return (*fastReflection_PolicyShort)(x) } func (x *PolicyShort) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PolicyShort_messageType fastReflection_PolicyShort_messageType var _ protoreflect.MessageType = fastReflection_PolicyShort_messageType{} type fastReflection_PolicyShort_messageType struct{} func (x fastReflection_PolicyShort_messageType) Zero() protoreflect.Message { return (*fastReflection_PolicyShort)(nil) } func (x fastReflection_PolicyShort_messageType) New() protoreflect.Message { return new(fastReflection_PolicyShort) } func (x fastReflection_PolicyShort_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PolicyShort } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PolicyShort) Descriptor() protoreflect.MessageDescriptor { return md_PolicyShort } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PolicyShort) Type() protoreflect.MessageType { return _fastReflection_PolicyShort_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PolicyShort) New() protoreflect.Message { return new(fastReflection_PolicyShort) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PolicyShort) Interface() protoreflect.ProtoMessage { return (*PolicyShort)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PolicyShort) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Name != "" { value := protoreflect.ValueOfString(x.Name) if !f(fd_PolicyShort_name, value) { return } } if x.Description != "" { value := protoreflect.ValueOfString(x.Description) if !f(fd_PolicyShort_description, value) { return } } if len(x.Meta) != 0 { value := protoreflect.ValueOfMap(&_PolicyShort_4_map{m: &x.Meta}) if !f(fd_PolicyShort_meta, value) { return } } if len(x.Resources) != 0 { value := protoreflect.ValueOfMap(&_PolicyShort_5_map{m: &x.Resources}) if !f(fd_PolicyShort_resources, value) { return } } if x.Actor != nil { value := protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) if !f(fd_PolicyShort_actor, value) { return } } if x.Version != "" { value := protoreflect.ValueOfString(x.Version) if !f(fd_PolicyShort_version, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PolicyShort) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyShort.name": return x.Name != "" case "sourcenetwork.acp_core.PolicyShort.description": return x.Description != "" case "sourcenetwork.acp_core.PolicyShort.meta": return len(x.Meta) != 0 case "sourcenetwork.acp_core.PolicyShort.resources": return len(x.Resources) != 0 case "sourcenetwork.acp_core.PolicyShort.actor": return x.Actor != nil case "sourcenetwork.acp_core.PolicyShort.version": return x.Version != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyShort does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyShort) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyShort.name": x.Name = "" case "sourcenetwork.acp_core.PolicyShort.description": x.Description = "" case "sourcenetwork.acp_core.PolicyShort.meta": x.Meta = nil case "sourcenetwork.acp_core.PolicyShort.resources": x.Resources = nil case "sourcenetwork.acp_core.PolicyShort.actor": x.Actor = nil case "sourcenetwork.acp_core.PolicyShort.version": x.Version = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyShort does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PolicyShort) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.PolicyShort.name": value := x.Name return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.PolicyShort.description": value := x.Description return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.PolicyShort.meta": if len(x.Meta) == 0 { return protoreflect.ValueOfMap(&_PolicyShort_4_map{}) } mapValue := &_PolicyShort_4_map{m: &x.Meta} return protoreflect.ValueOfMap(mapValue) case "sourcenetwork.acp_core.PolicyShort.resources": if len(x.Resources) == 0 { return protoreflect.ValueOfMap(&_PolicyShort_5_map{}) } mapValue := &_PolicyShort_5_map{m: &x.Resources} return protoreflect.ValueOfMap(mapValue) case "sourcenetwork.acp_core.PolicyShort.actor": value := x.Actor return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.PolicyShort.version": value := x.Version return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyShort does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyShort) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyShort.name": x.Name = value.Interface().(string) case "sourcenetwork.acp_core.PolicyShort.description": x.Description = value.Interface().(string) case "sourcenetwork.acp_core.PolicyShort.meta": mv := value.Map() cmv := mv.(*_PolicyShort_4_map) x.Meta = *cmv.m case "sourcenetwork.acp_core.PolicyShort.resources": mv := value.Map() cmv := mv.(*_PolicyShort_5_map) x.Resources = *cmv.m case "sourcenetwork.acp_core.PolicyShort.actor": x.Actor = value.Message().Interface().(*ActorResource) case "sourcenetwork.acp_core.PolicyShort.version": x.Version = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyShort does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyShort) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyShort.meta": if x.Meta == nil { x.Meta = make(map[string]string) } value := &_PolicyShort_4_map{m: &x.Meta} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.PolicyShort.resources": if x.Resources == nil { x.Resources = make(map[string]*ResourceShort) } value := &_PolicyShort_5_map{m: &x.Resources} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.PolicyShort.actor": if x.Actor == nil { x.Actor = new(ActorResource) } return protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) case "sourcenetwork.acp_core.PolicyShort.name": panic(fmt.Errorf("field name of message sourcenetwork.acp_core.PolicyShort is not mutable")) case "sourcenetwork.acp_core.PolicyShort.description": panic(fmt.Errorf("field description of message sourcenetwork.acp_core.PolicyShort is not mutable")) case "sourcenetwork.acp_core.PolicyShort.version": panic(fmt.Errorf("field version of message sourcenetwork.acp_core.PolicyShort is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyShort does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PolicyShort) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PolicyShort.name": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.PolicyShort.description": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.PolicyShort.meta": m := make(map[string]string) return protoreflect.ValueOfMap(&_PolicyShort_4_map{m: &m}) case "sourcenetwork.acp_core.PolicyShort.resources": m := make(map[string]*ResourceShort) return protoreflect.ValueOfMap(&_PolicyShort_5_map{m: &m}) case "sourcenetwork.acp_core.PolicyShort.actor": m := new(ActorResource) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.PolicyShort.version": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PolicyShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PolicyShort does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PolicyShort) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.PolicyShort", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PolicyShort) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PolicyShort) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PolicyShort) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PolicyShort) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PolicyShort) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Description) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Meta) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Meta)) for k := range x.Meta { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Meta[k] SiZeMaP(k, v) } } else { for k, v := range x.Meta { SiZeMaP(k, v) } } } if len(x.Resources) > 0 { SiZeMaP := func(k string, v *ResourceShort) { l := 0 if v != nil { l = options.Size(v) } l += 1 + runtime.Sov(uint64(l)) mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Resources)) for k := range x.Resources { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Resources[k] SiZeMaP(k, v) } } else { for k, v := range x.Resources { SiZeMaP(k, v) } } } if x.Actor != nil { l = options.Size(x.Actor) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Version) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PolicyShort) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Version) > 0 { i -= len(x.Version) copy(dAtA[i:], x.Version) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) i-- dAtA[i] = 0x3a } if x.Actor != nil { encoded, err := options.Marshal(x.Actor) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } if len(x.Resources) > 0 { MaRsHaLmAp := func(k string, v *ResourceShort) (protoiface.MarshalOutput, error) { baseI := i encoded, err := options.Marshal(v) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x2a return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForResources := make([]string, 0, len(x.Resources)) for k := range x.Resources { keysForResources = append(keysForResources, string(k)) } sort.Slice(keysForResources, func(i, j int) bool { return keysForResources[i] < keysForResources[j] }) for iNdEx := len(keysForResources) - 1; iNdEx >= 0; iNdEx-- { v := x.Resources[string(keysForResources[iNdEx])] out, err := MaRsHaLmAp(keysForResources[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Resources { v := x.Resources[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if len(x.Meta) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForMeta := make([]string, 0, len(x.Meta)) for k := range x.Meta { keysForMeta = append(keysForMeta, string(k)) } sort.Slice(keysForMeta, func(i, j int) bool { return keysForMeta[i] < keysForMeta[j] }) for iNdEx := len(keysForMeta) - 1; iNdEx >= 0; iNdEx-- { v := x.Meta[string(keysForMeta[iNdEx])] out, err := MaRsHaLmAp(keysForMeta[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Meta { v := x.Meta[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if len(x.Description) > 0 { i -= len(x.Description) copy(dAtA[i:], x.Description) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) i-- dAtA[i] = 0x12 } if len(x.Name) > 0 { i -= len(x.Name) copy(dAtA[i:], x.Name) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PolicyShort) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyShort: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PolicyShort: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Meta == nil { x.Meta = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Meta[mapkey] = mapvalue iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Resources == nil { x.Resources = make(map[string]*ResourceShort) } var mapkey string var mapvalue *ResourceShort for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postmsgIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = &ResourceShort{} if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Resources[mapkey] = mapvalue iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Actor == nil { x.Actor = &ActorResource{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Actor); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.Map = (*_ResourceShort_2_map)(nil) type _ResourceShort_2_map struct { m *map[string]*PermissionShort } func (x *_ResourceShort_2_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_ResourceShort_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(mapKey, mapValue) { break } } } func (x *_ResourceShort_2_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_ResourceShort_2_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_ResourceShort_2_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ResourceShort_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*PermissionShort) (*x.m)[concreteKey] = concreteValue } func (x *_ResourceShort_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if ok { return protoreflect.ValueOfMessage(v.ProtoReflect()) } newValue := new(PermissionShort) (*x.m)[concreteKey] = newValue return protoreflect.ValueOfMessage(newValue.ProtoReflect()) } func (x *_ResourceShort_2_map) NewValue() protoreflect.Value { v := new(PermissionShort) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ResourceShort_2_map) IsValid() bool { return x.m != nil } var _ protoreflect.Map = (*_ResourceShort_3_map)(nil) type _ResourceShort_3_map struct { m *map[string]*RelationShort } func (x *_ResourceShort_3_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_ResourceShort_3_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(mapKey, mapValue) { break } } } func (x *_ResourceShort_3_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_ResourceShort_3_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_ResourceShort_3_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ResourceShort_3_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*RelationShort) (*x.m)[concreteKey] = concreteValue } func (x *_ResourceShort_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value { keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if ok { return protoreflect.ValueOfMessage(v.ProtoReflect()) } newValue := new(RelationShort) (*x.m)[concreteKey] = newValue return protoreflect.ValueOfMessage(newValue.ProtoReflect()) } func (x *_ResourceShort_3_map) NewValue() protoreflect.Value { v := new(RelationShort) return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_ResourceShort_3_map) IsValid() bool { return x.m != nil } var ( md_ResourceShort protoreflect.MessageDescriptor fd_ResourceShort_doc protoreflect.FieldDescriptor fd_ResourceShort_permissions protoreflect.FieldDescriptor fd_ResourceShort_relations protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_short_proto_init() md_ResourceShort = File_sourcenetwork_acp_core_policy_short_proto.Messages().ByName("ResourceShort") fd_ResourceShort_doc = md_ResourceShort.Fields().ByName("doc") fd_ResourceShort_permissions = md_ResourceShort.Fields().ByName("permissions") fd_ResourceShort_relations = md_ResourceShort.Fields().ByName("relations") } var _ protoreflect.Message = (*fastReflection_ResourceShort)(nil) type fastReflection_ResourceShort ResourceShort func (x *ResourceShort) ProtoReflect() protoreflect.Message { return (*fastReflection_ResourceShort)(x) } func (x *ResourceShort) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ResourceShort_messageType fastReflection_ResourceShort_messageType var _ protoreflect.MessageType = fastReflection_ResourceShort_messageType{} type fastReflection_ResourceShort_messageType struct{} func (x fastReflection_ResourceShort_messageType) Zero() protoreflect.Message { return (*fastReflection_ResourceShort)(nil) } func (x fastReflection_ResourceShort_messageType) New() protoreflect.Message { return new(fastReflection_ResourceShort) } func (x fastReflection_ResourceShort_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ResourceShort } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ResourceShort) Descriptor() protoreflect.MessageDescriptor { return md_ResourceShort } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ResourceShort) Type() protoreflect.MessageType { return _fastReflection_ResourceShort_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ResourceShort) New() protoreflect.Message { return new(fastReflection_ResourceShort) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ResourceShort) Interface() protoreflect.ProtoMessage { return (*ResourceShort)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ResourceShort) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Doc != "" { value := protoreflect.ValueOfString(x.Doc) if !f(fd_ResourceShort_doc, value) { return } } if len(x.Permissions) != 0 { value := protoreflect.ValueOfMap(&_ResourceShort_2_map{m: &x.Permissions}) if !f(fd_ResourceShort_permissions, value) { return } } if len(x.Relations) != 0 { value := protoreflect.ValueOfMap(&_ResourceShort_3_map{m: &x.Relations}) if !f(fd_ResourceShort_relations, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ResourceShort) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ResourceShort.doc": return x.Doc != "" case "sourcenetwork.acp_core.ResourceShort.permissions": return len(x.Permissions) != 0 case "sourcenetwork.acp_core.ResourceShort.relations": return len(x.Relations) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ResourceShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ResourceShort does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ResourceShort) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ResourceShort.doc": x.Doc = "" case "sourcenetwork.acp_core.ResourceShort.permissions": x.Permissions = nil case "sourcenetwork.acp_core.ResourceShort.relations": x.Relations = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ResourceShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ResourceShort does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ResourceShort) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ResourceShort.doc": value := x.Doc return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.ResourceShort.permissions": if len(x.Permissions) == 0 { return protoreflect.ValueOfMap(&_ResourceShort_2_map{}) } mapValue := &_ResourceShort_2_map{m: &x.Permissions} return protoreflect.ValueOfMap(mapValue) case "sourcenetwork.acp_core.ResourceShort.relations": if len(x.Relations) == 0 { return protoreflect.ValueOfMap(&_ResourceShort_3_map{}) } mapValue := &_ResourceShort_3_map{m: &x.Relations} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ResourceShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ResourceShort does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ResourceShort) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ResourceShort.doc": x.Doc = value.Interface().(string) case "sourcenetwork.acp_core.ResourceShort.permissions": mv := value.Map() cmv := mv.(*_ResourceShort_2_map) x.Permissions = *cmv.m case "sourcenetwork.acp_core.ResourceShort.relations": mv := value.Map() cmv := mv.(*_ResourceShort_3_map) x.Relations = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ResourceShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ResourceShort does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ResourceShort) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ResourceShort.permissions": if x.Permissions == nil { x.Permissions = make(map[string]*PermissionShort) } value := &_ResourceShort_2_map{m: &x.Permissions} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.ResourceShort.relations": if x.Relations == nil { x.Relations = make(map[string]*RelationShort) } value := &_ResourceShort_3_map{m: &x.Relations} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.ResourceShort.doc": panic(fmt.Errorf("field doc of message sourcenetwork.acp_core.ResourceShort is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ResourceShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ResourceShort does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ResourceShort) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ResourceShort.doc": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.ResourceShort.permissions": m := make(map[string]*PermissionShort) return protoreflect.ValueOfMap(&_ResourceShort_2_map{m: &m}) case "sourcenetwork.acp_core.ResourceShort.relations": m := make(map[string]*RelationShort) return protoreflect.ValueOfMap(&_ResourceShort_3_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ResourceShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ResourceShort does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ResourceShort) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ResourceShort", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ResourceShort) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ResourceShort) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ResourceShort) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ResourceShort) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ResourceShort) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Doc) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Permissions) > 0 { SiZeMaP := func(k string, v *PermissionShort) { l := 0 if v != nil { l = options.Size(v) } l += 1 + runtime.Sov(uint64(l)) mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Permissions)) for k := range x.Permissions { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Permissions[k] SiZeMaP(k, v) } } else { for k, v := range x.Permissions { SiZeMaP(k, v) } } } if len(x.Relations) > 0 { SiZeMaP := func(k string, v *RelationShort) { l := 0 if v != nil { l = options.Size(v) } l += 1 + runtime.Sov(uint64(l)) mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Relations)) for k := range x.Relations { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Relations[k] SiZeMaP(k, v) } } else { for k, v := range x.Relations { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ResourceShort) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Relations) > 0 { MaRsHaLmAp := func(k string, v *RelationShort) (protoiface.MarshalOutput, error) { baseI := i encoded, err := options.Marshal(v) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForRelations := make([]string, 0, len(x.Relations)) for k := range x.Relations { keysForRelations = append(keysForRelations, string(k)) } sort.Slice(keysForRelations, func(i, j int) bool { return keysForRelations[i] < keysForRelations[j] }) for iNdEx := len(keysForRelations) - 1; iNdEx >= 0; iNdEx-- { v := x.Relations[string(keysForRelations[iNdEx])] out, err := MaRsHaLmAp(keysForRelations[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Relations { v := x.Relations[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if len(x.Permissions) > 0 { MaRsHaLmAp := func(k string, v *PermissionShort) (protoiface.MarshalOutput, error) { baseI := i encoded, err := options.Marshal(v) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForPermissions := make([]string, 0, len(x.Permissions)) for k := range x.Permissions { keysForPermissions = append(keysForPermissions, string(k)) } sort.Slice(keysForPermissions, func(i, j int) bool { return keysForPermissions[i] < keysForPermissions[j] }) for iNdEx := len(keysForPermissions) - 1; iNdEx >= 0; iNdEx-- { v := x.Permissions[string(keysForPermissions[iNdEx])] out, err := MaRsHaLmAp(keysForPermissions[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Permissions { v := x.Permissions[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if len(x.Doc) > 0 { i -= len(x.Doc) copy(dAtA[i:], x.Doc) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Doc))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ResourceShort) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResourceShort: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResourceShort: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Doc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Permissions == nil { x.Permissions = make(map[string]*PermissionShort) } var mapkey string var mapvalue *PermissionShort for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postmsgIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = &PermissionShort{} if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Permissions[mapkey] = mapvalue iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Relations == nil { x.Relations = make(map[string]*RelationShort) } var mapkey string var mapvalue *RelationShort for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postmsgIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = &RelationShort{} if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Relations[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.List = (*_RelationShort_2_list)(nil) type _RelationShort_2_list struct { list *[]string } func (x *_RelationShort_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_RelationShort_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } func (x *_RelationShort_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_RelationShort_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_RelationShort_2_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message RelationShort at list field Manages as it is not of Message kind")) } func (x *_RelationShort_2_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_RelationShort_2_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_RelationShort_2_list) IsValid() bool { return x.list != nil } var _ protoreflect.List = (*_RelationShort_3_list)(nil) type _RelationShort_3_list struct { list *[]string } func (x *_RelationShort_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } func (x *_RelationShort_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } func (x *_RelationShort_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_RelationShort_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } func (x *_RelationShort_3_list) AppendMutable() protoreflect.Value { panic(fmt.Errorf("AppendMutable can not be called on message RelationShort at list field Types as it is not of Message kind")) } func (x *_RelationShort_3_list) Truncate(n int) { *x.list = (*x.list)[:n] } func (x *_RelationShort_3_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_RelationShort_3_list) IsValid() bool { return x.list != nil } var ( md_RelationShort protoreflect.MessageDescriptor fd_RelationShort_doc protoreflect.FieldDescriptor fd_RelationShort_manages protoreflect.FieldDescriptor fd_RelationShort_types protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_short_proto_init() md_RelationShort = File_sourcenetwork_acp_core_policy_short_proto.Messages().ByName("RelationShort") fd_RelationShort_doc = md_RelationShort.Fields().ByName("doc") fd_RelationShort_manages = md_RelationShort.Fields().ByName("manages") fd_RelationShort_types = md_RelationShort.Fields().ByName("types") } var _ protoreflect.Message = (*fastReflection_RelationShort)(nil) type fastReflection_RelationShort RelationShort func (x *RelationShort) ProtoReflect() protoreflect.Message { return (*fastReflection_RelationShort)(x) } func (x *RelationShort) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RelationShort_messageType fastReflection_RelationShort_messageType var _ protoreflect.MessageType = fastReflection_RelationShort_messageType{} type fastReflection_RelationShort_messageType struct{} func (x fastReflection_RelationShort_messageType) Zero() protoreflect.Message { return (*fastReflection_RelationShort)(nil) } func (x fastReflection_RelationShort_messageType) New() protoreflect.Message { return new(fastReflection_RelationShort) } func (x fastReflection_RelationShort_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RelationShort } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RelationShort) Descriptor() protoreflect.MessageDescriptor { return md_RelationShort } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RelationShort) Type() protoreflect.MessageType { return _fastReflection_RelationShort_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RelationShort) New() protoreflect.Message { return new(fastReflection_RelationShort) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RelationShort) Interface() protoreflect.ProtoMessage { return (*RelationShort)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RelationShort) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Doc != "" { value := protoreflect.ValueOfString(x.Doc) if !f(fd_RelationShort_doc, value) { return } } if len(x.Manages) != 0 { value := protoreflect.ValueOfList(&_RelationShort_2_list{list: &x.Manages}) if !f(fd_RelationShort_manages, value) { return } } if len(x.Types) != 0 { value := protoreflect.ValueOfList(&_RelationShort_3_list{list: &x.Types}) if !f(fd_RelationShort_types, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RelationShort) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.RelationShort.doc": return x.Doc != "" case "sourcenetwork.acp_core.RelationShort.manages": return len(x.Manages) != 0 case "sourcenetwork.acp_core.RelationShort.types": return len(x.Types) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationShort does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationShort) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationShort.doc": x.Doc = "" case "sourcenetwork.acp_core.RelationShort.manages": x.Manages = nil case "sourcenetwork.acp_core.RelationShort.types": x.Types = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationShort does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RelationShort) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.RelationShort.doc": value := x.Doc return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.RelationShort.manages": if len(x.Manages) == 0 { return protoreflect.ValueOfList(&_RelationShort_2_list{}) } listValue := &_RelationShort_2_list{list: &x.Manages} return protoreflect.ValueOfList(listValue) case "sourcenetwork.acp_core.RelationShort.types": if len(x.Types) == 0 { return protoreflect.ValueOfList(&_RelationShort_3_list{}) } listValue := &_RelationShort_3_list{list: &x.Types} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationShort does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationShort) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationShort.doc": x.Doc = value.Interface().(string) case "sourcenetwork.acp_core.RelationShort.manages": lv := value.List() clv := lv.(*_RelationShort_2_list) x.Manages = *clv.list case "sourcenetwork.acp_core.RelationShort.types": lv := value.List() clv := lv.(*_RelationShort_3_list) x.Types = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationShort does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationShort) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationShort.manages": if x.Manages == nil { x.Manages = []string{} } value := &_RelationShort_2_list{list: &x.Manages} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.RelationShort.types": if x.Types == nil { x.Types = []string{} } value := &_RelationShort_3_list{list: &x.Types} return protoreflect.ValueOfList(value) case "sourcenetwork.acp_core.RelationShort.doc": panic(fmt.Errorf("field doc of message sourcenetwork.acp_core.RelationShort is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationShort does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RelationShort) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationShort.doc": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.RelationShort.manages": list := []string{} return protoreflect.ValueOfList(&_RelationShort_2_list{list: &list}) case "sourcenetwork.acp_core.RelationShort.types": list := []string{} return protoreflect.ValueOfList(&_RelationShort_3_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationShort does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RelationShort) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.RelationShort", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RelationShort) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationShort) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RelationShort) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RelationShort) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RelationShort) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Doc) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Manages) > 0 { for _, s := range x.Manages { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.Types) > 0 { for _, s := range x.Types { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RelationShort) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Types) > 0 { for iNdEx := len(x.Types) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.Types[iNdEx]) copy(dAtA[i:], x.Types[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Types[iNdEx]))) i-- dAtA[i] = 0x1a } } if len(x.Manages) > 0 { for iNdEx := len(x.Manages) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.Manages[iNdEx]) copy(dAtA[i:], x.Manages[iNdEx]) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Manages[iNdEx]))) i-- dAtA[i] = 0x12 } } if len(x.Doc) > 0 { i -= len(x.Doc) copy(dAtA[i:], x.Doc) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Doc))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RelationShort) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationShort: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationShort: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Doc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Manages", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Manages = append(x.Manages, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Types", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Types = append(x.Types, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_PermissionShort protoreflect.MessageDescriptor fd_PermissionShort_doc protoreflect.FieldDescriptor fd_PermissionShort_expr protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_short_proto_init() md_PermissionShort = File_sourcenetwork_acp_core_policy_short_proto.Messages().ByName("PermissionShort") fd_PermissionShort_doc = md_PermissionShort.Fields().ByName("doc") fd_PermissionShort_expr = md_PermissionShort.Fields().ByName("expr") } var _ protoreflect.Message = (*fastReflection_PermissionShort)(nil) type fastReflection_PermissionShort PermissionShort func (x *PermissionShort) ProtoReflect() protoreflect.Message { return (*fastReflection_PermissionShort)(x) } func (x *PermissionShort) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_PermissionShort_messageType fastReflection_PermissionShort_messageType var _ protoreflect.MessageType = fastReflection_PermissionShort_messageType{} type fastReflection_PermissionShort_messageType struct{} func (x fastReflection_PermissionShort_messageType) Zero() protoreflect.Message { return (*fastReflection_PermissionShort)(nil) } func (x fastReflection_PermissionShort_messageType) New() protoreflect.Message { return new(fastReflection_PermissionShort) } func (x fastReflection_PermissionShort_messageType) Descriptor() protoreflect.MessageDescriptor { return md_PermissionShort } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_PermissionShort) Descriptor() protoreflect.MessageDescriptor { return md_PermissionShort } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_PermissionShort) Type() protoreflect.MessageType { return _fastReflection_PermissionShort_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_PermissionShort) New() protoreflect.Message { return new(fastReflection_PermissionShort) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_PermissionShort) Interface() protoreflect.ProtoMessage { return (*PermissionShort)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PermissionShort) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Doc != "" { value := protoreflect.ValueOfString(x.Doc) if !f(fd_PermissionShort_doc, value) { return } } if x.Expr != "" { value := protoreflect.ValueOfString(x.Expr) if !f(fd_PermissionShort_expr, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_PermissionShort) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.PermissionShort.doc": return x.Doc != "" case "sourcenetwork.acp_core.PermissionShort.expr": return x.Expr != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PermissionShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PermissionShort does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PermissionShort) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.PermissionShort.doc": x.Doc = "" case "sourcenetwork.acp_core.PermissionShort.expr": x.Expr = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PermissionShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PermissionShort does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PermissionShort) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.PermissionShort.doc": value := x.Doc return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.PermissionShort.expr": value := x.Expr return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PermissionShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PermissionShort does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PermissionShort) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.PermissionShort.doc": x.Doc = value.Interface().(string) case "sourcenetwork.acp_core.PermissionShort.expr": x.Expr = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PermissionShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PermissionShort does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PermissionShort) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PermissionShort.doc": panic(fmt.Errorf("field doc of message sourcenetwork.acp_core.PermissionShort is not mutable")) case "sourcenetwork.acp_core.PermissionShort.expr": panic(fmt.Errorf("field expr of message sourcenetwork.acp_core.PermissionShort is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PermissionShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PermissionShort does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PermissionShort) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.PermissionShort.doc": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.PermissionShort.expr": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.PermissionShort")) } panic(fmt.Errorf("message sourcenetwork.acp_core.PermissionShort does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_PermissionShort) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.PermissionShort", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_PermissionShort) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PermissionShort) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_PermissionShort) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_PermissionShort) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*PermissionShort) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Doc) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Expr) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*PermissionShort) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Expr) > 0 { i -= len(x.Expr) copy(dAtA[i:], x.Expr) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Expr))) i-- dAtA[i] = 0x12 } if len(x.Doc) > 0 { i -= len(x.Doc) copy(dAtA[i:], x.Doc) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Doc))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*PermissionShort) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PermissionShort: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PermissionShort: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Doc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Expr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_MarshaledPolicy protoreflect.MessageDescriptor fd_MarshaledPolicy_policy protoreflect.FieldDescriptor fd_MarshaledPolicy_type protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_policy_short_proto_init() md_MarshaledPolicy = File_sourcenetwork_acp_core_policy_short_proto.Messages().ByName("MarshaledPolicy") fd_MarshaledPolicy_policy = md_MarshaledPolicy.Fields().ByName("policy") fd_MarshaledPolicy_type = md_MarshaledPolicy.Fields().ByName("type") } var _ protoreflect.Message = (*fastReflection_MarshaledPolicy)(nil) type fastReflection_MarshaledPolicy MarshaledPolicy func (x *MarshaledPolicy) ProtoReflect() protoreflect.Message { return (*fastReflection_MarshaledPolicy)(x) } func (x *MarshaledPolicy) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_MarshaledPolicy_messageType fastReflection_MarshaledPolicy_messageType var _ protoreflect.MessageType = fastReflection_MarshaledPolicy_messageType{} type fastReflection_MarshaledPolicy_messageType struct{} func (x fastReflection_MarshaledPolicy_messageType) Zero() protoreflect.Message { return (*fastReflection_MarshaledPolicy)(nil) } func (x fastReflection_MarshaledPolicy_messageType) New() protoreflect.Message { return new(fastReflection_MarshaledPolicy) } func (x fastReflection_MarshaledPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MarshaledPolicy } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MarshaledPolicy) Descriptor() protoreflect.MessageDescriptor { return md_MarshaledPolicy } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_MarshaledPolicy) Type() protoreflect.MessageType { return _fastReflection_MarshaledPolicy_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_MarshaledPolicy) New() protoreflect.Message { return new(fastReflection_MarshaledPolicy) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MarshaledPolicy) Interface() protoreflect.ProtoMessage { return (*MarshaledPolicy)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MarshaledPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Policy != "" { value := protoreflect.ValueOfString(x.Policy) if !f(fd_MarshaledPolicy_policy, value) { return } } if x.Type_ != 0 { value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) if !f(fd_MarshaledPolicy_type, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_MarshaledPolicy) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.MarshaledPolicy.policy": return x.Policy != "" case "sourcenetwork.acp_core.MarshaledPolicy.type": return x.Type_ != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.MarshaledPolicy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.MarshaledPolicy does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MarshaledPolicy) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.MarshaledPolicy.policy": x.Policy = "" case "sourcenetwork.acp_core.MarshaledPolicy.type": x.Type_ = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.MarshaledPolicy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.MarshaledPolicy does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MarshaledPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.MarshaledPolicy.policy": value := x.Policy return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.MarshaledPolicy.type": value := x.Type_ return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.MarshaledPolicy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.MarshaledPolicy does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MarshaledPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.MarshaledPolicy.policy": x.Policy = value.Interface().(string) case "sourcenetwork.acp_core.MarshaledPolicy.type": x.Type_ = (PolicyMarshalingType)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.MarshaledPolicy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.MarshaledPolicy does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MarshaledPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.MarshaledPolicy.policy": panic(fmt.Errorf("field policy of message sourcenetwork.acp_core.MarshaledPolicy is not mutable")) case "sourcenetwork.acp_core.MarshaledPolicy.type": panic(fmt.Errorf("field type of message sourcenetwork.acp_core.MarshaledPolicy is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.MarshaledPolicy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.MarshaledPolicy does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MarshaledPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.MarshaledPolicy.policy": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.MarshaledPolicy.type": return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.MarshaledPolicy")) } panic(fmt.Errorf("message sourcenetwork.acp_core.MarshaledPolicy does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MarshaledPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.MarshaledPolicy", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_MarshaledPolicy) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MarshaledPolicy) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MarshaledPolicy) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_MarshaledPolicy) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MarshaledPolicy) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Policy) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Type_ != 0 { n += 1 + runtime.Sov(uint64(x.Type_)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MarshaledPolicy) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Type_ != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) i-- dAtA[i] = 0x10 } if len(x.Policy) > 0 { i -= len(x.Policy) copy(dAtA[i:], x.Policy) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Policy))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MarshaledPolicy) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MarshaledPolicy: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MarshaledPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) } x.Type_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ x.Type_ |= PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/policy_short.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // PolicyEncodingType enumerates supported marshaling types for policies. type PolicyMarshalingType int32 const ( // Fallback value for a missing Marshaling Type PolicyMarshalingType_UNKNOWN PolicyMarshalingType = 0 // Policy Marshaled as a YAML Short Policy definition PolicyMarshalingType_YAML PolicyMarshalingType = 1 // Policy Marshaled as a JSON Short Policy definition PolicyMarshalingType_SHORT_JSON PolicyMarshalingType = 2 ) // Enum value maps for PolicyMarshalingType. var ( PolicyMarshalingType_name = map[int32]string{ 0: "UNKNOWN", 1: "SHORT_YAML", 2: "SHORT_JSON", } PolicyMarshalingType_value = map[string]int32{ "UNKNOWN": 0, "SHORT_YAML": 1, "SHORT_JSON": 2, } ) func (x PolicyMarshalingType) Enum() *PolicyMarshalingType { p := new(PolicyMarshalingType) *p = x return p } func (x PolicyMarshalingType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (PolicyMarshalingType) Descriptor() protoreflect.EnumDescriptor { return file_sourcenetwork_acp_core_policy_short_proto_enumTypes[0].Descriptor() } func (PolicyMarshalingType) Type() protoreflect.EnumType { return &file_sourcenetwork_acp_core_policy_short_proto_enumTypes[0] } func (x PolicyMarshalingType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use PolicyMarshalingType.Descriptor instead. func (PolicyMarshalingType) EnumDescriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_short_proto_rawDescGZIP(), []int{0} } // PolicyShort is a compact Policy definition which is conveniently expressed // as JSON or YAML. The shorthand format is used created a Policy. type PolicyShort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // meta field stores arbitrary key-values from users Meta map[string]string `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // resources defines resources within a policy. // map keys define the name for a resource Resources map[string]*ResourceShort `protobuf:"bytes,5,rep,name=resources,proto3" json:"resources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // actor resource defines the actor resource for the policy // optional. Actor *ActorResource `protobuf:"bytes,6,opt,name=actor,proto3" json:"actor,omitempty"` // specify the policy version Version string `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"` } func (x *PolicyShort) Reset() { *x = PolicyShort{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PolicyShort) String() string { return protoimpl.X.MessageStringOf(x) } func (*PolicyShort) ProtoMessage() {} // Deprecated: Use PolicyShort.ProtoReflect.Descriptor instead. func (*PolicyShort) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_short_proto_rawDescGZIP(), []int{0} } func (x *PolicyShort) GetName() string { if x != nil { return x.Name } return "" } func (x *PolicyShort) GetDescription() string { if x != nil { return x.Description } return "" } func (x *PolicyShort) GetMeta() map[string]string { if x != nil { return x.Meta } return nil } func (x *PolicyShort) GetResources() map[string]*ResourceShort { if x != nil { return x.Resources } return nil } func (x *PolicyShort) GetActor() *ActorResource { if x != nil { return x.Actor } return nil } func (x *PolicyShort) GetVersion() string { if x != nil { return x.Version } return "" } type ResourceShort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Doc string `protobuf:"bytes,1,opt,name=doc,proto3" json:"doc,omitempty"` Permissions map[string]*PermissionShort `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Relations map[string]*RelationShort `protobuf:"bytes,3,rep,name=relations,proto3" json:"relations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ResourceShort) Reset() { *x = ResourceShort{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ResourceShort) String() string { return protoimpl.X.MessageStringOf(x) } func (*ResourceShort) ProtoMessage() {} // Deprecated: Use ResourceShort.ProtoReflect.Descriptor instead. func (*ResourceShort) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_short_proto_rawDescGZIP(), []int{1} } func (x *ResourceShort) GetDoc() string { if x != nil { return x.Doc } return "" } func (x *ResourceShort) GetPermissions() map[string]*PermissionShort { if x != nil { return x.Permissions } return nil } func (x *ResourceShort) GetRelations() map[string]*RelationShort { if x != nil { return x.Relations } return nil } type RelationShort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Doc string `protobuf:"bytes,1,opt,name=doc,proto3" json:"doc,omitempty"` // list of relations managed by the current relation Manages []string `protobuf:"bytes,2,rep,name=manages,proto3" json:"manages,omitempty"` // types define a list of target types the current relation can point to. // Each type restriction points to a a resource's relation. // The syntax for a type restriction is "{resource}->{relation}", where relation is optional. // An empty relation means the relationship can only point to an object node, as opposed to an userset. Types []string `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"` } func (x *RelationShort) Reset() { *x = RelationShort{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RelationShort) String() string { return protoimpl.X.MessageStringOf(x) } func (*RelationShort) ProtoMessage() {} // Deprecated: Use RelationShort.ProtoReflect.Descriptor instead. func (*RelationShort) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_short_proto_rawDescGZIP(), []int{2} } func (x *RelationShort) GetDoc() string { if x != nil { return x.Doc } return "" } func (x *RelationShort) GetManages() []string { if x != nil { return x.Manages } return nil } func (x *RelationShort) GetTypes() []string { if x != nil { return x.Types } return nil } type PermissionShort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Doc string `protobuf:"bytes,1,opt,name=doc,proto3" json:"doc,omitempty"` Expr string `protobuf:"bytes,2,opt,name=expr,proto3" json:"expr,omitempty"` } func (x *PermissionShort) Reset() { *x = PermissionShort{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PermissionShort) String() string { return protoimpl.X.MessageStringOf(x) } func (*PermissionShort) ProtoMessage() {} // Deprecated: Use PermissionShort.ProtoReflect.Descriptor instead. func (*PermissionShort) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_short_proto_rawDescGZIP(), []int{3} } func (x *PermissionShort) GetDoc() string { if x != nil { return x.Doc } return "" } func (x *PermissionShort) GetExpr() string { if x != nil { return x.Expr } return "" } // MarshaledPolicy represents a PolicyShort object // marshaled to a known encoding format type MarshaledPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` Type_ PolicyMarshalingType `protobuf:"varint,2,opt,name=type,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"type,omitempty"` } func (x *MarshaledPolicy) Reset() { *x = MarshaledPolicy{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_policy_short_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MarshaledPolicy) String() string { return protoimpl.X.MessageStringOf(x) } func (*MarshaledPolicy) ProtoMessage() {} // Deprecated: Use MarshaledPolicy.ProtoReflect.Descriptor instead. func (*MarshaledPolicy) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_policy_short_proto_rawDescGZIP(), []int{4} } func (x *MarshaledPolicy) GetPolicy() string { if x != nil { return x.Policy } return "" } func (x *MarshaledPolicy) GetType_() PolicyMarshalingType { if x != nil { return x.Type_ } return PolicyMarshalingType_UNKNOWN } var File_sourcenetwork_acp_core_policy_short_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_policy_short_proto_rawDesc = []byte{ 0x0a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03, 0x0a, 0x0b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x63, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9d, 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x58, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x52, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x67, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x63, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x51, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x37, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x6b, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x43, 0x0a, 0x14, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x48, 0x4f, 0x52, 0x54, 0x5f, 0x59, 0x41, 0x4d, 0x4c, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x48, 0x4f, 0x52, 0x54, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0xe2, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x10, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_policy_short_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_policy_short_proto_rawDescData = file_sourcenetwork_acp_core_policy_short_proto_rawDesc ) func file_sourcenetwork_acp_core_policy_short_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_policy_short_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_policy_short_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_policy_short_proto_rawDescData) }) return file_sourcenetwork_acp_core_policy_short_proto_rawDescData } var file_sourcenetwork_acp_core_policy_short_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sourcenetwork_acp_core_policy_short_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_sourcenetwork_acp_core_policy_short_proto_goTypes = []interface{}{ (PolicyMarshalingType)(0), // 0: sourcenetwork.acp_core.PolicyMarshalingType (*PolicyShort)(nil), // 1: sourcenetwork.acp_core.PolicyShort (*ResourceShort)(nil), // 2: sourcenetwork.acp_core.ResourceShort (*RelationShort)(nil), // 3: sourcenetwork.acp_core.RelationShort (*PermissionShort)(nil), // 4: sourcenetwork.acp_core.PermissionShort (*MarshaledPolicy)(nil), // 5: sourcenetwork.acp_core.MarshaledPolicy nil, // 6: sourcenetwork.acp_core.PolicyShort.MetaEntry nil, // 7: sourcenetwork.acp_core.PolicyShort.ResourcesEntry nil, // 8: sourcenetwork.acp_core.ResourceShort.PermissionsEntry nil, // 9: sourcenetwork.acp_core.ResourceShort.RelationsEntry (*ActorResource)(nil), // 10: sourcenetwork.acp_core.ActorResource } var file_sourcenetwork_acp_core_policy_short_proto_depIdxs = []int32{ 6, // 0: sourcenetwork.acp_core.PolicyShort.meta:type_name -> sourcenetwork.acp_core.PolicyShort.MetaEntry 7, // 1: sourcenetwork.acp_core.PolicyShort.resources:type_name -> sourcenetwork.acp_core.PolicyShort.ResourcesEntry 10, // 2: sourcenetwork.acp_core.PolicyShort.actor:type_name -> sourcenetwork.acp_core.ActorResource 8, // 3: sourcenetwork.acp_core.ResourceShort.permissions:type_name -> sourcenetwork.acp_core.ResourceShort.PermissionsEntry 9, // 4: sourcenetwork.acp_core.ResourceShort.relations:type_name -> sourcenetwork.acp_core.ResourceShort.RelationsEntry 0, // 5: sourcenetwork.acp_core.MarshaledPolicy.type:type_name -> sourcenetwork.acp_core.PolicyMarshalingType 2, // 6: sourcenetwork.acp_core.PolicyShort.ResourcesEntry.value:type_name -> sourcenetwork.acp_core.ResourceShort 4, // 7: sourcenetwork.acp_core.ResourceShort.PermissionsEntry.value:type_name -> sourcenetwork.acp_core.PermissionShort 3, // 8: sourcenetwork.acp_core.ResourceShort.RelationsEntry.value:type_name -> sourcenetwork.acp_core.RelationShort 9, // [9:9] is the sub-list for method output_type 9, // [9:9] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name 9, // [9:9] is the sub-list for extension extendee 0, // [0:9] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_policy_short_proto_init() } func file_sourcenetwork_acp_core_policy_short_proto_init() { if File_sourcenetwork_acp_core_policy_short_proto != nil { return } file_sourcenetwork_acp_core_policy_proto_init() if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_policy_short_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolicyShort); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_short_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResourceShort); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_short_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RelationShort); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_short_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PermissionShort); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_policy_short_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MarshaledPolicy); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_policy_short_proto_rawDesc, NumEnums: 1, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_policy_short_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_policy_short_proto_depIdxs, EnumInfos: file_sourcenetwork_acp_core_policy_short_proto_enumTypes, MessageInfos: file_sourcenetwork_acp_core_policy_short_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_policy_short_proto = out.File file_sourcenetwork_acp_core_policy_short_proto_rawDesc = nil file_sourcenetwork_acp_core_policy_short_proto_goTypes = nil file_sourcenetwork_acp_core_policy_short_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/relationship.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sort "sort" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) var ( md_Object protoreflect.MessageDescriptor fd_Object_resource protoreflect.FieldDescriptor fd_Object_id protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_Object = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("Object") fd_Object_resource = md_Object.Fields().ByName("resource") fd_Object_id = md_Object.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_Object)(nil) type fastReflection_Object Object func (x *Object) ProtoReflect() protoreflect.Message { return (*fastReflection_Object)(x) } func (x *Object) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Object_messageType fastReflection_Object_messageType var _ protoreflect.MessageType = fastReflection_Object_messageType{} type fastReflection_Object_messageType struct{} func (x fastReflection_Object_messageType) Zero() protoreflect.Message { return (*fastReflection_Object)(nil) } func (x fastReflection_Object_messageType) New() protoreflect.Message { return new(fastReflection_Object) } func (x fastReflection_Object_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Object } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Object) Descriptor() protoreflect.MessageDescriptor { return md_Object } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Object) Type() protoreflect.MessageType { return _fastReflection_Object_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Object) New() protoreflect.Message { return new(fastReflection_Object) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Object) Interface() protoreflect.ProtoMessage { return (*Object)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Object) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Resource != "" { value := protoreflect.ValueOfString(x.Resource) if !f(fd_Object_resource, value) { return } } if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_Object_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Object) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Object.resource": return x.Resource != "" case "sourcenetwork.acp_core.Object.id": return x.Id != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Object")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Object does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Object) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Object.resource": x.Resource = "" case "sourcenetwork.acp_core.Object.id": x.Id = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Object")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Object does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Object) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Object.resource": value := x.Resource return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Object.id": value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Object")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Object does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Object) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Object.resource": x.Resource = value.Interface().(string) case "sourcenetwork.acp_core.Object.id": x.Id = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Object")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Object does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Object) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Object.resource": panic(fmt.Errorf("field resource of message sourcenetwork.acp_core.Object is not mutable")) case "sourcenetwork.acp_core.Object.id": panic(fmt.Errorf("field id of message sourcenetwork.acp_core.Object is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Object")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Object does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Object) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Object.resource": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Object.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Object")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Object does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Object) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Object", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Object) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Object) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Object) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Object) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Object) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Resource) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Object) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0x12 } if len(x.Resource) > 0 { i -= len(x.Resource) copy(dAtA[i:], x.Resource) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resource))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Object) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Object: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Actor protoreflect.MessageDescriptor fd_Actor_id protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_Actor = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("Actor") fd_Actor_id = md_Actor.Fields().ByName("id") } var _ protoreflect.Message = (*fastReflection_Actor)(nil) type fastReflection_Actor Actor func (x *Actor) ProtoReflect() protoreflect.Message { return (*fastReflection_Actor)(x) } func (x *Actor) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Actor_messageType fastReflection_Actor_messageType var _ protoreflect.MessageType = fastReflection_Actor_messageType{} type fastReflection_Actor_messageType struct{} func (x fastReflection_Actor_messageType) Zero() protoreflect.Message { return (*fastReflection_Actor)(nil) } func (x fastReflection_Actor_messageType) New() protoreflect.Message { return new(fastReflection_Actor) } func (x fastReflection_Actor_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Actor } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Actor) Descriptor() protoreflect.MessageDescriptor { return md_Actor } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Actor) Type() protoreflect.MessageType { return _fastReflection_Actor_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Actor) New() protoreflect.Message { return new(fastReflection_Actor) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Actor) Interface() protoreflect.ProtoMessage { return (*Actor)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Actor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) if !f(fd_Actor_id, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Actor) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Actor.id": return x.Id != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Actor")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Actor does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Actor) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Actor.id": x.Id = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Actor")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Actor does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Actor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Actor.id": value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Actor")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Actor does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Actor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Actor.id": x.Id = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Actor")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Actor does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Actor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Actor.id": panic(fmt.Errorf("field id of message sourcenetwork.acp_core.Actor is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Actor")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Actor does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Actor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Actor.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Actor")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Actor does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Actor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Actor", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Actor) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Actor) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Actor) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Actor) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Actor) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Actor) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Actor) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Actor: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Actor: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ActorSet protoreflect.MessageDescriptor fd_ActorSet_object protoreflect.FieldDescriptor fd_ActorSet_relation protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_ActorSet = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("ActorSet") fd_ActorSet_object = md_ActorSet.Fields().ByName("object") fd_ActorSet_relation = md_ActorSet.Fields().ByName("relation") } var _ protoreflect.Message = (*fastReflection_ActorSet)(nil) type fastReflection_ActorSet ActorSet func (x *ActorSet) ProtoReflect() protoreflect.Message { return (*fastReflection_ActorSet)(x) } func (x *ActorSet) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ActorSet_messageType fastReflection_ActorSet_messageType var _ protoreflect.MessageType = fastReflection_ActorSet_messageType{} type fastReflection_ActorSet_messageType struct{} func (x fastReflection_ActorSet_messageType) Zero() protoreflect.Message { return (*fastReflection_ActorSet)(nil) } func (x fastReflection_ActorSet_messageType) New() protoreflect.Message { return new(fastReflection_ActorSet) } func (x fastReflection_ActorSet_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ActorSet } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ActorSet) Descriptor() protoreflect.MessageDescriptor { return md_ActorSet } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ActorSet) Type() protoreflect.MessageType { return _fastReflection_ActorSet_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ActorSet) New() protoreflect.Message { return new(fastReflection_ActorSet) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ActorSet) Interface() protoreflect.ProtoMessage { return (*ActorSet)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ActorSet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_ActorSet_object, value) { return } } if x.Relation != "" { value := protoreflect.ValueOfString(x.Relation) if !f(fd_ActorSet_relation, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ActorSet) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ActorSet.object": return x.Object != nil case "sourcenetwork.acp_core.ActorSet.relation": return x.Relation != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorSet")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorSet does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorSet) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ActorSet.object": x.Object = nil case "sourcenetwork.acp_core.ActorSet.relation": x.Relation = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorSet")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorSet does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ActorSet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ActorSet.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.ActorSet.relation": value := x.Relation return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorSet")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorSet does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorSet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ActorSet.object": x.Object = value.Message().Interface().(*Object) case "sourcenetwork.acp_core.ActorSet.relation": x.Relation = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorSet")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorSet does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorSet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ActorSet.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.ActorSet.relation": panic(fmt.Errorf("field relation of message sourcenetwork.acp_core.ActorSet is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorSet")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorSet does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ActorSet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ActorSet.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.ActorSet.relation": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ActorSet")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ActorSet does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ActorSet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ActorSet", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ActorSet) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ActorSet) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ActorSet) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ActorSet) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ActorSet) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Relation) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ActorSet) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Relation) > 0 { i -= len(x.Relation) copy(dAtA[i:], x.Relation) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relation))) i-- dAtA[i] = 0x12 } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ActorSet) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ActorSet: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ActorSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Relation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_AllActors protoreflect.MessageDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_AllActors = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("AllActors") } var _ protoreflect.Message = (*fastReflection_AllActors)(nil) type fastReflection_AllActors AllActors func (x *AllActors) ProtoReflect() protoreflect.Message { return (*fastReflection_AllActors)(x) } func (x *AllActors) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_AllActors_messageType fastReflection_AllActors_messageType var _ protoreflect.MessageType = fastReflection_AllActors_messageType{} type fastReflection_AllActors_messageType struct{} func (x fastReflection_AllActors_messageType) Zero() protoreflect.Message { return (*fastReflection_AllActors)(nil) } func (x fastReflection_AllActors_messageType) New() protoreflect.Message { return new(fastReflection_AllActors) } func (x fastReflection_AllActors_messageType) Descriptor() protoreflect.MessageDescriptor { return md_AllActors } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_AllActors) Descriptor() protoreflect.MessageDescriptor { return md_AllActors } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_AllActors) Type() protoreflect.MessageType { return _fastReflection_AllActors_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_AllActors) New() protoreflect.Message { return new(fastReflection_AllActors) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_AllActors) Interface() protoreflect.ProtoMessage { return (*AllActors)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AllActors) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_AllActors) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AllActors")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AllActors does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllActors) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AllActors")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AllActors does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AllActors) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AllActors")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AllActors does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllActors) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AllActors")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AllActors does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllActors) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AllActors")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AllActors does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AllActors) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.AllActors")) } panic(fmt.Errorf("message sourcenetwork.acp_core.AllActors does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_AllActors) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.AllActors", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_AllActors) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AllActors) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_AllActors) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_AllActors) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*AllActors) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*AllActors) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*AllActors) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllActors: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllActors: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Subject protoreflect.MessageDescriptor fd_Subject_actor protoreflect.FieldDescriptor fd_Subject_actor_set protoreflect.FieldDescriptor fd_Subject_all_actors protoreflect.FieldDescriptor fd_Subject_object protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_Subject = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("Subject") fd_Subject_actor = md_Subject.Fields().ByName("actor") fd_Subject_actor_set = md_Subject.Fields().ByName("actor_set") fd_Subject_all_actors = md_Subject.Fields().ByName("all_actors") fd_Subject_object = md_Subject.Fields().ByName("object") } var _ protoreflect.Message = (*fastReflection_Subject)(nil) type fastReflection_Subject Subject func (x *Subject) ProtoReflect() protoreflect.Message { return (*fastReflection_Subject)(x) } func (x *Subject) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Subject_messageType fastReflection_Subject_messageType var _ protoreflect.MessageType = fastReflection_Subject_messageType{} type fastReflection_Subject_messageType struct{} func (x fastReflection_Subject_messageType) Zero() protoreflect.Message { return (*fastReflection_Subject)(nil) } func (x fastReflection_Subject_messageType) New() protoreflect.Message { return new(fastReflection_Subject) } func (x fastReflection_Subject_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Subject } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Subject) Descriptor() protoreflect.MessageDescriptor { return md_Subject } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Subject) Type() protoreflect.MessageType { return _fastReflection_Subject_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Subject) New() protoreflect.Message { return new(fastReflection_Subject) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Subject) Interface() protoreflect.ProtoMessage { return (*Subject)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Subject) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Subject != nil { switch o := x.Subject.(type) { case *Subject_Actor: v := o.Actor value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_Subject_actor, value) { return } case *Subject_ActorSet: v := o.ActorSet value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_Subject_actor_set, value) { return } case *Subject_AllActors: v := o.AllActors value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_Subject_all_actors, value) { return } case *Subject_Object: v := o.Object value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_Subject_object, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Subject) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Subject.actor": if x.Subject == nil { return false } else if _, ok := x.Subject.(*Subject_Actor); ok { return true } else { return false } case "sourcenetwork.acp_core.Subject.actor_set": if x.Subject == nil { return false } else if _, ok := x.Subject.(*Subject_ActorSet); ok { return true } else { return false } case "sourcenetwork.acp_core.Subject.all_actors": if x.Subject == nil { return false } else if _, ok := x.Subject.(*Subject_AllActors); ok { return true } else { return false } case "sourcenetwork.acp_core.Subject.object": if x.Subject == nil { return false } else if _, ok := x.Subject.(*Subject_Object); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Subject")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Subject does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Subject) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Subject.actor": x.Subject = nil case "sourcenetwork.acp_core.Subject.actor_set": x.Subject = nil case "sourcenetwork.acp_core.Subject.all_actors": x.Subject = nil case "sourcenetwork.acp_core.Subject.object": x.Subject = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Subject")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Subject does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Subject) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Subject.actor": if x.Subject == nil { return protoreflect.ValueOfMessage((*Actor)(nil).ProtoReflect()) } else if v, ok := x.Subject.(*Subject_Actor); ok { return protoreflect.ValueOfMessage(v.Actor.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*Actor)(nil).ProtoReflect()) } case "sourcenetwork.acp_core.Subject.actor_set": if x.Subject == nil { return protoreflect.ValueOfMessage((*ActorSet)(nil).ProtoReflect()) } else if v, ok := x.Subject.(*Subject_ActorSet); ok { return protoreflect.ValueOfMessage(v.ActorSet.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*ActorSet)(nil).ProtoReflect()) } case "sourcenetwork.acp_core.Subject.all_actors": if x.Subject == nil { return protoreflect.ValueOfMessage((*AllActors)(nil).ProtoReflect()) } else if v, ok := x.Subject.(*Subject_AllActors); ok { return protoreflect.ValueOfMessage(v.AllActors.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*AllActors)(nil).ProtoReflect()) } case "sourcenetwork.acp_core.Subject.object": if x.Subject == nil { return protoreflect.ValueOfMessage((*Object)(nil).ProtoReflect()) } else if v, ok := x.Subject.(*Subject_Object); ok { return protoreflect.ValueOfMessage(v.Object.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*Object)(nil).ProtoReflect()) } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Subject")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Subject does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Subject) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Subject.actor": cv := value.Message().Interface().(*Actor) x.Subject = &Subject_Actor{Actor: cv} case "sourcenetwork.acp_core.Subject.actor_set": cv := value.Message().Interface().(*ActorSet) x.Subject = &Subject_ActorSet{ActorSet: cv} case "sourcenetwork.acp_core.Subject.all_actors": cv := value.Message().Interface().(*AllActors) x.Subject = &Subject_AllActors{AllActors: cv} case "sourcenetwork.acp_core.Subject.object": cv := value.Message().Interface().(*Object) x.Subject = &Subject_Object{Object: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Subject")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Subject does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Subject) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Subject.actor": if x.Subject == nil { value := &Actor{} oneofValue := &Subject_Actor{Actor: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Subject.(type) { case *Subject_Actor: return protoreflect.ValueOfMessage(m.Actor.ProtoReflect()) default: value := &Actor{} oneofValue := &Subject_Actor{Actor: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.Subject.actor_set": if x.Subject == nil { value := &ActorSet{} oneofValue := &Subject_ActorSet{ActorSet: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Subject.(type) { case *Subject_ActorSet: return protoreflect.ValueOfMessage(m.ActorSet.ProtoReflect()) default: value := &ActorSet{} oneofValue := &Subject_ActorSet{ActorSet: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.Subject.all_actors": if x.Subject == nil { value := &AllActors{} oneofValue := &Subject_AllActors{AllActors: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Subject.(type) { case *Subject_AllActors: return protoreflect.ValueOfMessage(m.AllActors.ProtoReflect()) default: value := &AllActors{} oneofValue := &Subject_AllActors{AllActors: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.Subject.object": if x.Subject == nil { value := &Object{} oneofValue := &Subject_Object{Object: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Subject.(type) { case *Subject_Object: return protoreflect.ValueOfMessage(m.Object.ProtoReflect()) default: value := &Object{} oneofValue := &Subject_Object{Object: value} x.Subject = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Subject")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Subject does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Subject) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Subject.actor": value := &Actor{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.Subject.actor_set": value := &ActorSet{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.Subject.all_actors": value := &AllActors{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.Subject.object": value := &Object{} return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Subject")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Subject does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Subject) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcenetwork.acp_core.Subject.subject": if x.Subject == nil { return nil } switch x.Subject.(type) { case *Subject_Actor: return x.Descriptor().Fields().ByName("actor") case *Subject_ActorSet: return x.Descriptor().Fields().ByName("actor_set") case *Subject_AllActors: return x.Descriptor().Fields().ByName("all_actors") case *Subject_Object: return x.Descriptor().Fields().ByName("object") } default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Subject", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Subject) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Subject) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Subject) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Subject) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Subject) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Subject.(type) { case *Subject_Actor: if x == nil { break } l = options.Size(x.Actor) n += 1 + l + runtime.Sov(uint64(l)) case *Subject_ActorSet: if x == nil { break } l = options.Size(x.ActorSet) n += 1 + l + runtime.Sov(uint64(l)) case *Subject_AllActors: if x == nil { break } l = options.Size(x.AllActors) n += 1 + l + runtime.Sov(uint64(l)) case *Subject_Object: if x == nil { break } l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Subject) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Subject.(type) { case *Subject_Actor: encoded, err := options.Marshal(x.Actor) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa case *Subject_ActorSet: encoded, err := options.Marshal(x.ActorSet) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 case *Subject_AllActors: encoded, err := options.Marshal(x.AllActors) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a case *Subject_Object: encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Subject) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Subject: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &Actor{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Subject = &Subject_Actor{v} iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ActorSet", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &ActorSet{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Subject = &Subject_ActorSet{v} iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllActors", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &AllActors{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Subject = &Subject_AllActors{v} iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &Object{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Subject = &Subject_Object{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Relationship protoreflect.MessageDescriptor fd_Relationship_object protoreflect.FieldDescriptor fd_Relationship_relation protoreflect.FieldDescriptor fd_Relationship_subject protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_Relationship = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("Relationship") fd_Relationship_object = md_Relationship.Fields().ByName("object") fd_Relationship_relation = md_Relationship.Fields().ByName("relation") fd_Relationship_subject = md_Relationship.Fields().ByName("subject") } var _ protoreflect.Message = (*fastReflection_Relationship)(nil) type fastReflection_Relationship Relationship func (x *Relationship) ProtoReflect() protoreflect.Message { return (*fastReflection_Relationship)(x) } func (x *Relationship) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Relationship_messageType fastReflection_Relationship_messageType var _ protoreflect.MessageType = fastReflection_Relationship_messageType{} type fastReflection_Relationship_messageType struct{} func (x fastReflection_Relationship_messageType) Zero() protoreflect.Message { return (*fastReflection_Relationship)(nil) } func (x fastReflection_Relationship_messageType) New() protoreflect.Message { return new(fastReflection_Relationship) } func (x fastReflection_Relationship_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Relationship } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Relationship) Descriptor() protoreflect.MessageDescriptor { return md_Relationship } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Relationship) Type() protoreflect.MessageType { return _fastReflection_Relationship_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Relationship) New() protoreflect.Message { return new(fastReflection_Relationship) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Relationship) Interface() protoreflect.ProtoMessage { return (*Relationship)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Relationship) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_Relationship_object, value) { return } } if x.Relation != "" { value := protoreflect.ValueOfString(x.Relation) if !f(fd_Relationship_relation, value) { return } } if x.Subject != nil { value := protoreflect.ValueOfMessage(x.Subject.ProtoReflect()) if !f(fd_Relationship_subject, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Relationship) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Relationship.object": return x.Object != nil case "sourcenetwork.acp_core.Relationship.relation": return x.Relation != "" case "sourcenetwork.acp_core.Relationship.subject": return x.Subject != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relationship")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relationship does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relationship) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Relationship.object": x.Object = nil case "sourcenetwork.acp_core.Relationship.relation": x.Relation = "" case "sourcenetwork.acp_core.Relationship.subject": x.Subject = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relationship")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relationship does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Relationship) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Relationship.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.Relationship.relation": value := x.Relation return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.Relationship.subject": value := x.Subject return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relationship")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relationship does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relationship) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Relationship.object": x.Object = value.Message().Interface().(*Object) case "sourcenetwork.acp_core.Relationship.relation": x.Relation = value.Interface().(string) case "sourcenetwork.acp_core.Relationship.subject": x.Subject = value.Message().Interface().(*Subject) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relationship")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relationship does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relationship) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Relationship.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.Relationship.subject": if x.Subject == nil { x.Subject = new(Subject) } return protoreflect.ValueOfMessage(x.Subject.ProtoReflect()) case "sourcenetwork.acp_core.Relationship.relation": panic(fmt.Errorf("field relation of message sourcenetwork.acp_core.Relationship is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relationship")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relationship does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Relationship) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Relationship.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.Relationship.relation": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.Relationship.subject": m := new(Subject) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Relationship")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Relationship does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Relationship) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Relationship", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Relationship) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Relationship) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Relationship) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Relationship) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Relationship) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Relation) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Subject != nil { l = options.Size(x.Subject) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Relationship) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Subject != nil { encoded, err := options.Marshal(x.Subject) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.Relation) > 0 { i -= len(x.Relation) copy(dAtA[i:], x.Relation) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relation))) i-- dAtA[i] = 0x12 } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Relationship) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Relationship: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Relationship: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Relation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Subject == nil { x.Subject = &Subject{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Subject); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var _ protoreflect.Map = (*_RelationshipRecord_6_map)(nil) type _RelationshipRecord_6_map struct { m *map[string]string } func (x *_RelationshipRecord_6_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } func (x *_RelationshipRecord_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } for k, v := range *x.m { mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) mapValue := protoreflect.ValueOfString(v) if !f(mapKey, mapValue) { break } } } func (x *_RelationshipRecord_6_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } keyUnwrapped := key.String() concreteValue := keyUnwrapped _, ok := (*x.m)[concreteValue] return ok } func (x *_RelationshipRecord_6_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } keyUnwrapped := key.String() concreteKey := keyUnwrapped delete(*x.m, concreteKey) } func (x *_RelationshipRecord_6_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } keyUnwrapped := key.String() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] if !ok { return protoreflect.Value{} } return protoreflect.ValueOfString(v) } func (x *_RelationshipRecord_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } keyUnwrapped := key.String() concreteKey := keyUnwrapped valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.m)[concreteKey] = concreteValue } func (x *_RelationshipRecord_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } func (x *_RelationshipRecord_6_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } func (x *_RelationshipRecord_6_map) IsValid() bool { return x.m != nil } var ( md_RelationshipRecord protoreflect.MessageDescriptor fd_RelationshipRecord_policy_id protoreflect.FieldDescriptor fd_RelationshipRecord_owner_did protoreflect.FieldDescriptor fd_RelationshipRecord_relationship protoreflect.FieldDescriptor fd_RelationshipRecord_archived protoreflect.FieldDescriptor fd_RelationshipRecord_creation_time protoreflect.FieldDescriptor fd_RelationshipRecord_metadata protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_RelationshipRecord = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("RelationshipRecord") fd_RelationshipRecord_policy_id = md_RelationshipRecord.Fields().ByName("policy_id") fd_RelationshipRecord_owner_did = md_RelationshipRecord.Fields().ByName("owner_did") fd_RelationshipRecord_relationship = md_RelationshipRecord.Fields().ByName("relationship") fd_RelationshipRecord_archived = md_RelationshipRecord.Fields().ByName("archived") fd_RelationshipRecord_creation_time = md_RelationshipRecord.Fields().ByName("creation_time") fd_RelationshipRecord_metadata = md_RelationshipRecord.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_RelationshipRecord)(nil) type fastReflection_RelationshipRecord RelationshipRecord func (x *RelationshipRecord) ProtoReflect() protoreflect.Message { return (*fastReflection_RelationshipRecord)(x) } func (x *RelationshipRecord) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RelationshipRecord_messageType fastReflection_RelationshipRecord_messageType var _ protoreflect.MessageType = fastReflection_RelationshipRecord_messageType{} type fastReflection_RelationshipRecord_messageType struct{} func (x fastReflection_RelationshipRecord_messageType) Zero() protoreflect.Message { return (*fastReflection_RelationshipRecord)(nil) } func (x fastReflection_RelationshipRecord_messageType) New() protoreflect.Message { return new(fastReflection_RelationshipRecord) } func (x fastReflection_RelationshipRecord_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RelationshipRecord } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RelationshipRecord) Descriptor() protoreflect.MessageDescriptor { return md_RelationshipRecord } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RelationshipRecord) Type() protoreflect.MessageType { return _fastReflection_RelationshipRecord_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RelationshipRecord) New() protoreflect.Message { return new(fastReflection_RelationshipRecord) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RelationshipRecord) Interface() protoreflect.ProtoMessage { return (*RelationshipRecord)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RelationshipRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PolicyId != "" { value := protoreflect.ValueOfString(x.PolicyId) if !f(fd_RelationshipRecord_policy_id, value) { return } } if x.OwnerDid != "" { value := protoreflect.ValueOfString(x.OwnerDid) if !f(fd_RelationshipRecord_owner_did, value) { return } } if x.Relationship != nil { value := protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) if !f(fd_RelationshipRecord_relationship, value) { return } } if x.Archived != false { value := protoreflect.ValueOfBool(x.Archived) if !f(fd_RelationshipRecord_archived, value) { return } } if x.CreationTime != nil { value := protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) if !f(fd_RelationshipRecord_creation_time, value) { return } } if len(x.Metadata) != 0 { value := protoreflect.ValueOfMap(&_RelationshipRecord_6_map{m: &x.Metadata}) if !f(fd_RelationshipRecord_metadata, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RelationshipRecord) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipRecord.policy_id": return x.PolicyId != "" case "sourcenetwork.acp_core.RelationshipRecord.owner_did": return x.OwnerDid != "" case "sourcenetwork.acp_core.RelationshipRecord.relationship": return x.Relationship != nil case "sourcenetwork.acp_core.RelationshipRecord.archived": return x.Archived != false case "sourcenetwork.acp_core.RelationshipRecord.creation_time": return x.CreationTime != nil case "sourcenetwork.acp_core.RelationshipRecord.metadata": return len(x.Metadata) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipRecord does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipRecord.policy_id": x.PolicyId = "" case "sourcenetwork.acp_core.RelationshipRecord.owner_did": x.OwnerDid = "" case "sourcenetwork.acp_core.RelationshipRecord.relationship": x.Relationship = nil case "sourcenetwork.acp_core.RelationshipRecord.archived": x.Archived = false case "sourcenetwork.acp_core.RelationshipRecord.creation_time": x.CreationTime = nil case "sourcenetwork.acp_core.RelationshipRecord.metadata": x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipRecord does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RelationshipRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.RelationshipRecord.policy_id": value := x.PolicyId return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.RelationshipRecord.owner_did": value := x.OwnerDid return protoreflect.ValueOfString(value) case "sourcenetwork.acp_core.RelationshipRecord.relationship": value := x.Relationship return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipRecord.archived": value := x.Archived return protoreflect.ValueOfBool(value) case "sourcenetwork.acp_core.RelationshipRecord.creation_time": value := x.CreationTime return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipRecord.metadata": if len(x.Metadata) == 0 { return protoreflect.ValueOfMap(&_RelationshipRecord_6_map{}) } mapValue := &_RelationshipRecord_6_map{m: &x.Metadata} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipRecord does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipRecord.policy_id": x.PolicyId = value.Interface().(string) case "sourcenetwork.acp_core.RelationshipRecord.owner_did": x.OwnerDid = value.Interface().(string) case "sourcenetwork.acp_core.RelationshipRecord.relationship": x.Relationship = value.Message().Interface().(*Relationship) case "sourcenetwork.acp_core.RelationshipRecord.archived": x.Archived = value.Bool() case "sourcenetwork.acp_core.RelationshipRecord.creation_time": x.CreationTime = value.Message().Interface().(*timestamppb.Timestamp) case "sourcenetwork.acp_core.RelationshipRecord.metadata": mv := value.Map() cmv := mv.(*_RelationshipRecord_6_map) x.Metadata = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipRecord does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipRecord.relationship": if x.Relationship == nil { x.Relationship = new(Relationship) } return protoreflect.ValueOfMessage(x.Relationship.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipRecord.creation_time": if x.CreationTime == nil { x.CreationTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.CreationTime.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipRecord.metadata": if x.Metadata == nil { x.Metadata = make(map[string]string) } value := &_RelationshipRecord_6_map{m: &x.Metadata} return protoreflect.ValueOfMap(value) case "sourcenetwork.acp_core.RelationshipRecord.policy_id": panic(fmt.Errorf("field policy_id of message sourcenetwork.acp_core.RelationshipRecord is not mutable")) case "sourcenetwork.acp_core.RelationshipRecord.owner_did": panic(fmt.Errorf("field owner_did of message sourcenetwork.acp_core.RelationshipRecord is not mutable")) case "sourcenetwork.acp_core.RelationshipRecord.archived": panic(fmt.Errorf("field archived of message sourcenetwork.acp_core.RelationshipRecord is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipRecord does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RelationshipRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipRecord.policy_id": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.RelationshipRecord.owner_did": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.RelationshipRecord.relationship": m := new(Relationship) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipRecord.archived": return protoreflect.ValueOfBool(false) case "sourcenetwork.acp_core.RelationshipRecord.creation_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipRecord.metadata": m := make(map[string]string) return protoreflect.ValueOfMap(&_RelationshipRecord_6_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipRecord")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipRecord does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RelationshipRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.RelationshipRecord", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RelationshipRecord) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipRecord) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RelationshipRecord) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RelationshipRecord) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RelationshipRecord) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.PolicyId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.OwnerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.Relationship != nil { l = options.Size(x.Relationship) n += 1 + l + runtime.Sov(uint64(l)) } if x.Archived { n += 2 } if x.CreationTime != nil { l = options.Size(x.CreationTime) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Metadata) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { sortme := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { v := x.Metadata[k] SiZeMaP(k, v) } } else { for k, v := range x.Metadata { SiZeMaP(k, v) } } } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RelationshipRecord) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Metadata) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) copy(dAtA[i:], v) i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x32 return protoiface.MarshalOutput{}, nil } if options.Deterministic { keysForMetadata := make([]string, 0, len(x.Metadata)) for k := range x.Metadata { keysForMetadata = append(keysForMetadata, string(k)) } sort.Slice(keysForMetadata, func(i, j int) bool { return keysForMetadata[i] < keysForMetadata[j] }) for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { v := x.Metadata[string(keysForMetadata[iNdEx])] out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) if err != nil { return out, err } } } else { for k := range x.Metadata { v := x.Metadata[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err } } } } if x.CreationTime != nil { encoded, err := options.Marshal(x.CreationTime) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x2a } if x.Archived { i-- if x.Archived { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x20 } if x.Relationship != nil { encoded, err := options.Marshal(x.Relationship) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if len(x.OwnerDid) > 0 { i -= len(x.OwnerDid) copy(dAtA[i:], x.OwnerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnerDid))) i-- dAtA[i] = 0x12 } if len(x.PolicyId) > 0 { i -= len(x.PolicyId) copy(dAtA[i:], x.PolicyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyId))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RelationshipRecord) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationshipRecord: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationshipRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.OwnerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Relationship == nil { x.Relationship = &Relationship{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relationship); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Archived", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } x.Archived = bool(v != 0) case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.CreationTime == nil { x.CreationTime = ×tamppb.Timestamp{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreationTime); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Metadata == nil { x.Metadata = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapkey > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } iNdEx += skippy } } x.Metadata[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_Registration protoreflect.MessageDescriptor fd_Registration_object protoreflect.FieldDescriptor fd_Registration_actor protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_proto_init() md_Registration = File_sourcenetwork_acp_core_relationship_proto.Messages().ByName("Registration") fd_Registration_object = md_Registration.Fields().ByName("object") fd_Registration_actor = md_Registration.Fields().ByName("actor") } var _ protoreflect.Message = (*fastReflection_Registration)(nil) type fastReflection_Registration Registration func (x *Registration) ProtoReflect() protoreflect.Message { return (*fastReflection_Registration)(x) } func (x *Registration) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Registration_messageType fastReflection_Registration_messageType var _ protoreflect.MessageType = fastReflection_Registration_messageType{} type fastReflection_Registration_messageType struct{} func (x fastReflection_Registration_messageType) Zero() protoreflect.Message { return (*fastReflection_Registration)(nil) } func (x fastReflection_Registration_messageType) New() protoreflect.Message { return new(fastReflection_Registration) } func (x fastReflection_Registration_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Registration } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Registration) Descriptor() protoreflect.MessageDescriptor { return md_Registration } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Registration) Type() protoreflect.MessageType { return _fastReflection_Registration_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Registration) New() protoreflect.Message { return new(fastReflection_Registration) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Registration) Interface() protoreflect.ProtoMessage { return (*Registration)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Registration) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Object != nil { value := protoreflect.ValueOfMessage(x.Object.ProtoReflect()) if !f(fd_Registration_object, value) { return } } if x.Actor != nil { value := protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) if !f(fd_Registration_actor, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Registration) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.Registration.object": return x.Object != nil case "sourcenetwork.acp_core.Registration.actor": return x.Actor != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Registration")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Registration does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Registration) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.Registration.object": x.Object = nil case "sourcenetwork.acp_core.Registration.actor": x.Actor = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Registration")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Registration does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Registration) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.Registration.object": value := x.Object return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.Registration.actor": value := x.Actor return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Registration")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Registration does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Registration) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.Registration.object": x.Object = value.Message().Interface().(*Object) case "sourcenetwork.acp_core.Registration.actor": x.Actor = value.Message().Interface().(*Actor) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Registration")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Registration does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Registration) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Registration.object": if x.Object == nil { x.Object = new(Object) } return protoreflect.ValueOfMessage(x.Object.ProtoReflect()) case "sourcenetwork.acp_core.Registration.actor": if x.Actor == nil { x.Actor = new(Actor) } return protoreflect.ValueOfMessage(x.Actor.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Registration")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Registration does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Registration) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.Registration.object": m := new(Object) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.Registration.actor": m := new(Actor) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Registration")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Registration does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Registration) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Registration", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Registration) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Registration) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Registration) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Registration) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Registration) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.Object != nil { l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) } if x.Actor != nil { l = options.Size(x.Actor) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Registration) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.Actor != nil { encoded, err := options.Marshal(x.Actor) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.Object != nil { encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Registration) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Registration: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Registration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Object == nil { x.Object = &Object{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Object); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Actor == nil { x.Actor = &Actor{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Actor); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/relationship.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // RegistrationResult encodes the possible result set from Registering an Object type RegistrationResult int32 const ( // NoOp indicates no action was take. The operation failed or the Object already existed and was active RegistrationResult_NoOp RegistrationResult = 0 // Registered indicates the Object was sucessfuly registered to the Actor. RegistrationResult_Registered RegistrationResult = 1 // Unarchived indicates that a previously deleted Object is active again. // Only the original owners can Unarchive an object. RegistrationResult_Unarchived RegistrationResult = 2 ) // Enum value maps for RegistrationResult. var ( RegistrationResult_name = map[int32]string{ 0: "NoOp", 1: "Registered", 2: "Unarchived", } RegistrationResult_value = map[string]int32{ "NoOp": 0, "Registered": 1, "Unarchived": 2, } ) func (x RegistrationResult) Enum() *RegistrationResult { p := new(RegistrationResult) *p = x return p } func (x RegistrationResult) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (RegistrationResult) Descriptor() protoreflect.EnumDescriptor { return file_sourcenetwork_acp_core_relationship_proto_enumTypes[0].Descriptor() } func (RegistrationResult) Type() protoreflect.EnumType { return &file_sourcenetwork_acp_core_relationship_proto_enumTypes[0] } func (x RegistrationResult) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use RegistrationResult.Descriptor instead. func (RegistrationResult) EnumDescriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{0} } // Object represents an entity which must be access controlled within a Policy. type Object struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } func (x *Object) Reset() { *x = Object{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Object) String() string { return protoimpl.X.MessageStringOf(x) } func (*Object) ProtoMessage() {} // Deprecated: Use Object.ProtoReflect.Descriptor instead. func (*Object) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{0} } func (x *Object) GetResource() string { if x != nil { return x.Resource } return "" } func (x *Object) GetId() string { if x != nil { return x.Id } return "" } // Actor represents an entity which makes access requests to a Policy. type Actor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *Actor) Reset() { *x = Actor{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Actor) String() string { return protoimpl.X.MessageStringOf(x) } func (*Actor) ProtoMessage() {} // Deprecated: Use Actor.ProtoReflect.Descriptor instead. func (*Actor) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{1} } func (x *Actor) GetId() string { if x != nil { return x.Id } return "" } // ActorSet represents a set of Actors in a Policy. // It is specified through an Object, Relation pair, which represents // all actors which have a relationship with given obj-rel pair. // This expansion is recursive. type ActorSet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Object *Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` } func (x *ActorSet) Reset() { *x = ActorSet{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ActorSet) String() string { return protoimpl.X.MessageStringOf(x) } func (*ActorSet) ProtoMessage() {} // Deprecated: Use ActorSet.ProtoReflect.Descriptor instead. func (*ActorSet) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{2} } func (x *ActorSet) GetObject() *Object { if x != nil { return x.Object } return nil } func (x *ActorSet) GetRelation() string { if x != nil { return x.Relation } return "" } // AllActors models a special Relationship Subject which indicates // that all Actors in the Policy are included. type AllActors struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *AllActors) Reset() { *x = AllActors{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AllActors) String() string { return protoimpl.X.MessageStringOf(x) } func (*AllActors) ProtoMessage() {} // Deprecated: Use AllActors.ProtoReflect.Descriptor instead. func (*AllActors) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{3} } // Subject specifies the target of a Relationship. type Subject struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Subject: // // *Subject_Actor // *Subject_ActorSet // *Subject_AllActors // *Subject_Object Subject isSubject_Subject `protobuf_oneof:"subject"` } func (x *Subject) Reset() { *x = Subject{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Subject) String() string { return protoimpl.X.MessageStringOf(x) } func (*Subject) ProtoMessage() {} // Deprecated: Use Subject.ProtoReflect.Descriptor instead. func (*Subject) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{4} } func (x *Subject) GetSubject() isSubject_Subject { if x != nil { return x.Subject } return nil } func (x *Subject) GetActor() *Actor { if x, ok := x.GetSubject().(*Subject_Actor); ok { return x.Actor } return nil } func (x *Subject) GetActorSet() *ActorSet { if x, ok := x.GetSubject().(*Subject_ActorSet); ok { return x.ActorSet } return nil } func (x *Subject) GetAllActors() *AllActors { if x, ok := x.GetSubject().(*Subject_AllActors); ok { return x.AllActors } return nil } func (x *Subject) GetObject() *Object { if x, ok := x.GetSubject().(*Subject_Object); ok { return x.Object } return nil } type isSubject_Subject interface { isSubject_Subject() } type Subject_Actor struct { Actor *Actor `protobuf:"bytes,1,opt,name=actor,proto3,oneof"` } type Subject_ActorSet struct { ActorSet *ActorSet `protobuf:"bytes,2,opt,name=actor_set,json=actorSet,proto3,oneof"` } type Subject_AllActors struct { AllActors *AllActors `protobuf:"bytes,3,opt,name=all_actors,json=allActors,proto3,oneof"` } type Subject_Object struct { Object *Object `protobuf:"bytes,4,opt,name=object,proto3,oneof"` } func (*Subject_Actor) isSubject_Subject() {} func (*Subject_ActorSet) isSubject_Subject() {} func (*Subject_AllActors) isSubject_Subject() {} func (*Subject_Object) isSubject_Subject() {} // Relationship models an access control rule. // It states that the given subject has relation with object. type Relationship struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Object *Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` Subject *Subject `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` } func (x *Relationship) Reset() { *x = Relationship{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Relationship) String() string { return protoimpl.X.MessageStringOf(x) } func (*Relationship) ProtoMessage() {} // Deprecated: Use Relationship.ProtoReflect.Descriptor instead. func (*Relationship) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{5} } func (x *Relationship) GetObject() *Object { if x != nil { return x.Object } return nil } func (x *Relationship) GetRelation() string { if x != nil { return x.Relation } return "" } func (x *Relationship) GetSubject() *Subject { if x != nil { return x.Subject } return nil } // RelationshipRecord represents a document contained a Relationship and additional data. type RelationshipRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` // owner_did is the DID of the Actor which created the relationship OwnerDid string `protobuf:"bytes,2,opt,name=owner_did,json=ownerDid,proto3" json:"owner_did,omitempty"` Relationship *Relationship `protobuf:"bytes,3,opt,name=relationship,proto3" json:"relationship,omitempty"` // archived indicates whether an object has been unregistered Archived bool `protobuf:"varint,4,opt,name=archived,proto3" json:"archived,omitempty"` CreationTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // metadata contains arbitrary caller specified metadata Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *RelationshipRecord) Reset() { *x = RelationshipRecord{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RelationshipRecord) String() string { return protoimpl.X.MessageStringOf(x) } func (*RelationshipRecord) ProtoMessage() {} // Deprecated: Use RelationshipRecord.ProtoReflect.Descriptor instead. func (*RelationshipRecord) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{6} } func (x *RelationshipRecord) GetPolicyId() string { if x != nil { return x.PolicyId } return "" } func (x *RelationshipRecord) GetOwnerDid() string { if x != nil { return x.OwnerDid } return "" } func (x *RelationshipRecord) GetRelationship() *Relationship { if x != nil { return x.Relationship } return nil } func (x *RelationshipRecord) GetArchived() bool { if x != nil { return x.Archived } return false } func (x *RelationshipRecord) GetCreationTime() *timestamppb.Timestamp { if x != nil { return x.CreationTime } return nil } func (x *RelationshipRecord) GetMetadata() map[string]string { if x != nil { return x.Metadata } return nil } // Registration represents a record assigning an Object as being owned by an Actor type Registration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Object *Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` Actor *Actor `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"` } func (x *Registration) Reset() { *x = Registration{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Registration) String() string { return protoimpl.X.MessageStringOf(x) } func (*Registration) ProtoMessage() {} // Deprecated: Use Registration.ProtoReflect.Descriptor instead. func (*Registration) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP(), []int{7} } func (x *Registration) GetObject() *Object { if x != nil { return x.Object } return nil } func (x *Registration) GetActor() *Actor { if x != nil { return x.Actor } return nil } var File_sourcenetwork_acp_core_relationship_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_relationship_proto_rawDesc = []byte{ 0x0a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x05, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5e, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0b, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x8a, 0x02, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3f, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x88, 0x03, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7b, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2a, 0x3e, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x4f, 0x70, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x10, 0x02, 0x42, 0xe3, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_relationship_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_relationship_proto_rawDescData = file_sourcenetwork_acp_core_relationship_proto_rawDesc ) func file_sourcenetwork_acp_core_relationship_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_relationship_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_relationship_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_relationship_proto_rawDescData) }) return file_sourcenetwork_acp_core_relationship_proto_rawDescData } var file_sourcenetwork_acp_core_relationship_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sourcenetwork_acp_core_relationship_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_sourcenetwork_acp_core_relationship_proto_goTypes = []interface{}{ (RegistrationResult)(0), // 0: sourcenetwork.acp_core.RegistrationResult (*Object)(nil), // 1: sourcenetwork.acp_core.Object (*Actor)(nil), // 2: sourcenetwork.acp_core.Actor (*ActorSet)(nil), // 3: sourcenetwork.acp_core.ActorSet (*AllActors)(nil), // 4: sourcenetwork.acp_core.AllActors (*Subject)(nil), // 5: sourcenetwork.acp_core.Subject (*Relationship)(nil), // 6: sourcenetwork.acp_core.Relationship (*RelationshipRecord)(nil), // 7: sourcenetwork.acp_core.RelationshipRecord (*Registration)(nil), // 8: sourcenetwork.acp_core.Registration nil, // 9: sourcenetwork.acp_core.RelationshipRecord.MetadataEntry (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp } var file_sourcenetwork_acp_core_relationship_proto_depIdxs = []int32{ 1, // 0: sourcenetwork.acp_core.ActorSet.object:type_name -> sourcenetwork.acp_core.Object 2, // 1: sourcenetwork.acp_core.Subject.actor:type_name -> sourcenetwork.acp_core.Actor 3, // 2: sourcenetwork.acp_core.Subject.actor_set:type_name -> sourcenetwork.acp_core.ActorSet 4, // 3: sourcenetwork.acp_core.Subject.all_actors:type_name -> sourcenetwork.acp_core.AllActors 1, // 4: sourcenetwork.acp_core.Subject.object:type_name -> sourcenetwork.acp_core.Object 1, // 5: sourcenetwork.acp_core.Relationship.object:type_name -> sourcenetwork.acp_core.Object 5, // 6: sourcenetwork.acp_core.Relationship.subject:type_name -> sourcenetwork.acp_core.Subject 6, // 7: sourcenetwork.acp_core.RelationshipRecord.relationship:type_name -> sourcenetwork.acp_core.Relationship 10, // 8: sourcenetwork.acp_core.RelationshipRecord.creation_time:type_name -> google.protobuf.Timestamp 9, // 9: sourcenetwork.acp_core.RelationshipRecord.metadata:type_name -> sourcenetwork.acp_core.RelationshipRecord.MetadataEntry 1, // 10: sourcenetwork.acp_core.Registration.object:type_name -> sourcenetwork.acp_core.Object 2, // 11: sourcenetwork.acp_core.Registration.actor:type_name -> sourcenetwork.acp_core.Actor 12, // [12:12] is the sub-list for method output_type 12, // [12:12] is the sub-list for method input_type 12, // [12:12] is the sub-list for extension type_name 12, // [12:12] is the sub-list for extension extendee 0, // [0:12] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_relationship_proto_init() } func file_sourcenetwork_acp_core_relationship_proto_init() { if File_sourcenetwork_acp_core_relationship_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_relationship_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Object); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Actor); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActorSet); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllActors); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Subject); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Relationship); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RelationshipRecord); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Registration); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_sourcenetwork_acp_core_relationship_proto_msgTypes[4].OneofWrappers = []interface{}{ (*Subject_Actor)(nil), (*Subject_ActorSet)(nil), (*Subject_AllActors)(nil), (*Subject_Object)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_relationship_proto_rawDesc, NumEnums: 1, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_relationship_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_relationship_proto_depIdxs, EnumInfos: file_sourcenetwork_acp_core_relationship_proto_enumTypes, MessageInfos: file_sourcenetwork_acp_core_relationship_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_relationship_proto = out.File file_sourcenetwork_acp_core_relationship_proto_rawDesc = nil file_sourcenetwork_acp_core_relationship_proto_goTypes = nil file_sourcenetwork_acp_core_relationship_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/relationship_selector.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) var ( md_RelationshipSelector protoreflect.MessageDescriptor fd_RelationshipSelector_object_selector protoreflect.FieldDescriptor fd_RelationshipSelector_relation_selector protoreflect.FieldDescriptor fd_RelationshipSelector_subject_selector protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_selector_proto_init() md_RelationshipSelector = File_sourcenetwork_acp_core_relationship_selector_proto.Messages().ByName("RelationshipSelector") fd_RelationshipSelector_object_selector = md_RelationshipSelector.Fields().ByName("object_selector") fd_RelationshipSelector_relation_selector = md_RelationshipSelector.Fields().ByName("relation_selector") fd_RelationshipSelector_subject_selector = md_RelationshipSelector.Fields().ByName("subject_selector") } var _ protoreflect.Message = (*fastReflection_RelationshipSelector)(nil) type fastReflection_RelationshipSelector RelationshipSelector func (x *RelationshipSelector) ProtoReflect() protoreflect.Message { return (*fastReflection_RelationshipSelector)(x) } func (x *RelationshipSelector) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RelationshipSelector_messageType fastReflection_RelationshipSelector_messageType var _ protoreflect.MessageType = fastReflection_RelationshipSelector_messageType{} type fastReflection_RelationshipSelector_messageType struct{} func (x fastReflection_RelationshipSelector_messageType) Zero() protoreflect.Message { return (*fastReflection_RelationshipSelector)(nil) } func (x fastReflection_RelationshipSelector_messageType) New() protoreflect.Message { return new(fastReflection_RelationshipSelector) } func (x fastReflection_RelationshipSelector_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RelationshipSelector } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RelationshipSelector) Descriptor() protoreflect.MessageDescriptor { return md_RelationshipSelector } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RelationshipSelector) Type() protoreflect.MessageType { return _fastReflection_RelationshipSelector_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RelationshipSelector) New() protoreflect.Message { return new(fastReflection_RelationshipSelector) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RelationshipSelector) Interface() protoreflect.ProtoMessage { return (*RelationshipSelector)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RelationshipSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.ObjectSelector != nil { value := protoreflect.ValueOfMessage(x.ObjectSelector.ProtoReflect()) if !f(fd_RelationshipSelector_object_selector, value) { return } } if x.RelationSelector != nil { value := protoreflect.ValueOfMessage(x.RelationSelector.ProtoReflect()) if !f(fd_RelationshipSelector_relation_selector, value) { return } } if x.SubjectSelector != nil { value := protoreflect.ValueOfMessage(x.SubjectSelector.ProtoReflect()) if !f(fd_RelationshipSelector_subject_selector, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RelationshipSelector) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipSelector.object_selector": return x.ObjectSelector != nil case "sourcenetwork.acp_core.RelationshipSelector.relation_selector": return x.RelationSelector != nil case "sourcenetwork.acp_core.RelationshipSelector.subject_selector": return x.SubjectSelector != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipSelector does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipSelector) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipSelector.object_selector": x.ObjectSelector = nil case "sourcenetwork.acp_core.RelationshipSelector.relation_selector": x.RelationSelector = nil case "sourcenetwork.acp_core.RelationshipSelector.subject_selector": x.SubjectSelector = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipSelector does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RelationshipSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.RelationshipSelector.object_selector": value := x.ObjectSelector return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipSelector.relation_selector": value := x.RelationSelector return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipSelector.subject_selector": value := x.SubjectSelector return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipSelector does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipSelector.object_selector": x.ObjectSelector = value.Message().Interface().(*ObjectSelector) case "sourcenetwork.acp_core.RelationshipSelector.relation_selector": x.RelationSelector = value.Message().Interface().(*RelationSelector) case "sourcenetwork.acp_core.RelationshipSelector.subject_selector": x.SubjectSelector = value.Message().Interface().(*SubjectSelector) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipSelector does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipSelector.object_selector": if x.ObjectSelector == nil { x.ObjectSelector = new(ObjectSelector) } return protoreflect.ValueOfMessage(x.ObjectSelector.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipSelector.relation_selector": if x.RelationSelector == nil { x.RelationSelector = new(RelationSelector) } return protoreflect.ValueOfMessage(x.RelationSelector.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipSelector.subject_selector": if x.SubjectSelector == nil { x.SubjectSelector = new(SubjectSelector) } return protoreflect.ValueOfMessage(x.SubjectSelector.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipSelector does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RelationshipSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationshipSelector.object_selector": m := new(ObjectSelector) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipSelector.relation_selector": m := new(RelationSelector) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "sourcenetwork.acp_core.RelationshipSelector.subject_selector": m := new(SubjectSelector) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationshipSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationshipSelector does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RelationshipSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.RelationshipSelector", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RelationshipSelector) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationshipSelector) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RelationshipSelector) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RelationshipSelector) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RelationshipSelector) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.ObjectSelector != nil { l = options.Size(x.ObjectSelector) n += 1 + l + runtime.Sov(uint64(l)) } if x.RelationSelector != nil { l = options.Size(x.RelationSelector) n += 1 + l + runtime.Sov(uint64(l)) } if x.SubjectSelector != nil { l = options.Size(x.SubjectSelector) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RelationshipSelector) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.SubjectSelector != nil { encoded, err := options.Marshal(x.SubjectSelector) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } if x.RelationSelector != nil { encoded, err := options.Marshal(x.RelationSelector) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if x.ObjectSelector != nil { encoded, err := options.Marshal(x.ObjectSelector) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RelationshipSelector) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationshipSelector: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationshipSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.ObjectSelector == nil { x.ObjectSelector = &ObjectSelector{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ObjectSelector); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelationSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.RelationSelector == nil { x.RelationSelector = &RelationSelector{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RelationSelector); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubjectSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.SubjectSelector == nil { x.SubjectSelector = &SubjectSelector{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SubjectSelector); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_ObjectSelector protoreflect.MessageDescriptor fd_ObjectSelector_object protoreflect.FieldDescriptor fd_ObjectSelector_wildcard protoreflect.FieldDescriptor fd_ObjectSelector_resource_predicate protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_selector_proto_init() md_ObjectSelector = File_sourcenetwork_acp_core_relationship_selector_proto.Messages().ByName("ObjectSelector") fd_ObjectSelector_object = md_ObjectSelector.Fields().ByName("object") fd_ObjectSelector_wildcard = md_ObjectSelector.Fields().ByName("wildcard") fd_ObjectSelector_resource_predicate = md_ObjectSelector.Fields().ByName("resource_predicate") } var _ protoreflect.Message = (*fastReflection_ObjectSelector)(nil) type fastReflection_ObjectSelector ObjectSelector func (x *ObjectSelector) ProtoReflect() protoreflect.Message { return (*fastReflection_ObjectSelector)(x) } func (x *ObjectSelector) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_ObjectSelector_messageType fastReflection_ObjectSelector_messageType var _ protoreflect.MessageType = fastReflection_ObjectSelector_messageType{} type fastReflection_ObjectSelector_messageType struct{} func (x fastReflection_ObjectSelector_messageType) Zero() protoreflect.Message { return (*fastReflection_ObjectSelector)(nil) } func (x fastReflection_ObjectSelector_messageType) New() protoreflect.Message { return new(fastReflection_ObjectSelector) } func (x fastReflection_ObjectSelector_messageType) Descriptor() protoreflect.MessageDescriptor { return md_ObjectSelector } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_ObjectSelector) Descriptor() protoreflect.MessageDescriptor { return md_ObjectSelector } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_ObjectSelector) Type() protoreflect.MessageType { return _fastReflection_ObjectSelector_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_ObjectSelector) New() protoreflect.Message { return new(fastReflection_ObjectSelector) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_ObjectSelector) Interface() protoreflect.ProtoMessage { return (*ObjectSelector)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_ObjectSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Selector != nil { switch o := x.Selector.(type) { case *ObjectSelector_Object: v := o.Object value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_ObjectSelector_object, value) { return } case *ObjectSelector_Wildcard: v := o.Wildcard value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_ObjectSelector_wildcard, value) { return } case *ObjectSelector_ResourcePredicate: v := o.ResourcePredicate value := protoreflect.ValueOfString(v) if !f(fd_ObjectSelector_resource_predicate, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_ObjectSelector) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.ObjectSelector.object": if x.Selector == nil { return false } else if _, ok := x.Selector.(*ObjectSelector_Object); ok { return true } else { return false } case "sourcenetwork.acp_core.ObjectSelector.wildcard": if x.Selector == nil { return false } else if _, ok := x.Selector.(*ObjectSelector_Wildcard); ok { return true } else { return false } case "sourcenetwork.acp_core.ObjectSelector.resource_predicate": if x.Selector == nil { return false } else if _, ok := x.Selector.(*ObjectSelector_ResourcePredicate); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ObjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ObjectSelector does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ObjectSelector) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.ObjectSelector.object": x.Selector = nil case "sourcenetwork.acp_core.ObjectSelector.wildcard": x.Selector = nil case "sourcenetwork.acp_core.ObjectSelector.resource_predicate": x.Selector = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ObjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ObjectSelector does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_ObjectSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.ObjectSelector.object": if x.Selector == nil { return protoreflect.ValueOfMessage((*Object)(nil).ProtoReflect()) } else if v, ok := x.Selector.(*ObjectSelector_Object); ok { return protoreflect.ValueOfMessage(v.Object.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*Object)(nil).ProtoReflect()) } case "sourcenetwork.acp_core.ObjectSelector.wildcard": if x.Selector == nil { return protoreflect.ValueOfMessage((*WildcardSelector)(nil).ProtoReflect()) } else if v, ok := x.Selector.(*ObjectSelector_Wildcard); ok { return protoreflect.ValueOfMessage(v.Wildcard.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*WildcardSelector)(nil).ProtoReflect()) } case "sourcenetwork.acp_core.ObjectSelector.resource_predicate": if x.Selector == nil { return protoreflect.ValueOfString("") } else if v, ok := x.Selector.(*ObjectSelector_ResourcePredicate); ok { return protoreflect.ValueOfString(v.ResourcePredicate) } else { return protoreflect.ValueOfString("") } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ObjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ObjectSelector does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ObjectSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.ObjectSelector.object": cv := value.Message().Interface().(*Object) x.Selector = &ObjectSelector_Object{Object: cv} case "sourcenetwork.acp_core.ObjectSelector.wildcard": cv := value.Message().Interface().(*WildcardSelector) x.Selector = &ObjectSelector_Wildcard{Wildcard: cv} case "sourcenetwork.acp_core.ObjectSelector.resource_predicate": cv := value.Interface().(string) x.Selector = &ObjectSelector_ResourcePredicate{ResourcePredicate: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ObjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ObjectSelector does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ObjectSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ObjectSelector.object": if x.Selector == nil { value := &Object{} oneofValue := &ObjectSelector_Object{Object: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Selector.(type) { case *ObjectSelector_Object: return protoreflect.ValueOfMessage(m.Object.ProtoReflect()) default: value := &Object{} oneofValue := &ObjectSelector_Object{Object: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.ObjectSelector.wildcard": if x.Selector == nil { value := &WildcardSelector{} oneofValue := &ObjectSelector_Wildcard{Wildcard: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Selector.(type) { case *ObjectSelector_Wildcard: return protoreflect.ValueOfMessage(m.Wildcard.ProtoReflect()) default: value := &WildcardSelector{} oneofValue := &ObjectSelector_Wildcard{Wildcard: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.ObjectSelector.resource_predicate": panic(fmt.Errorf("field resource_predicate of message sourcenetwork.acp_core.ObjectSelector is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ObjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ObjectSelector does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_ObjectSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.ObjectSelector.object": value := &Object{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.ObjectSelector.wildcard": value := &WildcardSelector{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.ObjectSelector.resource_predicate": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.ObjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.ObjectSelector does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_ObjectSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcenetwork.acp_core.ObjectSelector.selector": if x.Selector == nil { return nil } switch x.Selector.(type) { case *ObjectSelector_Object: return x.Descriptor().Fields().ByName("object") case *ObjectSelector_Wildcard: return x.Descriptor().Fields().ByName("wildcard") case *ObjectSelector_ResourcePredicate: return x.Descriptor().Fields().ByName("resource_predicate") } default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.ObjectSelector", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_ObjectSelector) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ObjectSelector) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_ObjectSelector) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_ObjectSelector) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*ObjectSelector) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Selector.(type) { case *ObjectSelector_Object: if x == nil { break } l = options.Size(x.Object) n += 1 + l + runtime.Sov(uint64(l)) case *ObjectSelector_Wildcard: if x == nil { break } l = options.Size(x.Wildcard) n += 1 + l + runtime.Sov(uint64(l)) case *ObjectSelector_ResourcePredicate: if x == nil { break } l = len(x.ResourcePredicate) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*ObjectSelector) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Selector.(type) { case *ObjectSelector_Object: encoded, err := options.Marshal(x.Object) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa case *ObjectSelector_Wildcard: encoded, err := options.Marshal(x.Wildcard) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 case *ObjectSelector_ResourcePredicate: i -= len(x.ResourcePredicate) copy(dAtA[i:], x.ResourcePredicate) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ResourcePredicate))) i-- dAtA[i] = 0x1a } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*ObjectSelector) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ObjectSelector: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ObjectSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &Object{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Selector = &ObjectSelector_Object{v} iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Wildcard", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &WildcardSelector{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Selector = &ObjectSelector_Wildcard{v} iNdEx = postIndex case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResourcePredicate", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Selector = &ObjectSelector_ResourcePredicate{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_RelationSelector protoreflect.MessageDescriptor fd_RelationSelector_relation protoreflect.FieldDescriptor fd_RelationSelector_wildcard protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_selector_proto_init() md_RelationSelector = File_sourcenetwork_acp_core_relationship_selector_proto.Messages().ByName("RelationSelector") fd_RelationSelector_relation = md_RelationSelector.Fields().ByName("relation") fd_RelationSelector_wildcard = md_RelationSelector.Fields().ByName("wildcard") } var _ protoreflect.Message = (*fastReflection_RelationSelector)(nil) type fastReflection_RelationSelector RelationSelector func (x *RelationSelector) ProtoReflect() protoreflect.Message { return (*fastReflection_RelationSelector)(x) } func (x *RelationSelector) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_RelationSelector_messageType fastReflection_RelationSelector_messageType var _ protoreflect.MessageType = fastReflection_RelationSelector_messageType{} type fastReflection_RelationSelector_messageType struct{} func (x fastReflection_RelationSelector_messageType) Zero() protoreflect.Message { return (*fastReflection_RelationSelector)(nil) } func (x fastReflection_RelationSelector_messageType) New() protoreflect.Message { return new(fastReflection_RelationSelector) } func (x fastReflection_RelationSelector_messageType) Descriptor() protoreflect.MessageDescriptor { return md_RelationSelector } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_RelationSelector) Descriptor() protoreflect.MessageDescriptor { return md_RelationSelector } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_RelationSelector) Type() protoreflect.MessageType { return _fastReflection_RelationSelector_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_RelationSelector) New() protoreflect.Message { return new(fastReflection_RelationSelector) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_RelationSelector) Interface() protoreflect.ProtoMessage { return (*RelationSelector)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_RelationSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Selector != nil { switch o := x.Selector.(type) { case *RelationSelector_Relation: v := o.Relation value := protoreflect.ValueOfString(v) if !f(fd_RelationSelector_relation, value) { return } case *RelationSelector_Wildcard: v := o.Wildcard value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_RelationSelector_wildcard, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_RelationSelector) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.RelationSelector.relation": if x.Selector == nil { return false } else if _, ok := x.Selector.(*RelationSelector_Relation); ok { return true } else { return false } case "sourcenetwork.acp_core.RelationSelector.wildcard": if x.Selector == nil { return false } else if _, ok := x.Selector.(*RelationSelector_Wildcard); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationSelector does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationSelector) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationSelector.relation": x.Selector = nil case "sourcenetwork.acp_core.RelationSelector.wildcard": x.Selector = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationSelector does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_RelationSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.RelationSelector.relation": if x.Selector == nil { return protoreflect.ValueOfString("") } else if v, ok := x.Selector.(*RelationSelector_Relation); ok { return protoreflect.ValueOfString(v.Relation) } else { return protoreflect.ValueOfString("") } case "sourcenetwork.acp_core.RelationSelector.wildcard": if x.Selector == nil { return protoreflect.ValueOfMessage((*WildcardSelector)(nil).ProtoReflect()) } else if v, ok := x.Selector.(*RelationSelector_Wildcard); ok { return protoreflect.ValueOfMessage(v.Wildcard.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*WildcardSelector)(nil).ProtoReflect()) } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationSelector does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.RelationSelector.relation": cv := value.Interface().(string) x.Selector = &RelationSelector_Relation{Relation: cv} case "sourcenetwork.acp_core.RelationSelector.wildcard": cv := value.Message().Interface().(*WildcardSelector) x.Selector = &RelationSelector_Wildcard{Wildcard: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationSelector does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationSelector.wildcard": if x.Selector == nil { value := &WildcardSelector{} oneofValue := &RelationSelector_Wildcard{Wildcard: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Selector.(type) { case *RelationSelector_Wildcard: return protoreflect.ValueOfMessage(m.Wildcard.ProtoReflect()) default: value := &WildcardSelector{} oneofValue := &RelationSelector_Wildcard{Wildcard: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.RelationSelector.relation": panic(fmt.Errorf("field relation of message sourcenetwork.acp_core.RelationSelector is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationSelector does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_RelationSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.RelationSelector.relation": return protoreflect.ValueOfString("") case "sourcenetwork.acp_core.RelationSelector.wildcard": value := &WildcardSelector{} return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.RelationSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.RelationSelector does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_RelationSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcenetwork.acp_core.RelationSelector.selector": if x.Selector == nil { return nil } switch x.Selector.(type) { case *RelationSelector_Relation: return x.Descriptor().Fields().ByName("relation") case *RelationSelector_Wildcard: return x.Descriptor().Fields().ByName("wildcard") } default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.RelationSelector", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_RelationSelector) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_RelationSelector) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_RelationSelector) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_RelationSelector) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*RelationSelector) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Selector.(type) { case *RelationSelector_Relation: if x == nil { break } l = len(x.Relation) n += 1 + l + runtime.Sov(uint64(l)) case *RelationSelector_Wildcard: if x == nil { break } l = options.Size(x.Wildcard) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*RelationSelector) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Selector.(type) { case *RelationSelector_Relation: i -= len(x.Relation) copy(dAtA[i:], x.Relation) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relation))) i-- dAtA[i] = 0xa case *RelationSelector_Wildcard: encoded, err := options.Marshal(x.Wildcard) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*RelationSelector) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationSelector: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RelationSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Selector = &RelationSelector_Relation{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Wildcard", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &WildcardSelector{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Selector = &RelationSelector_Wildcard{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SubjectSelector protoreflect.MessageDescriptor fd_SubjectSelector_subject protoreflect.FieldDescriptor fd_SubjectSelector_wildcard protoreflect.FieldDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_selector_proto_init() md_SubjectSelector = File_sourcenetwork_acp_core_relationship_selector_proto.Messages().ByName("SubjectSelector") fd_SubjectSelector_subject = md_SubjectSelector.Fields().ByName("subject") fd_SubjectSelector_wildcard = md_SubjectSelector.Fields().ByName("wildcard") } var _ protoreflect.Message = (*fastReflection_SubjectSelector)(nil) type fastReflection_SubjectSelector SubjectSelector func (x *SubjectSelector) ProtoReflect() protoreflect.Message { return (*fastReflection_SubjectSelector)(x) } func (x *SubjectSelector) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_SubjectSelector_messageType fastReflection_SubjectSelector_messageType var _ protoreflect.MessageType = fastReflection_SubjectSelector_messageType{} type fastReflection_SubjectSelector_messageType struct{} func (x fastReflection_SubjectSelector_messageType) Zero() protoreflect.Message { return (*fastReflection_SubjectSelector)(nil) } func (x fastReflection_SubjectSelector_messageType) New() protoreflect.Message { return new(fastReflection_SubjectSelector) } func (x fastReflection_SubjectSelector_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SubjectSelector } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SubjectSelector) Descriptor() protoreflect.MessageDescriptor { return md_SubjectSelector } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SubjectSelector) Type() protoreflect.MessageType { return _fastReflection_SubjectSelector_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SubjectSelector) New() protoreflect.Message { return new(fastReflection_SubjectSelector) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SubjectSelector) Interface() protoreflect.ProtoMessage { return (*SubjectSelector)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SubjectSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Selector != nil { switch o := x.Selector.(type) { case *SubjectSelector_Subject: v := o.Subject value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_SubjectSelector_subject, value) { return } case *SubjectSelector_Wildcard: v := o.Wildcard value := protoreflect.ValueOfMessage(v.ProtoReflect()) if !f(fd_SubjectSelector_wildcard, value) { return } } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SubjectSelector) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "sourcenetwork.acp_core.SubjectSelector.subject": if x.Selector == nil { return false } else if _, ok := x.Selector.(*SubjectSelector_Subject); ok { return true } else { return false } case "sourcenetwork.acp_core.SubjectSelector.wildcard": if x.Selector == nil { return false } else if _, ok := x.Selector.(*SubjectSelector_Wildcard); ok { return true } else { return false } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SubjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SubjectSelector does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SubjectSelector) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "sourcenetwork.acp_core.SubjectSelector.subject": x.Selector = nil case "sourcenetwork.acp_core.SubjectSelector.wildcard": x.Selector = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SubjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SubjectSelector does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SubjectSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "sourcenetwork.acp_core.SubjectSelector.subject": if x.Selector == nil { return protoreflect.ValueOfMessage((*Subject)(nil).ProtoReflect()) } else if v, ok := x.Selector.(*SubjectSelector_Subject); ok { return protoreflect.ValueOfMessage(v.Subject.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*Subject)(nil).ProtoReflect()) } case "sourcenetwork.acp_core.SubjectSelector.wildcard": if x.Selector == nil { return protoreflect.ValueOfMessage((*WildcardSelector)(nil).ProtoReflect()) } else if v, ok := x.Selector.(*SubjectSelector_Wildcard); ok { return protoreflect.ValueOfMessage(v.Wildcard.ProtoReflect()) } else { return protoreflect.ValueOfMessage((*WildcardSelector)(nil).ProtoReflect()) } default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SubjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SubjectSelector does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SubjectSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "sourcenetwork.acp_core.SubjectSelector.subject": cv := value.Message().Interface().(*Subject) x.Selector = &SubjectSelector_Subject{Subject: cv} case "sourcenetwork.acp_core.SubjectSelector.wildcard": cv := value.Message().Interface().(*WildcardSelector) x.Selector = &SubjectSelector_Wildcard{Wildcard: cv} default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SubjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SubjectSelector does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SubjectSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SubjectSelector.subject": if x.Selector == nil { value := &Subject{} oneofValue := &SubjectSelector_Subject{Subject: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Selector.(type) { case *SubjectSelector_Subject: return protoreflect.ValueOfMessage(m.Subject.ProtoReflect()) default: value := &Subject{} oneofValue := &SubjectSelector_Subject{Subject: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } case "sourcenetwork.acp_core.SubjectSelector.wildcard": if x.Selector == nil { value := &WildcardSelector{} oneofValue := &SubjectSelector_Wildcard{Wildcard: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } switch m := x.Selector.(type) { case *SubjectSelector_Wildcard: return protoreflect.ValueOfMessage(m.Wildcard.ProtoReflect()) default: value := &WildcardSelector{} oneofValue := &SubjectSelector_Wildcard{Wildcard: value} x.Selector = oneofValue return protoreflect.ValueOfMessage(value.ProtoReflect()) } default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SubjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SubjectSelector does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SubjectSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "sourcenetwork.acp_core.SubjectSelector.subject": value := &Subject{} return protoreflect.ValueOfMessage(value.ProtoReflect()) case "sourcenetwork.acp_core.SubjectSelector.wildcard": value := &WildcardSelector{} return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.SubjectSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.SubjectSelector does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SubjectSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { case "sourcenetwork.acp_core.SubjectSelector.selector": if x.Selector == nil { return nil } switch x.Selector.(type) { case *SubjectSelector_Subject: return x.Descriptor().Fields().ByName("subject") case *SubjectSelector_Wildcard: return x.Descriptor().Fields().ByName("wildcard") } default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.SubjectSelector", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SubjectSelector) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SubjectSelector) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SubjectSelector) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SubjectSelector) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SubjectSelector) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l switch x := x.Selector.(type) { case *SubjectSelector_Subject: if x == nil { break } l = options.Size(x.Subject) n += 1 + l + runtime.Sov(uint64(l)) case *SubjectSelector_Wildcard: if x == nil { break } l = options.Size(x.Wildcard) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SubjectSelector) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } switch x := x.Selector.(type) { case *SubjectSelector_Subject: encoded, err := options.Marshal(x.Subject) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa case *SubjectSelector_Wildcard: encoded, err := options.Marshal(x.Wildcard) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SubjectSelector) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SubjectSelector: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SubjectSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &Subject{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Selector = &SubjectSelector_Subject{v} iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Wildcard", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } v := &WildcardSelector{} if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } x.Selector = &SubjectSelector_Wildcard{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_WildcardSelector protoreflect.MessageDescriptor ) func init() { file_sourcenetwork_acp_core_relationship_selector_proto_init() md_WildcardSelector = File_sourcenetwork_acp_core_relationship_selector_proto.Messages().ByName("WildcardSelector") } var _ protoreflect.Message = (*fastReflection_WildcardSelector)(nil) type fastReflection_WildcardSelector WildcardSelector func (x *WildcardSelector) ProtoReflect() protoreflect.Message { return (*fastReflection_WildcardSelector)(x) } func (x *WildcardSelector) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_WildcardSelector_messageType fastReflection_WildcardSelector_messageType var _ protoreflect.MessageType = fastReflection_WildcardSelector_messageType{} type fastReflection_WildcardSelector_messageType struct{} func (x fastReflection_WildcardSelector_messageType) Zero() protoreflect.Message { return (*fastReflection_WildcardSelector)(nil) } func (x fastReflection_WildcardSelector_messageType) New() protoreflect.Message { return new(fastReflection_WildcardSelector) } func (x fastReflection_WildcardSelector_messageType) Descriptor() protoreflect.MessageDescriptor { return md_WildcardSelector } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_WildcardSelector) Descriptor() protoreflect.MessageDescriptor { return md_WildcardSelector } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_WildcardSelector) Type() protoreflect.MessageType { return _fastReflection_WildcardSelector_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_WildcardSelector) New() protoreflect.Message { return new(fastReflection_WildcardSelector) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_WildcardSelector) Interface() protoreflect.ProtoMessage { return (*WildcardSelector)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_WildcardSelector) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_WildcardSelector) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.WildcardSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.WildcardSelector does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_WildcardSelector) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.WildcardSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.WildcardSelector does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_WildcardSelector) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.WildcardSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.WildcardSelector does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_WildcardSelector) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.WildcardSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.WildcardSelector does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_WildcardSelector) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.WildcardSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.WildcardSelector does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_WildcardSelector) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.WildcardSelector")) } panic(fmt.Errorf("message sourcenetwork.acp_core.WildcardSelector does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_WildcardSelector) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.WildcardSelector", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_WildcardSelector) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_WildcardSelector) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_WildcardSelector) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_WildcardSelector) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*WildcardSelector) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*WildcardSelector) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*WildcardSelector) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WildcardSelector: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WildcardSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/relationship_selector.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // RelationshipSelector models a set of predicates which are used to filter through // Relationships in a Policy. type RelationshipSelector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ObjectSelector *ObjectSelector `protobuf:"bytes,1,opt,name=object_selector,json=objectSelector,proto3" json:"object_selector,omitempty"` RelationSelector *RelationSelector `protobuf:"bytes,2,opt,name=relation_selector,json=relationSelector,proto3" json:"relation_selector,omitempty"` SubjectSelector *SubjectSelector `protobuf:"bytes,3,opt,name=subject_selector,json=subjectSelector,proto3" json:"subject_selector,omitempty"` } func (x *RelationshipSelector) Reset() { *x = RelationshipSelector{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RelationshipSelector) String() string { return protoimpl.X.MessageStringOf(x) } func (*RelationshipSelector) ProtoMessage() {} // Deprecated: Use RelationshipSelector.ProtoReflect.Descriptor instead. func (*RelationshipSelector) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_selector_proto_rawDescGZIP(), []int{0} } func (x *RelationshipSelector) GetObjectSelector() *ObjectSelector { if x != nil { return x.ObjectSelector } return nil } func (x *RelationshipSelector) GetRelationSelector() *RelationSelector { if x != nil { return x.RelationSelector } return nil } func (x *RelationshipSelector) GetSubjectSelector() *SubjectSelector { if x != nil { return x.SubjectSelector } return nil } // ObjectSelector models a filter for Relationship Objects type ObjectSelector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Selector: // // *ObjectSelector_Object // *ObjectSelector_Wildcard // *ObjectSelector_ResourcePredicate Selector isObjectSelector_Selector `protobuf_oneof:"selector"` } func (x *ObjectSelector) Reset() { *x = ObjectSelector{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ObjectSelector) String() string { return protoimpl.X.MessageStringOf(x) } func (*ObjectSelector) ProtoMessage() {} // Deprecated: Use ObjectSelector.ProtoReflect.Descriptor instead. func (*ObjectSelector) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_selector_proto_rawDescGZIP(), []int{1} } func (x *ObjectSelector) GetSelector() isObjectSelector_Selector { if x != nil { return x.Selector } return nil } func (x *ObjectSelector) GetObject() *Object { if x, ok := x.GetSelector().(*ObjectSelector_Object); ok { return x.Object } return nil } func (x *ObjectSelector) GetWildcard() *WildcardSelector { if x, ok := x.GetSelector().(*ObjectSelector_Wildcard); ok { return x.Wildcard } return nil } func (x *ObjectSelector) GetResourcePredicate() string { if x, ok := x.GetSelector().(*ObjectSelector_ResourcePredicate); ok { return x.ResourcePredicate } return "" } type isObjectSelector_Selector interface { isObjectSelector_Selector() } type ObjectSelector_Object struct { // object specifies an object which the Relationship must contain Object *Object `protobuf:"bytes,1,opt,name=object,proto3,oneof"` } type ObjectSelector_Wildcard struct { // wildcard matches any object Wildcard *WildcardSelector `protobuf:"bytes,2,opt,name=wildcard,proto3,oneof"` } type ObjectSelector_ResourcePredicate struct { ResourcePredicate string `protobuf:"bytes,3,opt,name=resource_predicate,json=resourcePredicate,proto3,oneof"` } func (*ObjectSelector_Object) isObjectSelector_Selector() {} func (*ObjectSelector_Wildcard) isObjectSelector_Selector() {} func (*ObjectSelector_ResourcePredicate) isObjectSelector_Selector() {} // RelationsSelector models a filter for Relationship Relations type RelationSelector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Selector: // // *RelationSelector_Relation // *RelationSelector_Wildcard Selector isRelationSelector_Selector `protobuf_oneof:"selector"` } func (x *RelationSelector) Reset() { *x = RelationSelector{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RelationSelector) String() string { return protoimpl.X.MessageStringOf(x) } func (*RelationSelector) ProtoMessage() {} // Deprecated: Use RelationSelector.ProtoReflect.Descriptor instead. func (*RelationSelector) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_selector_proto_rawDescGZIP(), []int{2} } func (x *RelationSelector) GetSelector() isRelationSelector_Selector { if x != nil { return x.Selector } return nil } func (x *RelationSelector) GetRelation() string { if x, ok := x.GetSelector().(*RelationSelector_Relation); ok { return x.Relation } return "" } func (x *RelationSelector) GetWildcard() *WildcardSelector { if x, ok := x.GetSelector().(*RelationSelector_Wildcard); ok { return x.Wildcard } return nil } type isRelationSelector_Selector interface { isRelationSelector_Selector() } type RelationSelector_Relation struct { // relation specifies a relation name which must exactly match the Relationship's Relation string `protobuf:"bytes,1,opt,name=relation,proto3,oneof"` } type RelationSelector_Wildcard struct { // wildcard matches any relation Wildcard *WildcardSelector `protobuf:"bytes,2,opt,name=wildcard,proto3,oneof"` } func (*RelationSelector_Relation) isRelationSelector_Selector() {} func (*RelationSelector_Wildcard) isRelationSelector_Selector() {} // SubjectSelector models a filter for Relationship Subjects type SubjectSelector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Selector: // // *SubjectSelector_Subject // *SubjectSelector_Wildcard Selector isSubjectSelector_Selector `protobuf_oneof:"selector"` } func (x *SubjectSelector) Reset() { *x = SubjectSelector{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SubjectSelector) String() string { return protoimpl.X.MessageStringOf(x) } func (*SubjectSelector) ProtoMessage() {} // Deprecated: Use SubjectSelector.ProtoReflect.Descriptor instead. func (*SubjectSelector) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_selector_proto_rawDescGZIP(), []int{3} } func (x *SubjectSelector) GetSelector() isSubjectSelector_Selector { if x != nil { return x.Selector } return nil } func (x *SubjectSelector) GetSubject() *Subject { if x, ok := x.GetSelector().(*SubjectSelector_Subject); ok { return x.Subject } return nil } func (x *SubjectSelector) GetWildcard() *WildcardSelector { if x, ok := x.GetSelector().(*SubjectSelector_Wildcard); ok { return x.Wildcard } return nil } type isSubjectSelector_Selector interface { isSubjectSelector_Selector() } type SubjectSelector_Subject struct { // subject requires an exact match between the given subject and a Relationship's subject Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3,oneof"` } type SubjectSelector_Wildcard struct { // wildcard matches any subject in a Relationship Wildcard *WildcardSelector `protobuf:"bytes,2,opt,name=wildcard,proto3,oneof"` } func (*SubjectSelector_Subject) isSubjectSelector_Selector() {} func (*SubjectSelector_Wildcard) isSubjectSelector_Selector() {} // WildcardSelector matches anything in a context type WildcardSelector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *WildcardSelector) Reset() { *x = WildcardSelector{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *WildcardSelector) String() string { return protoimpl.X.MessageStringOf(x) } func (*WildcardSelector) ProtoMessage() {} // Deprecated: Use WildcardSelector.ProtoReflect.Descriptor instead. func (*WildcardSelector) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_relationship_selector_proto_rawDescGZIP(), []int{4} } var File_sourcenetwork_acp_core_relationship_selector_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_relationship_selector_proto_rawDesc = []byte{ 0x0a, 0x32, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x29, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x4f, 0x0a, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x55, 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x10, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x52, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0xeb, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x19, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_relationship_selector_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_relationship_selector_proto_rawDescData = file_sourcenetwork_acp_core_relationship_selector_proto_rawDesc ) func file_sourcenetwork_acp_core_relationship_selector_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_relationship_selector_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_relationship_selector_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_relationship_selector_proto_rawDescData) }) return file_sourcenetwork_acp_core_relationship_selector_proto_rawDescData } var file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_sourcenetwork_acp_core_relationship_selector_proto_goTypes = []interface{}{ (*RelationshipSelector)(nil), // 0: sourcenetwork.acp_core.RelationshipSelector (*ObjectSelector)(nil), // 1: sourcenetwork.acp_core.ObjectSelector (*RelationSelector)(nil), // 2: sourcenetwork.acp_core.RelationSelector (*SubjectSelector)(nil), // 3: sourcenetwork.acp_core.SubjectSelector (*WildcardSelector)(nil), // 4: sourcenetwork.acp_core.WildcardSelector (*Object)(nil), // 5: sourcenetwork.acp_core.Object (*Subject)(nil), // 6: sourcenetwork.acp_core.Subject } var file_sourcenetwork_acp_core_relationship_selector_proto_depIdxs = []int32{ 1, // 0: sourcenetwork.acp_core.RelationshipSelector.object_selector:type_name -> sourcenetwork.acp_core.ObjectSelector 2, // 1: sourcenetwork.acp_core.RelationshipSelector.relation_selector:type_name -> sourcenetwork.acp_core.RelationSelector 3, // 2: sourcenetwork.acp_core.RelationshipSelector.subject_selector:type_name -> sourcenetwork.acp_core.SubjectSelector 5, // 3: sourcenetwork.acp_core.ObjectSelector.object:type_name -> sourcenetwork.acp_core.Object 4, // 4: sourcenetwork.acp_core.ObjectSelector.wildcard:type_name -> sourcenetwork.acp_core.WildcardSelector 4, // 5: sourcenetwork.acp_core.RelationSelector.wildcard:type_name -> sourcenetwork.acp_core.WildcardSelector 6, // 6: sourcenetwork.acp_core.SubjectSelector.subject:type_name -> sourcenetwork.acp_core.Subject 4, // 7: sourcenetwork.acp_core.SubjectSelector.wildcard:type_name -> sourcenetwork.acp_core.WildcardSelector 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_relationship_selector_proto_init() } func file_sourcenetwork_acp_core_relationship_selector_proto_init() { if File_sourcenetwork_acp_core_relationship_selector_proto != nil { return } file_sourcenetwork_acp_core_relationship_proto_init() if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RelationshipSelector); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ObjectSelector); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RelationSelector); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubjectSelector); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WildcardSelector); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[1].OneofWrappers = []interface{}{ (*ObjectSelector_Object)(nil), (*ObjectSelector_Wildcard)(nil), (*ObjectSelector_ResourcePredicate)(nil), } file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[2].OneofWrappers = []interface{}{ (*RelationSelector_Relation)(nil), (*RelationSelector_Wildcard)(nil), } file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes[3].OneofWrappers = []interface{}{ (*SubjectSelector_Subject)(nil), (*SubjectSelector_Wildcard)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_relationship_selector_proto_rawDesc, NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_relationship_selector_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_relationship_selector_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_relationship_selector_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_relationship_selector_proto = out.File file_sourcenetwork_acp_core_relationship_selector_proto_rawDesc = nil file_sourcenetwork_acp_core_relationship_selector_proto_goTypes = nil file_sourcenetwork_acp_core_relationship_selector_proto_depIdxs = nil } ================================================ FILE: api/sourcenetwork/acp_core/system.pulsar.go ================================================ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package acp_core import ( fmt "fmt" io "io" reflect "reflect" sync "sync" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) var ( md_Params protoreflect.MessageDescriptor ) func init() { file_sourcenetwork_acp_core_system_proto_init() md_Params = File_sourcenetwork_acp_core_system_proto.Messages().ByName("Params") } var _ protoreflect.Message = (*fastReflection_Params)(nil) type fastReflection_Params Params func (x *Params) ProtoReflect() protoreflect.Message { return (*fastReflection_Params)(x) } func (x *Params) slowProtoReflect() protoreflect.Message { mi := &file_sourcenetwork_acp_core_system_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } var _fastReflection_Params_messageType fastReflection_Params_messageType var _ protoreflect.MessageType = fastReflection_Params_messageType{} type fastReflection_Params_messageType struct{} func (x fastReflection_Params_messageType) Zero() protoreflect.Message { return (*fastReflection_Params)(nil) } func (x fastReflection_Params_messageType) New() protoreflect.Message { return new(fastReflection_Params) } func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { return md_Params } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_Params) Type() protoreflect.MessageType { return _fastReflection_Params_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_Params) New() protoreflect.Message { return new(fastReflection_Params) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { return (*Params)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Params")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Params does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Params")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Params does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Params")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Params does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Params")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Params does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Params")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Params does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: sourcenetwork.acp_core.Params")) } panic(fmt.Errorf("message sourcenetwork.acp_core.Params does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in sourcenetwork.acp_core.Params", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_Params) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*Params) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*Params) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: sourcenetwork/acp_core/system.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Params models the dynamic system parameters that callers can set type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { mi := &file_sourcenetwork_acp_core_system_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Params) String() string { return protoimpl.X.MessageStringOf(x) } func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { return file_sourcenetwork_acp_core_system_proto_rawDescGZIP(), []int{0} } var File_sourcenetwork_acp_core_system_proto protoreflect.FileDescriptor var file_sourcenetwork_acp_core_system_proto_rawDesc = []byte{ 0x0a, 0x23, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x08, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xdd, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x68, 0x75, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x21, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5c, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x3a, 0x41, 0x63, 0x70, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_sourcenetwork_acp_core_system_proto_rawDescOnce sync.Once file_sourcenetwork_acp_core_system_proto_rawDescData = file_sourcenetwork_acp_core_system_proto_rawDesc ) func file_sourcenetwork_acp_core_system_proto_rawDescGZIP() []byte { file_sourcenetwork_acp_core_system_proto_rawDescOnce.Do(func() { file_sourcenetwork_acp_core_system_proto_rawDescData = protoimpl.X.CompressGZIP(file_sourcenetwork_acp_core_system_proto_rawDescData) }) return file_sourcenetwork_acp_core_system_proto_rawDescData } var file_sourcenetwork_acp_core_system_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sourcenetwork_acp_core_system_proto_goTypes = []interface{}{ (*Params)(nil), // 0: sourcenetwork.acp_core.Params } var file_sourcenetwork_acp_core_system_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_sourcenetwork_acp_core_system_proto_init() } func file_sourcenetwork_acp_core_system_proto_init() { if File_sourcenetwork_acp_core_system_proto != nil { return } if !protoimpl.UnsafeEnabled { file_sourcenetwork_acp_core_system_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sourcenetwork_acp_core_system_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sourcenetwork_acp_core_system_proto_goTypes, DependencyIndexes: file_sourcenetwork_acp_core_system_proto_depIdxs, MessageInfos: file_sourcenetwork_acp_core_system_proto_msgTypes, }.Build() File_sourcenetwork_acp_core_system_proto = out.File file_sourcenetwork_acp_core_system_proto_rawDesc = nil file_sourcenetwork_acp_core_system_proto_goTypes = nil file_sourcenetwork_acp_core_system_proto_depIdxs = nil } ================================================ FILE: app/ante/ante.go ================================================ package ante import ( "cosmossdk.io/x/tx/signing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" ) // NewAnteHandler extends the default AnteHandler with custom decorators. func NewAnteHandler( accountKeeper ante.AccountKeeper, bankKeeper bankkeeper.Keeper, feegrantKeeper ante.FeegrantKeeper, channelKeeper *ibckeeper.Keeper, hubKeeper HubKeeper, signModeHandler *signing.HandlerMap, sigGasConsumer ante.SignatureVerificationGasConsumer, TxEncoder sdk.TxEncoder, ) sdk.AnteHandler { return sdk.ChainAnteDecorators( // Wraps panics with the string format of the transaction. NewHandlePanicDecorator(), // Initializes the context with the gas meter. Must run before any gas consumption. ante.NewSetUpContextDecorator(), // Rejects legacy transactions (SIGN_MODE_LEGACY_AMINO_JSON) that don't sign extension options. NewRejectLegacyTxDecorator(), // Validates extension options and extracts DID for feegrant usage. // Also stores JWS tokens for tracking and invalidation. NewExtensionOptionsDecorator(hubKeeper), // Performs basic validation on the transaction. ante.NewValidateBasicDecorator(), // Ensures that the tx has not exceeded the height timeout. ante.NewTxTimeoutHeightDecorator(), // Ensures that the memo does not exceed the allowed max length. ante.NewValidateMemoDecorator(accountKeeper), // Ensures that the gas limit covers the cost for transaction size. Consumes gas from the gas meter. ante.NewConsumeGasForTxSizeDecorator(accountKeeper), // Ensures that the fee payer has enough funds to pay for the tx, validates tx fees based on denom // (e.g. ucredit fees are higher than uopen fees) and deducts the fees. Does not affect tx priority. // Enforces DefaultMinGasPrice if min gas price was set to 0 by the validator to prevent spam. NewCustomDeductFeeDecorator(accountKeeper, bankKeeper, feegrantKeeper, hubKeeper, nil), // Sets public keys in the context for the fee payer and signers. Must happen before signature checks. ante.NewSetPubKeyDecorator(accountKeeper), // Ensures that the number of signatures does not exceed the tx's signature limit. ante.NewValidateSigCountDecorator(accountKeeper), // Ensures that the tx's gas limit is > the gas consumed based on signature verification. Consumes gas from the gas meter. ante.NewSigGasConsumeDecorator(accountKeeper, sigGasConsumer), // Validates signatures and ensure each signer's nonce matches its account sequence. No gas consumed from the gas meter. ante.NewSigVerificationDecorator(accountKeeper, signModeHandler), // Increments the sequence number (nonce) for all tx signers. ante.NewIncrementSequenceDecorator(accountKeeper), // Checks that the tx is not a duplicate IBC packet or update message. ibcante.NewRedundantRelayDecorator(channelKeeper), ) } var DefaultSigVerificationGasConsumer = ante.DefaultSigVerificationGasConsumer ================================================ FILE: app/ante/expected_keepers.go ================================================ package ante import ( "context" "time" hubtypes "github.com/sourcenetwork/sourcehub/x/hub/types" ) // HubKeeper is an interface for the x/hub module keeper. type HubKeeper interface { GetChainConfig(context.Context) hubtypes.ChainConfig // JWS token management StoreOrUpdateJWSToken( ctx context.Context, bearerToken string, issuerDid string, authorizedAccount string, issuedAt time.Time, expiresAt time.Time, ) error } ================================================ FILE: app/ante/extension.go ================================================ package ante import ( "time" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // ExtensionOptionsDecorator validates extension options in transactions. // It allows JWSExtensionOption and rejects all other extension options. // It also extracts DID from JWS extension options and stores it in context. // Additionally, it stores used JWS tokens for tracking and invalidation. type ExtensionOptionsDecorator struct { hubKeeper HubKeeper } // NewExtensionOptionsDecorator creates a new ExtensionOptionsDecorator. func NewExtensionOptionsDecorator(hubKeeper HubKeeper) ExtensionOptionsDecorator { return ExtensionOptionsDecorator{ hubKeeper: hubKeeper, } } // AnteHandle validates extension options, allowing only JWSExtensionOption. // It extracts DID from JWS extension options and stores it in context for later use. func (eod ExtensionOptionsDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { // Check if the transaction has extension options hasExtOptsTx, ok := tx.(ante.HasExtensionOptionsTx) if !ok { // Transaction doesn't support extension options, continue return next(ctx, tx, simulate) } extensionOptions := hasExtOptsTx.GetExtensionOptions() // If no extension options, continue normally if len(extensionOptions) == 0 { return next(ctx, tx, simulate) } // Reject transactions with more than one extension option if len(extensionOptions) > 1 { return ctx, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, "only one extension option is supported, got %d", len(extensionOptions), ) } // Process the single extension option extOpt := extensionOptions[0] // Check if it's a JWSExtensionOption jwsOpt, ok := extOpt.GetCachedValue().(*antetypes.JWSExtensionOption) if !ok { // Unknown extension option, reject return ctx, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "unsupported extension option type: %T", extOpt.GetCachedValue()) } currentTime := ctx.BlockTime() // Check if bearer auth should be ignored for validation skipAuthValidation := eod.hubKeeper != nil && eod.hubKeeper.GetChainConfig(ctx).IgnoreBearerAuth // Validate JWS format, signature, required claims, and timing did, authorizedAccount, err := validateJWSExtension(ctx, jwsOpt.BearerToken, currentTime, skipAuthValidation) if err != nil { ctx.Logger().Error("Bearer token validation failed", "error", err, "did", did) return ctx, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "bearer token validation failed: %v", err) } // Parse the bearer token to extract timestamps for storage bearerToken, err := parseValidateJWS(ctx, nil, jwsOpt.BearerToken, skipAuthValidation) if err != nil { return ctx, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "failed to parse bearer token: %v", err) } // Store or update the JWS token record if eod.hubKeeper != nil && !simulate { issuedAt := time.Unix(bearerToken.IssuedTime, 0) expiresAt := time.Unix(bearerToken.ExpirationTime, 0) err = eod.hubKeeper.StoreOrUpdateJWSToken( ctx, jwsOpt.BearerToken, did, authorizedAccount, issuedAt, expiresAt, ) if err != nil { // Log error but don't fail the transaction ctx.Logger().Error("failed to store JWS token", "error", err) } } // Ensure that transaction has at least one message msgs := tx.GetMsgs() if len(msgs) == 0 { return ctx, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "transaction has no messages") } // Check that all messages are signed by the same authorized account if !skipAuthValidation { for i, msg := range msgs { var msgSigner string if msgWithCreator, ok := msg.(interface{ GetCreator() string }); ok { msgSigner = msgWithCreator.GetCreator() } if msgSigner == "" { return ctx, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "cannot determine signer for message %d", i) } if msgSigner != authorizedAccount { return ctx, errorsmod.Wrapf( sdkerrors.ErrUnauthorized, "message %d signer mismatch: bearer token authorizes %s but message is signed by %s", i, authorizedAccount, msgSigner, ) } } } // Store extracted DID in context ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, did) return next(ctx, tx, simulate) } ================================================ FILE: app/ante/extension_test.go ================================================ package ante import ( "testing" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" appparams "github.com/sourcenetwork/sourcehub/app/params" test "github.com/sourcenetwork/sourcehub/testutil" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestExtensionOptionsDecorator_ValidJWSExtension(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create a valid JWS extension option with properly signed JWS using the test account address authorizedAccount := accs[0].acc.GetAddress().String() bearerToken, userDID := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "ExtensionOptionsDecorator should accept valid JWS extension option") // Verify DID was extracted and stored in context extractedDID := getExtractedDIDFromContext(newCtx) require.Equal(t, userDID, extractedDID, "DID should be extracted and stored in context") } func TestExtensionOptionsDecorator_InvalidJWSExtension(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create an invalid JWS extension option jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: "", } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject invalid JWS extension option") require.Contains(t, err.Error(), "failed parsing jws") } func TestExtensionOptionsDecorator_InvalidJWSFormat(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create an invalid JWS extension option jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: "invalid.format", } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject JWS with invalid format") require.Contains(t, err.Error(), "failed parsing jws") } func TestExtensionOptionsDecorator_InvalidJWSSignature(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create an invalid JWS extension option jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject invalid JWS signature") require.Contains(t, err.Error(), "missing required claim") } func TestExtensionOptionsDecorator_UnknownExtensionOption(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create an unknown extension option unknownOpt := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } // Pack the extension option any, err := codectypes.NewAnyWithValue(unknownOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject unknown extension option") require.Contains(t, err.Error(), "unsupported extension option type") } func TestExtensionOptionsDecorator_NoExtensionOptions(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // No extension options set privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "ExtensionOptionsDecorator should allow transactions with no extension options") // Verify no DID was extracted extractedDID := getExtractedDIDFromContext(newCtx) require.Empty(t, extractedDID, "No DID should be extracted when no extension options are present") } func TestExtensionOptionsDecorator_MultipleExtensionOptions(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create two JWS extension options authorizedAccount := accs[0].acc.GetAddress().String() bearerToken1, _ := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) bearerToken2, _ := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt1 := &antetypes.JWSExtensionOption{ BearerToken: bearerToken1, } jwsOpt2 := &antetypes.JWSExtensionOption{ BearerToken: bearerToken2, } // Pack both extension options any1, err := codectypes.NewAnyWithValue(jwsOpt1) require.NoError(t, err) any2, err := codectypes.NewAnyWithValue(jwsOpt2) require.NoError(t, err) // Add multiple extension options to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any1, any2) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject transactions with multiple extension options") require.Contains(t, err.Error(), "only one extension option is supported") require.Contains(t, err.Error(), "got 2") } func TestExtensionOptionsDecorator_JWSOptionWithInvalidSignature(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create a JWS extension option without DID in payload jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject JWS without valid DID in payload") require.Contains(t, err.Error(), "missing required claim") } func TestExtensionOptionsDecorator_ExtractDIDFromJWSPayload(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create a JWS with DID in payload using the test account address authorizedAccount := accs[0].acc.GetAddress().String() bearerToken, userDID := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "ExtensionOptionsDecorator should accept JWS extension option with DID in payload") // Verify DID was extracted from payload extractedDID := getExtractedDIDFromContext(newCtx) require.Equal(t, userDID, extractedDID, "DID should be extracted from JWS payload") } func TestExtensionOptionsDecorator_ValidJWSWithDIDInPayload(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create a JWS with DID in payload using the test account address authorizedAccount := accs[0].acc.GetAddress().String() bearerToken, userDID := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "ExtensionOptionsDecorator should accept JWS extension option") // Verify that payload DID is extracted and used extractedDID := getExtractedDIDFromContext(newCtx) require.Equal(t, userDID, extractedDID, "Payload DID should be extracted and used") } func TestExtensionOptionsDecorator_SecurityTamperedJWS(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create JWS with valid signature using the test account address authorizedAccount := accs[0].acc.GetAddress().String() bearerToken, _ := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) // Tamper with the JWS signature to make it invalid tamperedSignature := bearerToken[:len(bearerToken)-10] + "tampered123" jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: tamperedSignature, } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject tampered JWS") require.Contains(t, err.Error(), "could not verify actor signature") } func TestExtensionOptionsDecorator_SecurityNoDIDInPayload(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create JWS with no DID in payload (e.g. {"sub":"1234567890","name":"John Doe","iat":1516239022}) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject JWS without DID in payload") require.Contains(t, err.Error(), "missing required claim") } func TestExtensionAndFeeDecorators_WithDID(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() // Create mock feegrant keeper with DID support ctrl := gomock.NewController(t) defer ctrl.Finish() mockFeegrantKeeper := test.NewMockDIDFeegrantKeeper(ctrl) // Create both decorators extensionDecorator := NewExtensionOptionsDecorator(nil) feeDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, mockFeegrantKeeper, nil, nil) // Chain them in the same order as actual ante handler antehandler := sdk.ChainAnteDecorators(extensionDecorator, feeDecorator) accs := s.CreateTestAccounts(2) feePayer := accs[0].acc.GetAddress() feeGranter := accs[1].acc.GetAddress() msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create valid JWS extension option using the fee payer address authorizedAccount := feePayer.String() bearerToken, userDID := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } // Pack and add extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } // Set fee granter and amount s.txBuilder.SetFeeGranter(feeGranter) validFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 500)) s.txBuilder.SetFeeAmount(validFee) s.txBuilder.SetGasLimit(200000) // Mock expectations for DID-based feegrant mockFeegrantKeeper.EXPECT().UseFirstAvailableDIDGrant(gomock.Any(), userDID, validFee, gomock.Any()).Return(feeGranter, nil) // Fee deduction happens in the ante handler after feegrant validation s.bankKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), feeGranter, authtypes.FeeCollectorName, validFee).Return(nil) // Create transaction privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // Run the ante handler chain newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "Ante handler chain should succeed with DID-based feegrant") // Verify DID was passed through context extractedDID := getExtractedDIDFromContext(newCtx) require.Equal(t, userDID, extractedDID, "DID should be preserved in context after ante chain") } func TestExtensionAndFeeDecorators_NoDID(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() // Create both decorators extensionDecorator := NewExtensionOptionsDecorator(nil) feeDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) // Chain them in the same order as actual ante handler antehandler := sdk.ChainAnteDecorators(extensionDecorator, feeDecorator) accs := s.CreateTestAccounts(2) feePayer := accs[0].acc.GetAddress() feeGranter := accs[1].acc.GetAddress() msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Set fee granter and amount s.txBuilder.SetFeeGranter(feeGranter) validFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 500)) s.txBuilder.SetFeeAmount(validFee) s.txBuilder.SetGasLimit(200000) // Mock expectations for standard feegrant (no DID) s.feeGrantKeeper.EXPECT().UseGrantedFees(gomock.Any(), feeGranter, feePayer, validFee, gomock.Any()).Return(nil) s.bankKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), feeGranter, authtypes.FeeCollectorName, validFee).Return(nil) // Create transaction privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // Run the ante handler chain newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "Ante handler chain should succeed with standard feegrant") // Verify no DID was extracted extractedDID := getExtractedDIDFromContext(newCtx) require.Empty(t, extractedDID, "No DID should be in context when no extension options provided") } func TestExtensionOptionsDecorator_CorrectAuthorizedAccount(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create JWS token with authorized account matching the transaction signer authorizedAccount := accs[0].acc.GetAddress().String() bearerToken, userDID := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "ExtensionOptionsDecorator should accept JWS with matching authorized account") // Verify DID was extracted and stored in context extractedDID := getExtractedDIDFromContext(newCtx) require.Equal(t, userDID, extractedDID, "DID should be extracted and stored in context") } func TestExtensionOptionsDecorator_IncorrectAuthorizedAccount(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create JWS token with authorized account NOT matching the transaction signer wrongAuthorizedAccount := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" bearerToken, _ := test.GenerateSignedJWSWithMatchingDID(t, wrongAuthorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } // Pack the extension option any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) // Add extension option to the transaction if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject JWS with mismatched authorized account") require.Contains(t, err.Error(), "signer mismatch") } func TestExtensionOptionsDecorator_MultipleMessagesAllAuthorized(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) // Multiple ACP messages from same creator msg1 := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "policy 1", MarshalType: coretypes.PolicyMarshalingType_YAML, } msg2 := &acptypes.MsgEditPolicy{ Creator: accs[0].acc.GetAddress().String(), PolicyId: "policy-id-1", Policy: "updated policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } msg3 := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "policy 2", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg1, msg2, msg3)) authorizedAccount := accs[0].acc.GetAddress().String() bearerToken, userDID := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "ExtensionOptionsDecorator should accept transaction with multiple ACP messages all from authorized account") extractedDID := getExtractedDIDFromContext(newCtx) require.Equal(t, userDID, extractedDID, "DID should be extracted and stored in context") } func TestExtensionOptionsDecorator_MultipleMessagesOneUnauthorized(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewExtensionOptionsDecorator(nil) antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(2) // Mix of ACP messages from different creators - should be rejected msg1 := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "policy 1", MarshalType: coretypes.PolicyMarshalingType_YAML, } msg2 := &acptypes.MsgEditPolicy{ Creator: accs[1].acc.GetAddress().String(), // Different creator - unauthorized PolicyId: "policy-id-1", Policy: "malicious update", MarshalType: coretypes.PolicyMarshalingType_YAML, } msg3 := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "policy 2", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg1, msg2, msg3)) // JWS token authorized only for accs[0] authorizedAccount := accs[0].acc.GetAddress().String() bearerToken, _ := test.GenerateSignedJWSWithMatchingDID(t, authorizedAccount) jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: bearerToken, } any, err := codectypes.NewAnyWithValue(jwsOpt) require.NoError(t, err) if extBuilder, ok := s.txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv, accs[1].priv}, []uint64{0, 0}, []uint64{0, 0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "ExtensionOptionsDecorator should reject transaction with ACP message from unauthorized account") require.Contains(t, err.Error(), "message 1 signer mismatch", "Error should indicate which message failed") } ================================================ FILE: app/ante/extension_utils.go ================================================ package ante import ( "context" "encoding/json" "fmt" "strings" "time" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" sdk "github.com/cosmos/cosmos-sdk/types" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/go-jose/go-jose/v3" "github.com/lestrrat-go/jwx/v2/jwa" jwxjws "github.com/lestrrat-go/jwx/v2/jws" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/types" "github.com/sourcenetwork/sourcehub/x/acp/did" ) // parseValidateJWS processes a JWS Bearer token by unmarshaling it and verifying its signature. func parseValidateJWS(ctx context.Context, resolver did.Resolver, bearerJWS string, skipAuthAccountValidation bool) (antetypes.BearerToken, error) { bearerJWS = strings.TrimLeft(bearerJWS, " \n\t\r") if strings.HasPrefix(bearerJWS, "{") { return antetypes.BearerToken{}, fmt.Errorf("JSON serialization is not supported for security reasons") } jws, err := jose.ParseSigned(bearerJWS) if err != nil { return antetypes.BearerToken{}, fmt.Errorf("failed parsing jws: %v", err) } payloadBytes := jws.UnsafePayloadWithoutVerification() bearer, err := unmarshalJWSPayload(payloadBytes) if err != nil { return antetypes.BearerToken{}, err } err = validateBearerTokenValues(&bearer, skipAuthAccountValidation) if err != nil { return antetypes.BearerToken{}, err } // Verify signature against the issuer DID did := bearer.IssuerID didKey := key.DIDKey(did) pubBytes, _, keytype, err := didKey.Decode() if err != nil { return antetypes.BearerToken{}, fmt.Errorf("failed to resolve actor did: %v", err) } pubKey, err := crypto.BytesToPubKey(pubBytes, keytype) if err != nil { return antetypes.BearerToken{}, fmt.Errorf("failed to retrieve pub key: %v", err) } var algs []jwa.SignatureAlgorithm if secpKey, ok := pubKey.(secp.PublicKey); ok { // https://www.rfc-editor.org/rfc/rfc8812 algs = []jwa.SignatureAlgorithm{jwa.ES256K} pubKey = secpKey.ToECDSA() } else { algs, err = jwxjws.AlgorithmsForKey(pubKey) if err != nil { return antetypes.BearerToken{}, fmt.Errorf("failed to retrieve algs for pub key: %v", err) } } _, err = jwxjws.Verify([]byte(bearerJWS), jwxjws.WithKey(algs[0], pubKey)) if err != nil { return antetypes.BearerToken{}, fmt.Errorf("could not verify actor signature for jwk: %v", err) } return bearer, nil } // unmarshalJWSPayload unmarshals the JWS bytes into a BearerToken. func unmarshalJWSPayload(payload []byte) (antetypes.BearerToken, error) { obj := make(map[string]any) err := json.Unmarshal(payload, &obj) if err != nil { return antetypes.BearerToken{}, err } for _, claim := range antetypes.RequiredClaims() { _, ok := obj[claim] if !ok { return antetypes.BearerToken{}, fmt.Errorf("missing required claim: %s", claim) } } token := antetypes.BearerToken{} err = json.Unmarshal(payload, &token) if err != nil { return antetypes.BearerToken{}, fmt.Errorf("could not unmarshal payload: %v", err) } return token, nil } // validateProviderToken validates the provider token fields. func validateProviderToken(token *antetypes.ProviderToken) error { if token.ProviderName == "" { return fmt.Errorf("provider token missing provider_name") } if token.UserID == "" { return fmt.Errorf("provider token missing user_id") } if token.ActorDID == "" { return fmt.Errorf("provider token missing actor_did") } return nil } // validateBearerTokenValues validates the bearer token values. func validateBearerTokenValues(token *antetypes.BearerToken, skipAuthAccountValidation bool) error { if strings.HasPrefix(token.IssuerID, "did:") { if err := did.IsValidDID(token.IssuerID); err != nil { return fmt.Errorf("invalid issuer DID: %v", err) } } else { var providerToken antetypes.ProviderToken if err := json.Unmarshal([]byte(token.IssuerID), &providerToken); err != nil { return fmt.Errorf("issuer is neither a valid DID nor a valid provider token: %v", err) } } // Only validate authorized account if bearer auth is not being ignored if !skipAuthAccountValidation { if err := types.IsValidSourceHubAddr(token.AuthorizedAccount); err != nil { return fmt.Errorf("invalid authorized account: %v", err) } } if token.ExpirationTime < token.IssuedTime { return fmt.Errorf("issue time cannot be after expiration time") } return nil } // validateBearerToken validates the bearer token including timing func validateBearerToken(token *antetypes.BearerToken, currentTime *time.Time, skipAuthAccountValidation bool) error { err := validateBearerTokenValues(token, skipAuthAccountValidation) if err != nil { return err } now := currentTime.Unix() if now > token.ExpirationTime { return fmt.Errorf("token expired: current time %d > expiration time %d", now, token.ExpirationTime) } return nil } // validateJWSExtension parses and validates JWS extension option bearer token. // Returns the actor DID (from provider token if present, otherwise issuer DID) and the authorized account. // If skipAuthAccountValidation is true, the authorized account validation is skipped (when ignoreBearerAuth is enabled). func validateJWSExtension(ctx context.Context, bearerToken string, currentTime time.Time, skipAuthAccountValidation bool) (string, string, error) { resolver := &did.KeyResolver{} token, err := parseValidateJWS(ctx, resolver, bearerToken, skipAuthAccountValidation) if err != nil { return "", "", err } err = validateBearerToken(&token, ¤tTime, skipAuthAccountValidation) if err != nil { return "", "", err } actorDID := token.IssuerID if token.ProviderToken != "" { var providerToken antetypes.ProviderToken if err := json.Unmarshal([]byte(token.ProviderToken), &providerToken); err != nil { return "", "", fmt.Errorf("failed to unmarshal provider token: %v", err) } if err := validateProviderToken(&providerToken); err != nil { return "", "", err } actorDID = providerToken.ActorDID } return actorDID, token.AuthorizedAccount, nil } // getExtractedDIDFromContext retrieves the extracted DID from context. func getExtractedDIDFromContext(ctx sdk.Context) string { if did, ok := ctx.Value(appparams.ExtractedDIDContextKey).(string); ok { return did } return "" } ================================================ FILE: app/ante/fee.go ================================================ package ante import ( "bytes" "context" "fmt" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // TxFeeChecker validates provided fee and returns the effective fee and tx priority. type TxFeeChecker func(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) // CustomDeductFeeDecorator deducts fees from the fee payer. type CustomDeductFeeDecorator struct { accountKeeper ante.AccountKeeper bankKeeper types.BankKeeper feegrantKeeper ante.FeegrantKeeper txFeeChecker TxFeeChecker hubKeeper HubKeeper } // NewCustomDeductFeeDecorator initializes custom deduct fee decorator with a fee checker. func NewCustomDeductFeeDecorator( ak ante.AccountKeeper, bk types.BankKeeper, fk ante.FeegrantKeeper, hk HubKeeper, tfc TxFeeChecker, ) CustomDeductFeeDecorator { if tfc == nil { tfc = func(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) { return checkTxFeeWithMinGasPrices(ctx, tx, hk) } } return CustomDeductFeeDecorator{ accountKeeper: ak, bankKeeper: bk, feegrantKeeper: fk, hubKeeper: hk, txFeeChecker: tfc, } } // AnteHandle performs fee validation and deduction for transactions. Transactions at genesis bypass fee validation. func (cdfd CustomDeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) ( sdk.Context, error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "tx must be a FeeTx") } // Skip fee validation and deduction for transactions at genesis if ctx.BlockHeight() == 0 { return next(ctx, tx, simulate) } if !simulate && ctx.BlockHeight() > 0 && feeTx.GetGas() == 0 { return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidGasLimit, "must provide positive gas") } var ( priority int64 err error ) fees := feeTx.GetFee() if !simulate { // Check tx fees with min gas prices fees, priority, err = cdfd.txFeeChecker(ctx, tx) if err != nil { return ctx, err } } if err := cdfd.checkDeductFee(ctx, tx, fees); err != nil { return ctx, err } newCtx := ctx.WithPriority(priority) return next(newCtx, tx, simulate) } // checkTxFeeWithMinGasPrices checks if the tx fee with denom fee multiplier >= min gas price of the validator. // Enforces the DefaultMinGasPrice to prevent spam if minimum gas price was set to 0 by the validator. // NOTE: Always returns 0 for transaction priority because we handle TxPriority in priority_lane.go. func checkTxFeeWithMinGasPrices(ctx sdk.Context, tx sdk.Tx, hubKeeper HubKeeper) (sdk.Coins, int64, error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { return nil, 0, errorsmod.Wrap(sdkerrors.ErrTxDecode, "tx must be a FeeTx") } fees := feeTx.GetFee() gas := feeTx.GetGas() // Allow zero-fee transactions if allowed by app config and the "--fees" flag is omitted if fees.Empty() { if hubKeeper != nil && hubKeeper.GetChainConfig(ctx).AllowZeroFeeTxs { return fees, 0, nil } return nil, 0, sdkerrors.ErrInsufficientFee.Wrap("zero fees are not allowed") } if fees.Len() > 1 { return nil, 0, errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "only one fee denomination is allowed, got: %s", fees.String()) } // Validate provided fees if this is a CheckTx if ctx.IsCheckTx() { fee := fees[0] minGasPrice := ctx.MinGasPrices().AmountOf(fee.Denom) // Denoms missing from MinGasPrices() are not supported if minGasPrice.IsNil() { return nil, 0, errorsmod.Wrapf( sdkerrors.ErrInvalidCoins, "invalid fee denom: %s is not supported, available fee denoms: %s", fee.Denom, ctx.MinGasPrices(), ) } // Enforce default min gas price to prevent spam if it was set to 0 by the validator if minGasPrice.IsZero() { minGasPrice = math.LegacyMustNewDecFromStr(appparams.DefaultMinGasPrice) } // Calculate required fee by multiplying minimum gas price by gas limit and denom multiplier denomFeeMultiplier := math.LegacyOneDec() if fee.Denom == appparams.MicroCreditDenom { denomFeeMultiplier = math.LegacyNewDec(appparams.CreditFeeMultiplier) } requiredAmount := minGasPrice.Mul(math.LegacyNewDec(int64(gas))).Mul(denomFeeMultiplier).Ceil().RoundInt() // Make sure that provided fee is at least the required amount if fee.Amount.LT(requiredAmount) { return nil, 0, errorsmod.Wrapf( sdkerrors.ErrInsufficientFee, "insufficient fee; got: %s required: %s", fee, sdk.NewCoin(fee.Denom, requiredAmount), ) } } return fees, 0, nil } // checkDeductFee checks and deducts fees from the fee payer. func (cdfd CustomDeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fees sdk.Coins) error { feeTx, ok := sdkTx.(sdk.FeeTx) if !ok { return errorsmod.Wrap(sdkerrors.ErrTxDecode, "tx must be a FeeTx") } if addr := cdfd.accountKeeper.GetModuleAddress(types.FeeCollectorName); addr == nil { return fmt.Errorf("fee collector module account (%s) has not been set", types.FeeCollectorName) } feePayer := feeTx.FeePayer() feeGranter := feeTx.FeeGranter() // Determine who will pay the fees deductFeesFrom, err := cdfd.handleFeegrant(ctx, feeGranter, feePayer, fees, sdkTx.GetMsgs()) if err != nil { return err } deductFeesFromAcc := cdfd.accountKeeper.GetAccount(ctx, deductFeesFrom) if deductFeesFromAcc == nil { return sdkerrors.ErrUnknownAddress.Wrapf("fee payer address: %s does not exist", deductFeesFrom) } if !fees.IsZero() { err := deductFees(cdfd.bankKeeper, ctx, deductFeesFromAcc, fees) if err != nil { return err } } ctx.EventManager().EmitEvent(sdk.NewEvent( sdk.EventTypeTx, sdk.NewAttribute(sdk.AttributeKeyFee, fees.String()), sdk.NewAttribute(sdk.AttributeKeyFeePayer, sdk.AccAddress(deductFeesFrom).String()), )) return nil } // handleFeegrant determines who should pay for fees based on feegrant configuration. // It handles both DID-based feegrants (when DID is extracted from context) and standard feegrants. // Returns the address that should be charged for fees, or an error if feegrant validation fails. func (cdfd CustomDeductFeeDecorator) handleFeegrant( ctx sdk.Context, feeGranter []byte, feePayer sdk.AccAddress, fees sdk.Coins, msgs []sdk.Msg, ) (sdk.AccAddress, error) { extractedDID := getExtractedDIDFromContext(ctx) // If DID was extracted, try to use the first available grant for that DID if extractedDID != "" && cdfd.feegrantKeeper != nil { if didKeeper, ok := cdfd.feegrantKeeper.(interface { UseFirstAvailableDIDGrant(ctx context.Context, granteeDID string, fee sdk.Coins, msgs []sdk.Msg) (sdk.AccAddress, error) }); ok { usedGranter, err := didKeeper.UseFirstAvailableDIDGrant(ctx, extractedDID, fees, msgs) if err == nil { return usedGranter, nil } } } // If no DID extracted, try to use fee granter from the tx if feeGranter != nil { feeGranterAddr := sdk.AccAddress(feeGranter) if cdfd.feegrantKeeper == nil { return nil, sdkerrors.ErrInvalidRequest.Wrap("fee grants are not enabled") } if !bytes.Equal(feeGranterAddr, feePayer) { err := cdfd.feegrantKeeper.UseGrantedFees(ctx, feeGranterAddr, feePayer, fees, msgs) if err != nil { return nil, errorsmod.Wrapf(err, "%s does not allow to pay fees for %s", feeGranter, feePayer) } } return feeGranterAddr, nil } // If there is no fee grant, we deduct from the fee payer return feePayer, nil } // deductFees deducts fees from the given account. func deductFees(bankKeeper types.BankKeeper, ctx sdk.Context, acc sdk.AccountI, fees sdk.Coins) error { if !fees.IsValid() { return errorsmod.Wrapf(sdkerrors.ErrInsufficientFee, "invalid fee amount: %s", fees) } err := bankKeeper.SendCoinsFromAccountToModule(ctx, acc.GetAddress(), types.FeeCollectorName, fees) if err != nil { return errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, err.Error()) } return nil } ================================================ FILE: app/ante/fee_test.go ================================================ package ante import ( "testing" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "cosmossdk.io/math" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" appparams "github.com/sourcenetwork/sourcehub/app/params" test "github.com/sourcenetwork/sourcehub/testutil" ) // createCustomDecoratorWithMockDIDKeeper creates a custom decorator with DID-based mock keeper func createCustomDecoratorWithMockDIDKeeper(t *testing.T, s *AnteTestSuite) (*CustomDeductFeeDecorator, *test.MockDIDFeegrantKeeper) { ctrl := gomock.NewController(t) mockKeeper := test.NewMockDIDFeegrantKeeper(ctrl) decorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, mockKeeper, nil, nil) return &decorator, mockKeeper } func TestCustomDeductFeeDecorator_CheckTx_ZeroGas(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() customDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) antehandler := sdk.ChainAnteDecorators(customDecorator) accs := s.CreateTestAccounts(1) msg := testdata.NewTestMsg(accs[0].acc.GetAddress()) require.NoError(t, s.txBuilder.SetMsgs(msg)) // set zero gas s.txBuilder.SetGasLimit(0) privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // set IsCheckTx to true s.ctx = s.ctx.WithIsCheckTx(true) _, err = antehandler(s.ctx, tx, false) require.Error(t, err) // zero gas is accepted in simulation mode _, err = antehandler(s.ctx, tx, true) require.NoError(t, err) } func TestCustomDeductFeeDecorator_CheckTx_InsufficientFee(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() customDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) antehandler := sdk.ChainAnteDecorators(customDecorator) accs := s.CreateTestAccounts(1) msg := testdata.NewTestMsg(accs[0].acc.GetAddress()) require.NoError(t, s.txBuilder.SetMsgs(msg)) gasLimit := uint64(20000) s.txBuilder.SetGasLimit(gasLimit) // set insufficient fee insufficientFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 1)) s.txBuilder.SetFeeAmount(insufficientFee) privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // set IsCheckTx to true s.ctx = s.ctx.WithIsCheckTx(true) _, err = antehandler(s.ctx, tx, false) require.Error(t, err) require.Contains(t, err.Error(), "insufficient fee") } func TestCustomDeductFeeDecorator_CheckTx_ValidFee(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() customDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) antehandler := sdk.ChainAnteDecorators(customDecorator) accs := s.CreateTestAccounts(1) msg := testdata.NewTestMsg(accs[0].acc.GetAddress()) require.NoError(t, s.txBuilder.SetMsgs(msg)) gasLimit := uint64(20000) s.txBuilder.SetGasLimit(gasLimit) // set valid fee validFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) s.txBuilder.SetFeeAmount(validFee) s.bankKeeper.EXPECT().SendCoinsFromAccountToModule( gomock.Any(), accs[0].acc.GetAddress(), authtypes.FeeCollectorName, validFee, ).Return(nil).Times(1) privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // set IsCheckTx to true s.ctx = s.ctx.WithIsCheckTx(true) _, err = antehandler(s.ctx, tx, false) require.NoError(t, err) } func TestCustomDeductFeeDecorator_DeliverTx_FeeGranter(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() customDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) antehandler := sdk.ChainAnteDecorators(customDecorator) accs := s.CreateTestAccounts(2) feePayer := accs[0].acc.GetAddress() feeGranter := accs[1].acc.GetAddress() msg := testdata.NewTestMsg(feePayer) require.NoError(t, s.txBuilder.SetMsgs(msg)) gasLimit := uint64(20000) s.txBuilder.SetGasLimit(gasLimit) // set valid fee and fee granter validFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) s.txBuilder.SetFeeGranter(feeGranter) s.txBuilder.SetFeeAmount(validFee) s.bankKeeper.EXPECT().SendCoinsFromAccountToModule( gomock.Any(), feeGranter, authtypes.FeeCollectorName, validFee, ).Return(nil).Times(1) privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) s.feeGrantKeeper.EXPECT().UseGrantedFees(gomock.Any(), feeGranter, feePayer, gomock.Any(), gomock.Any()).Return(nil) _, err = antehandler(s.ctx, tx, false) require.NoError(t, err) } func TestCustomDeductFeeDecorator_DeliverTx(t *testing.T) { s := SetupTestSuite(t, false) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() cdfd := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, nil, nil, nil) antehandler := sdk.ChainAnteDecorators(cdfd) accs := s.CreateTestAccounts(1) msg := testdata.NewTestMsg(accs[0].acc.GetAddress()) require.NoError(t, s.txBuilder.SetMsgs(msg)) gasLimit := testdata.NewTestGasLimit() s.txBuilder.SetGasLimit(gasLimit) // set valid fee validFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) s.txBuilder.SetFeeAmount(validFee) privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) s.bankKeeper.EXPECT().SendCoinsFromAccountToModule( gomock.Any(), accs[0].acc.GetAddress(), authtypes.FeeCollectorName, validFee, ).Return(sdkerrors.ErrInsufficientFunds).Times(1) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "Tx did not error when fee payer had insufficient funds") s.bankKeeper.EXPECT().SendCoinsFromAccountToModule( gomock.Any(), accs[0].acc.GetAddress(), authtypes.FeeCollectorName, validFee, ).Return(nil).Times(1) _, err = antehandler(s.ctx, tx, false) require.NoError(t, err, "Tx errored after account has been set with sufficient funds") } func TestCustomDeductFeeDecorator_OpenDenomFees(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() cdfd := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) antehandler := sdk.ChainAnteDecorators(cdfd) accs := s.CreateTestAccounts(1) msg := testdata.NewTestMsg(accs[0].acc.GetAddress()) require.NoError(t, s.txBuilder.SetMsgs(msg)) gasLimit := uint64(10) s.txBuilder.SetGasLimit(gasLimit) // set valid uopen fee validFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) s.txBuilder.SetFeeAmount(validFee) s.bankKeeper.EXPECT().SendCoinsFromAccountToModule( gomock.Any(), accs[0].acc.GetAddress(), authtypes.FeeCollectorName, validFee, ).Return(nil).Times(3) privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // set 20 uopen as gas price so tx with 100 fee fails (200 required) uopenPrice := sdk.NewDecCoinFromDec(appparams.MicroOpenDenom, math.LegacyNewDec(20)) highGasPrice := []sdk.DecCoin{uopenPrice} s.ctx = s.ctx.WithMinGasPrices(highGasPrice) // set IsCheckTx to true s.ctx = s.ctx.WithIsCheckTx(true) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "CustomDeductFeeDecorator should have errored on too low fee for local gasPrice") // antehandler should not error since we do not check minGasPrice in simulation mode cacheCtx, _ := s.ctx.CacheContext() _, err = antehandler(cacheCtx, tx, true) require.NoError(t, err, "CustomDeductFeeDecorator should not have errored in simulation mode") // set IsCheckTx to false s.ctx = s.ctx.WithIsCheckTx(false) // antehandler should not error since we do not check minGasPrice in DeliverTx _, err = antehandler(s.ctx, tx, false) require.NoError(t, err, "CustomDeductFeeDecorator returned error in DeliverTx") // set IsCheckTx back to true for testing sufficient mempool fee s.ctx = s.ctx.WithIsCheckTx(true) // set 1 uopen as gas price so tx with 100 fee succeeds uopenPrice = sdk.NewDecCoinFromDec(appparams.MicroOpenDenom, math.LegacyOneDec()) lowGasPrice := []sdk.DecCoin{uopenPrice} s.ctx = s.ctx.WithMinGasPrices(lowGasPrice) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "CustomDeductFeeDecorator should not have errored on fee higher than local gasPrice") require.Equal(t, int64(0), newCtx.Priority()) } func TestCustomDeductFeeDecorator_CreditDenomFees(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() cdfd := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) antehandler := sdk.ChainAnteDecorators(cdfd) accs := s.CreateTestAccounts(1) msg := testdata.NewTestMsg(accs[0].acc.GetAddress()) require.NoError(t, s.txBuilder.SetMsgs(msg)) gasLimit := uint64(10) s.txBuilder.SetGasLimit(gasLimit) // set valid fee in ucredit validFee := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroCreditDenom, 100)) s.txBuilder.SetFeeAmount(validFee) s.bankKeeper.EXPECT().SendCoinsFromAccountToModule( gomock.Any(), accs[0].acc.GetAddress(), authtypes.FeeCollectorName, validFee, ).Return(nil).Times(3) privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // set 10 ucredit as gas price so tx with 100 fee fails (10 * 10 * 10 required due to CreditFeeMultiplier) uopenPrice := sdk.NewDecCoinFromDec(appparams.MicroCreditDenom, math.LegacyNewDec(10)) highGasPrice := []sdk.DecCoin{uopenPrice} s.ctx = s.ctx.WithMinGasPrices(highGasPrice) // set IsCheckTx to true s.ctx = s.ctx.WithIsCheckTx(true) _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "CustomDeductFeeDecorator should have errored on too low fee for local gasPrice") // antehandler should not error since we do not check minGasPrice in simulation mode cacheCtx, _ := s.ctx.CacheContext() _, err = antehandler(cacheCtx, tx, true) require.NoError(t, err, "CustomDeductFeeDecorator should not have errored in simulation mode") // set IsCheckTx to false s.ctx = s.ctx.WithIsCheckTx(false) // antehandler should not error since we do not check minGasPrice in DeliverTx _, err = antehandler(s.ctx, tx, false) require.NoError(t, err, "CustomDeductFeeDecorator returned error in DeliverTx") // set IsCheckTx back to true for testing sufficient mempool fee s.ctx = s.ctx.WithIsCheckTx(true) // set 1 ucredit as gas price so tx with 100 fee succeeds (1 * 10 * 10 required) uopenPrice = sdk.NewDecCoinFromDec(appparams.MicroCreditDenom, math.LegacyOneDec()) lowGasPrice := []sdk.DecCoin{uopenPrice} s.ctx = s.ctx.WithMinGasPrices(lowGasPrice) newCtx, err := antehandler(s.ctx, tx, false) require.NoError(t, err, "CustomDeductFeeDecorator should not have errored on fee higher than local gasPrice") require.Equal(t, int64(0), newCtx.Priority()) } func TestCustomDeductFeeDecorator_HandleFeegrant_WithDID(t *testing.T) { s := SetupTestSuite(t, true) // Create decorator with mock DID keeper customDecorator, mockFeegrantKeeper := createCustomDecoratorWithMockDIDKeeper(t, s) accs := s.CreateTestAccounts(2) granter := accs[0].acc.GetAddress() feePayer := accs[1].acc.GetAddress() fees := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) msgs := []sdk.Msg{testdata.NewTestMsg(feePayer)} testDID := "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH" // Set DID in context to simulate extraction from JWS extension ctx := s.ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) // Verify DID was properly set in context extractedDID := getExtractedDIDFromContext(ctx) require.Equal(t, testDID, extractedDID, "DID should be properly set in context") // Expect DID-based feegrant to be called mockFeegrantKeeper.EXPECT().UseFirstAvailableDIDGrant(ctx, testDID, fees, msgs).Return(granter, nil) deductFrom, err := customDecorator.handleFeegrant(ctx, granter.Bytes(), feePayer, fees, msgs) require.NoError(t, err, "handleFeegrant should succeed with DID-based feegrant") require.Equal(t, granter, deductFrom, "should return the granter address from UseFirstAvailableDIDGrant") } func TestCustomDeductFeeDecorator_HandleFeegrant_WithoutDID(t *testing.T) { s := SetupTestSuite(t, true) customDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) accs := s.CreateTestAccounts(2) granter := accs[0].acc.GetAddress() feePayer := accs[1].acc.GetAddress() fees := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) msgs := []sdk.Msg{testdata.NewTestMsg(feePayer)} // No DID in context - should use standard feegrant ctx := s.ctx // Expect standard feegrant to be called s.feeGrantKeeper.EXPECT().UseGrantedFees(ctx, granter, feePayer, fees, msgs).Return(nil) deductFrom, err := customDecorator.handleFeegrant(ctx, granter.Bytes(), feePayer, fees, msgs) require.NoError(t, err, "handleFeegrant should succeed with standard feegrant") require.Equal(t, granter, deductFrom, "should return the granter address") } func TestCustomDeductFeeDecorator_HandleFeegrant_DIDBasedFallback(t *testing.T) { s := SetupTestSuite(t, true) // Create decorator with mock DID keeper customDecorator, mockFeegrantKeeper := createCustomDecoratorWithMockDIDKeeper(t, s) accs := s.CreateTestAccounts(2) feePayer := accs[1].acc.GetAddress() fees := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) msgs := []sdk.Msg{testdata.NewTestMsg(feePayer)} testDID := "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH" // Set DID in context ctx := s.ctx.WithValue(appparams.ExtractedDIDContextKey, testDID) // When DID-based feegrant fails (e.g., no grant found), it should fall back to feePayer expectedErr := sdkerrors.ErrNotFound.Wrap("no usable fee-grant found for DID") mockFeegrantKeeper.EXPECT().UseFirstAvailableDIDGrant(ctx, testDID, fees, msgs).Return(nil, expectedErr) deductFrom, err := customDecorator.handleFeegrant(ctx, nil, feePayer, fees, msgs) require.NoError(t, err, "handleFeegrant should fall back to feePayer when DID grant not found") require.Equal(t, feePayer, deductFrom, "should return feePayer when DID grant fails and no feeGranter specified") } func TestCustomDeductFeeDecorator_HandleFeegrant_StandardError(t *testing.T) { s := SetupTestSuite(t, true) customDecorator := NewCustomDeductFeeDecorator(s.accountKeeper, s.bankKeeper, s.feeGrantKeeper, nil, nil) accs := s.CreateTestAccounts(2) granter := accs[0].acc.GetAddress() feePayer := accs[1].acc.GetAddress() fees := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 100)) msgs := []sdk.Msg{testdata.NewTestMsg(feePayer)} // No DID in context ctx := s.ctx // Expect standard feegrant to return error expectedErr := sdkerrors.ErrUnauthorized.Wrap("fee allowance not found") s.feeGrantKeeper.EXPECT().UseGrantedFees(ctx, granter, feePayer, fees, msgs).Return(expectedErr) _, err := customDecorator.handleFeegrant(ctx, granter.Bytes(), feePayer, fees, msgs) require.Error(t, err, "handleFeegrant should return error from standard feegrant") require.Contains(t, err.Error(), "fee allowance not found") } ================================================ FILE: app/ante/panic.go ================================================ package ante import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" ) // HandlePanicDecorator catches and wraps panics in the transaction that caused them. type HandlePanicDecorator struct{} func NewHandlePanicDecorator() HandlePanicDecorator { return HandlePanicDecorator{} } func (d HandlePanicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { defer func() { if r := recover(); r != nil { panic(fmt.Sprint(r, FormatTx(tx))) } }() return next(ctx, tx, simulate) } func FormatTx(tx sdk.Tx) string { output := "\ntransaction failed:\n" for _, msg := range tx.GetMsgs() { output += fmt.Sprintf("%T{%s}\n", msg, msg) } return output } ================================================ FILE: app/ante/panic_test.go ================================================ package ante_test import ( "fmt" "testing" "github.com/sourcenetwork/sourcehub/app/ante" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" appparams "github.com/sourcenetwork/sourcehub/app/params" test "github.com/sourcenetwork/sourcehub/testutil" "github.com/sourcenetwork/sourcehub/testutil/sample" "github.com/stretchr/testify/require" ) type mockPanicDecorator struct{} func (d mockPanicDecorator) AnteHandle(_ sdk.Context, _ sdk.Tx, _ bool, _ sdk.AnteHandler) (newCtx sdk.Context, err error) { panic("panic") } func TestPanicHandlerDecorator(t *testing.T) { decorator := ante.NewHandlePanicDecorator() anteHandler := sdk.ChainAnteDecorators(decorator, mockPanicDecorator{}) encCfg := test.CreateTestEncodingConfig() builder := encCfg.TxConfig.NewTxBuilder() err := builder.SetMsgs(banktypes.NewMsgSend(sample.RandomAccAddress(), sample.RandomAccAddress(), sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 100)))) require.NoError(t, err) tx := builder.GetTx() defer func() { r := recover() require.NotNil(t, r) require.Equal(t, fmt.Sprint("panic", ante.FormatTx(tx)), r) }() _, _ = anteHandler(sdk.Context{}, tx, false) } ================================================ FILE: app/ante/reject_legacy.go ================================================ package ante import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // RejectLegacyTxDecorator rejects transactions signed with SIGN_MODE_LEGACY_AMINO_JSON. // Legacy transactions do not support extension options, which means the extension options // part of the transaction is not signed. This creates a potential security vulnerability // where extension options could be modified without invalidating the signature. type RejectLegacyTxDecorator struct{} // NewRejectLegacyTxDecorator creates a new RejectLegacyTxDecorator. func NewRejectLegacyTxDecorator() RejectLegacyTxDecorator { return RejectLegacyTxDecorator{} } // AnteHandle rejects transactions that use SIGN_MODE_LEGACY_AMINO_JSON. func (rltd RejectLegacyTxDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { sigTx, ok := tx.(authsigning.SigVerifiableTx) if !ok { return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } sigs, err := sigTx.GetSignaturesV2() if err != nil { return ctx, err } // Check all signatures for legacy amino sign mode for i, sig := range sigs { if hasLegacyAminoSignMode(sig.Data) { return ctx, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, "signature %d uses SIGN_MODE_LEGACY_AMINO_JSON which is not supported due to security concerns (extension options are not signed)", i, ) } } return next(ctx, tx, simulate) } // hasLegacyAminoSignMode recursively checks if any signature uses SIGN_MODE_LEGACY_AMINO_JSON. func hasLegacyAminoSignMode(sigData signing.SignatureData) bool { switch data := sigData.(type) { case *signing.SingleSignatureData: return data.SignMode == signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON case *signing.MultiSignatureData: for _, sig := range data.Signatures { if hasLegacyAminoSignMode(sig) { return true } } return false default: return false } } ================================================ FILE: app/ante/reject_legacy_test.go ================================================ package ante import ( "testing" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/stretchr/testify/require" coretypes "github.com/sourcenetwork/acp_core/pkg/types" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestRejectLegacyTxDecorator_RejectsLegacyAmino(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewRejectLegacyTxDecorator() antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create transaction with SIGN_MODE_LEGACY_AMINO_JSON privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) require.NoError(t, err) // The decorator should reject the transaction _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "RejectLegacyTxDecorator should reject transactions with SIGN_MODE_LEGACY_AMINO_JSON") require.Contains(t, err.Error(), "SIGN_MODE_LEGACY_AMINO_JSON") require.Contains(t, err.Error(), "not supported") } func TestRejectLegacyTxDecorator_AllowsDirectSignMode(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewRejectLegacyTxDecorator() antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(1) msg := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg)) // Create transaction with SIGN_MODE_DIRECT privs, accNums, accSeqs := []cryptotypes.PrivKey{accs[0].priv}, []uint64{0}, []uint64{0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) // The decorator should allow the transaction _, err = antehandler(s.ctx, tx, false) require.NoError(t, err, "RejectLegacyTxDecorator should allow transactions with SIGN_MODE_DIRECT") } func TestRejectLegacyTxDecorator_MultipleSigners(t *testing.T) { s := SetupTestSuite(t, true) s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() decorator := NewRejectLegacyTxDecorator() antehandler := sdk.ChainAnteDecorators(decorator) accs := s.CreateTestAccounts(2) msg1 := &acptypes.MsgCreatePolicy{ Creator: accs[0].acc.GetAddress().String(), Policy: "name: test policy 1", MarshalType: coretypes.PolicyMarshalingType_YAML, } msg2 := &acptypes.MsgCreatePolicy{ Creator: accs[1].acc.GetAddress().String(), Policy: "name: test policy 2", MarshalType: coretypes.PolicyMarshalingType_YAML, } require.NoError(t, s.txBuilder.SetMsgs(msg1, msg2)) // Create transaction with multiple signers, one using legacy amino privs := []cryptotypes.PrivKey{accs[0].priv, accs[1].priv} accNums := []uint64{0, 1} accSeqs := []uint64{0, 0} tx, err := s.CreateTestTx(s.ctx, privs, accNums, accSeqs, s.ctx.ChainID(), signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) require.NoError(t, err) // The decorator should reject the transaction _, err = antehandler(s.ctx, tx, false) require.Error(t, err, "RejectLegacyTxDecorator should reject transactions where any signer uses SIGN_MODE_LEGACY_AMINO_JSON") require.Contains(t, err.Error(), "SIGN_MODE_LEGACY_AMINO_JSON") } ================================================ FILE: app/ante/testutil_test.go ================================================ package ante import ( "testing" _ "cosmossdk.io/api/cosmos/bank/v1beta1" _ "cosmossdk.io/api/cosmos/crypto/secp256k1" storetypes "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/testdata" _ "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" antetestutil "github.com/cosmos/cosmos-sdk/x/auth/ante/testutil" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" "github.com/cosmos/cosmos-sdk/x/auth/keeper" xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" txtestutil "github.com/cosmos/cosmos-sdk/x/auth/tx/testutil" "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/golang/mock/gomock" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" test "github.com/sourcenetwork/sourcehub/testutil" hubtypes "github.com/sourcenetwork/sourcehub/types" "github.com/stretchr/testify/require" ) // TestAccount represents a test account used in app/ante/fee_test. type TestAccount struct { acc sdk.AccountI priv cryptotypes.PrivKey } // AnteTestSuite is a test suite that is used with ante handler tests. type AnteTestSuite struct { anteHandler sdk.AnteHandler ctx sdk.Context clientCtx client.Context txBuilder client.TxBuilder accountKeeper keeper.AccountKeeper bankKeeper *authtestutil.MockBankKeeper txBankKeeper *txtestutil.MockBankKeeper feeGrantKeeper *antetestutil.MockFeegrantKeeper encCfg test.EncodingConfig authStoreKey storetypes.StoreKey } // SetupTest inits a new test, with new app, context, and anteHandler. func SetupTestSuite(t *testing.T, isCheckTx bool) *AnteTestSuite { sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForAccount("source", "sourcepub") sdkConfig.SetBech32PrefixForValidator("sourcevaloper", "sourcevaloperpub") sdkConfig.SetBech32PrefixForConsensusNode("sourcevalcons", "sourcevalconspub") suite := &AnteTestSuite{} ctrl := gomock.NewController(t) suite.bankKeeper = authtestutil.NewMockBankKeeper(ctrl) suite.txBankKeeper = txtestutil.NewMockBankKeeper(ctrl) suite.feeGrantKeeper = antetestutil.NewMockFeegrantKeeper(ctrl) key := storetypes.NewKVStoreKey(types.StoreKey) suite.authStoreKey = key testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) suite.ctx = testCtx.Ctx.WithIsCheckTx(isCheckTx).WithBlockHeight(1) suite.encCfg = test.CreateTestEncodingConfig() maccPerms := map[string][]string{ "fee_collector": nil, "mint": {"minter"}, "bonded_tokens_pool": {"burner", "staking"}, "not_bonded_tokens_pool": {"burner", "staking"}, "multiPerm": {"burner", "minter", "staking"}, "random": {"random"}, } suite.accountKeeper = keeper.NewAccountKeeper( suite.encCfg.Codec, runtime.NewKVStoreService(key), types.ProtoBaseAccount, maccPerms, authcodec.NewBech32Codec(hubtypes.AccountAddrPrefix), hubtypes.AccountAddrPrefix, types.NewModuleAddress("gov").String(), ) suite.accountKeeper.GetModuleAccount(suite.ctx, types.FeeCollectorName) err := suite.accountKeeper.Params.Set(suite.ctx, types.DefaultParams()) require.NoError(t, err) suite.encCfg.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) testdata.RegisterInterfaces(suite.encCfg.InterfaceRegistry) // Register ante interfaces for extension options antetypes.RegisterInterfaces(suite.encCfg.InterfaceRegistry) suite.clientCtx = client.Context{}. WithTxConfig(suite.encCfg.TxConfig). WithClient(clitestutil.NewMockCometRPC(abci.ResponseQuery{})) anteHandler, err := ante.NewAnteHandler( ante.HandlerOptions{ AccountKeeper: suite.accountKeeper, BankKeeper: suite.bankKeeper, FeegrantKeeper: suite.feeGrantKeeper, SignModeHandler: suite.encCfg.TxConfig.SignModeHandler(), SigGasConsumer: ante.DefaultSigVerificationGasConsumer, }, ) require.NoError(t, err) suite.anteHandler = anteHandler suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() return suite } // CreateTestAccounts is a helper function to create test accounts. func (suite *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount { var accounts []TestAccount for i := 0; i < numAccs; i++ { priv, _, addr := testdata.KeyTestPubAddr() acc := suite.accountKeeper.NewAccountWithAddress(suite.ctx, addr) acc.SetAccountNumber(uint64(i + 1000)) suite.accountKeeper.SetAccount(suite.ctx, acc) accounts = append(accounts, TestAccount{acc, priv}) } return accounts } // CreateTestTx is a helper function to create a tx for multiple inputs. func (suite *AnteTestSuite) CreateTestTx( ctx sdk.Context, privs []cryptotypes.PrivKey, accNums, accSeqs []uint64, chainID string, signMode signing.SignMode, ) (xauthsigning.Tx, error) { // First round: we gather all the signer infos using the "set empty signature" hack var sigsV2 []signing.SignatureV2 for i, priv := range privs { sigV2 := signing.SignatureV2{ PubKey: priv.PubKey(), Data: &signing.SingleSignatureData{ SignMode: signMode, Signature: nil, }, Sequence: accSeqs[i], } sigsV2 = append(sigsV2, sigV2) } err := suite.txBuilder.SetSignatures(sigsV2...) if err != nil { return nil, err } // Second round: all signer infos are set, so each signer can sign sigsV2 = []signing.SignatureV2{} for i, priv := range privs { signerData := xauthsigning.SignerData{ Address: sdk.AccAddress(priv.PubKey().Address()).String(), ChainID: chainID, AccountNumber: accNums[i], Sequence: accSeqs[i], PubKey: priv.PubKey(), } sigV2, err := tx.SignWithPrivKey( ctx, signMode, signerData, suite.txBuilder, priv, suite.clientCtx.TxConfig, accSeqs[i]) if err != nil { return nil, err } sigsV2 = append(sigsV2, sigV2) } err = suite.txBuilder.SetSignatures(sigsV2...) if err != nil { return nil, err } return suite.txBuilder.GetTx(), nil } ================================================ FILE: app/ante/types/bearer_token.go ================================================ package types import "time" // JWT claim constants const ( IssuedAtClaim = "iat" ExpiresClaim = "exp" IssuerClaim = "iss" AuthorizedAccountClaim = "authorized_account" ) // DefaultExpirationTime is the default expiration time for bearer tokens const DefaultExpirationTime = time.Minute * 10 // BearerToken contains the structured fields included in the JWS Bearer Token. // This type is used for DID-based authorization via JWS extension options. type BearerToken struct { // IssuerID is the Actor ID (DID) for the Token signer IssuerID string `json:"iss,omitempty"` // ProviderToken contains provider information (provider name, user id, etc.) as a JWT string ProviderToken string `json:"provider_token,omitempty"` // AuthorizedAccount is the SourceHub account address which is allowed to use this token AuthorizedAccount string `json:"authorized_account,omitempty"` // IssuedTime is the timestamp at which the token was generated IssuedTime int64 `json:"iat,omitempty"` // ExpirationTime is the timestamp at which the token will expire ExpirationTime int64 `json:"exp,omitempty"` } // ProviderToken represents an authentication provider token. type ProviderToken struct { // ProviderName is the name of the authentication provider (e.g., "google", "github") ProviderName string `json:"provider_name,omitempty"` // UserID is the unique user identifier from the provider UserID string `json:"user_id,omitempty"` // ActorDID is the actor/user DID derived from userID hash ActorDID string `json:"actor_did,omitempty"` } // RequiredClaims returns the list of required claims for JWS payload validation func RequiredClaims() []string { return []string{ IssuedAtClaim, IssuerClaim, // AuthorizedAccountClaim, // Authorized account claim is no longer required ExpiresClaim, } } ================================================ FILE: app/ante/types/codec.go ================================================ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" tx "github.com/cosmos/cosmos-sdk/types/tx" ) func (m *JWSExtensionOption) IsExtensionOption() {} func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*tx.TxExtensionOptionI)(nil), &JWSExtensionOption{}, ) } ================================================ FILE: app/ante/types/jws_extension.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/ante/jws_extension.proto package types import ( fmt "fmt" _ "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 // JWSExtensionOption represents a transaction extension option with a bearer token. // The bearer token is a JWS containing issuer DID, authorized account, issued at, and expiration time claims. type JWSExtensionOption struct { BearerToken string `protobuf:"bytes,1,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty" yaml:"bearer_token"` } func (m *JWSExtensionOption) Reset() { *m = JWSExtensionOption{} } func (m *JWSExtensionOption) String() string { return proto.CompactTextString(m) } func (*JWSExtensionOption) ProtoMessage() {} func (*JWSExtensionOption) Descriptor() ([]byte, []int) { return fileDescriptor_6097667ae1d3a21d, []int{0} } func (m *JWSExtensionOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JWSExtensionOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_JWSExtensionOption.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 *JWSExtensionOption) XXX_Merge(src proto.Message) { xxx_messageInfo_JWSExtensionOption.Merge(m, src) } func (m *JWSExtensionOption) XXX_Size() int { return m.Size() } func (m *JWSExtensionOption) XXX_DiscardUnknown() { xxx_messageInfo_JWSExtensionOption.DiscardUnknown(m) } var xxx_messageInfo_JWSExtensionOption proto.InternalMessageInfo func init() { proto.RegisterType((*JWSExtensionOption)(nil), "sourcehub.ante.JWSExtensionOption") } func init() { proto.RegisterFile("sourcehub/ante/jws_extension.proto", fileDescriptor_6097667ae1d3a21d) } var fileDescriptor_6097667ae1d3a21d = []byte{ // 216 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2a, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x4f, 0xcc, 0x2b, 0x49, 0xd5, 0xcf, 0x2a, 0x2f, 0x8e, 0x4f, 0xad, 0x28, 0x49, 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xab, 0xd1, 0x03, 0xa9, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xe9, 0x83, 0x58, 0x10, 0x55, 0x4a, 0x51, 0x5c, 0x42, 0x5e, 0xe1, 0xc1, 0xae, 0x30, 0xbd, 0xfe, 0x05, 0x25, 0x99, 0xf9, 0x79, 0x42, 0x56, 0x5c, 0x3c, 0x49, 0xa9, 0x89, 0x45, 0xa9, 0x45, 0xf1, 0x25, 0xf9, 0xd9, 0xa9, 0x79, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0xe2, 0x9f, 0xee, 0xc9, 0x0b, 0x57, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x21, 0xcb, 0x2a, 0x05, 0x71, 0x43, 0xb8, 0x21, 0x20, 0x9e, 0x15, 0x47, 0xc7, 0x02, 0x79, 0x86, 0x17, 0x0b, 0xe4, 0x19, 0x9c, 0xbc, 0x4f, 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, 0x30, 0x3d, 0xb3, 0x04, 0xe4, 0xb0, 0xe4, 0xfc, 0x5c, 0x7d, 0x88, 0x33, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xf5, 0x91, 0x3c, 0x56, 0x50, 0x00, 0xf1, 0x5c, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0xbd, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x4d, 0xbc, 0xff, 0xfb, 0x00, 0x00, 0x00, } func (m *JWSExtensionOption) 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 *JWSExtensionOption) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *JWSExtensionOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.BearerToken) > 0 { i -= len(m.BearerToken) copy(dAtA[i:], m.BearerToken) i = encodeVarintJwsExtension(dAtA, i, uint64(len(m.BearerToken))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintJwsExtension(dAtA []byte, offset int, v uint64) int { offset -= sovJwsExtension(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *JWSExtensionOption) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.BearerToken) if l > 0 { n += 1 + l + sovJwsExtension(uint64(l)) } return n } func sovJwsExtension(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozJwsExtension(x uint64) (n int) { return sovJwsExtension(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *JWSExtensionOption) 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 ErrIntOverflowJwsExtension } 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: JWSExtensionOption: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JWSExtensionOption: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BearerToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsExtension } 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 ErrInvalidLengthJwsExtension } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsExtension } if postIndex > l { return io.ErrUnexpectedEOF } m.BearerToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipJwsExtension(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthJwsExtension } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipJwsExtension(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, ErrIntOverflowJwsExtension } 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, ErrIntOverflowJwsExtension } 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, ErrIntOverflowJwsExtension } 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, ErrInvalidLengthJwsExtension } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupJwsExtension } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthJwsExtension } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthJwsExtension = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowJwsExtension = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupJwsExtension = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: app/app.go ================================================ package app import ( "encoding/json" "io" "os" "path/filepath" "time" "cosmossdk.io/depinject" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" circuitkeeper "cosmossdk.io/x/circuit/keeper" evidencekeeper "cosmossdk.io/x/evidence/keeper" upgradekeeper "cosmossdk.io/x/upgrade/keeper" abcitypes "github.com/cometbft/cometbft/abci/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/telemetry" testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" _ "github.com/cosmos/ibc-go/modules/capability" // import for side-effects capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper" icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper" ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper" ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" abci "github.com/skip-mev/block-sdk/v2/abci" "github.com/skip-mev/block-sdk/v2/block" "github.com/skip-mev/block-sdk/v2/block/base" "github.com/sourcenetwork/sourcehub/app/ante" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" "github.com/sourcenetwork/sourcehub/app/metrics" overrides "github.com/sourcenetwork/sourcehub/app/overrides" sourcehubtypes "github.com/sourcenetwork/sourcehub/types" acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletinkeeper "github.com/sourcenetwork/sourcehub/x/bulletin/keeper" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" epochskeeper "github.com/sourcenetwork/sourcehub/x/epochs/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" feegrantkeeper "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" hubkeeper "github.com/sourcenetwork/sourcehub/x/hub/keeper" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/sourcenetwork/sourcehub/docs" ) const ( AccountAddressPrefix = sourcehubtypes.AccountAddrPrefix Name = "sourcehub" ) var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string ) var ( _ runtime.AppI = (*App)(nil) _ servertypes.Application = (*App)(nil) ) // App extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object // capabilities aren't needed for testing. type App struct { *runtime.App legacyAmino *codec.LegacyAmino appCodec codec.Codec txConfig client.TxConfig interfaceRegistry codectypes.InterfaceRegistry appOpts servertypes.AppOptions // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper *govkeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper AuthzKeeper authzkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper GroupKeeper groupkeeper.Keeper ConsensusParamsKeeper consensuskeeper.Keeper CircuitBreakerKeeper circuitkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper // IBC IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouterV2 on it correctly ICAControllerKeeper icacontrollerkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper TransferKeeper ibctransferkeeper.Keeper HubKeeper *hubkeeper.Keeper AcpKeeper *acpkeeper.Keeper BulletinKeeper *bulletinkeeper.Keeper EpochsKeeper *epochskeeper.Keeper TierKeeper *tierkeeper.Keeper // simulation manager sm *module.SimulationManager } func init() { userHomeDir, err := os.UserHomeDir() if err != nil { panic(err) } DefaultNodeHome = filepath.Join(userHomeDir, "."+Name) } // AppConfig returns the default app config. func AppConfig() depinject.Config { return depinject.Configs( appConfig, depinject.Supply( // Supply custom module basics map[string]module.AppModuleBasic{ genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), banktypes.ModuleName: overrides.BankModuleBasic{}, crisistypes.ModuleName: overrides.CrisisModuleBasic{}, govtypes.ModuleName: overrides.NewGovModuleBasic(), stakingtypes.ModuleName: overrides.StakingModuleBasic{}, epochstypes.ModuleName: overrides.EpochsModuleBasic{}, tiertypes.ModuleName: overrides.TierModuleBasic{}, }, ), ) } // New returns a reference to an initialized App. func New( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) (*App, error) { var ( app = &App{appOpts: appOpts} appBuilder *runtime.AppBuilder // merge the AppConfig and other configuration in one config appConfig = depinject.Configs( AppConfig(), depinject.Supply( // Supply the application options appOpts, // Supply with IBC keeper getter for the IBC modules with App Wiring. // The IBC Keeper cannot be passed because it has not been initiated yet. // Passing the getter, the app IBC Keeper will always be accessible. // This needs to be removed after IBC supports App Wiring. app.GetIBCKeeper, app.GetCapabilityScopedKeeper, // Supply the logger logger, // ADVANCED CONFIGURATION // // AUTH // // For providing a custom function required in auth to generate custom account types // add it below. By default the auth module uses simulation.RandomGenesisAccounts. // // authtypes.RandomGenesisAccountsFn(simulation.RandomGenesisAccounts), // // For providing a custom a base account type add it below. // By default the auth module uses authtypes.ProtoBaseAccount(). // // func() sdk.AccountI { return authtypes.ProtoBaseAccount() }, // // For providing a different address codec, add it below. // By default the auth module uses a Bech32 address codec, // with the prefix defined in the auth module configuration. // // func() address.Codec { return <- custom address codec type -> } // // STAKING // // For provinding a different validator and consensus address codec, add it below. // By default the staking module uses the bech32 prefix provided in the auth config, // and appends "valoper" and "valcons" for validator and consensus addresses respectively. // When providing a custom address codec in auth, custom address codecs must be provided here as well. // // func() runtime.ValidatorAddressCodec { return <- custom validator address codec type -> } // func() runtime.ConsensusAddressCodec { return <- custom consensus address codec type -> } // // MINT // // For providing a custom inflation function for x/mint add here your // custom function that implements the minttypes.InflationCalculationFn // interface. ), ) ) if err := depinject.Inject(appConfig, &appBuilder, &app.appCodec, &app.legacyAmino, &app.txConfig, &app.interfaceRegistry, &app.AccountKeeper, &app.BankKeeper, &app.StakingKeeper, &app.SlashingKeeper, &app.DistrKeeper, &app.GovKeeper, &app.CrisisKeeper, &app.UpgradeKeeper, &app.ParamsKeeper, &app.AuthzKeeper, &app.EvidenceKeeper, &app.FeeGrantKeeper, &app.GroupKeeper, &app.ConsensusParamsKeeper, &app.CircuitBreakerKeeper, &app.HubKeeper, &app.AcpKeeper, &app.BulletinKeeper, &app.EpochsKeeper, &app.TierKeeper, ); err != nil { panic(err) } // Below we could construct and set an application specific mempool and // ABCI 1.0 PrepareProposal and ProcessProposal handlers. These defaults are // already set in the SDK's BaseApp, this shows an example of how to override // them. // // Example: // // app.App = appBuilder.Build(...) // nonceMempool := mempool.NewSenderNonceMempool() // abciPropHandler := NewDefaultProposalHandler(nonceMempool, app.App.BaseApp) // // app.App.BaseApp.SetMempool(nonceMempool) // app.App.BaseApp.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) // app.App.BaseApp.SetProcessProposal(abciPropHandler.ProcessProposalHandler()) // // Alternatively, you can construct BaseApp options, append those to // baseAppOptions and pass them to the appBuilder. // // Example: // // prepareOpt = func(app *baseapp.BaseApp) { // abciPropHandler := baseapp.NewDefaultProposalHandler(nonceMempool, app) // app.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) // } // baseAppOptions = append(baseAppOptions, prepareOpt) // // create and set vote extension handler // voteExtOp := func(bApp *baseapp.BaseApp) { // voteExtHandler := NewVoteExtensionHandler() // voteExtHandler.SetHandlers(bApp) // } app.App = appBuilder.Build(db, traceStore, baseAppOptions...) // Register ante interfaces for extension options antetypes.RegisterInterfaces(app.interfaceRegistry) // Register legacy modules app.registerIBCModules() customMintModule := app.registerCustomMintModule() // Initialize capability keeper in acp module which is initialized by IBC modules acpKeeper := app.GetCapabilityScopedKeeper(acptypes.ModuleName) app.AcpKeeper.InitializeCapabilityKeeper(&acpKeeper) // Initialize capability keeper for the bulletin module bulletinKeeper := app.GetCapabilityScopedKeeper(bulletintypes.ModuleName) app.BulletinKeeper.InitializeCapabilityKeeper(&bulletinKeeper) // Register streaming services if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { return nil, err } // Create priority lane priorityLane := CreatePriorityLane(app) // Create the laned mempool with priority and default lanes mempool, err := block.NewLanedMempool( app.Logger(), []block.Lane{priorityLane}, ) if err != nil { panic(err) } app.App.SetMempool(mempool) // AnteHandler performs stateful checks on transactions before internal messages are processed. anteHandler := ante.NewAnteHandler( app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.IBCKeeper, app.HubKeeper, app.txConfig.SignModeHandler(), ante.DefaultSigVerificationGasConsumer, app.txConfig.TxEncoder(), ) app.SetAnteHandler(anteHandler) // Set the ante handler on the lanes opt := []base.LaneOption{ base.WithAnteHandler(anteHandler), } priorityLane.WithOptions( opt..., ) // Create the default proposal handler with the laned mempool proposalHandler := abci.NewDefaultProposalHandler( app.Logger(), app.txConfig.TxDecoder(), app.txConfig.TxEncoder(), mempool, ) prepareProposalHandler := proposalHandler.PrepareProposalHandler() prepareProposal := func(ctx sdk.Context, req *abcitypes.RequestPrepareProposal) (*abcitypes.ResponsePrepareProposal, error) { defer telemetry.MeasureSince(time.Now(), metrics.App, metrics.PrepareProposal, metrics.SecondsUnit) telemetry.IncrCounterWithLabels( []string{metrics.App, metrics.PrepareProposal, metrics.Tx, metrics.Count}, float32(len(req.Txs)), []metrics.Label{telemetry.NewLabel(metrics.Method, metrics.PrepareProposal)}, ) return prepareProposalHandler(ctx, req) } app.App.SetPrepareProposal(prepareProposal) processProposalHandler := proposalHandler.ProcessProposalHandler() processProposal := func(ctx sdk.Context, req *abcitypes.RequestProcessProposal) (*abcitypes.ResponseProcessProposal, error) { defer telemetry.MeasureSince(time.Now(), metrics.App, metrics.ProcessProposal, metrics.SecondsUnit) telemetry.IncrCounterWithLabels( []string{metrics.App, metrics.ProcessProposal, metrics.Tx, metrics.Count}, float32(len(req.Txs)), []metrics.Label{telemetry.NewLabel(metrics.Method, metrics.ProcessProposal)}, ) return processProposalHandler(ctx, req) } app.App.SetProcessProposal(processProposal) /**** Module Options ****/ app.ModuleManager.RegisterInvariants(app.CrisisKeeper) // add test gRPC service for testing gRPC queries in isolation testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{}) // create the simulation manager and define the order of the modules for deterministic simulations // // NOTE: this is not required apps that don't use the simulator for fuzz testing // transactions overrideModules := map[string]module.AppModuleSimulation{ authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), } app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) app.sm.RegisterStoreDecoders() // A custom InitChainer can be set if extra pre-init-genesis logic is required. // By default, when using app wiring enabled module, this is not required. // For instance, the upgrade module will set automatically the module version map in its init genesis thanks to app wiring. // However, when registering a module manually (i.e. that does not support app wiring), the module version map // must be set manually as follow. The upgrade module will de-duplicate the module version map. // initChainer := func(ctx sdk.Context, req *abcitypes.RequestInitChain) (*abcitypes.ResponseInitChain, error) { if req.InitialHeight == 1 { // Temp workaround to set default IBC params until app wiring is fully supported. app.setDefaultIBCParams(ctx) // Call InitGenesis() to set default state for the custom mint module customMintModule.InitGenesis(ctx, app.appCodec, json.RawMessage{}) } return app.App.InitChainer(ctx, req) } app.SetInitChainer(initChainer) if err := app.Load(loadLatest); err != nil { return nil, err } return app, nil } // LegacyAmino returns App's amino codec. // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. func (app *App) LegacyAmino() *codec.LegacyAmino { return app.legacyAmino } // AppCodec returns App's app codec. // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. func (app *App) AppCodec() codec.Codec { return app.appCodec } func (app *App) TxConfig() client.TxConfig { return app.txConfig } // GetKey returns the KVStoreKey for the provided store key. func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { kvStoreKey, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.KVStoreKey) if !ok { return nil } return kvStoreKey } // GetMemKey returns the MemoryStoreKey for the provided store key. func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey) if !ok { return nil } return key } // kvStoreKeys returns all the kv store keys registered inside App. func (app *App) kvStoreKeys() map[string]*storetypes.KVStoreKey { keys := make(map[string]*storetypes.KVStoreKey) for _, k := range app.GetStoreKeys() { if kv, ok := k.(*storetypes.KVStoreKey); ok { keys[kv.Name()] = kv } } return keys } // GetSubspace returns a param subspace for a given module name. func (app *App) GetSubspace(moduleName string) paramstypes.Subspace { subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) return subspace } // SimulationManager implements the SimulationApp interface. func (app *App) SimulationManager() *module.SimulationManager { return app.sm } // RegisterAPIRoutes registers all application module routes with the provided // API server. func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { app.App.RegisterAPIRoutes(apiSvr, apiConfig) // register swagger API in app.go so that other applications can override easily if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { panic(err) } // register app's OpenAPI routes docs.RegisterOpenAPIService(Name, apiSvr.Router) // register faucet routes app.RegisterFaucetRoutes(apiSvr, apiConfig, app.appOpts) } // GetIBCKeeper returns the IBC keeper. func (app *App) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper } // GetCapabilityScopedKeeper returns the capability scoped keeper. func (app *App) GetCapabilityScopedKeeper(moduleName string) capabilitykeeper.ScopedKeeper { return app.CapabilityKeeper.ScopeToModule(moduleName) } // GetMaccPerms returns a copy of the module account permissions // // NOTE: This is solely to be used for testing purposes. func GetMaccPerms() map[string][]string { dup := make(map[string][]string) for _, perms := range moduleAccPerms { dup[perms.Account] = perms.Permissions } return dup } // BlockedAddresses returns all the app's blocked account addresses. func BlockedAddresses() map[string]bool { result := make(map[string]bool) if len(blockAccAddrs) > 0 { for _, addr := range blockAccAddrs { result[addr] = true } } else { for addr := range GetMaccPerms() { result[addr] = true } } return result } ================================================ FILE: app/app_config.go ================================================ package app import ( "time" runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" authzmodulev1 "cosmossdk.io/api/cosmos/authz/module/v1" bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" circuitmodulev1 "cosmossdk.io/api/cosmos/circuit/module/v1" consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" crisismodulev1 "cosmossdk.io/api/cosmos/crisis/module/v1" distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" evidencemodulev1 "cosmossdk.io/api/cosmos/evidence/module/v1" genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" govmodulev1 "cosmossdk.io/api/cosmos/gov/module/v1" groupmodulev1 "cosmossdk.io/api/cosmos/group/module/v1" paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" slashingmodulev1 "cosmossdk.io/api/cosmos/slashing/module/v1" stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" upgrademodulev1 "cosmossdk.io/api/cosmos/upgrade/module/v1" vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/core/appconfig" _ "cosmossdk.io/x/circuit" // import for side-effects circuittypes "cosmossdk.io/x/circuit/types" _ "cosmossdk.io/x/evidence" // import for side-effects evidencetypes "cosmossdk.io/x/evidence/types" _ "cosmossdk.io/x/upgrade" // import for side-effects upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/runtime" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/authz" _ "github.com/cosmos/cosmos-sdk/x/authz/module" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/group" _ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" _ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" _ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" _ "github.com/cosmos/ibc-go/modules/capability" // import for side-effects capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" _ "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts" // import for side-effects icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types" ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" feegrantmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/feegrant/module/v1" "github.com/sourcenetwork/sourcehub/x/feegrant" _ "github.com/sourcenetwork/sourcehub/x/feegrant/module" // import for side-effects "google.golang.org/protobuf/types/known/durationpb" epochsmodulev1 "github.com/sourcenetwork/sourcehub/api/osmosis/epochs/module/v1beta1" acpmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/acp/module" bulletinmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/bulletin/module" hubmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/hub/module" tiermodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/tier/module/v1beta1" _ "github.com/sourcenetwork/sourcehub/x/acp/module" // import for side-effects acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" _ "github.com/sourcenetwork/sourcehub/x/bulletin/module" // import for side-effects bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" _ "github.com/sourcenetwork/sourcehub/x/epochs/module" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" _ "github.com/sourcenetwork/sourcehub/x/hub/module" hubmoduletypes "github.com/sourcenetwork/sourcehub/x/hub/types" _ "github.com/sourcenetwork/sourcehub/x/tier/module" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) var ( // NOTE: The genutils module must occur after staking so that pools are // properly initialized with tokens from genesis accounts. // NOTE: The genutils module must also occur after auth so that it can access the params from auth. // NOTE: Capability module must occur first so that it can initialize any capabilities // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. genesisModuleOrder = []string{ // cosmos-sdk/ibc modules capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName, ibcexported.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, ibctransfertypes.ModuleName, icatypes.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, circuittypes.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, circuittypes.ModuleName, // chain modules hubmoduletypes.ModuleName, acptypes.ModuleName, bulletintypes.ModuleName, epochstypes.ModuleName, tiertypes.ModuleName, } // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so as to keep the // CanWithdrawInvariant invariant. // NOTE: staking module is required if HistoricalEntries param > 0 // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC) beginBlockers = []string{ // cosmos sdk modules minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, evidencetypes.ModuleName, stakingtypes.ModuleName, authz.ModuleName, genutiltypes.ModuleName, // ibc modules capabilitytypes.ModuleName, ibcexported.ModuleName, ibctransfertypes.ModuleName, icatypes.ModuleName, // chain modules hubmoduletypes.ModuleName, acptypes.ModuleName, bulletintypes.ModuleName, epochstypes.ModuleName, tiertypes.ModuleName, } endBlockers = []string{ // cosmos sdk modules crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, feegrant.ModuleName, group.ModuleName, genutiltypes.ModuleName, // ibc modules ibcexported.ModuleName, ibctransfertypes.ModuleName, capabilitytypes.ModuleName, icatypes.ModuleName, // chain modules hubmoduletypes.ModuleName, acptypes.ModuleName, bulletintypes.ModuleName, epochstypes.ModuleName, tiertypes.ModuleName, } preBlockers = []string{ upgradetypes.ModuleName, } // module account permissions moduleAccPerms = []*authmodulev1.ModuleAccountPermission{ {Account: authtypes.FeeCollectorName}, {Account: distrtypes.ModuleName}, {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, {Account: govtypes.ModuleName, Permissions: []string{authtypes.Burner}}, {Account: ibctransfertypes.ModuleName, Permissions: []string{authtypes.Minter, authtypes.Burner}}, {Account: icatypes.ModuleName}, {Account: tiertypes.ModuleName, Permissions: []string{authtypes.Minter, authtypes.Burner, authtypes.Staking}}, {Account: tiertypes.DeveloperPoolName}, {Account: tiertypes.InsurancePoolName}, {Account: bulletintypes.ModuleName}, } // blocked account addresses blockAccAddrs = []string{ authtypes.FeeCollectorName, distrtypes.ModuleName, minttypes.ModuleName, stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, tiertypes.DeveloperPoolName, tiertypes.InsurancePoolName, // We allow the following module accounts to receive funds: // govtypes.ModuleName // tiertypes.ModuleName } // appConfig application configuration (used by depinject) appConfig = appconfig.Compose(&appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { Name: runtime.ModuleName, Config: appconfig.WrapAny(&runtimev1alpha1.Module{ AppName: Name, PreBlockers: preBlockers, BeginBlockers: beginBlockers, EndBlockers: endBlockers, InitGenesis: genesisModuleOrder, OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { ModuleName: authtypes.ModuleName, KvStoreKey: "acc", }, }, // When ExportGenesis is not specified, the export genesis module order // is equal to the init genesis order // ExportGenesis: genesisModuleOrder, // Uncomment if you want to set a custom migration order here. // OrderMigrations: nil, }), }, { Name: authtypes.ModuleName, Config: appconfig.WrapAny(&authmodulev1.Module{ Bech32Prefix: AccountAddressPrefix, ModuleAccountPermissions: moduleAccPerms, // By default modules authority is the governance module. This is configurable with the following: // Authority: "group", // A custom module authority can be set using a module name // Authority: "cosmos1cwwv22j5ca08ggdv9c2uky355k908694z577tv", // or a specific address }), }, { Name: vestingtypes.ModuleName, Config: appconfig.WrapAny(&vestingmodulev1.Module{}), }, { Name: banktypes.ModuleName, Config: appconfig.WrapAny(&bankmodulev1.Module{ BlockedModuleAccountsOverride: blockAccAddrs, }), }, { Name: stakingtypes.ModuleName, Config: appconfig.WrapAny(&stakingmodulev1.Module{ // NOTE: specifying a prefix is only necessary when using bech32 addresses // If not specfied, the auth Bech32Prefix appended with "valoper" and "valcons" is used by default Bech32PrefixValidator: AccountAddressPrefix + "valoper", Bech32PrefixConsensus: AccountAddressPrefix + "valcons", }), }, { Name: slashingtypes.ModuleName, Config: appconfig.WrapAny(&slashingmodulev1.Module{}), }, { Name: paramstypes.ModuleName, Config: appconfig.WrapAny(¶msmodulev1.Module{}), }, { Name: "tx", Config: appconfig.WrapAny(&txconfigv1.Config{}), }, { Name: genutiltypes.ModuleName, Config: appconfig.WrapAny(&genutilmodulev1.Module{}), }, { Name: authz.ModuleName, Config: appconfig.WrapAny(&authzmodulev1.Module{}), }, { Name: upgradetypes.ModuleName, Config: appconfig.WrapAny(&upgrademodulev1.Module{}), }, { Name: distrtypes.ModuleName, Config: appconfig.WrapAny(&distrmodulev1.Module{}), }, { Name: evidencetypes.ModuleName, Config: appconfig.WrapAny(&evidencemodulev1.Module{}), }, { Name: group.ModuleName, Config: appconfig.WrapAny(&groupmodulev1.Module{ MaxExecutionPeriod: durationpb.New(time.Second * 1209600), MaxMetadataLen: 255, }), }, { Name: feegrant.ModuleName, Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), }, { Name: govtypes.ModuleName, Config: appconfig.WrapAny(&govmodulev1.Module{}), }, { Name: crisistypes.ModuleName, Config: appconfig.WrapAny(&crisismodulev1.Module{}), }, { Name: consensustypes.ModuleName, Config: appconfig.WrapAny(&consensusmodulev1.Module{}), }, { Name: circuittypes.ModuleName, Config: appconfig.WrapAny(&circuitmodulev1.Module{}), }, { Name: hubmoduletypes.ModuleName, Config: appconfig.WrapAny(&hubmodulev1.Module{}), }, { Name: acptypes.ModuleName, Config: appconfig.WrapAny(&acpmodulev1.Module{}), }, { Name: bulletintypes.ModuleName, Config: appconfig.WrapAny(&bulletinmodulev1.Module{}), }, { Name: epochstypes.ModuleName, Config: appconfig.WrapAny(&epochsmodulev1.Module{}), }, { Name: tiertypes.ModuleName, Config: appconfig.WrapAny(&tiermodulev1.Module{}), }, }, }) ) ================================================ FILE: app/export.go ================================================ package app import ( "encoding/json" "fmt" "log" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis // file. func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block ctx := app.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which // CometBFT will start InitChain. height := app.LastBlockHeight() + 1 if forZeroHeight { height = 0 app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } genState, err := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) if err != nil { return servertypes.ExportedApp{}, err } appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err } validators, err := staking.WriteValidators(ctx, app.StakingKeeper) return servertypes.ExportedApp{ AppState: appState, Validators: validators, Height: height, ConsensusParams: app.BaseApp.GetConsensusParams(ctx), }, err } // prepare for fresh start at zero height // NOTE zero height genesis is a temporary feature which will be deprecated // // in favor of export at a block height func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { applyAllowedAddrs := false // check if there is a allowed address list if len(jailAllowedAddrs) > 0 { applyAllowedAddrs = true } allowedAddrsMap := make(map[string]bool) for _, addr := range jailAllowedAddrs { _, err := sdk.ValAddressFromBech32(addr) if err != nil { log.Fatal(err) } allowedAddrsMap[addr] = true } /* Just to be safe, assert the invariants on current state. */ app.CrisisKeeper.AssertInvariants(ctx) /* Handle fee distribution state. */ // withdraw all validator commission err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) if err != nil { panic(err) } _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, valBz) return false }) if err != nil { panic(err) } // withdraw all delegator rewards dels, err := app.StakingKeeper.GetAllDelegations(ctx) if err != nil { panic(err) } for _, delegation := range dels { valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) if err != nil { panic(err) } delAddr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) } // clear validator slash events app.DistrKeeper.DeleteAllValidatorSlashEvents(ctx) // clear validator historical rewards app.DistrKeeper.DeleteAllValidatorHistoricalRewards(ctx) // set context height to zero height := ctx.BlockHeight() ctx = ctx.WithBlockHeight(0) // reinitialize all validators err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) if err != nil { panic(err) } // donate any unwithdrawn outstanding reward fraction tokens to the community pool scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) if err != nil { panic(err) } feePool, err := app.DistrKeeper.FeePool.Get(ctx) if err != nil { panic(err) } feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) if err := app.DistrKeeper.FeePool.Set(ctx, feePool); err != nil { panic(err) } if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valBz); err != nil { panic(err) } return false }) // reinitialize all delegations for _, del := range dels { valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) if err != nil { panic(err) } delAddr := sdk.MustAccAddressFromBech32(del.DelegatorAddress) if err := app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil { // never called as BeforeDelegationCreated always returns nil panic(fmt.Errorf("error while incrementing period: %w", err)) } if err := app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr); err != nil { // never called as AfterDelegationModified always returns nil panic(fmt.Errorf("error while creating a new delegation period record: %w", err)) } } // reset context height ctx = ctx.WithBlockHeight(height) /* Handle staking state. */ // iterate through redelegations, reset creation height app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { for i := range red.Entries { red.Entries[i].CreationHeight = 0 } err = app.StakingKeeper.SetRedelegation(ctx, red) if err != nil { panic(err) } return false }) // iterate through unbonding delegations, reset creation height app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { for i := range ubd.Entries { ubd.Entries[i].CreationHeight = 0 } err = app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) if err != nil { panic(err) } return false }) // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) counter := int16(0) for ; iter.Valid(); iter.Next() { addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) validator, err := app.StakingKeeper.GetValidator(ctx, addr) if err != nil { panic("expected validator, not found") } validator.UnbondingHeight = 0 if applyAllowedAddrs && !allowedAddrsMap[addr.String()] { validator.Jailed = true } app.StakingKeeper.SetValidator(ctx, validator) counter++ } if err := iter.Close(); err != nil { app.Logger().Error("error while closing the key-value store reverse prefix iterator: ", err) return } _, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { log.Fatal(err) } /* Handle slashing state. */ // reset start height on signing infos app.SlashingKeeper.IterateValidatorSigningInfos( ctx, func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { info.StartHeight = 0 app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info) return false }, ) } ================================================ FILE: app/faucet/types/faucet.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/faucet/faucet.proto package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // FaucetRequestRecord represents a faucet request record stored internally. type FaucetRequestRecord struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` } func (m *FaucetRequestRecord) Reset() { *m = FaucetRequestRecord{} } func (m *FaucetRequestRecord) String() string { return proto.CompactTextString(m) } func (*FaucetRequestRecord) ProtoMessage() {} func (*FaucetRequestRecord) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{0} } func (m *FaucetRequestRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FaucetRequestRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FaucetRequestRecord.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 *FaucetRequestRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_FaucetRequestRecord.Merge(m, src) } func (m *FaucetRequestRecord) XXX_Size() int { return m.Size() } func (m *FaucetRequestRecord) XXX_DiscardUnknown() { xxx_messageInfo_FaucetRequestRecord.DiscardUnknown(m) } var xxx_messageInfo_FaucetRequestRecord proto.InternalMessageInfo func (m *FaucetRequestRecord) GetAddress() string { if m != nil { return m.Address } return "" } func (m *FaucetRequestRecord) GetAmount() types.Coin { if m != nil { return m.Amount } return types.Coin{} } func (m *FaucetRequestRecord) GetTxHash() string { if m != nil { return m.TxHash } return "" } // FaucetRequest represents a request to get funds from the faucet. type FaucetRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } func (m *FaucetRequest) Reset() { *m = FaucetRequest{} } func (m *FaucetRequest) String() string { return proto.CompactTextString(m) } func (*FaucetRequest) ProtoMessage() {} func (*FaucetRequest) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{1} } func (m *FaucetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FaucetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FaucetRequest.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 *FaucetRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_FaucetRequest.Merge(m, src) } func (m *FaucetRequest) XXX_Size() int { return m.Size() } func (m *FaucetRequest) XXX_DiscardUnknown() { xxx_messageInfo_FaucetRequest.DiscardUnknown(m) } var xxx_messageInfo_FaucetRequest proto.InternalMessageInfo func (m *FaucetRequest) GetAddress() string { if m != nil { return m.Address } return "" } // FaucetResponse represents the response from a faucet request. type FaucetResponse struct { Txhash string `protobuf:"bytes,1,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,3,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` Amount types.Coin `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount"` } func (m *FaucetResponse) Reset() { *m = FaucetResponse{} } func (m *FaucetResponse) String() string { return proto.CompactTextString(m) } func (*FaucetResponse) ProtoMessage() {} func (*FaucetResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{2} } func (m *FaucetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FaucetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FaucetResponse.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 *FaucetResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_FaucetResponse.Merge(m, src) } func (m *FaucetResponse) XXX_Size() int { return m.Size() } func (m *FaucetResponse) XXX_DiscardUnknown() { xxx_messageInfo_FaucetResponse.DiscardUnknown(m) } var xxx_messageInfo_FaucetResponse proto.InternalMessageInfo func (m *FaucetResponse) GetTxhash() string { if m != nil { return m.Txhash } return "" } func (m *FaucetResponse) GetCode() uint32 { if m != nil { return m.Code } return 0 } func (m *FaucetResponse) GetRawLog() string { if m != nil { return m.RawLog } return "" } func (m *FaucetResponse) GetAddress() string { if m != nil { return m.Address } return "" } func (m *FaucetResponse) GetAmount() types.Coin { if m != nil { return m.Amount } return types.Coin{} } // InitAccountRequest represents a request to initialize an account. type InitAccountRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } func (m *InitAccountRequest) Reset() { *m = InitAccountRequest{} } func (m *InitAccountRequest) String() string { return proto.CompactTextString(m) } func (*InitAccountRequest) ProtoMessage() {} func (*InitAccountRequest) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{3} } func (m *InitAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *InitAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_InitAccountRequest.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 *InitAccountRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_InitAccountRequest.Merge(m, src) } func (m *InitAccountRequest) XXX_Size() int { return m.Size() } func (m *InitAccountRequest) XXX_DiscardUnknown() { xxx_messageInfo_InitAccountRequest.DiscardUnknown(m) } var xxx_messageInfo_InitAccountRequest proto.InternalMessageInfo func (m *InitAccountRequest) GetAddress() string { if m != nil { return m.Address } return "" } // InitAccountResponse represents the response from an account initialization request. type InitAccountResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Txhash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,4,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` Amount types.Coin `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount"` Exists bool `protobuf:"varint,7,opt,name=exists,proto3" json:"exists,omitempty"` } func (m *InitAccountResponse) Reset() { *m = InitAccountResponse{} } func (m *InitAccountResponse) String() string { return proto.CompactTextString(m) } func (*InitAccountResponse) ProtoMessage() {} func (*InitAccountResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{4} } func (m *InitAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *InitAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_InitAccountResponse.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 *InitAccountResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_InitAccountResponse.Merge(m, src) } func (m *InitAccountResponse) XXX_Size() int { return m.Size() } func (m *InitAccountResponse) XXX_DiscardUnknown() { xxx_messageInfo_InitAccountResponse.DiscardUnknown(m) } var xxx_messageInfo_InitAccountResponse proto.InternalMessageInfo func (m *InitAccountResponse) GetMessage() string { if m != nil { return m.Message } return "" } func (m *InitAccountResponse) GetTxhash() string { if m != nil { return m.Txhash } return "" } func (m *InitAccountResponse) GetCode() uint32 { if m != nil { return m.Code } return 0 } func (m *InitAccountResponse) GetRawLog() string { if m != nil { return m.RawLog } return "" } func (m *InitAccountResponse) GetAddress() string { if m != nil { return m.Address } return "" } func (m *InitAccountResponse) GetAmount() types.Coin { if m != nil { return m.Amount } return types.Coin{} } func (m *InitAccountResponse) GetExists() bool { if m != nil { return m.Exists } return false } // FaucetInfoResponse represents the faucet information response. type FaucetInfoResponse struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Balance types.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` RequestCount int32 `protobuf:"varint,3,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` } func (m *FaucetInfoResponse) Reset() { *m = FaucetInfoResponse{} } func (m *FaucetInfoResponse) String() string { return proto.CompactTextString(m) } func (*FaucetInfoResponse) ProtoMessage() {} func (*FaucetInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{5} } func (m *FaucetInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FaucetInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FaucetInfoResponse.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 *FaucetInfoResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_FaucetInfoResponse.Merge(m, src) } func (m *FaucetInfoResponse) XXX_Size() int { return m.Size() } func (m *FaucetInfoResponse) XXX_DiscardUnknown() { xxx_messageInfo_FaucetInfoResponse.DiscardUnknown(m) } var xxx_messageInfo_FaucetInfoResponse proto.InternalMessageInfo func (m *FaucetInfoResponse) GetAddress() string { if m != nil { return m.Address } return "" } func (m *FaucetInfoResponse) GetBalance() types.Coin { if m != nil { return m.Balance } return types.Coin{} } func (m *FaucetInfoResponse) GetRequestCount() int32 { if m != nil { return m.RequestCount } return 0 } // GrantAllowanceRequest represents a request to grant fee allowance from the faucet. type GrantAllowanceRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Optional amount limit for the allowance (in uopen). If not provided, defaults to 10000000000 (10,000 OPEN) AmountLimit types.Coin `protobuf:"bytes,2,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit"` // Optional expiration time. If not provided, defaults to 30 days from now Expiration *time.Time `protobuf:"bytes,3,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` } func (m *GrantAllowanceRequest) Reset() { *m = GrantAllowanceRequest{} } func (m *GrantAllowanceRequest) String() string { return proto.CompactTextString(m) } func (*GrantAllowanceRequest) ProtoMessage() {} func (*GrantAllowanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{6} } func (m *GrantAllowanceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GrantAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GrantAllowanceRequest.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 *GrantAllowanceRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_GrantAllowanceRequest.Merge(m, src) } func (m *GrantAllowanceRequest) XXX_Size() int { return m.Size() } func (m *GrantAllowanceRequest) XXX_DiscardUnknown() { xxx_messageInfo_GrantAllowanceRequest.DiscardUnknown(m) } var xxx_messageInfo_GrantAllowanceRequest proto.InternalMessageInfo func (m *GrantAllowanceRequest) GetAddress() string { if m != nil { return m.Address } return "" } func (m *GrantAllowanceRequest) GetAmountLimit() types.Coin { if m != nil { return m.AmountLimit } return types.Coin{} } func (m *GrantAllowanceRequest) GetExpiration() *time.Time { if m != nil { return m.Expiration } return nil } // GrantAllowanceResponse represents the response from a grant allowance request. type GrantAllowanceResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Txhash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,4,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Granter string `protobuf:"bytes,5,opt,name=granter,proto3" json:"granter,omitempty"` Grantee string `protobuf:"bytes,6,opt,name=grantee,proto3" json:"grantee,omitempty"` AmountLimit types.Coin `protobuf:"bytes,7,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit"` Expiration *time.Time `protobuf:"bytes,8,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` } func (m *GrantAllowanceResponse) Reset() { *m = GrantAllowanceResponse{} } func (m *GrantAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*GrantAllowanceResponse) ProtoMessage() {} func (*GrantAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{7} } func (m *GrantAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GrantAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GrantAllowanceResponse.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 *GrantAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_GrantAllowanceResponse.Merge(m, src) } func (m *GrantAllowanceResponse) XXX_Size() int { return m.Size() } func (m *GrantAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_GrantAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_GrantAllowanceResponse proto.InternalMessageInfo func (m *GrantAllowanceResponse) GetMessage() string { if m != nil { return m.Message } return "" } func (m *GrantAllowanceResponse) GetTxhash() string { if m != nil { return m.Txhash } return "" } func (m *GrantAllowanceResponse) GetCode() uint32 { if m != nil { return m.Code } return 0 } func (m *GrantAllowanceResponse) GetRawLog() string { if m != nil { return m.RawLog } return "" } func (m *GrantAllowanceResponse) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *GrantAllowanceResponse) GetGrantee() string { if m != nil { return m.Grantee } return "" } func (m *GrantAllowanceResponse) GetAmountLimit() types.Coin { if m != nil { return m.AmountLimit } return types.Coin{} } func (m *GrantAllowanceResponse) GetExpiration() *time.Time { if m != nil { return m.Expiration } return nil } // GrantDIDAllowanceRequest represents a request to grant fee allowance to a DID from the faucet. type GrantDIDAllowanceRequest struct { Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` // Optional amount limit for the allowance (in uopen). If not provided, defaults to 10000000000 (10,000 OPEN) AmountLimit types.Coin `protobuf:"bytes,2,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit"` // Optional expiration time. If not provided, defaults to 30 days from now Expiration *time.Time `protobuf:"bytes,3,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` } func (m *GrantDIDAllowanceRequest) Reset() { *m = GrantDIDAllowanceRequest{} } func (m *GrantDIDAllowanceRequest) String() string { return proto.CompactTextString(m) } func (*GrantDIDAllowanceRequest) ProtoMessage() {} func (*GrantDIDAllowanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{8} } func (m *GrantDIDAllowanceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GrantDIDAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GrantDIDAllowanceRequest.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 *GrantDIDAllowanceRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_GrantDIDAllowanceRequest.Merge(m, src) } func (m *GrantDIDAllowanceRequest) XXX_Size() int { return m.Size() } func (m *GrantDIDAllowanceRequest) XXX_DiscardUnknown() { xxx_messageInfo_GrantDIDAllowanceRequest.DiscardUnknown(m) } var xxx_messageInfo_GrantDIDAllowanceRequest proto.InternalMessageInfo func (m *GrantDIDAllowanceRequest) GetDid() string { if m != nil { return m.Did } return "" } func (m *GrantDIDAllowanceRequest) GetAmountLimit() types.Coin { if m != nil { return m.AmountLimit } return types.Coin{} } func (m *GrantDIDAllowanceRequest) GetExpiration() *time.Time { if m != nil { return m.Expiration } return nil } // GrantDIDAllowanceResponse represents the response from a DID grant allowance request. type GrantDIDAllowanceResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Txhash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` RawLog string `protobuf:"bytes,4,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` Granter string `protobuf:"bytes,5,opt,name=granter,proto3" json:"granter,omitempty"` GranteeDid string `protobuf:"bytes,6,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` AmountLimit types.Coin `protobuf:"bytes,7,opt,name=amount_limit,json=amountLimit,proto3" json:"amount_limit"` Expiration *time.Time `protobuf:"bytes,8,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` } func (m *GrantDIDAllowanceResponse) Reset() { *m = GrantDIDAllowanceResponse{} } func (m *GrantDIDAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*GrantDIDAllowanceResponse) ProtoMessage() {} func (*GrantDIDAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b854b66c8024df8a, []int{9} } func (m *GrantDIDAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GrantDIDAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GrantDIDAllowanceResponse.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 *GrantDIDAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_GrantDIDAllowanceResponse.Merge(m, src) } func (m *GrantDIDAllowanceResponse) XXX_Size() int { return m.Size() } func (m *GrantDIDAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_GrantDIDAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_GrantDIDAllowanceResponse proto.InternalMessageInfo func (m *GrantDIDAllowanceResponse) GetMessage() string { if m != nil { return m.Message } return "" } func (m *GrantDIDAllowanceResponse) GetTxhash() string { if m != nil { return m.Txhash } return "" } func (m *GrantDIDAllowanceResponse) GetCode() uint32 { if m != nil { return m.Code } return 0 } func (m *GrantDIDAllowanceResponse) GetRawLog() string { if m != nil { return m.RawLog } return "" } func (m *GrantDIDAllowanceResponse) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *GrantDIDAllowanceResponse) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } func (m *GrantDIDAllowanceResponse) GetAmountLimit() types.Coin { if m != nil { return m.AmountLimit } return types.Coin{} } func (m *GrantDIDAllowanceResponse) GetExpiration() *time.Time { if m != nil { return m.Expiration } return nil } func init() { proto.RegisterType((*FaucetRequestRecord)(nil), "sourcehub.faucet.FaucetRequestRecord") proto.RegisterType((*FaucetRequest)(nil), "sourcehub.faucet.FaucetRequest") proto.RegisterType((*FaucetResponse)(nil), "sourcehub.faucet.FaucetResponse") proto.RegisterType((*InitAccountRequest)(nil), "sourcehub.faucet.InitAccountRequest") proto.RegisterType((*InitAccountResponse)(nil), "sourcehub.faucet.InitAccountResponse") proto.RegisterType((*FaucetInfoResponse)(nil), "sourcehub.faucet.FaucetInfoResponse") proto.RegisterType((*GrantAllowanceRequest)(nil), "sourcehub.faucet.GrantAllowanceRequest") proto.RegisterType((*GrantAllowanceResponse)(nil), "sourcehub.faucet.GrantAllowanceResponse") proto.RegisterType((*GrantDIDAllowanceRequest)(nil), "sourcehub.faucet.GrantDIDAllowanceRequest") proto.RegisterType((*GrantDIDAllowanceResponse)(nil), "sourcehub.faucet.GrantDIDAllowanceResponse") } func init() { proto.RegisterFile("sourcehub/faucet/faucet.proto", fileDescriptor_b854b66c8024df8a) } var fileDescriptor_b854b66c8024df8a = []byte{ // 659 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcf, 0x4f, 0x13, 0x4f, 0x14, 0xef, 0x94, 0xd2, 0xc2, 0x2b, 0x7c, 0xc3, 0x77, 0x50, 0x5c, 0x48, 0xdc, 0x92, 0x7a, 0x41, 0x0f, 0xbb, 0x01, 0xae, 0xc6, 0xc8, 0x8f, 0x88, 0x24, 0x78, 0xd9, 0x78, 0xf2, 0xd2, 0x4c, 0xb7, 0xc3, 0x76, 0xe2, 0xee, 0xce, 0xba, 0x33, 0x6b, 0xeb, 0x3f, 0xe0, 0x99, 0xc4, 0x7f, 0xc2, 0x8b, 0x89, 0x27, 0xbd, 0x78, 0xf0, 0xc8, 0x91, 0xa3, 0x27, 0x35, 0x60, 0xe2, 0xbf, 0x61, 0x76, 0x66, 0x16, 0x8a, 0xb4, 0x21, 0x25, 0x46, 0xbc, 0xb4, 0xfb, 0xde, 0x9b, 0x37, 0xf3, 0xf9, 0xf1, 0x26, 0x03, 0xb7, 0x05, 0xcf, 0x52, 0x9f, 0x76, 0xb3, 0xb6, 0xbb, 0x4f, 0x32, 0x9f, 0x4a, 0xf3, 0xe7, 0x24, 0x29, 0x97, 0x1c, 0xcf, 0x9d, 0x96, 0x1d, 0x9d, 0x5f, 0xfa, 0x9f, 0x44, 0x2c, 0xe6, 0xae, 0xfa, 0xd5, 0x8b, 0x96, 0x16, 0x7d, 0x2e, 0x22, 0x2e, 0x5a, 0x2a, 0x72, 0x75, 0x60, 0x4a, 0x37, 0x02, 0x1e, 0x70, 0x9d, 0xcf, 0xbf, 0x4c, 0xd6, 0xd6, 0x6b, 0xdc, 0x36, 0x11, 0xd4, 0x7d, 0xb9, 0xda, 0xa6, 0x92, 0xac, 0xba, 0x3e, 0x67, 0xb1, 0xa9, 0x37, 0x02, 0xce, 0x83, 0x90, 0xba, 0x2a, 0x6a, 0x67, 0xfb, 0xae, 0x64, 0x11, 0x15, 0x92, 0x44, 0x89, 0x5e, 0xd0, 0x7c, 0x8d, 0x60, 0xfe, 0x91, 0xc2, 0xe3, 0xd1, 0x17, 0x19, 0x15, 0xd2, 0xa3, 0x3e, 0x4f, 0x3b, 0xd8, 0x82, 0x1a, 0xe9, 0x74, 0x52, 0x2a, 0x84, 0x85, 0x96, 0xd1, 0xca, 0xb4, 0x57, 0x84, 0xf8, 0x3e, 0x54, 0x49, 0xc4, 0xb3, 0x58, 0x5a, 0xe5, 0x65, 0xb4, 0x52, 0x5f, 0x5b, 0x74, 0x0c, 0xce, 0x1c, 0x83, 0x63, 0x30, 0x38, 0x5b, 0x9c, 0xc5, 0x9b, 0xd3, 0x87, 0x5f, 0x1b, 0xa5, 0xb7, 0x3f, 0xdf, 0xdf, 0x43, 0x9e, 0xe9, 0xc1, 0xb7, 0xa0, 0x26, 0xfb, 0xad, 0x2e, 0x11, 0x5d, 0x6b, 0x42, 0xed, 0x5b, 0x95, 0xfd, 0xc7, 0x44, 0x74, 0x9b, 0x77, 0x61, 0xf6, 0x1c, 0x8e, 0xd1, 0x08, 0x9a, 0xef, 0x10, 0xfc, 0x57, 0xac, 0x15, 0x09, 0x8f, 0x05, 0xc5, 0x0b, 0x50, 0x95, 0x7d, 0xb5, 0x2b, 0x2a, 0x76, 0xcd, 0x23, 0x8c, 0xa1, 0xe2, 0xf3, 0x0e, 0x55, 0x50, 0x67, 0x3d, 0xf5, 0x9d, 0x43, 0x48, 0x49, 0xaf, 0x15, 0xf2, 0xa0, 0x80, 0x90, 0x92, 0xde, 0x1e, 0x0f, 0x06, 0x4f, 0xac, 0x8c, 0xe2, 0x3c, 0x39, 0x3e, 0xe7, 0xa6, 0x03, 0x78, 0x37, 0x66, 0x72, 0xc3, 0xf7, 0xf3, 0xf0, 0x72, 0x7e, 0x3f, 0x10, 0xcc, 0x9f, 0x6b, 0x30, 0x24, 0x2d, 0xa8, 0x45, 0x54, 0x08, 0x12, 0xd0, 0xa2, 0xc3, 0x84, 0x03, 0xf4, 0xcb, 0x43, 0xe9, 0x4f, 0x0c, 0xa7, 0x5f, 0x19, 0x45, 0x7f, 0x72, 0x14, 0xfd, 0xea, 0x15, 0x2c, 0x5f, 0x80, 0x2a, 0xed, 0x33, 0x21, 0x85, 0x55, 0x5b, 0x46, 0x2b, 0x53, 0x9e, 0x89, 0x9a, 0x6f, 0x10, 0x60, 0x6d, 0xe3, 0x6e, 0xbc, 0xcf, 0x07, 0x59, 0x8e, 0x98, 0xbc, 0x07, 0x50, 0x6b, 0x93, 0x90, 0xc4, 0x3e, 0x1d, 0x6b, 0xf4, 0x8a, 0x26, 0x7c, 0x07, 0x66, 0x53, 0x2d, 0x7e, 0x4b, 0x09, 0xab, 0x64, 0x99, 0xf4, 0x66, 0x4c, 0x72, 0x4b, 0x99, 0xf5, 0x09, 0xc1, 0xcd, 0x9d, 0x94, 0xc4, 0x72, 0x23, 0x0c, 0x79, 0x2f, 0xef, 0xbb, 0xd4, 0x30, 0xbc, 0x03, 0x33, 0x9a, 0x6b, 0x2b, 0x64, 0x11, 0x1b, 0xef, 0x62, 0xd4, 0x75, 0xe7, 0x5e, 0xde, 0x88, 0x1f, 0x02, 0xd0, 0x7e, 0xc2, 0x52, 0x22, 0x19, 0x8f, 0x15, 0xbc, 0xfa, 0xda, 0x92, 0xa3, 0xef, 0xb0, 0x53, 0xdc, 0x61, 0xe7, 0x69, 0x71, 0x87, 0x37, 0x2b, 0x07, 0xdf, 0x1a, 0xc8, 0x1b, 0xe8, 0x69, 0x7e, 0x28, 0xc3, 0xc2, 0xef, 0xf0, 0xff, 0xda, 0xf8, 0x04, 0xf9, 0xc1, 0x34, 0x2d, 0xc6, 0xc7, 0x84, 0x67, 0x15, 0xaa, 0xe6, 0xe7, 0xb4, 0x42, 0x2f, 0x08, 0x57, 0xfb, 0x33, 0xc2, 0x4d, 0x5d, 0x41, 0xb8, 0x8f, 0x08, 0x2c, 0x25, 0xdc, 0xf6, 0xee, 0xf6, 0x05, 0xeb, 0xe7, 0x60, 0xa2, 0xc3, 0x3a, 0x46, 0xb6, 0xfc, 0xf3, 0x5f, 0xb2, 0xfc, 0x73, 0x19, 0x16, 0x87, 0x20, 0xbf, 0x6e, 0xd7, 0x1b, 0x50, 0x37, 0x36, 0xb7, 0x72, 0xed, 0xb4, 0xf3, 0x60, 0x52, 0xdb, 0x43, 0x24, 0xbc, 0x3e, 0xf3, 0x37, 0x9f, 0x1c, 0x1e, 0xdb, 0xe8, 0xe8, 0xd8, 0x46, 0xdf, 0x8f, 0x6d, 0x74, 0x70, 0x62, 0x97, 0x8e, 0x4e, 0xec, 0xd2, 0x97, 0x13, 0xbb, 0xf4, 0x6c, 0x3d, 0x60, 0x32, 0x7f, 0xb3, 0x7d, 0x1e, 0xb9, 0xfa, 0x05, 0x8f, 0xa9, 0xec, 0xf1, 0xf4, 0xb9, 0x7b, 0xf6, 0xdc, 0x93, 0x24, 0x29, 0x9e, 0x7c, 0xf9, 0x2a, 0xa1, 0xa2, 0x5d, 0x55, 0x87, 0xae, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x36, 0x16, 0x94, 0x13, 0x08, 0x00, 0x00, } func (m *FaucetRequestRecord) 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 *FaucetRequestRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FaucetRequestRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.TxHash) > 0 { i -= len(m.TxHash) copy(dAtA[i:], m.TxHash) i = encodeVarintFaucet(dAtA, i, uint64(len(m.TxHash))) i-- dAtA[i] = 0x1a } { size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *FaucetRequest) 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 *FaucetRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FaucetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *FaucetResponse) 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 *FaucetResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FaucetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0x22 } if len(m.RawLog) > 0 { i -= len(m.RawLog) copy(dAtA[i:], m.RawLog) i = encodeVarintFaucet(dAtA, i, uint64(len(m.RawLog))) i-- dAtA[i] = 0x1a } if m.Code != 0 { i = encodeVarintFaucet(dAtA, i, uint64(m.Code)) i-- dAtA[i] = 0x10 } if len(m.Txhash) > 0 { i -= len(m.Txhash) copy(dAtA[i:], m.Txhash) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Txhash))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *InitAccountRequest) 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 *InitAccountRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *InitAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *InitAccountResponse) 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 *InitAccountResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *InitAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Exists { i-- if m.Exists { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x38 } { size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0x2a } if len(m.RawLog) > 0 { i -= len(m.RawLog) copy(dAtA[i:], m.RawLog) i = encodeVarintFaucet(dAtA, i, uint64(len(m.RawLog))) i-- dAtA[i] = 0x22 } if m.Code != 0 { i = encodeVarintFaucet(dAtA, i, uint64(m.Code)) i-- dAtA[i] = 0x18 } if len(m.Txhash) > 0 { i -= len(m.Txhash) copy(dAtA[i:], m.Txhash) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Txhash))) i-- dAtA[i] = 0x12 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *FaucetInfoResponse) 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 *FaucetInfoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FaucetInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.RequestCount != 0 { i = encodeVarintFaucet(dAtA, i, uint64(m.RequestCount)) i-- dAtA[i] = 0x18 } { size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *GrantAllowanceRequest) 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 *GrantAllowanceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *GrantAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Expiration != nil { n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) if err5 != nil { return 0, err5 } i -= n5 i = encodeVarintFaucet(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x1a } { size, err := m.AmountLimit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *GrantAllowanceResponse) 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 *GrantAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *GrantAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Expiration != nil { n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) if err7 != nil { return 0, err7 } i -= n7 i = encodeVarintFaucet(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x42 } { size, err := m.AmountLimit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a if len(m.Grantee) > 0 { i -= len(m.Grantee) copy(dAtA[i:], m.Grantee) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Grantee))) i-- dAtA[i] = 0x32 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0x2a } if len(m.RawLog) > 0 { i -= len(m.RawLog) copy(dAtA[i:], m.RawLog) i = encodeVarintFaucet(dAtA, i, uint64(len(m.RawLog))) i-- dAtA[i] = 0x22 } if m.Code != 0 { i = encodeVarintFaucet(dAtA, i, uint64(m.Code)) i-- dAtA[i] = 0x18 } if len(m.Txhash) > 0 { i -= len(m.Txhash) copy(dAtA[i:], m.Txhash) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Txhash))) i-- dAtA[i] = 0x12 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *GrantDIDAllowanceRequest) 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 *GrantDIDAllowanceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *GrantDIDAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Expiration != nil { n9, err9 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) if err9 != nil { return 0, err9 } i -= n9 i = encodeVarintFaucet(dAtA, i, uint64(n9)) i-- dAtA[i] = 0x1a } { size, err := m.AmountLimit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Did) > 0 { i -= len(m.Did) copy(dAtA[i:], m.Did) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Did))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *GrantDIDAllowanceResponse) 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 *GrantDIDAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *GrantDIDAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Expiration != nil { n11, err11 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) if err11 != nil { return 0, err11 } i -= n11 i = encodeVarintFaucet(dAtA, i, uint64(n11)) i-- dAtA[i] = 0x42 } { size, err := m.AmountLimit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFaucet(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a if len(m.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintFaucet(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0x32 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0x2a } if len(m.RawLog) > 0 { i -= len(m.RawLog) copy(dAtA[i:], m.RawLog) i = encodeVarintFaucet(dAtA, i, uint64(len(m.RawLog))) i-- dAtA[i] = 0x22 } if m.Code != 0 { i = encodeVarintFaucet(dAtA, i, uint64(m.Code)) i-- dAtA[i] = 0x18 } if len(m.Txhash) > 0 { i -= len(m.Txhash) copy(dAtA[i:], m.Txhash) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Txhash))) i-- dAtA[i] = 0x12 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintFaucet(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintFaucet(dAtA []byte, offset int, v uint64) int { offset -= sovFaucet(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *FaucetRequestRecord) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Address) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.Amount.Size() n += 1 + l + sovFaucet(uint64(l)) l = len(m.TxHash) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } return n } func (m *FaucetRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Address) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } return n } func (m *FaucetResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Txhash) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } if m.Code != 0 { n += 1 + sovFaucet(uint64(m.Code)) } l = len(m.RawLog) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Address) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.Amount.Size() n += 1 + l + sovFaucet(uint64(l)) return n } func (m *InitAccountRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Address) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } return n } func (m *InitAccountResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Message) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Txhash) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } if m.Code != 0 { n += 1 + sovFaucet(uint64(m.Code)) } l = len(m.RawLog) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Address) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.Amount.Size() n += 1 + l + sovFaucet(uint64(l)) if m.Exists { n += 2 } return n } func (m *FaucetInfoResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Address) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.Balance.Size() n += 1 + l + sovFaucet(uint64(l)) if m.RequestCount != 0 { n += 1 + sovFaucet(uint64(m.RequestCount)) } return n } func (m *GrantAllowanceRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Address) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.AmountLimit.Size() n += 1 + l + sovFaucet(uint64(l)) if m.Expiration != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) n += 1 + l + sovFaucet(uint64(l)) } return n } func (m *GrantAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Message) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Txhash) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } if m.Code != 0 { n += 1 + sovFaucet(uint64(m.Code)) } l = len(m.RawLog) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Granter) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Grantee) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.AmountLimit.Size() n += 1 + l + sovFaucet(uint64(l)) if m.Expiration != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) n += 1 + l + sovFaucet(uint64(l)) } return n } func (m *GrantDIDAllowanceRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Did) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.AmountLimit.Size() n += 1 + l + sovFaucet(uint64(l)) if m.Expiration != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) n += 1 + l + sovFaucet(uint64(l)) } return n } func (m *GrantDIDAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Message) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Txhash) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } if m.Code != 0 { n += 1 + sovFaucet(uint64(m.Code)) } l = len(m.RawLog) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.Granter) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = len(m.GranteeDid) if l > 0 { n += 1 + l + sovFaucet(uint64(l)) } l = m.AmountLimit.Size() n += 1 + l + sovFaucet(uint64(l)) if m.Expiration != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) n += 1 + l + sovFaucet(uint64(l)) } return n } func sovFaucet(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozFaucet(x uint64) (n int) { return sovFaucet(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *FaucetRequestRecord) 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 ErrIntOverflowFaucet } 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: FaucetRequestRecord: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FaucetRequestRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FaucetRequest) 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 ErrIntOverflowFaucet } 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: FaucetRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FaucetRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FaucetResponse) 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 ErrIntOverflowFaucet } 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: FaucetResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FaucetResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *InitAccountRequest) 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 ErrIntOverflowFaucet } 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: InitAccountRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: InitAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *InitAccountResponse) 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 ErrIntOverflowFaucet } 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: InitAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: InitAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Exists = bool(v != 0) default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FaucetInfoResponse) 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 ErrIntOverflowFaucet } 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: FaucetInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FaucetInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequestCount", wireType) } m.RequestCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RequestCount |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GrantAllowanceRequest) 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 ErrIntOverflowFaucet } 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: GrantAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GrantAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.AmountLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if m.Expiration == nil { m.Expiration = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GrantAllowanceResponse) 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 ErrIntOverflowFaucet } 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: GrantAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GrantAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.AmountLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if m.Expiration == nil { m.Expiration = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GrantDIDAllowanceRequest) 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 ErrIntOverflowFaucet } 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: GrantDIDAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GrantDIDAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.AmountLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if m.Expiration == nil { m.Expiration = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GrantDIDAllowanceResponse) 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 ErrIntOverflowFaucet } 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: GrantDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GrantDIDAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txhash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Txhash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RawLog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.RawLog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } 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 ErrInvalidLengthFaucet } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } m.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmountLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.AmountLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFaucet } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFaucet } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFaucet } if postIndex > l { return io.ErrUnexpectedEOF } if m.Expiration == nil { m.Expiration = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFaucet(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFaucet } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipFaucet(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, ErrIntOverflowFaucet } 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, ErrIntOverflowFaucet } 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, ErrIntOverflowFaucet } 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, ErrInvalidLengthFaucet } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupFaucet } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthFaucet } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthFaucet = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowFaucet = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupFaucet = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: app/faucet.go ================================================ package app import ( "encoding/json" "fmt" "net/http" "os" "path/filepath" "time" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/gogoproto/proto" "github.com/sourcenetwork/sourcehub/x/feegrant" faucettypes "github.com/sourcenetwork/sourcehub/app/faucet/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // Faucet constants const ( FaucetRequestAmount = 1000000000 // 1,000 $OPEN DefaultAllowanceAmount = 10000000000 // 10,000 $OPEN DefaultAllowanceExpirationDays = 30 ) // getFaucetConfig extracts faucet configuration from app options. func getFaucetConfig(appOpts servertypes.AppOptions) appparams.FaucetConfig { var faucetConfig appparams.FaucetConfig if enableFaucet := appOpts.Get("faucet.enable_faucet"); enableFaucet != nil { if boolVal, ok := enableFaucet.(bool); ok { faucetConfig.EnableFaucet = boolVal } } return faucetConfig } // shouldRegisterFaucetRoutes determines if faucet routes should be registered based on configuration. func shouldRegisterFaucetRoutes(appOpts servertypes.AppOptions) bool { faucetConfig := getFaucetConfig(appOpts) return faucetConfig.EnableFaucet } // RegisterFaucetRoutes registers the faucet API routes. func (app *App) RegisterFaucetRoutes(apiSvr *api.Server, apiConfig config.APIConfig, appOpts servertypes.AppOptions) { if !shouldRegisterFaucetRoutes(appOpts) { return } clientCtx := apiSvr.ClientCtx rtr := apiSvr.Router rtr.HandleFunc("/faucet/info", app.handleFaucetInfo(clientCtx)).Methods("GET") rtr.HandleFunc("/faucet/init-account", app.handleInitAccount(clientCtx)).Methods("POST") rtr.HandleFunc("/faucet/request", app.handleFaucetRequest(clientCtx)).Methods("POST") rtr.HandleFunc("/faucet/grant-allowance", app.handleGrantAllowance(clientCtx)).Methods("POST") rtr.HandleFunc("/faucet/grant-did-allowance", app.handleGrantDIDAllowance(clientCtx)).Methods("POST") } // zeroFeeTxsAllowed returns true if zero fee transactions are allowed, false otherwise. func (app *App) zeroFeeTxsAllowed() bool { ctx := sdk.NewContext(app.CommitMultiStore(), cmtproto.Header{}, false, app.Logger()) return app.HubKeeper != nil && app.HubKeeper.GetChainConfig(ctx).AllowZeroFeeTxs } // hasAddressRequested checks if an address has already requested funds. func (app *App) hasAddressRequested(address string) bool { store := app.BaseApp.CommitMultiStore().GetKVStore(app.GetKey(appparams.FaucetStoreKey)) if store == nil { return false } return store.Has([]byte(address)) } // recordAddressRequested records that an address has requested funds. func (app *App) recordAddressRequested(address string, amount sdk.Coins, txHash string) error { store := app.BaseApp.CommitMultiStore().GetKVStore(app.GetKey(appparams.FaucetStoreKey)) if store == nil { return fmt.Errorf("faucet store not found") } request := &faucettypes.FaucetRequestRecord{ Address: address, Amount: amount[0], TxHash: txHash, } bz, err := proto.Marshal(request) if err != nil { return fmt.Errorf("failed to marshal faucet request: %w", err) } store.Set([]byte(address), bz) return nil } // getRequestCount returns the number of addresses that have requested funds. func (app *App) getRequestCount() int { store := app.BaseApp.CommitMultiStore().GetKVStore(app.GetKey(appparams.FaucetStoreKey)) if store == nil { return 0 } iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() count := 0 for ; iterator.Valid(); iterator.Next() { count++ } return count } // FaucetKeyConfig represents the structure of the faucet key JSON file. type FaucetKeyConfig struct { Mnemonic string `json:"mnemonic"` Name string `json:"name"` Address string `json:"address"` } // getFaucetKey retrieves the faucet key from the faucet-key.json configuration file. func (app *App) getFaucetKey() (keyring.Keyring, keyring.Record, error) { faucetKeyPath := filepath.Join(DefaultNodeHome, "config", "faucet-key.json") if _, err := os.Stat(faucetKeyPath); os.IsNotExist(err) { return nil, keyring.Record{}, fmt.Errorf("faucet key configuration file not found at %s", faucetKeyPath) } var faucetKeyConfig FaucetKeyConfig file, err := os.Open(faucetKeyPath) if err != nil { return nil, keyring.Record{}, fmt.Errorf("failed to open faucet key configuration file: %w", err) } defer file.Close() if err := json.NewDecoder(file).Decode(&faucetKeyConfig); err != nil { return nil, keyring.Record{}, fmt.Errorf("failed to decode faucet key configuration: %w", err) } kb := keyring.NewInMemory(app.appCodec) info, err := kb.NewAccount(faucetKeyConfig.Name, faucetKeyConfig.Mnemonic, "", "m/44'/118'/0'/0/0", hd.Secp256k1) if err != nil { return nil, keyring.Record{}, fmt.Errorf("failed to import faucet key: %w", err) } return kb, *info, nil } // handleFaucetRequest handles POST requests to request funds from the faucet. func (app *App) handleFaucetRequest(clientCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req faucettypes.FaucetRequest if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, "Invalid request body", http.StatusBadRequest) return } _, err := sdk.AccAddressFromBech32(req.Address) if err != nil { http.Error(w, "Invalid address", http.StatusBadRequest) return } // Check if address has already requested funds if app.hasAddressRequested(req.Address) { http.Error(w, "Address has already requested funds from the faucet", http.StatusForbidden) return } coins := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, FaucetRequestAmount)) kb, faucetInfo, err := app.getFaucetKey() if err != nil { http.Error(w, fmt.Sprintf("Faucet not configured: %v", err), http.StatusInternalServerError) return } faucetAddress, err := faucetInfo.GetAddress() if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet address: %v", err), http.StatusInternalServerError) return } msg := banktypes.NewMsgSend( faucetAddress, sdk.MustAccAddressFromBech32(req.Address), coins, ) chainID := clientCtx.ChainID if chainID == "" { chainID = "sourcehub-dev" } txf := tx.Factory{}. WithTxConfig(clientCtx.TxConfig). WithAccountRetriever(clientCtx.AccountRetriever). WithChainID(chainID). WithGas(200000). WithKeybase(kb) // Only add fees if zero fee transactions are not allowed if !app.zeroFeeTxsAllowed() { txf = txf.WithFees("200uopen") } faucetAccount, err := clientCtx.AccountRetriever.GetAccount(clientCtx, faucetAddress) if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet account: %v", err), http.StatusInternalServerError) return } txf = txf.WithAccountNumber(faucetAccount.GetAccountNumber()). WithSequence(faucetAccount.GetSequence()) txn, err := txf.BuildUnsignedTx(msg) if err != nil { http.Error(w, fmt.Sprintf("Failed to build transaction: %v", err), http.StatusInternalServerError) return } err = tx.Sign(r.Context(), txf, "faucet", txn, true) if err != nil { http.Error(w, fmt.Sprintf("Failed to sign transaction: %v", err), http.StatusInternalServerError) return } txBytes, err := clientCtx.TxConfig.TxEncoder()(txn.GetTx()) if err != nil { http.Error(w, fmt.Sprintf("Failed to encode transaction: %v", err), http.StatusInternalServerError) return } res, err := clientCtx.BroadcastTxSync(txBytes) if err != nil { http.Error(w, fmt.Sprintf("Failed to broadcast transaction: %v", err), http.StatusInternalServerError) return } if res.Code == 0 { if err := app.recordAddressRequested(req.Address, coins, res.TxHash); err != nil { fmt.Printf("Failed to record faucet request: %v\n", err) } } response := &faucettypes.FaucetResponse{ Txhash: res.TxHash, Code: res.Code, RawLog: res.RawLog, Address: req.Address, Amount: sdk.NewInt64Coin(appparams.MicroOpenDenom, FaucetRequestAmount), } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(response) } } // handleFaucetInfo handles GET requests to get faucet information. func (app *App) handleFaucetInfo(clientCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { _, faucetInfo, err := app.getFaucetKey() if err != nil { http.Error(w, fmt.Sprintf("Faucet not configured: %v", err), http.StatusNotFound) return } faucetAddress, err := faucetInfo.GetAddress() if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet address: %v", err), http.StatusInternalServerError) return } bankClient := banktypes.NewQueryClient(clientCtx) balance, err := bankClient.Balance(r.Context(), &banktypes.QueryBalanceRequest{ Address: faucetAddress.String(), Denom: appparams.MicroOpenDenom, }) if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet balance: %v", err), http.StatusInternalServerError) return } requestCount := app.getRequestCount() response := &faucettypes.FaucetInfoResponse{ Address: faucetAddress.String(), Balance: *balance.Balance, RequestCount: int32(requestCount), } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(response) } } // handleInitAccount handles POST requests to initialize an account on chain. // Accounts that are not yet registered in the auth module are initialized with 1 uopen. func (app *App) handleInitAccount(clientCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req faucettypes.InitAccountRequest if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, "Invalid request body", http.StatusBadRequest) return } accAddr, err := sdk.AccAddressFromBech32(req.Address) if err != nil { http.Error(w, "Invalid address", http.StatusBadRequest) return } // Check if account already exists in the auth module existingAccount, err := clientCtx.AccountRetriever.GetAccount(clientCtx, accAddr) if err == nil && existingAccount != nil { response := &faucettypes.InitAccountResponse{ Message: "Account already exists", Address: req.Address, Exists: true, } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(response) return } kb, faucetInfo, err := app.getFaucetKey() if err != nil { http.Error(w, fmt.Sprintf("Faucet not configured: %v", err), http.StatusInternalServerError) return } faucetAddress, err := faucetInfo.GetAddress() if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet address: %v", err), http.StatusInternalServerError) return } // Create a bank send message with 1 uopen to initialize the account coins := sdk.NewCoins(sdk.NewInt64Coin(appparams.MicroOpenDenom, 1)) msg := banktypes.NewMsgSend( faucetAddress, accAddr, coins, ) chainID := clientCtx.ChainID if chainID == "" { chainID = "sourcehub-dev" } txf := tx.Factory{}. WithTxConfig(clientCtx.TxConfig). WithAccountRetriever(clientCtx.AccountRetriever). WithChainID(chainID). WithGas(200000). WithKeybase(kb) // Only add fees if zero fee transactions are not allowed if !app.zeroFeeTxsAllowed() { txf = txf.WithFees("200uopen") } faucetAccount, err := clientCtx.AccountRetriever.GetAccount(clientCtx, faucetAddress) if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet account: %v", err), http.StatusInternalServerError) return } txf = txf.WithAccountNumber(faucetAccount.GetAccountNumber()). WithSequence(faucetAccount.GetSequence()) txn, err := txf.BuildUnsignedTx(msg) if err != nil { http.Error(w, fmt.Sprintf("Failed to build transaction: %v", err), http.StatusInternalServerError) return } err = tx.Sign(r.Context(), txf, "faucet", txn, true) if err != nil { http.Error(w, fmt.Sprintf("Failed to sign transaction: %v", err), http.StatusInternalServerError) return } txBytes, err := clientCtx.TxConfig.TxEncoder()(txn.GetTx()) if err != nil { http.Error(w, fmt.Sprintf("Failed to encode transaction: %v", err), http.StatusInternalServerError) return } res, err := clientCtx.BroadcastTxSync(txBytes) if err != nil { http.Error(w, fmt.Sprintf("Failed to broadcast transaction: %v", err), http.StatusInternalServerError) return } response := &faucettypes.InitAccountResponse{ Message: "Account initialized successfully", Txhash: res.TxHash, Code: res.Code, RawLog: res.RawLog, Address: req.Address, Amount: sdk.NewInt64Coin(appparams.MicroOpenDenom, 1), Exists: false, } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(response) } } // handleGrantAllowance handles POST requests to grant fee allowances from the faucet. func (app *App) handleGrantAllowance(clientCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req faucettypes.GrantAllowanceRequest if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, "Invalid request body", http.StatusBadRequest) return } granteeAddr, err := sdk.AccAddressFromBech32(req.Address) if err != nil { http.Error(w, "Invalid address", http.StatusBadRequest) return } kb, faucetInfo, err := app.getFaucetKey() if err != nil { http.Error(w, fmt.Sprintf("Faucet not configured: %v", err), http.StatusInternalServerError) return } faucetAddress, err := faucetInfo.GetAddress() if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet address: %v", err), http.StatusInternalServerError) return } amountLimit := sdk.NewInt64Coin(appparams.MicroOpenDenom, DefaultAllowanceAmount) if !req.AmountLimit.Amount.IsNil() && req.AmountLimit.Amount.IsPositive() { amountLimit = req.AmountLimit } expiration := time.Now().AddDate(0, 0, DefaultAllowanceExpirationDays) if req.Expiration != nil { expiration = *req.Expiration } // Create basic allowance spendLimit := sdk.NewCoins(amountLimit) allowance := &feegrant.BasicAllowance{ SpendLimit: spendLimit, Expiration: &expiration, } msg, err := feegrant.NewMsgGrantAllowance(allowance, faucetAddress, granteeAddr) if err != nil { http.Error(w, fmt.Sprintf("Failed to create grant allowance message: %v", err), http.StatusInternalServerError) return } chainID := clientCtx.ChainID if chainID == "" { chainID = "sourcehub-dev" } txf := tx.Factory{}. WithTxConfig(clientCtx.TxConfig). WithAccountRetriever(clientCtx.AccountRetriever). WithChainID(chainID). WithGas(300000). WithKeybase(kb) // Only add fees if zero fee transactions are not allowed if !app.zeroFeeTxsAllowed() { txf = txf.WithFees("300uopen") } faucetAccount, err := clientCtx.AccountRetriever.GetAccount(clientCtx, faucetAddress) if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet account: %v", err), http.StatusInternalServerError) return } txf = txf.WithAccountNumber(faucetAccount.GetAccountNumber()). WithSequence(faucetAccount.GetSequence()) txn, err := txf.BuildUnsignedTx(msg) if err != nil { http.Error(w, fmt.Sprintf("Failed to build transaction: %v", err), http.StatusInternalServerError) return } err = tx.Sign(r.Context(), txf, "faucet", txn, true) if err != nil { http.Error(w, fmt.Sprintf("Failed to sign transaction: %v", err), http.StatusInternalServerError) return } txBytes, err := clientCtx.TxConfig.TxEncoder()(txn.GetTx()) if err != nil { http.Error(w, fmt.Sprintf("Failed to encode transaction: %v", err), http.StatusInternalServerError) return } res, err := clientCtx.BroadcastTxSync(txBytes) if err != nil { http.Error(w, fmt.Sprintf("Failed to broadcast transaction: %v", err), http.StatusInternalServerError) return } response := &faucettypes.GrantAllowanceResponse{ Message: "Fee allowance granted successfully", Txhash: res.TxHash, Code: res.Code, RawLog: res.RawLog, Granter: faucetAddress.String(), Grantee: req.Address, AmountLimit: amountLimit, Expiration: &expiration, } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(response) } } // handleGrantDIDAllowance handles POST requests to grant fee allowances to a DID from the faucet. func (app *App) handleGrantDIDAllowance(clientCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req faucettypes.GrantDIDAllowanceRequest if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, "Invalid request body", http.StatusBadRequest) return } if req.Did == "" || len(req.Did) < 4 || req.Did[:4] != "did:" { http.Error(w, "Invalid DID", http.StatusBadRequest) return } kb, faucetInfo, err := app.getFaucetKey() if err != nil { http.Error(w, fmt.Sprintf("Faucet not configured: %v", err), http.StatusInternalServerError) return } faucetAddress, err := faucetInfo.GetAddress() if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet address: %v", err), http.StatusInternalServerError) return } amountLimit := sdk.NewInt64Coin(appparams.MicroOpenDenom, DefaultAllowanceAmount) if !req.AmountLimit.Amount.IsNil() && req.AmountLimit.Amount.IsPositive() { amountLimit = req.AmountLimit } expiration := time.Now().AddDate(0, 0, DefaultAllowanceExpirationDays) if req.Expiration != nil { expiration = *req.Expiration } // Create basic allowance spendLimit := sdk.NewCoins(amountLimit) allowance := &feegrant.BasicAllowance{ SpendLimit: spendLimit, Expiration: &expiration, } msg, err := feegrant.NewMsgGrantDIDAllowance(allowance, faucetAddress, req.Did) if err != nil { http.Error(w, fmt.Sprintf("Failed to create grant DID allowance message: %v", err), http.StatusInternalServerError) return } chainID := clientCtx.ChainID if chainID == "" { chainID = "sourcehub-dev" } txf := tx.Factory{}. WithTxConfig(clientCtx.TxConfig). WithAccountRetriever(clientCtx.AccountRetriever). WithChainID(chainID). WithGas(300000). WithKeybase(kb) // Only add fees if zero fee transactions are not allowed if !app.zeroFeeTxsAllowed() { txf = txf.WithFees("300uopen") } faucetAccount, err := clientCtx.AccountRetriever.GetAccount(clientCtx, faucetAddress) if err != nil { http.Error(w, fmt.Sprintf("Failed to get faucet account: %v", err), http.StatusInternalServerError) return } txf = txf.WithAccountNumber(faucetAccount.GetAccountNumber()). WithSequence(faucetAccount.GetSequence()) txn, err := txf.BuildUnsignedTx(msg) if err != nil { http.Error(w, fmt.Sprintf("Failed to build transaction: %v", err), http.StatusInternalServerError) return } err = tx.Sign(r.Context(), txf, "faucet", txn, true) if err != nil { http.Error(w, fmt.Sprintf("Failed to sign transaction: %v", err), http.StatusInternalServerError) return } txBytes, err := clientCtx.TxConfig.TxEncoder()(txn.GetTx()) if err != nil { http.Error(w, fmt.Sprintf("Failed to encode transaction: %v", err), http.StatusInternalServerError) return } res, err := clientCtx.BroadcastTxSync(txBytes) if err != nil { http.Error(w, fmt.Sprintf("Failed to broadcast transaction: %v", err), http.StatusInternalServerError) return } response := &faucettypes.GrantDIDAllowanceResponse{ Message: "DID fee allowance granted successfully", Txhash: res.TxHash, Code: res.Code, RawLog: res.RawLog, Granter: faucetAddress.String(), GranteeDid: req.Did, AmountLimit: amountLimit, Expiration: &expiration, } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(response) } } ================================================ FILE: app/genesis.go ================================================ package app import ( "encoding/json" ) // GenesisState of the blockchain is represented here as a map of raw json // messages key'd by a identifier string. // The identifier is used to determine which module genesis information belongs // to so it may be appropriately routed during init chain. // Within this application default genesis information is retrieved from // the ModuleBasicManager which populates json from each BasicModule // object provided to it during init. type GenesisState map[string]json.RawMessage ================================================ FILE: app/genesis_account.go ================================================ package app import ( "errors" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ authtypes.GenesisAccount = (*GenesisAccount)(nil) // GenesisAccount defines a type that implements the GenesisAccount interface // to be used for simulation accounts in the genesis state. type GenesisAccount struct { *authtypes.BaseAccount // vesting account fields OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` // total vesting coins upon initialization DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` // delegated vested coins at time of delegation DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` // delegated vesting coins at time of delegation StartTime int64 `json:"start_time" yaml:"start_time"` // vesting start time (UNIX Epoch time) EndTime int64 `json:"end_time" yaml:"end_time"` // vesting end time (UNIX Epoch time) // module account fields ModuleName string `json:"module_name" yaml:"module_name"` // name of the module account ModulePermissions []string `json:"module_permissions" yaml:"module_permissions"` // permissions of module account } // Validate checks for errors on the vesting and module account parameters func (sga GenesisAccount) Validate() error { if !sga.OriginalVesting.IsZero() { if sga.StartTime >= sga.EndTime { return errors.New("vesting start-time cannot be after or equal to end-time") } } if sga.ModuleName != "" { ma := authtypes.ModuleAccount{ BaseAccount: sga.BaseAccount, Name: sga.ModuleName, Permissions: sga.ModulePermissions, } if err := ma.Validate(); err != nil { return err } } return sga.BaseAccount.Validate() } ================================================ FILE: app/ibc.go ================================================ package app import ( "cosmossdk.io/core/appmodule" storetypes "cosmossdk.io/store/types" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/params" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/cosmos/ibc-go/modules/capability" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" icamodule "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts" icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller" icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper" icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types" icahost "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host" icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper" icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types" "github.com/cosmos/ibc-go/v10/modules/apps/transfer" ibctransfer "github.com/cosmos/ibc-go/v10/modules/apps/transfer" ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper" ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" transferv2 "github.com/cosmos/ibc-go/v10/modules/apps/transfer/v2" ibc "github.com/cosmos/ibc-go/v10/modules/core" ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types" porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types" ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api" ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" solomachine "github.com/cosmos/ibc-go/v10/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // registerIBCModules register IBC keepers and non dependency inject modules. func (app *App) registerIBCModules() { // set up non depinject support modules store keys if err := app.RegisterStores( storetypes.NewKVStoreKey(capabilitytypes.StoreKey), storetypes.NewKVStoreKey(ibcexported.StoreKey), storetypes.NewKVStoreKey(ibctransfertypes.StoreKey), storetypes.NewKVStoreKey(icahosttypes.StoreKey), storetypes.NewKVStoreKey(icacontrollertypes.StoreKey), storetypes.NewKVStoreKey(appparams.FaucetStoreKey), storetypes.NewMemoryStoreKey(capabilitytypes.MemStoreKey), storetypes.NewTransientStoreKey(paramstypes.TStoreKey), ); err != nil { panic(err) } // register the key tables for legacy param subspaces keyTable := ibcclienttypes.ParamKeyTable() keyTable.RegisterParamSet(&ibcconnectiontypes.Params{}) app.ParamsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable) app.ParamsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable()) app.ParamsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable()) app.ParamsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable()) // Set capability keeper before GetCapabilityScopedKeeper app.CapabilityKeeper = capabilitykeeper.NewKeeper( app.AppCodec(), app.GetKey(capabilitytypes.StoreKey), app.GetMemKey(capabilitytypes.MemStoreKey), ) keys := app.kvStoreKeys() // Create IBC keeper app.IBCKeeper = ibckeeper.NewKeeper( app.appCodec, runtime.NewKVStoreService(keys[ibcexported.StoreKey]), app.GetSubspace(ibcexported.ModuleName), app.UpgradeKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // Register the proposal types // Deprecated: Avoid adding new handlers, instead use the new proposal flow // by granting the governance module the right to execute the message. // See: https://docs.cosmos.network/main/modules/gov#proposal-messages govRouter := govv1beta1.NewRouter() govRouter. AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)) // Set legacy router for backwards compatibility with gov v1beta1 app.GovKeeper.SetLegacyRouter(govRouter) // Create interchain account keepers app.ICAHostKeeper = icahostkeeper.NewKeeper( app.appCodec, runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), app.GetSubspace(icahosttypes.SubModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, app.AccountKeeper, app.MsgServiceRouter(), app.GRPCQueryRouter(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( app.appCodec, runtime.NewKVStoreService(keys[icacontrollertypes.StoreKey]), app.GetSubspace(icacontrollertypes.SubModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, app.MsgServiceRouter(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // Create IBC transfer keeper app.TransferKeeper = ibctransferkeeper.NewKeeper( app.appCodec, runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), app.GetSubspace(ibctransfertypes.ModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, app.MsgServiceRouter(), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) icaHostStack := newICAHostMiddleware(app, app.HubKeeper, icaHostIBCModule) icaControllerStack := icacontroller.NewIBCMiddleware(app.ICAControllerKeeper) transferStack := transfer.NewIBCModule(app.TransferKeeper) ibcRouter := porttypes.NewRouter(). AddRoute(icahosttypes.SubModuleName, icaHostStack). AddRoute(icacontrollertypes.SubModuleName, icaControllerStack). AddRoute(ibctransfertypes.ModuleName, transferStack) app.IBCKeeper.SetRouter(ibcRouter) // Create IBC v2 transfer middleware stack var ibcv2TransferStack ibcapi.IBCModule ibcv2TransferStack = transferv2.NewIBCModule(app.TransferKeeper) ibcv2Router := ibcapi.NewRouter().AddRoute(ibctransfertypes.PortID, ibcv2TransferStack) app.IBCKeeper.SetRouterV2(ibcv2Router) // Light client modules clientKeeper := app.IBCKeeper.ClientKeeper storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() tmLightClientModule := ibctm.NewLightClientModule(app.appCodec, storeProvider) clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) // register IBC modules if err := app.RegisterModules( ibc.NewAppModule(app.IBCKeeper), ibctransfer.NewAppModule(app.TransferKeeper), icamodule.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), capability.NewAppModule(app.appCodec, *app.CapabilityKeeper, false), ibctm.NewAppModule(tmLightClientModule), solomachine.AppModule{}, ); err != nil { panic(err) } } // setDefaultIBCParams is used to set default IBC params until app wiring is fully supported. func (app *App) setDefaultIBCParams(ctx sdk.Context) { app.IBCKeeper.ClientKeeper.SetNextClientSequence(ctx, 0) app.IBCKeeper.ConnectionKeeper.SetNextConnectionSequence(ctx, 0) app.IBCKeeper.ChannelKeeper.SetNextChannelSequence(ctx, 0) app.IBCKeeper.ClientKeeper.SetParams(ctx, ibcclienttypes.DefaultParams()) app.IBCKeeper.ConnectionKeeper.SetParams(ctx, ibcconnectiontypes.DefaultParams()) app.ICAControllerKeeper.SetParams(ctx, icacontrollertypes.DefaultParams()) // Enable ICA host and allow ACP msgs to be executed from interchain accounts hostParams := icahosttypes.DefaultParams() hostParams.HostEnabled = true hostParams.AllowMessages = []string{ "/sourcehub.acp.MsgCreatePolicy", "/sourcehub.acp.MsgEditPolicy", "/sourcehub.acp.MsgCheckAccess", "/sourcehub.acp.MsgSignedPolicyCmd", "/sourcehub.acp.MsgBearerPolicyCmd", "/sourcehub.acp.MsgDirectPolicyCmd", } app.ICAHostKeeper.SetParams(ctx, hostParams) app.TransferKeeper.SetParams(ctx, ibctransfertypes.DefaultParams()) } // Since the IBC modules don't support dependency injection, we need to // manually register the modules on the client side. // This needs to be removed after IBC supports App Wiring. func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppModule { modules := map[string]appmodule.AppModule{ ibcexported.ModuleName: ibc.AppModule{}, ibctransfertypes.ModuleName: ibctransfer.AppModule{}, icatypes.ModuleName: icamodule.AppModule{}, capabilitytypes.ModuleName: capability.AppModule{}, ibctm.ModuleName: ibctm.AppModule{}, solomachine.ModuleName: solomachine.AppModule{}, } for _, module := range modules { if mod, ok := module.(interface { RegisterInterfaces(registry cdctypes.InterfaceRegistry) }); ok { mod.RegisterInterfaces(registry) } } return modules } ================================================ FILE: app/ica_host_middleware.go ================================================ package app import ( sdk "github.com/cosmos/cosmos-sdk/types" icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types" channeltypes "github.com/cosmos/ibc-go/v10/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" hubKeeper "github.com/sourcenetwork/sourcehub/x/hub/keeper" ) type icaHostMiddleware struct { app *App hubKeeper *hubKeeper.Keeper next porttypes.IBCModule } func newICAHostMiddleware(app *App, hubKeeper *hubKeeper.Keeper, next porttypes.IBCModule) porttypes.IBCModule { return &icaHostMiddleware{ app: app, hubKeeper: hubKeeper, next: next, } } func (m *icaHostMiddleware) OnRecvPacket( ctx sdk.Context, portID string, packet channeltypes.Packet, relayer sdk.AccAddress, ) ibcexported.Acknowledgement { return m.next.OnRecvPacket(ctx, portID, packet, relayer) } func (m *icaHostMiddleware) OnAcknowledgementPacket( ctx sdk.Context, portID string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error { return m.next.OnAcknowledgementPacket(ctx, portID, packet, acknowledgement, relayer) } func (m *icaHostMiddleware) OnTimeoutPacket( ctx sdk.Context, portID string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error { return m.next.OnTimeoutPacket(ctx, portID, packet, relayer) } func (m *icaHostMiddleware) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, counterparty channeltypes.Counterparty, version string, ) (string, error) { return m.next.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, counterparty, version) } func (m *icaHostMiddleware) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error) { version, err := m.next.OnChanOpenTry(ctx, order, connectionHops, portID, channelID, counterparty, counterpartyVersion) if err != nil { return "", err } // Only process ICA host channels during DeliverTx to avoid duplicate processing if portID == icatypes.HostPortID && len(connectionHops) > 0 && !ctx.IsCheckTx() { if err := m.hubKeeper.HandleICAChannelOpen( ctx, connectionHops[0], counterparty.PortId, m.app.ICAHostKeeper, m.app.IBCKeeper.ConnectionKeeper, m.app.IBCKeeper.ClientKeeper, ); err != nil { ctx.Logger().Error("Failed to handle ICA channel open", "error", err, "connection_id", connectionHops[0], "controller_port_id", counterparty.PortId) } } return version, nil } func (m *icaHostMiddleware) OnChanOpenAck( ctx sdk.Context, portID, channelID, counterpartyChannelID, counterpartyVersion string, ) error { return m.next.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) } func (m *icaHostMiddleware) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error { return m.next.OnChanOpenConfirm(ctx, portID, channelID) } func (m *icaHostMiddleware) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error { return m.next.OnChanCloseInit(ctx, portID, channelID) } func (m *icaHostMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error { return m.next.OnChanCloseConfirm(ctx, portID, channelID) } ================================================ FILE: app/lanes/priority_lane.go ================================================ package lanes import ( "context" "fmt" "strings" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/skip-mev/block-sdk/v2/block/base" appparams "github.com/sourcenetwork/sourcehub/app/params" ) const ( // LaneName defines the name of the priority lane. LaneName = "priority" ) // NewPriorityLane returns a new priority lane. func NewPriorityLane[C comparable]( cfg base.LaneConfig, txPriority base.TxPriority[C], matchFn base.MatchHandler, ) *base.BaseLane { options := []base.LaneOption{ base.WithMatchHandler(matchFn), base.WithMempoolConfigs[C](cfg, txPriority), } lane, err := base.NewBaseLane( cfg, LaneName, options..., ) if err != nil { panic(err) } return lane } // TxPriority defines a transaction prioritization strategy for the priority lane. // Transactions are ranked by priority group and gas price (higher is better). func TxPriority() base.TxPriority[string] { return base.TxPriority[string]{ GetTxPriority: func(_ context.Context, tx sdk.Tx) string { priorityGroup := getPriorityGroup(tx) gasPrice := getGasPrice(tx) gasPriceStr := formatGasPrice(gasPrice) return priorityGroup + ":" + gasPriceStr }, Compare: func(a, b string) int { if a > b { return 1 } else if a < b { return -1 } return 0 }, MinValue: "0:00000000000000000000000000000000", } } // getPriorityGroup returns a string that defines the transaction priority. // Prioritizes transactions based on the modules their messages belong to. func getPriorityGroup(tx sdk.Tx) string { msgs := tx.GetMsgs() if len(msgs) == 0 { return "0" } // Start with highest possible priority and reduce txPriority based on the found messages, // so that the system can not be abused by sending a mix or high and low priority messages minPriority := "3" for _, msg := range msgs { msgType := sdk.MsgTypeURL(msg) switch { case strings.HasPrefix(msgType, "/sourcehub.acp."): // Keep minPriority at 3 for acp module messages case strings.HasPrefix(msgType, "/sourcehub.tier."): // Reduce minPriority to 2 if tier module message found if minPriority > "2" { minPriority = "2" } case strings.HasPrefix(msgType, "/sourcehub.bulletin."): // Reduce minPriority to 1 if bulletin module message found if minPriority > "1" { minPriority = "1" } default: // Return lowest priority if found a message from other modules return "0" } } // Return the lowest priority based on the messages found in the tx return minPriority } // getGasPrice extracts the gas price from the transaction. func getGasPrice(tx sdk.Tx) math.LegacyDec { // Cast tx to FeeTx, return LegacyZeroDec if fails feeTx, ok := tx.(sdk.FeeTx) if !ok { return math.LegacyZeroDec() } // Get the fee and gas limit, return LegacyZeroDec if invalid fee := feeTx.GetFee() gasLimit := feeTx.GetGas() if gasLimit == 0 || len(fee) == 0 { return math.LegacyZeroDec() } // Calculate and return the gas price (e.g, total fee / gas limit) return math.LegacyNewDecFromInt(fee.AmountOf(appparams.DefaultBondDenom)).Quo(math.LegacyNewDec(int64(gasLimit))) } // formatGasPrice ensures lexicographic sorting of gas prices. func formatGasPrice(gasPrice math.LegacyDec) string { // Convert to string and remove the decimal point gasPriceStr := strings.ReplaceAll(gasPrice.String(), ".", "") // Ensure gas price does not exceed 32 characters if len(gasPriceStr) > 32 { gasPriceStr = gasPriceStr[:32] } // Ensure proper zero-padding to 32 characters return fmt.Sprintf("%032s", gasPriceStr) } ================================================ FILE: app/lanes/priority_lane_test.go ================================================ package lanes import ( "fmt" "testing" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" appparams "github.com/sourcenetwork/sourcehub/app/params" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) type mockTx struct { msgs []sdk.Msg fee sdk.Coins gasLimit uint64 nonce uint64 } func (tx mockTx) GetMsgs() []sdk.Msg { return tx.msgs } func (tx mockTx) GetMsgsV2() ([]proto.Message, error) { protoMsgs := make([]proto.Message, 0, len(tx.msgs)) for _, msg := range tx.msgs { pMsg, ok := msg.(proto.Message) if !ok { return nil, fmt.Errorf("message %T does not implement proto.Message", msg) } protoMsgs = append(protoMsgs, pMsg) } return protoMsgs, nil } func (tx mockTx) ValidateBasic() error { return nil } func (tx mockTx) GetGas() uint64 { return tx.gasLimit } func (tx mockTx) GetFee() sdk.Coins { return tx.fee } func (tx mockTx) FeePayer() []byte { return []byte("") } func (tx mockTx) FeeGranter() []byte { return []byte("") } var _ sdk.FeeTx = mockTx{} func setupTest(t testing.TB) sdk.Context { storeKey := storetypes.NewKVStoreKey(acptypes.StoreKey) db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeDB, db) require.NoError(t, stateStore.LoadLatestVersion()) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) return ctx } func TestTxPriority(t *testing.T) { ctx := setupTest(t) acpMsg := &acptypes.MsgBearerPolicyCmd{} tx1 := mockTx{ msgs: []sdk.Msg{acpMsg}, fee: sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 5000)), gasLimit: 10000, } tierMsg := &tiertypes.MsgLock{} tx2 := mockTx{ msgs: []sdk.Msg{tierMsg}, fee: sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 10000)), gasLimit: 10000, } bulletinMsg := &bulletintypes.MsgCreatePost{} tx3 := mockTx{ msgs: []sdk.Msg{bulletinMsg}, fee: sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 20000)), gasLimit: 10000, } stakingMsg := &stakingtypes.MsgDelegate{} tx4 := mockTx{ msgs: []sdk.Msg{stakingMsg}, fee: sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 30000)), gasLimit: 10000, } priority1 := TxPriority().GetTxPriority(ctx, tx1) priority2 := TxPriority().GetTxPriority(ctx, tx2) priority3 := TxPriority().GetTxPriority(ctx, tx3) priority4 := TxPriority().GetTxPriority(ctx, tx4) require.True(t, priority1 > priority2, "Acp transaction should have higher priority than Tier transaction") require.True(t, priority2 > priority3, "Tier transaction should have higher priority than Bulletin transaction") require.True(t, priority3 > priority4, "Bulletin transaction should have higher priority than any other transaction") } func TestGasPriceSorting(t *testing.T) { ctx := setupTest(t) tx1 := mockTx{ msgs: []sdk.Msg{&acptypes.MsgCreatePolicy{}}, fee: sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 50000)), // 50,000 uopen gasLimit: 50000, // gas price = 50,000 / 50,000 = 1.0 uopen } tx2 := mockTx{ msgs: []sdk.Msg{&acptypes.MsgCreatePolicy{}}, fee: sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 30000)), // 30,000 uopen gasLimit: 10000, // gas price = 30,000 / 10,000 = 3.0 uopen } tx3 := mockTx{ msgs: []sdk.Msg{&acptypes.MsgCreatePolicy{}}, fee: sdk.NewCoins(sdk.NewInt64Coin(appparams.DefaultBondDenom, 10000)), // 10,000 uopen gasLimit: 20000, // gas price = 10,000 / 20,000 = 0.5 uopen } priority1 := TxPriority().GetTxPriority(ctx, tx1) // 1.0 uopen priority2 := TxPriority().GetTxPriority(ctx, tx2) // 3.0 uopen priority3 := TxPriority().GetTxPriority(ctx, tx3) // 0.5 uopen require.True(t, priority2 > priority1, "Tx with 3.0 gas price should have higher priority than tx with 1.0 gas price") require.True(t, priority1 > priority3, "Tx with 1.0 gas price should have higher priority than tx with 0.5 gas price") } ================================================ FILE: app/lanes.go ================================================ package app import ( "cosmossdk.io/math" signerextraction "github.com/skip-mev/block-sdk/v2/adapters/signer_extraction_adapter" "github.com/skip-mev/block-sdk/v2/block/base" "github.com/sourcenetwork/sourcehub/app/lanes" ) // CreatePriorityLane creates a lane that matches all txs and occupies 100% of the block space. func CreatePriorityLane(app *App) (priorityLane *base.BaseLane) { // signerAdapter is used to extract the expected signers from a transaction signerAdapter := signerextraction.NewDefaultAdapter() // Create a priority lane configuration that occupies 100% of the block space priorityLaneConfig := base.LaneConfig{ Logger: app.Logger(), TxEncoder: app.txConfig.TxEncoder(), TxDecoder: app.txConfig.TxDecoder(), MaxBlockSpace: math.LegacyMustNewDecFromStr("1.0"), SignerExtractor: signerAdapter, MaxTxs: 0, } // Create TxPriority for the priority lane priorityLaneTxPriority := lanes.TxPriority() // Use default match handler to match all transactions defaultLaneMatchHandler := base.DefaultMatchHandler() // Create priority lane priorityLane = lanes.NewPriorityLane( priorityLaneConfig, priorityLaneTxPriority, defaultLaneMatchHandler, ) return priorityLane } ================================================ FILE: app/metrics/constants.go ================================================ package metrics const ( // global keys App = "sourcehub" Count = "count" Error = "error" Errors = "errors" Internal = "internal" Latency = "latency" Method = "method" Msg = "msg" Query = "query" Status = "status" Tx = "tx" // Units SecondsUnit = "seconds" CounterSuffix = "total" // Labels HostnameLabel = "host" ChainIDLabel = "chain_id" ModuleLabel = "module" EndpointLabel = "endpoint" // abci methods PrepareProposal = "prepare_proposal" ProcessProposal = "process_proposal" // tier keys Amount = "amount" AutoLockEnabled = "auto_lock_enabled" CreditUtilization = "credit_utilization" CreationHeight = "creation_height" Delegator = "delegator" Developer = "developer" DeveloperPoolBalance = "developer_pool_balance" DstValidator = "dst_validator" Epoch = "epoch" InsurancePoolBalance = "insurance_pool_balance" TotalCredits = "total_credits" TotalDevGranted = "total_dev_granted" TotalLocked = "total_locked" SrcValidator = "src_validator" SubscriptionAmount = "subscription_amount" SubscriptionExpiration = "subscription_expiration" SubscriptionPeriod = "subscription_period" UserDid = "user_did" Validator = "validator" // tier methods AddUserSubscription = "add_user_subscription" BurnAllCredits = "burn_all_credits" CancelUnlocking = "cancel_unlocking" CheckDeveloperCredits = "check_developer_credits" CompleteUnlocking = "complete_unlocking" CreateDeveloper = "create_developer" HandleDoubleSign = "handle_double_sign" HandleMissingSignature = "handle_missing_signature" Lock = "lock" LockAuto = "lock_auto" ProcessRewards = "process_rewards" Redelegate = "redelegate" RemoveDeveloper = "remove_developer" RemoveUserSubscription = "remove_user_subscription" ResetAllCredits = "reset_all_credits" Unlock = "unlock" UpdateDeveloper = "update_developer" UpdateUserSubscription = "update_user_subscription" // ChainIDEnvVar represents the environment variable, which when set, // is used as the chain id value for metric collection ChainIDEnvVar = "CHAIN_ID" ) var ( SourcehubMethodSeconds []string = []string{App, Method, SecondsUnit} SourcehubMethodTotal []string = []string{App, Method, CounterSuffix} SourcehubMethodErrorsTotal []string = []string{App, Method, Errors, CounterSuffix} SourcehubMsgSeconds []string = []string{App, Msg, SecondsUnit} SourcehubMsgTotal []string = []string{App, Msg, CounterSuffix} SourcehubMsgErrorsTotal []string = []string{App, Msg, Errors, CounterSuffix} SourcehubQuerySeconds []string = []string{App, Query, SecondsUnit} SourcehubQueryTotal []string = []string{App, Query, CounterSuffix} SourcehubQueryErrorsTotal []string = []string{App, Query, Errors, CounterSuffix} SourcehubInternalErrorsTotal []string = []string{App, Errors, Internal, CounterSuffix} ) ================================================ FILE: app/metrics/labels.go ================================================ package metrics import ( "os" "github.com/hashicorp/go-metrics" ) // commonLabels models a set of labels which should be added // to every Sourcehub meter var commonLabels []metrics.Label // AddCommonLabel appends the given name, value pair // to the list of labels which are added to all Sourcehub meters func AddCommonLabel(name, value string) { label := metrics.Label{ Name: name, Value: value, } commonLabels = append(commonLabels, label) } func init() { name, err := os.Hostname() if err != nil { panic("could not recover hostname") } AddCommonLabel(HostnameLabel, name) chainIDVal := os.Getenv(ChainIDEnvVar) if chainIDVal != "" { AddCommonLabel(ChainIDLabel, chainIDVal) } } ================================================ FILE: app/metrics/utils.go ================================================ package metrics import ( "time" "github.com/cosmos/cosmos-sdk/telemetry" gometrics "github.com/hashicorp/go-metrics" ) type Label = gometrics.Label // NewLabel creates new Label with given name and value. func NewLabel(name, value string) Label { return Label{Name: name, Value: value} } // ModuleMeasureSinceWithCounter emits latency and counter metrics for a module method with common and extra labels. func ModuleMeasureSinceWithCounter(moduleName, methodName string, start time.Time, err error, extraLabels []Label) { if !telemetry.IsTelemetryEnabled() { return } labels := []Label{ {Name: ModuleLabel, Value: moduleName}, {Name: EndpointLabel, Value: methodName}, } labels = append(labels, commonLabels...) labels = append(labels, extraLabels...) // Track message handling latency gometrics.MeasureSinceWithLabels(SourcehubMethodSeconds, start, labels) // Increment message count gometrics.IncrCounterWithLabels(SourcehubMethodTotal, 1, labels) if err != nil { // Increment error count gometrics.IncrCounterWithLabels(SourcehubMethodErrorsTotal, 1, labels) } } // ModuleIncrInternalErrorCounter tracks internal method errors for a module. func ModuleIncrInternalErrorCounter(moduleName, methodName string, err error) { if !telemetry.IsTelemetryEnabled() { return } labels := []Label{ {Name: ModuleLabel, Value: moduleName}, {Name: EndpointLabel, Value: methodName}, } labels = append(labels, commonLabels...) if err != nil { gometrics.IncrCounterWithLabels(SourcehubInternalErrorsTotal, 1, labels) } } ================================================ FILE: app/metrics/wrapper.go ================================================ package metrics import ( "context" "time" "github.com/cosmos/cosmos-sdk/telemetry" gometrics "github.com/hashicorp/go-metrics" grpc "google.golang.org/grpc" ) // WrapMsgServerServiceDescriptor wraps a message service descriptor and adds metric instrumentation. func WrapMsgServerServiceDescriptor(moduleName string, desc grpc.ServiceDesc) grpc.ServiceDesc { methods := make([]grpc.MethodDesc, 0, len(desc.Methods)) for _, method := range desc.Methods { handler := wrapMsgServerHandler(moduleName, method.MethodName, SourcehubMsgSeconds, SourcehubMsgTotal, SourcehubMsgErrorsTotal, method.Handler) method.Handler = handler methods = append(methods, method) } desc.Methods = methods return desc } // WrapQueryServiceDescriptor wraps a query service descriptor and adds metric instrumentation. func WrapQueryServiceDescriptor(moduleName string, desc grpc.ServiceDesc) grpc.ServiceDesc { methods := make([]grpc.MethodDesc, 0, len(desc.Methods)) for _, method := range desc.Methods { handler := wrapMsgServerHandler(moduleName, method.MethodName, SourcehubQuerySeconds, SourcehubQueryTotal, SourcehubQueryErrorsTotal, method.Handler) method.Handler = handler methods = append(methods, method) } desc.Methods = methods return desc } // wrapMsgServerHandler wraps an individual GRPC server method handler with metric collection logic. // It tracks the number of processed messages, error count, and message handling latency. func wrapMsgServerHandler( moduleName, methodName string, latencyMetricName, countMetricName, errMetricName []string, handler grpc.MethodHandler, ) grpc.MethodHandler { return func( srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor, ) (interface{}, error) { if !telemetry.IsTelemetryEnabled() { return handler(srv, ctx, dec, interceptor) } labels := []Label{ {Name: ModuleLabel, Value: moduleName}, {Name: EndpointLabel, Value: methodName}, } labels = append(labels, commonLabels...) // Track message handling latency now := time.Now() defer gometrics.MeasureSinceWithLabels(latencyMetricName, now, labels) // Increment message count gometrics.IncrCounterWithLabels(countMetricName, 1, labels) resp, err := handler(srv, ctx, dec, interceptor) if err != nil { // Increment error count gometrics.IncrCounterWithLabels(errMetricName, 1, labels) } return resp, err } } ================================================ FILE: app/mint.go ================================================ package app import ( "context" "encoding/json" "fmt" "cosmossdk.io/log" "cosmossdk.io/core/appmodule" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" appparams "github.com/sourcenetwork/sourcehub/app/params" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" ) var _ appmodule.AppModule = CustomMintModule{} // CustomMintModule overrides default mint module. type CustomMintModule struct { *mint.AppModule mintKeeper mintkeeper.Keeper tierKeeper *tierkeeper.Keeper cdc codec.Codec } // NewCustomMintModule creates new custom mint module instance. func NewCustomMintModule( oldMintModule mint.AppModule, mintKeeper mintkeeper.Keeper, tierKeeper *tierkeeper.Keeper, cdc codec.Codec, ) CustomMintModule { return CustomMintModule{ AppModule: &oldMintModule, mintKeeper: mintKeeper, tierKeeper: tierKeeper, cdc: cdc, } } // CustomMintQueryServer overrides default mint query server. type CustomMintQueryServer struct { minttypes.QueryServer mintKeeper mintkeeper.Keeper tierKeeper *tierkeeper.Keeper logger log.Logger } // NewCustomMintQueryServer creates new custom mint query server instance. func NewCustomMintQueryServer( defaultQueryServer minttypes.QueryServer, mintKeeper mintkeeper.Keeper, tierKeeper *tierkeeper.Keeper, logger log.Logger, ) minttypes.QueryServer { return &CustomMintQueryServer{ QueryServer: defaultQueryServer, mintKeeper: mintKeeper, tierKeeper: tierKeeper, logger: logger, } } func getDelegatorStakeRatio(ctx context.Context, k *tierkeeper.Keeper) (math.LegacyDec, error) { // Get the total bonded stake totalStake, err := k.GetStakingKeeper().TotalBondedTokens(ctx) if err != nil { return math.LegacyOneDec(), err } // Get developer stake and fees devStake := k.GetTotalLockupsAmount(ctx) params := k.GetParams(ctx) totalFees := params.DeveloperPoolFee + params.InsurancePoolFee devStakeMinusFees := devStake.MulRaw(100 - totalFees).QuoRaw(100) // Calculate the delegator stake delStake, err := totalStake.SafeSub(devStakeMinusFees) if err != nil { return math.LegacyOneDec(), err } if !totalStake.IsPositive() || !delStake.IsPositive() { return math.LegacyOneDec(), fmt.Errorf("non-positive totalStake/delStake") } // Calculate the delegator stake ratio delStakeRatio := delStake.ToLegacyDec().Quo(totalStake.ToLegacyDec()) return delStakeRatio, nil } // Inflation overrides the default mint module inflation query. func (q CustomMintQueryServer) Inflation(ctx context.Context, _ *minttypes.QueryInflationRequest) (*minttypes.QueryInflationResponse, error) { // Fetch the minter state minter, err := q.mintKeeper.Minter.Get(ctx) if err != nil { return nil, err } // Get the delegator stake ratio delStakeRatio, err := getDelegatorStakeRatio(ctx, q.tierKeeper) if err != nil { q.logger.Info("Returning default inflation", "inflation", minter.Inflation) return &minttypes.QueryInflationResponse{Inflation: minter.Inflation}, nil } // Calculate the effective inflation effectiveInflation := minter.Inflation.Mul(delStakeRatio) q.logger.Info("Returning effective inflation", "inflation", effectiveInflation) return &minttypes.QueryInflationResponse{Inflation: effectiveInflation}, nil } // RegisterServices registers default message server and custom query server. func (cm CustomMintModule) RegisterServices(cfg module.Configurator) { minttypes.RegisterMsgServer(cfg.MsgServer(), mintkeeper.NewMsgServerImpl(cm.mintKeeper)) defaultMintQueryServer := mintkeeper.NewQueryServerImpl(cm.mintKeeper) customMintQueryServer := NewCustomMintQueryServer(defaultMintQueryServer, cm.mintKeeper, cm.tierKeeper, cm.tierKeeper.Logger()) minttypes.RegisterQueryServer(cfg.QueryServer(), customMintQueryServer) } // InitGenesis initializes default state for the mint keeper and overrides the default params. func (cm CustomMintModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { genesisState := minttypes.DefaultGenesisState() genesisState.Minter = minttypes.DefaultInitialMinter() genesisState.Minter.Inflation = math.LegacyMustNewDecFromStr(appparams.InitialInflation) genesisState.Params = minttypes.DefaultParams() genesisState.Params.MintDenom = appparams.DefaultBondDenom genesisState.Params.BlocksPerYear = appparams.BlocksPerYear genesisState.Params.InflationMin = math.LegacyMustNewDecFromStr(appparams.InflationMin) genesisState.Params.InflationMax = math.LegacyMustNewDecFromStr(appparams.InflationMax) genesisState.Params.InflationRateChange = math.LegacyMustNewDecFromStr(appparams.InflationRateChange) if err := cm.mintKeeper.Minter.Set(ctx, genesisState.Minter); err != nil { panic(err) } if err := cm.mintKeeper.Params.Set(ctx, genesisState.Params); err != nil { panic(err) } } // registerCustomMintModule registers the custom mint module. func (app *App) registerCustomMintModule() CustomMintModule { mintStoreKey := storetypes.NewKVStoreKey(minttypes.StoreKey) if err := app.RegisterStores(mintStoreKey); err != nil { panic(err) } app.MintKeeper = mintkeeper.NewKeeper( app.appCodec, runtime.NewKVStoreService(app.GetKey(minttypes.StoreKey)), app.StakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) defaultMintModule := mint.NewAppModule(app.appCodec, app.MintKeeper, app.AccountKeeper, nil, nil) customMintModule := NewCustomMintModule(defaultMintModule, app.MintKeeper, app.TierKeeper, app.appCodec) if err := app.RegisterModules(customMintModule); err != nil { panic(err) } return customMintModule } // RegisterMintInterfaces registers interfaces for the mint module and returns mint.AppModule. func RegisterMintInterfaces(registry codectypes.InterfaceRegistry) appmodule.AppModule { module := mint.AppModule{} module.RegisterInterfaces(registry) return module } ================================================ FILE: app/mint_test.go ================================================ package app import ( "bytes" "context" "testing" "cosmossdk.io/log" "cosmossdk.io/math" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttestutil "github.com/cosmos/cosmos-sdk/x/mint/testutil" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" test "github.com/sourcenetwork/sourcehub/testutil" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" ) type MintTestSuite struct { suite.Suite bankKeeper *test.MockBankKeeper distrKeeper *test.MockDistributionKeeper feegrantKeeper *test.MockFeegrantKeeper stakingKeeper *test.MockStakingKeeper epochsKeeper *test.MockEpochsKeeper tierKeeper tierkeeper.Keeper mintKeeper mintkeeper.Keeper queryClient minttypes.QueryClient encCfg test.EncodingConfig ctx sdk.Context authorityAccount sdk.AccAddress logBuffer *bytes.Buffer logger log.Logger } func TestMintTestSuite(t *testing.T) { suite.Run(t, new(MintTestSuite)) } func (suite *MintTestSuite) SetupTest() { sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForAccount("source", "sourcepub") sdkConfig.SetBech32PrefixForValidator("sourcevaloper", "sourcevaloperpub") sdkConfig.SetBech32PrefixForConsensusNode("sourcevalcons", "sourcevalconspub") key := storetypes.NewKVStoreKey(minttypes.StoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) suite.ctx = testCtx.Ctx suite.encCfg = test.CreateTestEncodingConfig() suite.logBuffer = new(bytes.Buffer) suite.logger = log.NewLogger(suite.logBuffer) ctrl := gomock.NewController(suite.T()) suite.bankKeeper = test.NewMockBankKeeper(ctrl) suite.distrKeeper = test.NewMockDistributionKeeper(ctrl) suite.stakingKeeper = test.NewMockStakingKeeper(ctrl) suite.epochsKeeper = test.NewMockEpochsKeeper(ctrl) suite.authorityAccount = sdk.AccAddress([]byte("authority")) accountKeeper := minttestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetModuleAddress("mint").Return(sdk.AccAddress{}) suite.tierKeeper = tierkeeper.NewKeeper( suite.encCfg.Codec, runtime.NewKVStoreService(key), log.NewNopLogger(), suite.authorityAccount.String(), suite.bankKeeper, suite.stakingKeeper, suite.epochsKeeper, suite.distrKeeper, suite.feegrantKeeper, nil, ) suite.mintKeeper = mintkeeper.NewKeeper( suite.encCfg.Codec, runtime.NewKVStoreService(key), suite.stakingKeeper, accountKeeper, suite.bankKeeper, authtypes.FeeCollectorName, suite.authorityAccount.String(), ) err := suite.mintKeeper.Params.Set(suite.ctx, minttypes.DefaultParams()) suite.Require().NoError(err) suite.Require().NoError(suite.mintKeeper.Minter.Set(suite.ctx, minttypes.DefaultInitialMinter())) queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, suite.encCfg.InterfaceRegistry) suite.queryClient = minttypes.NewQueryClient(queryHelper) defaultQueryServer := mintkeeper.NewQueryServerImpl(suite.mintKeeper) minttypes.RegisterQueryServer(queryHelper, NewCustomMintQueryServer(defaultQueryServer, suite.mintKeeper, &suite.tierKeeper, suite.logger)) } func (suite *MintTestSuite) TestGRPCParams() { params, err := suite.queryClient.Params(context.Background(), &minttypes.QueryParamsRequest{}) suite.Require().NoError(err) keeperParams, err := suite.mintKeeper.Params.Get(suite.ctx) suite.Require().NoError(err) suite.Require().Equal(params.Params, keeperParams) totalBondedTokens := math.NewInt(1_000_000_000_000) suite.stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(totalBondedTokens, nil).Times(1) inflation, err := suite.queryClient.Inflation(context.Background(), &minttypes.QueryInflationRequest{}) suite.Require().NoError(err) minter, err := suite.mintKeeper.Minter.Get(suite.ctx) suite.Require().NoError(err) suite.Require().Equal(inflation.Inflation, minter.Inflation) annualProvisions, err := suite.queryClient.AnnualProvisions(context.Background(), &minttypes.QueryAnnualProvisionsRequest{}) suite.Require().NoError(err) suite.Require().Equal(annualProvisions.AnnualProvisions, minter.AnnualProvisions) } func (suite *MintTestSuite) TestInflationQuery() { minter, err := suite.mintKeeper.Minter.Get(suite.ctx) suite.Require().NoError(err) // Return default inflation rate if no bonded tokens totalBondedTokens := math.ZeroInt() suite.stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(totalBondedTokens, nil).Times(1) inflation, err := suite.queryClient.Inflation(context.Background(), &minttypes.QueryInflationRequest{}) suite.Require().NoError(err) suite.Require().Equal(inflation.Inflation, minter.Inflation) logs := suite.logBuffer.String() suite.Require().Contains(logs, "Returning default inflation") // Return effective inflation rate otherwise totalBondedTokens = math.NewInt(1_000_000_000_000) suite.stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(totalBondedTokens, nil).Times(1) inflation, err = suite.queryClient.Inflation(context.Background(), &minttypes.QueryInflationRequest{}) suite.Require().NoError(err) suite.Require().Equal(inflation.Inflation, minter.Inflation) logs = suite.logBuffer.String() suite.Require().Contains(logs, "Returning effective inflation") } func (suite *MintTestSuite) TestGetDelegatorStakeRatio() { delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") suite.Require().NoError(err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") suite.Require().NoError(err) testCases := []struct { desc string totalStake math.Int devStake math.Int devPoolFee int64 insPoolFee int64 expectedRatio math.LegacyDec expectError bool }{ { desc: "Zero dev stake", totalStake: math.NewInt(1000), devStake: math.ZeroInt(), devPoolFee: 2, insPoolFee: 1, expectedRatio: math.LegacyOneDec(), expectError: false, }, { desc: "Existing dev stake", totalStake: math.NewInt(1000), devStake: math.NewInt(200), devPoolFee: 2, insPoolFee: 1, expectedRatio: math.LegacyMustNewDecFromStr("806").Quo(math.LegacyMustNewDecFromStr("1000")), expectError: false, }, { desc: "Zero total stake", totalStake: math.ZeroInt(), devStake: math.NewInt(200), devPoolFee: 2, insPoolFee: 1, expectedRatio: math.LegacyOneDec(), expectError: true, }, { desc: "Total stake less than dev stake", totalStake: math.NewInt(100), devStake: math.NewInt(200), devPoolFee: 2, insPoolFee: 1, expectedRatio: math.LegacyOneDec(), expectError: true, }, } for _, tc := range testCases { suite.Run(tc.desc, func() { suite.tierKeeper.AddLockup(suite.ctx, delAddr, valAddr, tc.devStake) params := suite.tierKeeper.GetParams(suite.ctx) params.DeveloperPoolFee = tc.devPoolFee params.InsurancePoolFee = tc.insPoolFee suite.tierKeeper.SetParams(suite.ctx, params) suite.stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(tc.totalStake, nil).Times(1) delStakeRatio, err := getDelegatorStakeRatio(suite.ctx, &suite.tierKeeper) if tc.expectError { suite.Require().Error(err) } else { suite.Require().NoError(err) suite.Require().Equal(tc.expectedRatio, delStakeRatio) } }) } } ================================================ FILE: app/overrides/bank.go ================================================ package overrides import ( "encoding/json" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/bank" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // BankModuleBasic defines a wrapper of the x/bank module AppModuleBasic to provide custom default genesis state. type BankModuleBasic struct { bank.AppModuleBasic } // DefaultGenesis returns custom x/bank module genesis state. func (BankModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { openMetadata := banktypes.Metadata{ Description: appparams.OpenDescription, DenomUnits: []*banktypes.DenomUnit{ { Denom: appparams.MicroOpenDenom, Exponent: 0, Aliases: []string{appparams.MicroOpenDenomAlias}, }, { Denom: appparams.OpenDenom, Exponent: 6, }, }, Base: appparams.MicroOpenDenom, Display: appparams.OpenDenom, Name: appparams.OpenName, Symbol: appparams.OpenSymbol, } creditMetadata := banktypes.Metadata{ Description: appparams.CreditDescription, DenomUnits: []*banktypes.DenomUnit{ { Denom: appparams.MicroCreditDenom, Exponent: 0, Aliases: []string{appparams.MicroCreditDenomAlias}, }, { Denom: appparams.CreditDenom, Exponent: 6, }, }, Base: appparams.MicroCreditDenom, Display: appparams.CreditDenom, Name: appparams.CreditName, Symbol: appparams.CreditSymbol, } creditSendEnabled := banktypes.SendEnabled{ Denom: appparams.MicroCreditDenom, Enabled: false, } genState := banktypes.DefaultGenesisState() genState.DenomMetadata = append(genState.DenomMetadata, openMetadata) genState.DenomMetadata = append(genState.DenomMetadata, creditMetadata) genState.SendEnabled = append(genState.SendEnabled, creditSendEnabled) return cdc.MustMarshalJSON(genState) } ================================================ FILE: app/overrides/crisis.go ================================================ package overrides import ( "encoding/json" sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/crisis" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // CrisisModuleBasic defines a wrapper of the x/crisis module AppModuleBasic to provide custom default genesis state. type CrisisModuleBasic struct { crisis.AppModuleBasic } // DefaultGenesis returns custom x/crisis module genesis state. func (CrisisModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { genState := crisistypes.DefaultGenesisState() genState.ConstantFee = sdk.NewCoin(appparams.DefaultBondDenom, sdkmath.NewInt(1000)) return cdc.MustMarshalJSON(genState) } ================================================ FILE: app/overrides/epochs.go ================================================ package overrides import ( "encoding/json" "github.com/cosmos/cosmos-sdk/codec" epochsmodule "github.com/sourcenetwork/sourcehub/x/epochs/module" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) // EpochsModuleBasic defines a wrapper of the x/epochs module AppModuleBasic to provide custom default genesis state. type EpochsModuleBasic struct { epochsmodule.AppModuleBasic } // DefaultGenesis returns custom x/epochs module genesis state. func (EpochsModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { genState := epochstypes.DefaultGenesis() genState.Epochs = []epochstypes.EpochInfo{ epochstypes.NewGenesisEpochInfo(tiertypes.EpochIdentifier, tiertypes.DefaultEpochDuration), } return cdc.MustMarshalJSON(genState) } ================================================ FILE: app/overrides/gov.go ================================================ package overrides import ( "encoding/json" "time" math "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" gov "github.com/cosmos/cosmos-sdk/x/gov" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // GovModuleBasic defines a wrapper of the x/gov module AppModuleBasic to provide custom default genesis state. type GovModuleBasic struct { gov.AppModuleBasic } func NewGovModuleBasic() GovModuleBasic { return GovModuleBasic{ AppModuleBasic: gov.NewAppModuleBasic(proposalHandlers()), } } // proposalHandlers returns supported governance proposal handlers. func proposalHandlers() []govclient.ProposalHandler { return []govclient.ProposalHandler{ paramsclient.ProposalHandler, } } // DefaultGenesis returns custom x/gov module genesis state. func (GovModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { genState := govtypes.DefaultGenesisState() oneWeek := time.Duration(time.Hour*24) * 7 twoWeeks := time.Duration(time.Hour*24) * 14 genState.Params.MaxDepositPeriod = &twoWeeks genState.Params.VotingPeriod = &twoWeeks genState.Params.ExpeditedVotingPeriod = &oneWeek genState.Params.MinDeposit = sdk.NewCoins( sdk.NewCoin(appparams.MicroOpenDenom, math.NewInt(1_000_000_000)), ) genState.Params.ExpeditedMinDeposit = sdk.NewCoins( sdk.NewCoin(appparams.MicroOpenDenom, math.NewInt(5_000_000_000)), ) return cdc.MustMarshalJSON(genState) } ================================================ FILE: app/overrides/staking.go ================================================ package overrides import ( "encoding/json" "github.com/cosmos/cosmos-sdk/codec" staking "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // StakingModuleBasic defines a wrapper of the x/staking module AppModuleBasic to provide custom default genesis state. type StakingModuleBasic struct { staking.AppModuleBasic } // DefaultGenesis returns custom x/staking module genesis state. func (StakingModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { genState := stakingtypes.DefaultGenesisState() genState.Params.BondDenom = appparams.DefaultBondDenom return cdc.MustMarshalJSON(genState) } ================================================ FILE: app/overrides/tier.go ================================================ package overrides import ( "encoding/json" "github.com/cosmos/cosmos-sdk/codec" tiermodule "github.com/sourcenetwork/sourcehub/x/tier/module" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) // TierModuleBasic defines a wrapper of the x/tier module AppModuleBasic to provide custom default genesis state. type TierModuleBasic struct { tiermodule.AppModuleBasic } // DefaultGenesis returns custom x/tier module genesis state. func (TierModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { genState := tiertypes.DefaultGenesis() return cdc.MustMarshalJSON(genState) } ================================================ FILE: app/params/params.go ================================================ package params const ( MicroOpenDenom = "uopen" MicroOpenDenomAlias = "microopen" OpenDenom = "open" OpenName = "Source Open" OpenSymbol = "OPEN" OpenDescription = "OPEN is the native staking token of SourceHub." MicroCreditDenom = "ucredit" MicroCreditDenomAlias = "microcredit" CreditDenom = "credit" CreditName = "Source Credit" CreditSymbol = "CREDIT" CreditDescription = "Credit is the utility token for access services on SourceHub. Non-transferable." CreditFeeMultiplier = 10 DefaultBondDenom = MicroOpenDenom DefaultMinGasPrice = "0.001" BlocksPerYear = 31557600 GoalBonded = "0.67" InflationMin = "0.02" InflationMax = "0.15" InflationRateChange = "0.13" InitialInflation = "0.13" ) // FaucetStoreKey is the store key for faucet data. const FaucetStoreKey = "faucet" // FaucetConfig defines the configuration for the faucet service. type FaucetConfig struct { EnableFaucet bool `mapstructure:"enable_faucet"` } // Context key for storing extracted DID from JWS extension options. type contextKey string const ( // ExtractedDIDContextKey is the key used to store extracted DID in context ExtractedDIDContextKey contextKey = "extracted_did" ) ================================================ FILE: app/sim_bench_test.go ================================================ package app_test import ( "fmt" "os" "testing" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/app" ) // Profile with: // `go test -benchmem -run=^$ -bench ^BenchmarkFullAppSimulation ./app -Commit=true -cpuprofile cpu.out` func BenchmarkFullAppSimulation(b *testing.B) { b.ReportAllocs() config := simcli.NewConfigFromFlags() config.ChainID = SimAppChainID db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "goleveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) } if skip { b.Skip("skipping benchmark application simulation") } defer func() { require.NoError(b, db.Close()) require.NoError(b, os.RemoveAll(dir)) }() appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue bApp, err := app.New(logger, db, nil, true, appOptions, interBlockCacheOpt()) require.NoError(b, err) require.Equal(b, app.Name, bApp.Name()) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, bApp.BaseApp, simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), app.BlockedAddresses(), config, bApp.AppCodec(), ) // export state and simParams before the simulation error is checked if err = simtestutil.CheckExportSimulation(bApp, config, simParams); err != nil { b.Fatal(err) } if simErr != nil { b.Fatal(simErr) } if config.Commit { simtestutil.PrintStats(db) } } func BenchmarkInvariants(b *testing.B) { b.ReportAllocs() config := simcli.NewConfigFromFlags() config.ChainID = SimAppChainID db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-invariant-bench", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) } if skip { b.Skip("skipping benchmark application simulation") } config.AllInvariants = false defer func() { require.NoError(b, db.Close()) require.NoError(b, os.RemoveAll(dir)) }() appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue bApp, err := app.New(logger, db, nil, true, appOptions, interBlockCacheOpt()) require.NoError(b, err) require.Equal(b, app.Name, bApp.Name()) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, bApp.BaseApp, simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), app.BlockedAddresses(), config, bApp.AppCodec(), ) // export state and simParams before the simulation error is checked if err = simtestutil.CheckExportSimulation(bApp, config, simParams); err != nil { b.Fatal(err) } if simErr != nil { b.Fatal(simErr) } if config.Commit { simtestutil.PrintStats(db) } ctx := bApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight() + 1}) // 3. Benchmark each invariant separately // // NOTE: We use the crisis keeper as it has all the invariants registered with // their respective metadata which makes it useful for testing/benchmarking. for _, cr := range bApp.CrisisKeeper.Routes() { cr := cr b.Run(fmt.Sprintf("%s/%s", cr.ModuleName, cr.Route), func(b *testing.B) { if res, stop := cr.Invar(ctx); stop { b.Fatalf( "broken invariant at block %d of %d\n%s", ctx.BlockHeight()-1, config.NumBlocks, res, ) } }) } } ================================================ FILE: app/sim_test.go ================================================ package app_test import ( "encoding/json" "flag" "fmt" "math/rand" "os" "runtime/debug" "strings" "testing" "time" "cosmossdk.io/log" "cosmossdk.io/store" storetypes "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" simulationtypes "github.com/cosmos/cosmos-sdk/types/simulation" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/spf13/viper" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/app" ) const ( SimAppChainID = "sourcehub-simapp" ) var FlagEnableStreamingValue bool // Get flags every time the simulator is run func init() { simcli.GetSimulatorFlags() flag.BoolVar(&FlagEnableStreamingValue, "EnableStreaming", false, "Enable streaming service") } // fauxMerkleModeOpt returns a BaseApp option to use a dbStoreAdapter instead of // an IAVLStore for faster simulation speed. func fauxMerkleModeOpt(bapp *baseapp.BaseApp) { bapp.SetFauxMerkleMode() } // interBlockCacheOpt returns a BaseApp option function that sets the persistent // inter-block write-through cache. func interBlockCacheOpt() func(*baseapp.BaseApp) { return baseapp.SetInterBlockCache(store.NewCommitKVStoreCacheManager()) } // BenchmarkSimulation run the chain simulation // Running using starport command: // `ignite chain simulate -v --numBlocks 200 --blockSize 50` // Running as go benchmark test: // `go test -benchmem -run=^$ -bench ^BenchmarkSimulation ./app -NumBlocks=200 -BlockSize 50 -Commit=true -Verbose=true -Enabled=true` func BenchmarkSimulation(b *testing.B) { simcli.FlagSeedValue = time.Now().Unix() simcli.FlagVerboseValue = true simcli.FlagCommitValue = true simcli.FlagEnabledValue = true config := simcli.NewConfigFromFlags() config.ChainID = SimAppChainID db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if skip { b.Skip("skipping application simulation") } require.NoError(b, err, "simulation setup failed") defer func() { require.NoError(b, db.Close()) require.NoError(b, os.RemoveAll(dir)) }() appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue bApp, err := app.New(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.NoError(b, err) require.Equal(b, app.Name, bApp.Name()) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, bApp.BaseApp, simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), simulationtypes.RandomAccounts, simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), app.BlockedAddresses(), config, bApp.AppCodec(), ) // export state and simParams before the simulation error is checked err = simtestutil.CheckExportSimulation(bApp, config, simParams) require.NoError(b, err) require.NoError(b, simErr) if config.Commit { simtestutil.PrintStats(db) } } func TestAppImportExport(t *testing.T) { config := simcli.NewConfigFromFlags() config.ChainID = SimAppChainID db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if skip { t.Skip("skipping application import/export simulation") } require.NoError(t, err, "simulation setup failed") defer func() { require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue bApp, err := app.New(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.NoError(t, err) require.Equal(t, app.Name, bApp.Name()) // Run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( t, os.Stdout, bApp.BaseApp, simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), simulationtypes.RandomAccounts, simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), app.BlockedAddresses(), config, bApp.AppCodec(), ) // export state and simParams before the simulation error is checked err = simtestutil.CheckExportSimulation(bApp, config, simParams) require.NoError(t, err) require.NoError(t, simErr) if config.Commit { simtestutil.PrintStats(db) } fmt.Printf("exporting genesis...\n") exported, err := bApp.ExportAppStateAndValidators(false, []string{}, []string{}) require.NoError(t, err) fmt.Printf("importing genesis...\n") newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) require.NoError(t, err, "simulation setup failed") defer func() { require.NoError(t, newDB.Close()) require.NoError(t, os.RemoveAll(newDir)) }() newApp, err := app.New(log.NewNopLogger(), newDB, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.NoError(t, err) require.Equal(t, app.Name, newApp.Name()) var genesisState app.GenesisState err = json.Unmarshal(exported.AppState, &genesisState) require.NoError(t, err) ctxA := bApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight()}) ctxB := newApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight()}) _, err = newApp.ModuleManager.InitGenesis(ctxB, bApp.AppCodec(), genesisState) if err != nil { if strings.Contains(err.Error(), "validator set is empty after InitGenesis") { logger.Info("Skipping simulation as all validators have been unbonded") logger.Info("err", err, "stacktrace", string(debug.Stack())) return } } require.NoError(t, err) err = newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) require.NoError(t, err) fmt.Printf("comparing stores...\n") // skip certain prefixes skipPrefixes := map[string][][]byte{ stakingtypes.StoreKey: { stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, stakingtypes.HistoricalInfoKey, stakingtypes.UnbondingIDKey, stakingtypes.UnbondingIndexKey, stakingtypes.UnbondingTypeKey, stakingtypes.ValidatorUpdatesKey, }, authzkeeper.StoreKey: {authzkeeper.GrantQueuePrefix}, feegrant.StoreKey: {feegrant.FeeAllowanceQueueKeyPrefix}, slashingtypes.StoreKey: {slashingtypes.ValidatorMissedBlockBitmapKeyPrefix}, } storeKeys := bApp.GetStoreKeys() require.NotEmpty(t, storeKeys) for _, appKeyA := range storeKeys { // only compare kvstores if _, ok := appKeyA.(*storetypes.KVStoreKey); !ok { continue } keyName := appKeyA.Name() appKeyB := newApp.GetKey(keyName) storeA := ctxA.KVStore(appKeyA) storeB := ctxB.KVStore(appKeyB) failedKVAs, failedKVBs := simtestutil.DiffKVStores(storeA, storeB, skipPrefixes[keyName]) require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare %s", keyName) fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), appKeyA, appKeyB) require.Equal(t, 0, len(failedKVAs), simtestutil.GetSimulationLog(keyName, bApp.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) } } func TestAppSimulationAfterImport(t *testing.T) { config := simcli.NewConfigFromFlags() config.ChainID = SimAppChainID db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if skip { t.Skip("skipping application simulation after import") } require.NoError(t, err, "simulation setup failed") defer func() { require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue bApp, err := app.New(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.NoError(t, err) require.Equal(t, app.Name, bApp.Name()) // Run randomized simulation stopEarly, simParams, simErr := simulation.SimulateFromSeed( t, os.Stdout, bApp.BaseApp, simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), simulationtypes.RandomAccounts, simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), app.BlockedAddresses(), config, bApp.AppCodec(), ) // export state and simParams before the simulation error is checked err = simtestutil.CheckExportSimulation(bApp, config, simParams) require.NoError(t, err) require.NoError(t, simErr) if config.Commit { simtestutil.PrintStats(db) } if stopEarly { fmt.Println("can't export or import a zero-validator genesis, exiting test...") return } fmt.Printf("exporting genesis...\n") exported, err := bApp.ExportAppStateAndValidators(true, []string{}, []string{}) require.NoError(t, err) fmt.Printf("importing genesis...\n") newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) require.NoError(t, err, "simulation setup failed") defer func() { require.NoError(t, newDB.Close()) require.NoError(t, os.RemoveAll(newDir)) }() newApp, err := app.New(log.NewNopLogger(), newDB, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.NoError(t, err) require.Equal(t, app.Name, newApp.Name()) _, err = newApp.InitChain(&abci.RequestInitChain{ AppStateBytes: exported.AppState, ChainId: SimAppChainID, }) require.NoError(t, err) _, _, err = simulation.SimulateFromSeed( t, os.Stdout, newApp.BaseApp, simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), simulationtypes.RandomAccounts, simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config), app.BlockedAddresses(), config, bApp.AppCodec(), ) require.NoError(t, err) } func TestAppStateDeterminism(t *testing.T) { if !simcli.FlagEnabledValue { t.Skip("skipping application simulation") } config := simcli.NewConfigFromFlags() config.InitialBlockHeight = 1 config.ExportParamsPath = "" config.OnOperation = true config.AllInvariants = true numSeeds := 3 numTimesToRunPerSeed := 3 // This used to be set to 5, but we've temporarily reduced it to 3 for the sake of faster CI. appHashList := make([]json.RawMessage, numTimesToRunPerSeed) // We will be overriding the random seed and just run a single simulation on the provided seed value if config.Seed != simcli.DefaultSeedValue { numSeeds = 1 } appOptions := viper.New() if FlagEnableStreamingValue { m := make(map[string]interface{}) m["streaming.abci.keys"] = []string{"*"} m["streaming.abci.plugin"] = "abci_v1" m["streaming.abci.stop-node-on-err"] = true for key, value := range m { appOptions.SetDefault(key, value) } } appOptions.SetDefault(flags.FlagHome, app.DefaultNodeHome) appOptions.SetDefault(server.FlagInvCheckPeriod, simcli.FlagPeriodValue) if simcli.FlagVerboseValue { appOptions.SetDefault(flags.FlagLogLevel, "debug") } for i := 0; i < numSeeds; i++ { if config.Seed == simcli.DefaultSeedValue { config.Seed = rand.Int63() } fmt.Println("config.Seed: ", config.Seed) for j := 0; j < numTimesToRunPerSeed; j++ { var logger log.Logger if simcli.FlagVerboseValue { logger = log.NewTestLogger(t) } else { logger = log.NewNopLogger() } chainID := fmt.Sprintf("chain-id-%d-%d", i, j) config.ChainID = chainID db := dbm.NewMemDB() bApp, err := app.New( logger, db, nil, true, appOptions, interBlockCacheOpt(), baseapp.SetChainID(chainID), ) require.NoError(t, err) fmt.Printf( "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, ) _, _, err = simulation.SimulateFromSeed( t, os.Stdout, bApp.BaseApp, simtestutil.AppStateFn( bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis(), ), simulationtypes.RandomAccounts, simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), app.BlockedAddresses(), config, bApp.AppCodec(), ) require.NoError(t, err) if config.Commit { simtestutil.PrintStats(db) } appHash := bApp.LastCommitID().Hash appHashList[j] = appHash if j != 0 { require.Equal( t, string(appHashList[0]), string(appHashList[j]), "non-determinism in seed %d: %d/%d, attempt: %d/%d\n", config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, ) } } } } ================================================ FILE: app/utils.go ================================================ package app import ( sdk "github.com/cosmos/cosmos-sdk/types" ) func SetConfig(seal bool) { // set prefixes accountPubKeyPrefix := AccountAddressPrefix + "pub" validatorAddressPrefix := AccountAddressPrefix + "valoper" validatorPubKeyPrefix := AccountAddressPrefix + "valoperpub" consNodeAddressPrefix := AccountAddressPrefix + "valcons" consNodePubKeyPrefix := AccountAddressPrefix + "valconspub" // init config config := sdk.GetConfig() config.SetBech32PrefixForAccount(AccountAddressPrefix, accountPubKeyPrefix) config.SetBech32PrefixForValidator(validatorAddressPrefix, validatorPubKeyPrefix) config.SetBech32PrefixForConsensusNode(consNodeAddressPrefix, consNodePubKeyPrefix) if seal { config.Seal() } } ================================================ FILE: buf.work.yaml ================================================ # Generated by "buf config migrate-v1beta1". Edit as necessary, and # remove this comment when you're finished. # # This workspace file points to the roots found in your # previous "buf.yaml" configuration. version: v1 directories: - proto ================================================ FILE: cmd/extension_options_tx/main.go ================================================ package main import ( "context" "crypto/ed25519" "encoding/base64" "encoding/json" "fmt" "log" "os" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" clienttx "github.com/cosmos/cosmos-sdk/client/tx" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" coretypes "github.com/sourcenetwork/acp_core/pkg/types" jwstypes "github.com/sourcenetwork/sourcehub/app/ante/types" testutil "github.com/sourcenetwork/sourcehub/testutil" acp "github.com/sourcenetwork/sourcehub/x/acp/module" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func main() { if len(os.Args) < 2 { log.Fatal("Usage: go run main.go ") } // Read the policy file content policyContent, err := os.ReadFile(os.Args[1]) if err != nil { log.Fatal("Failed to read policy file:", err) } // Initialize SDK config sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForAccount("source", "sourcepub") sdkConfig.Seal() // Setup encoding config with auth and acp modules encodingConfig := testutilmod.MakeTestEncodingConfig(auth.AppModuleBasic{}, acp.AppModuleBasic{}) // Setup RPC client rpcClient, err := rpchttp.New("tcp://localhost:26657", "/websocket") if err != nil { log.Fatal("Failed to create RPC client:", err) } // Setup gRPC connection grpcConn, err := grpc.NewClient("localhost:9090", grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { log.Fatal("Failed to create gRPC connection:", err) } defer grpcConn.Close() // Setup client context clientCtx := client.Context{}. WithChainID("sourcehub-dev"). WithKeyringDir(".sourcehub"). WithTxConfig(encodingConfig.TxConfig). WithCodec(encodingConfig.Codec). WithClient(rpcClient). WithNodeURI("tcp://localhost:26657"). WithAccountRetriever(authtypes.AccountRetriever{}). WithGRPCClient(grpcConn). WithBroadcastMode(flags.BroadcastSync). WithSkipConfirmation(true) // Load keyring from home directory homeDir := os.Getenv("HOME") + "/.sourcehub" kr, err := keyring.New(sdk.KeyringServiceName(), "test", homeDir, nil, encodingConfig.Codec) if err != nil { log.Fatal("Failed to create keyring:", err) } keyName := "validator" info, err := kr.Key(keyName) if err != nil { log.Fatal("Key not found in keyring:", err) } addr, err := info.GetAddress() if err != nil { log.Fatal("Failed to get address from key:", err) } senderAddr := addr.String() clientCtx = clientCtx. WithFromAddress(addr). WithFromName(info.Name). WithKeyring(kr) // Create the message msg := &acptypes.MsgCreatePolicy{ Creator: senderAddr, Policy: string(policyContent), MarshalType: coretypes.PolicyMarshalingType_YAML, } // Generate the key pair for signing var privKey ed25519.PrivateKey var pubKey ed25519.PublicKey // Derive seed from mnemonic mnemonic := "near smoke great nasty alley food crush nurse rubber say danger search employ under gaze today alien eager risk letter drum relief sponsor current" seed, err := hd.Secp256k1.Derive()(mnemonic, "", "m/44'/118'/0'/0/0") if err != nil { log.Fatal("Failed to derive seed from mnemonic:", err) } // Generate Ed25519 key pair from the derived seed if len(seed) > 32 { seed = seed[:32] } privKey = ed25519.NewKeyFromSeed(seed) pubKey = privKey.Public().(ed25519.PublicKey) didKey, err := key.CreateDIDKey(crypto.Ed25519, pubKey) if err != nil { log.Fatal("Failed to create DID key:", err) } // Create bearer token with the matching DID bearerToken := testutil.NewBearerTokenNow(didKey.String(), senderAddr) payloadBytes, err := json.Marshal(bearerToken) if err != nil { log.Fatal("Failed to marshal payload:", err) } // Create and sign the JWS header := testutil.CreateJWSHeader() headerBytes, err := json.Marshal(header) if err != nil { log.Fatal("Failed to marshal header:", err) } headerEncoded := base64.RawURLEncoding.EncodeToString(headerBytes) payloadEncoded := base64.RawURLEncoding.EncodeToString(payloadBytes) signingInput := headerEncoded + "." + payloadEncoded signature := ed25519.Sign(privKey, []byte(signingInput)) signatureEncoded := base64.RawURLEncoding.EncodeToString(signature) jwsString := signingInput + "." + signatureEncoded // Create extension option ext := &jwstypes.JWSExtensionOption{ BearerToken: jwsString, } extAny, err := codectypes.NewAnyWithValue(ext) if err != nil { log.Fatal("Failed to marshal extension:", err) } // Build transaction txBuilder := clientCtx.TxConfig.NewTxBuilder() err = txBuilder.SetMsgs(msg) if err != nil { log.Fatal("Failed to set messages:", err) } // Set extension options if extBuilder, ok := txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(extAny) } else { log.Fatal("TxBuilder does not implement ExtendedTxBuilder") } txBuilder.SetGasLimit(200000) txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("uopen", math.NewInt(5000)))) // Query account to get acc number and sequence authClient := authtypes.NewQueryClient(grpcConn) accountResp, err := authClient.Account(context.Background(), &authtypes.QueryAccountRequest{ Address: addr.String(), }) if err != nil { log.Fatal("Failed to query account:", err) } var account sdk.AccountI err = encodingConfig.InterfaceRegistry.UnpackAny(accountResp.Account, &account) if err != nil { log.Fatal("Failed to unpack account:", err) } accNum := account.GetAccountNumber() seq := account.GetSequence() // Create transaction factory txf := clienttx.Factory{}. WithTxConfig(clientCtx.TxConfig). WithChainID(clientCtx.ChainID). WithKeybase(kr). WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). WithAccountRetriever(clientCtx.AccountRetriever). WithAccountNumber(accNum). WithSequence(seq) // Sign transaction err = clienttx.Sign(context.Background(), txf, info.Name, txBuilder, true) if err != nil { log.Fatal("Failed to sign transaction:", err) } // Encode transaction txBytes, err := clientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) if err != nil { log.Fatal("Failed to encode transaction:", err) } // Broadcast transaction res, err := clientCtx.BroadcastTx(txBytes) if err != nil { log.Fatal("Failed to broadcast transaction:", err) } output, _ := json.MarshalIndent(res, "", " ") fmt.Println("Transaction Result:") fmt.Println(string(output)) } ================================================ FILE: cmd/extension_options_tx/readme.md ================================================ # Testing JWS extension option with DID-based feegrant This document explains how to test the JWS extension option functionality with DID-based feegrants. ## Prerequisites - sourcehub node running locally (e.g. `./scripts/dev-entrypoint.sh start`) - Faucet account and validator account set up in keyring (set by default when running `dev-entrypoint.sh` script) - Test policy file available in `./scripts/test-policy.yaml` ## Steps ### 1. Grant DID-based fee allowance Add a DID-based fee grant from the faucet address to the DID used in the script: ```bash build/sourcehubd tx feegrant grant-did source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt did:key:z6MknVX5y2APs6LH21s9FusVozvdKKwDhFAqq3jzwAr6v21a --spend-limit 1000000uopen --keyring-backend test --chain-id=sourcehub-dev --gas auto --fees 200uopen -y ``` ### 2. Verify the feegrant (optional) Check that the DID allowance was added correctly: ```bash build/sourcehubd q feegrant did-grant source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt did:key:z6MknVX5y2APs6LH21s9FusVozvdKKwDhFAqq3jzwAr6v21a ``` ### 3. Run the extension options script Execute the script to create a policy with validator as the sender and faucet as the fee payer: ```bash go run ./cmd/extension_options_tx scripts/test-policy.yaml ``` ### 4. Confirm policy creation (optional) Check that the policy was created successfully: ```bash build/sourcehubd q acp policy-ids ``` ## How it works - The script creates a transaction signed by the **validator** account - The transaction includes a **JWS extension option** with a signature from the DID - The **faucet** account pays the transaction fees via DID-based feegrant - The policy is created with the validator as the creator ## Expected behavior 1. JWS extension option is validated and DID is extracted. 2. DID-based feegrant is used to pay fees. 3. Transaction succeeds and policy is created. 4. Events show `use_feegrant` with the correct DID. ## Current limitations > **NOTE**: The current create/edit policy logic uses the msg creator address as the policy owner. We should make changes to be able to use DID from the JWS as the owner instead. ================================================ FILE: cmd/ica_packet_gen/main.go ================================================ package main import ( "encoding/json" "flag" "fmt" codectypes "github.com/cosmos/cosmos-sdk/codec/types" gogoproto "github.com/cosmos/gogoproto/proto" icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func main() { var creator, policy string flag.StringVar(&creator, "creator", "", "Host chain ICA address to use as creator") flag.StringVar(&policy, "policy", "name: ica test policy", "Policy content") flag.Parse() if creator == "" { panic("--creator is required") } msg := &acptypes.MsgCreatePolicy{ Creator: creator, Policy: policy, MarshalType: coretypes.PolicyMarshalingType_YAML, } anyMsg, err := codectypes.NewAnyWithValue(msg) if err != nil { panic(err) } cosmosTx := &icatypes.CosmosTx{Messages: []*codectypes.Any{anyMsg}} bz, err := gogoproto.Marshal(cosmosTx) if err != nil { panic(err) } out := icatypes.InterchainAccountPacketData{ Type: icatypes.EXECUTE_TX, Data: bz, Memo: "", } enc, err := json.MarshalIndent(out, "", " ") if err != nil { panic(err) } fmt.Println(string(enc)) } ================================================ FILE: cmd/sourcehubd/cmd/commands.go ================================================ package cmd import ( "errors" "io" "cosmossdk.io/log" confixcmd "cosmossdk.io/tools/confix/cmd" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/client/snapshot" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/types/module" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/sourcenetwork/sourcehub/app" ) func initRootCmd( rootCmd *cobra.Command, txConfig client.TxConfig, interfaceRegistry codectypes.InterfaceRegistry, appCodec codec.Codec, basicManager module.BasicManager, ) { rootCmd.AddCommand( genutilcli.InitCmd(basicManager, app.DefaultNodeHome), debug.Cmd(), confixcmd.ConfigCommand(), pruning.Cmd(newApp, app.DefaultNodeHome), snapshot.Cmd(newApp), NewTestnetCmd(basicManager, banktypes.GenesisBalancesIterator{}), ) server.AddCommands(rootCmd, app.DefaultNodeHome, newApp, appExport, addModuleInitFlags) // add keybase, auxiliary RPC, query, genesis, and tx child commands rootCmd.AddCommand( server.StatusCommand(), genesisCommand(txConfig, basicManager), queryCommand(), txCommand(), keys.Commands(), ) } func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) } // genesisCommand builds genesis-related `sourcehubd genesis` command. Users may provide application specific commands as a parameter func genesisCommand(txConfig client.TxConfig, basicManager module.BasicManager, cmds ...*cobra.Command) *cobra.Command { cmd := genutilcli.Commands(txConfig, basicManager, app.DefaultNodeHome) for _, subCmd := range cmds { cmd.AddCommand(subCmd) } return cmd } func queryCommand() *cobra.Command { cmd := &cobra.Command{ Use: "query", Aliases: []string{"q"}, Short: "Querying subcommands", DisableFlagParsing: false, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } cmd.AddCommand( rpc.QueryEventForTxCmd(), rpc.ValidatorCommand(), server.QueryBlockCmd(), authcmd.QueryTxsByEventsCmd(), server.QueryBlocksCmd(), authcmd.QueryTxCmd(), server.QueryBlockResultsCmd(), ) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd } func txCommand() *cobra.Command { cmd := &cobra.Command{ Use: "tx", Short: "Transactions subcommands", DisableFlagParsing: false, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } cmd.AddCommand( authcmd.GetSignCommand(), authcmd.GetSignBatchCommand(), authcmd.GetMultiSignCommand(), authcmd.GetMultiSignBatchCmd(), authcmd.GetValidateSignaturesCommand(), flags.LineBreak, authcmd.GetBroadcastCommand(), authcmd.GetEncodeCommand(), authcmd.GetDecodeCommand(), authcmd.GetSimulateCmd(), ) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd } // newApp creates the application func newApp( logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions, ) servertypes.Application { baseappOptions := server.DefaultBaseappOptions(appOpts) app, err := app.New( logger, db, traceStore, true, appOpts, baseappOptions..., ) if err != nil { panic(err) } return app } // appExport creates a new app (optionally at a given height) and exports state. func appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions, modulesToExport []string, ) (servertypes.ExportedApp, error) { var ( bApp *app.App err error ) // this check is necessary as we use the flag in x/upgrade. // we can exit more gracefully by checking the flag here. homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { return servertypes.ExportedApp{}, errors.New("application home not set") } viperAppOpts, ok := appOpts.(*viper.Viper) if !ok { return servertypes.ExportedApp{}, errors.New("appOpts is not viper.Viper") } // overwrite the FlagInvCheckPeriod viperAppOpts.Set(server.FlagInvCheckPeriod, 1) appOpts = viperAppOpts if height != -1 { bApp, err = app.New(logger, db, traceStore, false, appOpts) if err != nil { return servertypes.ExportedApp{}, err } if err := bApp.LoadHeight(height); err != nil { return servertypes.ExportedApp{}, err } } else { bApp, err = app.New(logger, db, traceStore, true, appOpts) if err != nil { return servertypes.ExportedApp{}, err } } return bApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } ================================================ FILE: cmd/sourcehubd/cmd/config.go ================================================ package cmd import ( "fmt" cmtcfg "github.com/cometbft/cometbft/config" serverconfig "github.com/cosmos/cosmos-sdk/server/config" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // CustomAppConfig extends the default Cosmos SDK app config type CustomAppConfig struct { serverconfig.Config `mapstructure:",squash"` Faucet appparams.FaucetConfig `mapstructure:"faucet"` } // initCometBFTConfig helps to override default CometBFT Config values. // return cmtcfg.DefaultConfig if no custom configuration is required for the application. func initCometBFTConfig() *cmtcfg.Config { cfg := cmtcfg.DefaultConfig() // these values put a higher strain on node memory // cfg.P2P.MaxNumInboundPeers = 100 // cfg.P2P.MaxNumOutboundPeers = 40 return cfg } // initAppConfig helps to override default appConfig template and configs. // return "", nil if no custom configuration is required for the application. func initAppConfig() (string, interface{}) { // Optionally allow the chain developer to overwrite the SDK's default server config. srvCfg := serverconfig.DefaultConfig() srvCfg.MinGasPrices = fmt.Sprintf( "%s%s,%s%s", appparams.DefaultMinGasPrice, appparams.MicroOpenDenom, appparams.DefaultMinGasPrice, appparams.MicroCreditDenom, ) // The SDK's default minimum gas price is set to "" (empty value) inside // app.toml. If left empty by validators, the node will halt on startup. // However, the chain developer can set a default app.toml value for their // validators here. // // In summary: // - if you leave srvCfg.MinGasPrices = "", all validators MUST tweak their // own app.toml config, // - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their // own app.toml to override, or use this default value. // // In tests, we set the min gas prices to 0. // srvCfg.MinGasPrices = "0stake" // srvCfg.BaseConfig.IAVLDisableFastNode = true // disable fastnode by default customAppConfig := CustomAppConfig{ Config: *srvCfg, Faucet: appparams.FaucetConfig{ EnableFaucet: false, }, } customAppTemplate := serverconfig.DefaultConfigTemplate + ` ############################################################################### ### Faucet Configuration ### ############################################################################### [faucet] # Defines if the faucet service should be enabled. enable_faucet = {{ .Faucet.EnableFaucet }} ` return customAppTemplate, customAppConfig } ================================================ FILE: cmd/sourcehubd/cmd/root.go ================================================ package cmd import ( "os" "strings" "cosmossdk.io/client/v2/autocli" clientv2keyring "cosmossdk.io/client/v2/autocli/keyring" "cosmossdk.io/core/address" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/tx" txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/spf13/cobra" "github.com/spf13/pflag" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/sourcenetwork/sourcehub/app" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" ) // NewRootCmd creates a new root command for sourcehubd. It is called once in the main function. func NewRootCmd() *cobra.Command { app.SetConfig(true) var ( txConfigOpts tx.ConfigOptions autoCliOpts autocli.AppOptions moduleBasicManager module.BasicManager clientCtx client.Context ) if err := depinject.Inject( depinject.Configs(app.AppConfig(), depinject.Supply( log.NewNopLogger(), ), depinject.Provide( ProvideClientContext, ProvideKeyring, ), ), &txConfigOpts, &autoCliOpts, &moduleBasicManager, &clientCtx, ); err != nil { panic(err) } rootCmd := &cobra.Command{ Use: app.Name + "d", Short: "Start sourcehub node", SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { // set the default command outputs cmd.SetOut(cmd.OutOrStdout()) cmd.SetErr(cmd.ErrOrStderr()) clientCtx = clientCtx.WithCmdContext(cmd.Context()) clientCtx, err := client.ReadPersistentCommandFlags(clientCtx, cmd.Flags()) if err != nil { return err } clientCtx, err = config.ReadFromClientConfig(clientCtx) if err != nil { return err } // This needs to go after ReadFromClientConfig, as that function // sets the RPC client needed for SIGN_MODE_TEXTUAL. txConfigOpts.EnabledSignModes = append(txConfigOpts.EnabledSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) txConfigOpts.TextualCoinMetadataQueryFn = txmodule.NewGRPCCoinMetadataQueryFn(clientCtx) txConfigWithTextual, err := tx.NewTxConfigWithOptions( codec.NewProtoCodec(clientCtx.InterfaceRegistry), txConfigOpts, ) if err != nil { return err } clientCtx = clientCtx.WithTxConfig(txConfigWithTextual) if err := client.SetCmdClientContextHandler(clientCtx, cmd); err != nil { return err } if err := client.SetCmdClientContextHandler(clientCtx, cmd); err != nil { return err } customAppTemplate, customAppConfig := initAppConfig() customCMTConfig := initCometBFTConfig() return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customCMTConfig) }, } // Since the IBC modules don't support dependency injection, we need to // manually register the modules on the client side. // This needs to be removed after IBC supports App Wiring. ibcModules := app.RegisterIBC(clientCtx.InterfaceRegistry) for name, module := range ibcModules { autoCliOpts.Modules[name] = module } // Manually set auto cli options for the mint module since we removed it from depinject autoCliOpts.Modules[minttypes.ModuleName] = app.RegisterMintInterfaces(clientCtx.InterfaceRegistry) initRootCmd(rootCmd, clientCtx.TxConfig, clientCtx.InterfaceRegistry, clientCtx.Codec, moduleBasicManager) overwriteFlagDefaults(rootCmd, map[string]string{ flags.FlagChainID: strings.ReplaceAll(app.Name, "-", ""), flags.FlagKeyringBackend: "test", }) if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { panic(err) } return rootCmd } func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) { set := func(s *pflag.FlagSet, key, val string) { if f := s.Lookup(key); f != nil { f.DefValue = val f.Value.Set(val) } } for key, val := range defaults { set(c.Flags(), key, val) set(c.PersistentFlags(), key, val) } for _, c := range c.Commands() { overwriteFlagDefaults(c, defaults) } } func ProvideClientContext( appCodec codec.Codec, interfaceRegistry codectypes.InterfaceRegistry, txConfig client.TxConfig, legacyAmino *codec.LegacyAmino, ) client.Context { // Register ante interfaces for extension options antetypes.RegisterInterfaces(interfaceRegistry) clientCtx := client.Context{}. WithCodec(appCodec). WithInterfaceRegistry(interfaceRegistry). WithTxConfig(txConfig). WithLegacyAmino(legacyAmino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). WithHomeDir(app.DefaultNodeHome). WithViper(app.Name) // env variable prefix // Read the config again to overwrite the default values with the values from the config file clientCtx, _ = config.ReadFromClientConfig(clientCtx) return clientCtx } func ProvideKeyring(clientCtx client.Context, addressCodec address.Codec) (clientv2keyring.Keyring, error) { kb, err := client.NewKeyringFromBackend(clientCtx, clientCtx.Keyring.Backend()) if err != nil { return nil, err } return keyring.NewAutoCLIKeyring(kb) } ================================================ FILE: cmd/sourcehubd/cmd/testnet.go ================================================ package cmd import ( "bufio" "encoding/json" "fmt" "net" "os" "path/filepath" cmtconfig "github.com/cometbft/cometbft/config" cmttime "github.com/cometbft/cometbft/types/time" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" "github.com/spf13/pflag" "cosmossdk.io/log" "cosmossdk.io/math" "cosmossdk.io/math/unsafe" bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sourcenetwork/sourcehub/app" appparams "github.com/sourcenetwork/sourcehub/app/params" hubtypes "github.com/sourcenetwork/sourcehub/x/hub/types" ) var ( // Common flags flagNumValidators = "v" flagOutputDir = "output-dir" flagNoFees = "no-fees" // `start` command flags flagRPCAddress = "rpc.address" flagAPIAddress = "api.address" flagGRPCAddress = "grpc.address" flagEnableLogging = "enable-logging" flagPrintMnemonic = "print-mnemonic" // `init-files` command flags flagStakeTokens = "stake-tokens" flagOpenTokens = "uopen-tokens" flagCreditTokens = "ucredit-tokens" flagAddFaucet = "faucet-amount" flagNodeDirPrefix = "node-dir-prefix" flagNodeDaemonHome = "node-daemon-home" flagStartingIPAddress = "starting-ip-address" ) const nodeDirPerm = 0o755 type startArgs struct { algo string apiAddress string chainID string enableLogging bool grpcAddress string minGasPrices string numValidators int outputDir string printMnemonic bool rpcAddress string } type initFilesArgs struct { algo string chainID string creditTokens int64 faucetAmount int64 keyringBackend string minGasPrices string nodeDaemonHome string nodeDirPrefix string numValidators int openTokens int64 outputDir string stakeTokens int64 startingIPAddress string noFees bool } // NewTestnetCmd creates a root testnet command with subcommands to run an in-process testnet or initialize // validator configuration files for running a multi-validator testnet in a separate process. func NewTestnetCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator) *cobra.Command { testnetCmd := &cobra.Command{ Use: "testnet", Short: "subcommands for starting or configuring local testnets", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } testnetCmd.AddCommand(testnetStartCmd()) testnetCmd.AddCommand(testnetInitFilesCmd(mbm, genBalIterator)) return testnetCmd } // addTestnetFlagsToCmd adds common testnet CLI flags to a Cobra command. func addTestnetFlagsToCmd(cmd *cobra.Command) { cmd.Flags().Int(flagNumValidators, 4, "Number of validators to initialize the testnet with") cmd.Flags().StringP(flagOutputDir, "o", "./.testnets", "Directory to store initialization data for the testnet") cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created") cmd.Flags().String( server.FlagMinGasPrices, "0.001uopen,0.001ucredit", "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.001uopen,0.001ucredit)", ) cmd.Flags().String(flags.FlagKeyType, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") cmd.Flags().Bool(flagNoFees, false, "If set the chain will accept no fee Txs") // support old flags name for backwards compatibility cmd.Flags().SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName { if name == flags.FlagKeyAlgorithm { name = flags.FlagKeyType } return pflag.NormalizedName(name) }) } // testnetStartCmd returns a cmd to start multi validator in-process testnet. func testnetStartCmd() *cobra.Command { cmd := &cobra.Command{ Use: "start", Short: "Launch an in-process multi-validator testnet", Long: `testnet will launch an in-process multi-validator testnet, and generate "v" directories, populated with necessary validator configuration files (private validator, genesis, config, etc.). Example: sourcehubd testnet start --v 4 --output-dir ./.testnets `, RunE: func(cmd *cobra.Command, _ []string) error { args := startArgs{} args.outputDir, _ = cmd.Flags().GetString(flagOutputDir) args.chainID, _ = cmd.Flags().GetString(flags.FlagChainID) args.minGasPrices, _ = cmd.Flags().GetString(server.FlagMinGasPrices) args.numValidators, _ = cmd.Flags().GetInt(flagNumValidators) args.algo, _ = cmd.Flags().GetString(flags.FlagKeyType) args.enableLogging, _ = cmd.Flags().GetBool(flagEnableLogging) args.rpcAddress, _ = cmd.Flags().GetString(flagRPCAddress) args.apiAddress, _ = cmd.Flags().GetString(flagAPIAddress) args.grpcAddress, _ = cmd.Flags().GetString(flagGRPCAddress) args.printMnemonic, _ = cmd.Flags().GetBool(flagPrintMnemonic) return startTestnet(cmd, args) }, } addTestnetFlagsToCmd(cmd) cmd.Flags().Bool(flagEnableLogging, false, "Enable INFO logging of CometBFT validator nodes") cmd.Flags().String(flagRPCAddress, "tcp://0.0.0.0:26657", "the RPC address to listen on") cmd.Flags().String(flagAPIAddress, "tcp://0.0.0.0:1317", "the address to listen on for REST API") cmd.Flags().String(flagGRPCAddress, "0.0.0.0:9090", "the gRPC server address to listen on") cmd.Flags().Bool(flagPrintMnemonic, true, "print mnemonic of first validator to stdout for manual testing") return cmd } // startTestnet starts an in-process testnet. func startTestnet(cmd *cobra.Command, args startArgs) error { networkConfig := network.DefaultConfig(newTestNetworkFixture) // Default networkConfig.ChainID is random, and we should only override it if chainID provided is non-empty if args.chainID != "" { networkConfig.ChainID = args.chainID } networkConfig.SigningAlgo = args.algo networkConfig.MinGasPrices = args.minGasPrices networkConfig.BondDenom = appparams.DefaultBondDenom networkConfig.NumValidators = args.numValidators networkConfig.EnableLogging = args.enableLogging networkConfig.RPCAddress = args.rpcAddress networkConfig.APIAddress = args.apiAddress networkConfig.GRPCAddress = args.grpcAddress networkConfig.PrintMnemonic = args.printMnemonic networkLogger := network.NewCLILogger(cmd) baseDir := fmt.Sprintf("%s", args.outputDir) if _, err := os.Stat(baseDir); !os.IsNotExist(err) { return fmt.Errorf( "testnests directory already exists for chain-id '%s': %s, please remove or select a new --chain-id", networkConfig.ChainID, baseDir) } testnet, err := network.New(networkLogger, baseDir, networkConfig) if err != nil { return err } if _, err := testnet.WaitForHeight(1); err != nil { return err } cmd.Println("press the Enter Key to terminate") if _, err := fmt.Scanln(); err != nil { return err } testnet.Cleanup() return nil } // newTestNetworkFixture returns a test fixture used in the network config. func newTestNetworkFixture() network.TestFixture { dir, err := os.MkdirTemp("", "sourceapp") if err != nil { panic(fmt.Sprintf("failed creating temporary directory: %v", err)) } defer os.RemoveAll(dir) application, err := app.New(log.NewNopLogger(), dbm.NewMemDB(), nil, true, sims.NewAppOptionsWithFlagHome(dir)) appCtr := func(val network.ValidatorI) servertypes.Application { appInstance, _ := app.New( val.GetCtx().Logger, dbm.NewMemDB(), nil, true, sims.NewAppOptionsWithFlagHome(val.GetCtx().Config.RootDir), bam.SetChainID(val.GetCtx().Viper.GetString(flags.FlagChainID)), ) return appInstance } return network.TestFixture{ AppConstructor: appCtr, GenesisState: application.DefaultGenesis(), EncodingConfig: simtestutil.TestEncodingConfig{ InterfaceRegistry: application.AppCodec().InterfaceRegistry(), Codec: application.AppCodec(), TxConfig: application.TxConfig(), Amino: application.LegacyAmino(), }, } } // testnetInitFilesCmd returns a cmd to initialize all files for CometBFT testnet and application. func testnetInitFilesCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator) *cobra.Command { cmd := &cobra.Command{ Use: "init-files", Short: "Initialize config directories & files for a multi-validator testnet running locally via separate processes", Long: `init-files will setup "v" number of directories and populate each with necessary files (private validator, genesis, config, etc.) for running "v" validator nodes. Booting up a network with these validator folders is intended to be used with Docker Compose, or a similar setup where each node has a manually configurable IP address. Note, strict routability for addresses is turned off in the config file. Example: sourcehubd testnet init-files --v 4 --output-dir ./.testnets --starting-ip-address 192.168.10.2 `, RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err } serverCtx := server.GetServerContextFromCmd(cmd) config := serverCtx.Config args := initFilesArgs{} args.outputDir, _ = cmd.Flags().GetString(flagOutputDir) args.keyringBackend, _ = cmd.Flags().GetString(flags.FlagKeyringBackend) args.chainID, _ = cmd.Flags().GetString(flags.FlagChainID) args.minGasPrices, _ = cmd.Flags().GetString(server.FlagMinGasPrices) args.nodeDirPrefix, _ = cmd.Flags().GetString(flagNodeDirPrefix) args.nodeDaemonHome, _ = cmd.Flags().GetString(flagNodeDaemonHome) args.startingIPAddress, _ = cmd.Flags().GetString(flagStartingIPAddress) args.numValidators, _ = cmd.Flags().GetInt(flagNumValidators) args.algo, _ = cmd.Flags().GetString(flags.FlagKeyType) args.faucetAmount, _ = cmd.Flags().GetInt64(flagAddFaucet) args.openTokens, _ = cmd.Flags().GetInt64(flagOpenTokens) args.creditTokens, _ = cmd.Flags().GetInt64(flagCreditTokens) args.stakeTokens, _ = cmd.Flags().GetInt64(flagStakeTokens) args.noFees, _ = cmd.Flags().GetBool(flagNoFees) return initTestnetFiles( clientCtx, cmd, config, mbm, genBalIterator, clientCtx.TxConfig.SigningContext().ValidatorAddressCodec(), args, ) }, } addTestnetFlagsToCmd(cmd) cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)") cmd.Flags().String(flagNodeDaemonHome, "sourcehubd", "Home directory of the node's daemon configuration") cmd.Flags().String( flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)", ) cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)") cmd.Flags().Int64(flagAddFaucet, 0, "Create a faucet account with the given amount of uopen tokens") cmd.Flags().Int64(flagOpenTokens, 1000, "Amount of uopen to fund each validator account") cmd.Flags().Int64(flagCreditTokens, 2000, "Amount of ucredit to fund each validator account") cmd.Flags().Int64(flagStakeTokens, 100, "Amount of uopen to self-delegate during MsgCreateValidator") return cmd } // initTestnetFiles initializes testnet files for a testnet to be run in a separate process. func initTestnetFiles( clientCtx client.Context, cmd *cobra.Command, nodeConfig *cmtconfig.Config, mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator, valAddrCodec runtime.ValidatorAddressCodec, args initFilesArgs, ) error { if args.chainID == "" { args.chainID = "chain-" + unsafe.Str(6) } nodeIDs := make([]string, args.numValidators) valPubKeys := make([]cryptotypes.PubKey, args.numValidators) appConfig := srvconfig.DefaultConfig() appConfig.MinGasPrices = args.minGasPrices appConfig.API.Enable = true appConfig.Telemetry.Enabled = true appConfig.Telemetry.PrometheusRetentionTime = 60 appConfig.Telemetry.EnableHostnameLabel = false appConfig.Telemetry.GlobalLabels = [][]string{{"chain_id", args.chainID}} var ( genAccounts []authtypes.GenesisAccount genBalances []banktypes.Balance genFiles []string ) // generate private keys, node IDs, and initial transactions inBuf := bufio.NewReader(cmd.InOrStdin()) for i := 0; i < args.numValidators; i++ { nodeDirName := fmt.Sprintf("%s%d", args.nodeDirPrefix, i) nodeDir := filepath.Join(args.outputDir, nodeDirName, args.nodeDaemonHome) gentxsDir := filepath.Join(args.outputDir, "gentxs") nodeConfig.SetRoot(nodeDir) nodeConfig.Moniker = nodeDirName nodeConfig.RPC.ListenAddress = "tcp://0.0.0.0:26657" if err := os.MkdirAll(filepath.Join(nodeDir, "config"), nodeDirPerm); err != nil { _ = os.RemoveAll(args.outputDir) return err } _, err := getIP(i, args.startingIPAddress) if err != nil { _ = os.RemoveAll(args.outputDir) return err } nodeIDs[i], valPubKeys[i], err = genutil.InitializeNodeValidatorFiles(nodeConfig) if err != nil { _ = os.RemoveAll(args.outputDir) return err } basePort := 26656 memo := fmt.Sprintf("%s@0.0.0.0:%d", nodeIDs[i], basePort+(i*10)) genFiles = append(genFiles, nodeConfig.GenesisFile()) kb, err := keyring.New(sdk.KeyringServiceName(), args.keyringBackend, nodeDir, inBuf, clientCtx.Codec) if err != nil { return err } keyringAlgos, _ := kb.SupportedAlgorithms() algo, err := keyring.NewSigningAlgoFromString(args.algo, keyringAlgos) if err != nil { return err } addr, secret, err := testutil.GenerateSaveCoinKey(kb, nodeDirName, "", true, algo) if err != nil { _ = os.RemoveAll(args.outputDir) return err } info := map[string]string{"secret": secret} cliPrint, err := json.MarshalIndent(info, "", " ") if err != nil { return err } if err := writeFile(fmt.Sprintf("%v.json", "key_seed"), nodeDir, cliPrint); err != nil { return err } accOpenTokens := sdk.TokensFromConsensusPower(args.openTokens, sdk.DefaultPowerReduction) // 1,000 $OPEN accCreditTokens := sdk.TokensFromConsensusPower(args.creditTokens, sdk.DefaultPowerReduction) // 2,000 $CREDIT coins := sdk.Coins{ sdk.NewCoin(appparams.DefaultBondDenom, accOpenTokens), sdk.NewCoin(appparams.MicroCreditDenom, accCreditTokens), } genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) valStr, err := valAddrCodec.BytesToString(sdk.ValAddress(addr)) if err != nil { return err } valTokens := sdk.TokensFromConsensusPower(args.stakeTokens, sdk.DefaultPowerReduction) // 100 $OPEN createValMsg, err := stakingtypes.NewMsgCreateValidator( valStr, valPubKeys[i], sdk.NewCoin(appparams.DefaultBondDenom, valTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), stakingtypes.NewCommissionRates(math.LegacyOneDec(), math.LegacyOneDec(), math.LegacyOneDec()), math.OneInt(), ) if err != nil { return err } txBuilder := clientCtx.TxConfig.NewTxBuilder() if err := txBuilder.SetMsgs(createValMsg); err != nil { return err } txBuilder.SetMemo(memo) txFactory := tx.Factory{} txFactory = txFactory. WithChainID(args.chainID). WithMemo(memo). WithKeybase(kb). WithTxConfig(clientCtx.TxConfig) if err := tx.Sign(cmd.Context(), txFactory, nodeDirName, txBuilder, true); err != nil { return err } txBz, err := clientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx()) if err != nil { return err } if err := writeFile(fmt.Sprintf("%v.json", nodeDirName), gentxsDir, txBz); err != nil { return err } srvconfig.SetConfigTemplate(srvconfig.DefaultConfigTemplate) srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config", "app.toml"), appConfig) } // initialize and fund the faucet account if faucetAmount is set via --faucet flag if args.faucetAmount > 0 { faucetDir := filepath.Join(args.outputDir, "faucet") if err := os.MkdirAll(faucetDir, nodeDirPerm); err != nil { return err } faucetKb, err := keyring.New(sdk.KeyringServiceName(), args.keyringBackend, faucetDir, inBuf, clientCtx.Codec) if err != nil { return err } keyringAlgos, _ := faucetKb.SupportedAlgorithms() algo, err := keyring.NewSigningAlgoFromString(args.algo, keyringAlgos) if err != nil { return err } addr, secret, err := testutil.GenerateSaveCoinKey(faucetKb, "faucet", "", true, algo) if err != nil { return err } faucetInfo := map[string]string{ "secret": secret, "address": addr.String(), } cliPrint, err := json.MarshalIndent(faucetInfo, "", " ") if err != nil { return err } if err := writeFile(fmt.Sprintf("%v.json", "key_seed"), faucetDir, cliPrint); err != nil { return err } amount := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(args.faucetAmount)) genBalances = append(genBalances, banktypes.Balance{ Address: addr.String(), Coins: sdk.NewCoins(amount), }) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) } if err := initGenFiles(clientCtx, mbm, args.chainID, genAccounts, genBalances, genFiles, args.numValidators, args.noFees); err != nil { return err } err := collectGenFiles( clientCtx, nodeConfig, args.chainID, nodeIDs, valPubKeys, args.numValidators, args.outputDir, args.nodeDirPrefix, args.nodeDaemonHome, genBalIterator, valAddrCodec, ) if err != nil { return err } cmd.PrintErrf("Successfully initialized %d node directories\n", args.numValidators) return nil } // initGenFiles writes genesis files including auth and bank state for all validators. func initGenFiles( clientCtx client.Context, mbm module.BasicManager, chainID string, genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance, genFiles []string, numValidators int, noFees bool, ) error { appGenState := mbm.DefaultGenesis(clientCtx.Codec) // set the accounts in the genesis state var authGenState authtypes.GenesisState clientCtx.Codec.MustUnmarshalJSON(appGenState[authtypes.ModuleName], &authGenState) accounts, err := authtypes.PackAccounts(genAccounts) if err != nil { return err } authGenState.Accounts = accounts appGenState[authtypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&authGenState) // set the balances in the genesis state var bankGenState banktypes.GenesisState clientCtx.Codec.MustUnmarshalJSON(appGenState[banktypes.ModuleName], &bankGenState) bankGenState.Balances = banktypes.SanitizeGenesisBalances(genBalances) for _, bal := range bankGenState.Balances { bankGenState.Supply = bankGenState.Supply.Add(bal.Coins...) } appGenState[banktypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&bankGenState) hubGenesis := hubtypes.DefaultGenesis() hubGenesis.ChainConfig.AllowZeroFeeTxs = noFees appGenState[hubtypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(hubGenesis) appGenStateJSON, err := json.MarshalIndent(appGenState, "", " ") if err != nil { return err } // generate empty genesis files for each validator and save appGenesis := genutiltypes.NewAppGenesisWithVersion(chainID, appGenStateJSON) for i := 0; i < numValidators; i++ { if err := appGenesis.SaveAs(genFiles[i]); err != nil { return err } } return nil } // collectGenFiles collects gentxs and finalizes the genesis files with consistent app state and time. func collectGenFiles( clientCtx client.Context, nodeConfig *cmtconfig.Config, chainID string, nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, valAddrCodec runtime.ValidatorAddressCodec, ) error { var appState json.RawMessage genTime := cmttime.Now() for i := 0; i < numValidators; i++ { nodeDirName := fmt.Sprintf("%s%d", nodeDirPrefix, i) nodeDir := filepath.Join(outputDir, nodeDirName, nodeDaemonHome) gentxsDir := filepath.Join(outputDir, "gentxs") nodeConfig.Moniker = nodeDirName nodeConfig.SetRoot(nodeDir) appGenesis, err := genutiltypes.AppGenesisFromFile(nodeConfig.GenesisFile()) if err != nil { return err } nodeID, valPubKey := nodeIDs[i], valPubKeys[i] initCfg := genutiltypes.NewInitConfig(chainID, gentxsDir, nodeID, valPubKey) nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, appGenesis, genBalIterator, genutiltypes.DefaultMessageValidator, valAddrCodec) if err != nil { return err } if appState == nil { // set the canonical application state (they should not differ) appState = nodeAppState } genFile := nodeConfig.GenesisFile() // overwrite each validator's genesis file to have a canonical genesis time if err := genutil.ExportGenesisFileWithTime(genFile, chainID, nil, appState, genTime); err != nil { return err } } return nil } // getIP returns an IP address based on the index and starting IP, or external IP if none provided. func getIP(i int, startingIPAddr string) (ip string, err error) { if len(startingIPAddr) == 0 { ip, err = server.ExternalIP() if err != nil { return "", err } return ip, nil } return calculateIP(startingIPAddr, i) } // calculateIP computes the nth IP address offset from a base IPv4 address. func calculateIP(ip string, i int) (string, error) { ipv4 := net.ParseIP(ip).To4() if ipv4 == nil { return "", fmt.Errorf("%v: non ipv4 address", ip) } for j := 0; j < i; j++ { ipv4[3]++ } return ipv4.String(), nil } // writeFile writes a byte slice to a named file inside the given directory, creating the directory if needed. func writeFile(name, dir string, contents []byte) error { file := filepath.Join(dir, name) if err := os.MkdirAll(dir, nodeDirPerm); err != nil { return fmt.Errorf("could not create directory %q: %w", dir, err) } if err := os.WriteFile(file, contents, 0o600); err != nil { return err } return nil } ================================================ FILE: cmd/sourcehubd/main.go ================================================ package main import ( "fmt" "os" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/sourcenetwork/sourcehub/app" "github.com/sourcenetwork/sourcehub/cmd/sourcehubd/cmd" ) func main() { rootCmd := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { fmt.Fprintln(rootCmd.OutOrStderr(), err) os.Exit(1) } } ================================================ FILE: cmd/test_env_generator/main.go ================================================ package main import ( "fmt" "log" "strconv" "strings" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/utils" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "test_env_generator {permutation}", Short: "test_env_generator permutates through SourceHub's test suite environment variables", Long: ` test_env_generator outputs the set of environment variables which should be set for each test permutation. With no input, prints the amount of permutations available. Permutation numbering is 0 based (eg if there are permutations the allowed options arguments are 0, 1, 2) `, Args: cobra.MaximumNArgs(1), Run: func(cmd *cobra.Command, args []string) { environs := genEnvirons() if len(args) == 0 { fmt.Printf("%v\n", len(environs)) return } if args[0] == "all" { for _, env := range environs { fmt.Println(env) } return } index, err := strconv.Atoi(args[0]) if err != nil { log.Fatalf("%v is an invalid index", args[0]) } if index < 0 || index > len(environs) { log.Fatalf("index must be within [0, %v]", len(environs)-1) } println(environs[index]) }, } func main() { rootCmd.Execute() } func writeKV(builder *strings.Builder, key, value string) { builder.WriteString("export ") builder.WriteString(key) builder.WriteRune('=') builder.WriteRune('"') builder.WriteString(value) builder.WriteRune('"') builder.WriteRune(' ') builder.WriteRune(';') } func genEnvirons() []string { combinations := len(test.ActorKeyMap) * len(test.ExecutorStrategyMap) * len(test.AuthenticationStrategyMap) environs := make([]string, 0, combinations) for actorKeyVar := range test.ActorKeyMap { for executorVar := range test.ExecutorStrategyMap { for authStratVar := range test.AuthenticationStrategyMap { // ED25519 key type is not valid for direct authentication // since ed25519 accounts cannot sign txs if actorKeyVar == "ED25519" && authStratVar == "DIRECT" { continue } builder := strings.Builder{} writeKV(&builder, test.SourceHubActorEnvVar, actorKeyVar) writeKV(&builder, test.SourceHubExecutorEnvVar, executorVar) writeKV(&builder, test.SourceHubAuthStratEnvVar, authStratVar) environ := builder.String() environs = append(environs, environ) } } } utils.SortSlice(environs) return environs } ================================================ FILE: cmd/tx_listener/main.go ================================================ package main import ( "context" "encoding/json" "fmt" "log" "os" "os/signal" "syscall" "github.com/sourcenetwork/sourcehub/sdk" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "tx-listener [comet-rpc-addr]", Short: "listens to proposed txs and unmarshal results into structured SourceHub msgs", Long: `tx-listener is a cli utility which connects to SourceHub's cometbft rpc connection and listens for Tx processing events. The received events are expanded and the Tx results are unmarshaled into the correct Msg response types. This is meant to be used a development tool to monitor the result of executed Txs by SourceHub. `, Args: cobra.MaximumNArgs(1), Run: func(cmd *cobra.Command, args []string) { addr := sdk.DefaultCometRPCAddr var opts []sdk.Opt if len(args) == 1 { addr = args[0] } opts = append(opts, sdk.WithCometRPCAddr(addr)) client, err := sdk.NewClient(opts...) if err != nil { log.Fatal(err) } listener := client.TxListener() ctx := context.Background() listener.ListenAsync(ctx, func(ev *sdk.Event, err error) { if err != nil { log.Printf("ERROR in Tx: %v", err) } else { bytes, err := json.MarshalIndent(ev, "", " ") if err != nil { log.Fatalf("failed to marshal result: %v", err) } log.Print(string(bytes)) } }) log.Printf("Listening to RPC at %v", addr) done := make(chan os.Signal, 1) signal.Notify(done, syscall.SIGINT, syscall.SIGTERM) fmt.Println("Blocking, press ctrl+c to continue...") <-done fmt.Println("Received interrupt: terminating listener") listener.Close() }, } func main() { rootCmd.Execute() } ================================================ FILE: codecov.yml ================================================ coverage: ignore: - "api/**" - "data/**" - "devnet/**" - "docs/**" - "example/**" - "manual/**" - "proto/**" - "scripts/**" - "testutil/**" - "**/*.pb.go" - "**/*.pb.gw.go" - "**/*.pulsar.go" - "**/*_test.go" ================================================ FILE: config.yml ================================================ version: 1 validation: sovereign accounts: - name: alice mnemonic: 'near smoke great nasty alley food crush nurse rubber say danger search employ under gaze today alien eager risk letter drum relief sponsor current' # address: source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9 coins: - 100000000000000uopen # 100m open - name: bob mnemonic: 'kingdom race grab ask size settle gesture vendor certain purpose clump gauge firm kiwi muffin term hello addict laugh tornado copper all sheriff reflect' # address: source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et coins: - 100000000000000uopen # 100m open - name: charlie mnemonic: 'vast brand cannon priority equip comfort mixed connect belt holiday either bleak employ sauce wrong memory cover appear symptom assume faint fire bargain guide' # address: source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4 coins: - 100000000000000uopen # 100m open - name: frank mnemonic: 'trophy space shove poverty armor trap foil siege poem keen cancel device garage item desert mention school multiply viable practice silent push flip blame' # address: source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy coins: - 100000000000000uopen # 100m open - name: victor mnemonic: 'divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight' # address: source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme coins: - 200000000000000uopen # 200m open faucet: name: frank coins: - 100000000000000uopen # 100m open validators: - name: victor # address: sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm bonded: 100000000000000uopen # 100m open build: main: cmd/sourcehubd ================================================ FILE: devnet/Makefile ================================================ .PHONY: localnet localnet: docker-compose up .PHONY: clean clean: docker-compose down --volumes ================================================ FILE: devnet/README.md ================================================ # Devnet This directory defines a docker-compose file alongside a set of scripts to generate a 3 node devnet. For each full run, the nodes are initialized, the validator accounts are created, the genesis transaction is built and the chain is started. This setup makes use of docker volumes to persist the chain state between runs. To fully wipe a chain use `make clean` or `docker-compose down --volumes`. To spin up a localnet run `make localnet` or `docker-compose up` in this directory. ================================================ FILE: devnet/configs/app.toml ================================================ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml ############################################################################### ### Base Configuration ### ############################################################################### # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination # specified in this config (e.g. 0.25token1;0.0001token2). minimum-gas-prices = "0stake" # default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) # everything: 2 latest states will be kept; pruning at 10 block intervals. # custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' pruning = "default" # These are applied if and only if the pruning strategy is custom. pruning-keep-recent = "0" pruning-interval = "0" # HaltHeight contains a non-zero block height at which a node will gracefully # halt and shutdown that can be used to assist upgrades and testing. # # Note: Commitment of state will be attempted on the corresponding block. halt-height = 0 # HaltTime contains a non-zero minimum block time (in Unix seconds) at which # a node will gracefully halt and shutdown that can be used to assist upgrades # and testing. # # Note: Commitment of state will be attempted on the corresponding block. halt-time = 0 # MinRetainBlocks defines the minimum block height offset from the current # block being committed, such that all blocks past this offset are pruned # from Tendermint. It is used as part of the process of determining the # ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates # that no blocks should be pruned. # # This configuration value is only responsible for pruning Tendermint blocks. # It has no bearing on application state pruning which is determined by the # "pruning-*" configurations. # # Note: Tendermint block pruning is dependant on this parameter in conunction # with the unbonding (safety threshold) period, state pruning and state sync # snapshot parameters to determine the correct minimum value of # ResponseCommit.RetainHeight. min-retain-blocks = 0 # InterBlockCache enables inter-block caching. inter-block-cache = true # IndexEvents defines the set of events in the form {eventType}.{attributeKey}, # which informs Tendermint what to index. If empty, all events will be indexed. # # Example: # ["message.sender", "message.recipient"] index-events = [] # IavlCacheSize set the size of the iavl tree cache (in number of nodes). iavl-cache-size = 781250 # IAVLDisableFastNode enables or disables the fast node feature of IAVL. # Default is false. iavl-disable-fastnode = false # IAVLLazyLoading enable/disable the lazy loading of iavl store. # Default is false. iavl-lazy-loading = false # AppDBBackend defines the database backend type to use for the application and snapshots DBs. # An empty string indicates that a fallback will be used. # First fallback is the deprecated compile-time types.DBBackend value. # Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in Tendermint's config.toml. app-db-backend = "" ############################################################################### ### Telemetry Configuration ### ############################################################################### [telemetry] # Prefixed with keys to separate services. service-name = "sourcehub" # Enabled enables the application telemetry functionality. When enabled, # an in-memory sink is also enabled by default. Operators may also enabled # other sinks such as Prometheus. enabled = true # Enable prefixing gauge values with hostname. enable-hostname = false # Enable adding hostname to labels. enable-hostname-label = true # Enable adding service to labels. enable-service-label = true # PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. prometheus-retention-time = 300 # GlobalLabels defines a global set of name/value label tuples applied to all # metrics emitted using the wrapper functions defined in telemetry package. # # Example: # [["chain_id", "cosmoshub-1"]] global-labels = [ ] ############################################################################### ### API Configuration ### ############################################################################### [api] # Enable defines if the API server should be enabled. enable = true # Swagger defines if swagger documentation should automatically be registered. swagger = true # Address defines the API server to listen on. address = "tcp://0.0.0.0:1317" # MaxOpenConnections defines the number of maximum open connections. max-open-connections = 1000 # RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). rpc-read-timeout = 10 # RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). rpc-write-timeout = 0 # RPCMaxBodyBytes defines the Tendermint maximum request body (in bytes). rpc-max-body-bytes = 1000000 # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). enabled-unsafe-cors = false ############################################################################### ### Rosetta Configuration ### ############################################################################### [rosetta] # Enable defines if the Rosetta API server should be enabled. enable = false # Address defines the Rosetta API server to listen on. address = ":8080" # Network defines the name of the blockchain that will be returned by Rosetta. blockchain = "app" # Network defines the name of the network that will be returned by Rosetta. network = "network" # Retries defines the number of retries when connecting to the node before failing. retries = 3 # Offline defines if Rosetta server should run in offline mode. offline = false # EnableDefaultSuggestedFee defines if the server should suggest fee by default. # If 'construction/medata' is called without gas limit and gas price, # suggested fee based on gas-to-suggest and denom-to-suggest will be given. enable-fee-suggestion = false # GasToSuggest defines gas limit when calculating the fee gas-to-suggest = 200000 # DenomToSuggest defines the defult denom for fee suggestion. # Price must be in minimum-gas-prices. denom-to-suggest = "uatom" ############################################################################### ### gRPC Configuration ### ############################################################################### [grpc] # Enable defines if the gRPC server should be enabled. enable = true # Address defines the gRPC server address to bind to. address = "localhost:9090" # MaxRecvMsgSize defines the max message size in bytes the server can receive. # The default value is 10MB. max-recv-msg-size = "10485760" # MaxSendMsgSize defines the max message size in bytes the server can send. # The default value is math.MaxInt32. max-send-msg-size = "2147483647" ############################################################################### ### gRPC Web Configuration ### ############################################################################### [grpc-web] # GRPCWebEnable defines if the gRPC-web should be enabled. # NOTE: gRPC must also be enabled, otherwise, this configuration is a no-op. enable = true # Address defines the gRPC-web server address to bind to. address = "localhost:9091" # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). enable-unsafe-cors = false ############################################################################### ### State Sync Configuration ### ############################################################################### # State sync snapshots allow other nodes to rapidly join the network without replaying historical # blocks, instead downloading and applying a snapshot of the application state at a given height. [state-sync] # snapshot-interval specifies the block interval at which local state sync snapshots are # taken (0 to disable). snapshot-interval = 0 # snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). snapshot-keep-recent = 2 ############################################################################### ### Store / State Streaming ### ############################################################################### [store] streamers = [] [streamers] [streamers.file] keys = ["*", ] write_dir = "" prefix = "" # output-metadata specifies if output the metadata file which includes the abci request/responses # during processing the block. output-metadata = "true" # stop-node-on-error specifies if propagate the file streamer errors to consensus state machine. stop-node-on-error = "true" # fsync specifies if call fsync after writing the files. fsync = "false" ############################################################################### ### Mempool ### ############################################################################### [mempool] # Setting max-txs to 0 will allow for a unbounded amount of transactions in the mempool. # Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool. # Setting max_txs to a positive number (> 0) will limit the number of transactions in the mempool, by the specified amount. # # Note, this configuration only applies to SDK built-in app-side mempool # implementations. max-txs = "5000" ================================================ FILE: devnet/configs/client.toml ================================================ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml ############################################################################### ### Client Configuration ### ############################################################################### # The network chain ID chain-id = "sourcehub-dev" # The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) keyring-backend = "test" # CLI output format (text|json) output = "text" # : to Tendermint RPC interface for this chain node = "tcp://localhost:26657" # Transaction broadcasting mode (sync|async) broadcast-mode = "sync" ================================================ FILE: devnet/configs/config.toml ================================================ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml # NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or # relative to the home directory (e.g. "data"). The home directory is # "$HOME/.cometbft" by default, but could be changed via $CMTHOME env variable # or --home cmd flag. ####################################################################### ### Main Base Config Options ### ####################################################################### # TCP or UNIX socket address of the ABCI application, # or the name of an ABCI application compiled in with the CometBFT binary proxy_app = "tcp://127.0.0.1:26658" # A custom human readable name for this node moniker = "node" # If this node is many blocks behind the tip of the chain, BlockSync # allows them to catchup quickly by downloading blocks in parallel # and verifying their commits # # Deprecated: this key will be removed and BlockSync will be enabled # unconditionally in the next major release. block_sync = true # Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) # - pure go # - stable # * cleveldb (uses levigo wrapper) # - fast # - requires gcc # - use cleveldb build tag (go build -tags cleveldb) # * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) # - EXPERIMENTAL # - may be faster is some use-cases (random reads - indexer) # - use boltdb build tag (go build -tags boltdb) # * rocksdb (uses github.com/tecbot/gorocksdb) # - EXPERIMENTAL # - requires gcc # - use rocksdb build tag (go build -tags rocksdb) # * badgerdb (uses github.com/dgraph-io/badger) # - EXPERIMENTAL # - use badgerdb build tag (go build -tags badgerdb) db_backend = "goleveldb" # Database directory db_dir = "data" # Output level for logging, including package level options log_level = "info" # Output format: 'plain' (colored text) or 'json' log_format = "plain" ##### additional base config options ##### # Path to the JSON file containing the initial validator set and other meta data genesis_file = "config/genesis.json" # Path to the JSON file containing the private key to use as a validator in the consensus protocol priv_validator_key_file = "config/priv_validator_key.json" # Path to the JSON file containing the last sign state of a validator priv_validator_state_file = "data/priv_validator_state.json" # TCP or UNIX socket address for CometBFT to listen on for # connections from an external PrivValidator process priv_validator_laddr = "" # Path to the JSON file containing the private key to use for node authentication in the p2p protocol node_key_file = "config/node_key.json" # Mechanism to connect to the ABCI application: socket | grpc abci = "socket" # If true, query the ABCI app on connecting to a new peer # so the app can decide if we should keep the connection or not filter_peers = false ####################################################################### ### Advanced Configuration Options ### ####################################################################### ####################################################### ### RPC Server Configuration Options ### ####################################################### [rpc] # TCP or UNIX socket address for the RPC server to listen on laddr = "tcp://0.0.0.0:26657" # A list of origins a cross-domain request can be executed from # Default value '[]' disables cors support # Use '["*"]' to allow any origin cors_allowed_origins = [] # A list of methods the client is allowed to use with cross-domain requests cors_allowed_methods = ["HEAD", "GET", "POST", ] # A list of non simple headers the client is allowed to use with cross-domain requests cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] # TCP or UNIX socket address for the gRPC server to listen on # NOTE: This server only supports /broadcast_tx_commit grpc_laddr = "" # Maximum number of simultaneous connections. # Does not include RPC (HTTP&WebSocket) connections. See max_open_connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 grpc_max_open_connections = 900 # Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool unsafe = true # Maximum number of simultaneous connections (including WebSocket). # Does not include gRPC connections. See grpc_max_open_connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 max_open_connections = 900 # Maximum number of unique clientIDs that can /subscribe # If you're using /broadcast_tx_commit, set to the estimated maximum number # of broadcast_tx_commit calls per block. max_subscription_clients = 100 # Maximum number of unique queries a given client can /subscribe to # If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to # the estimated # maximum number of broadcast_tx_commit calls per block. max_subscriptions_per_client = 5 # Experimental parameter to specify the maximum number of events a node will # buffer, per subscription, before returning an error and closing the # subscription. Must be set to at least 100, but higher values will accommodate # higher event throughput rates (and will use more memory). experimental_subscription_buffer_size = 200 # Experimental parameter to specify the maximum number of RPC responses that # can be buffered per WebSocket client. If clients cannot read from the # WebSocket endpoint fast enough, they will be disconnected, so increasing this # parameter may reduce the chances of them being disconnected (but will cause # the node to use more memory). # # Must be at least the same as "experimental_subscription_buffer_size", # otherwise connections could be dropped unnecessarily. This value should # ideally be somewhat higher than "experimental_subscription_buffer_size" to # accommodate non-subscription-related RPC responses. experimental_websocket_write_buffer_size = 200 # If a WebSocket client cannot read fast enough, at present we may # silently drop events instead of generating an error or disconnecting the # client. # # Enabling this experimental parameter will cause the WebSocket connection to # be closed instead if it cannot read fast enough, allowing for greater # predictability in subscription behavior. experimental_close_on_slow_client = false # How long to wait for a tx to be committed during /broadcast_tx_commit. # WARNING: Using a value larger than 10s will result in increasing the # global HTTP write timeout, which applies to all connections and endpoints. # See https://github.com/tendermint/tendermint/issues/3435 timeout_broadcast_tx_commit = "10s" # Maximum size of request body, in bytes max_body_bytes = 1000000 # Maximum size of request header, in bytes max_header_bytes = 1048576 # The path to a file containing certificate that is used to create the HTTPS server. # Might be either absolute path or path related to CometBFT's config directory. # If the certificate is signed by a certificate authority, # the certFile should be the concatenation of the server's certificate, any intermediates, # and the CA's certificate. # NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server. # Otherwise, HTTP server is run. tls_cert_file = "" # The path to a file containing matching private key that is used to create the HTTPS server. # Might be either absolute path or path related to CometBFT's config directory. # NOTE: both tls-cert-file and tls-key-file must be present for CometBFT to create HTTPS server. # Otherwise, HTTP server is run. tls_key_file = "" # pprof listen address (https://golang.org/pkg/net/http/pprof) pprof_laddr = "localhost:6060" ####################################################### ### P2P Configuration Options ### ####################################################### [p2p] # Address to listen for incoming connections laddr = "tcp://0.0.0.0:26656" # Address to advertise to peers for them to dial # If empty, will use the same port as the laddr, # and will introspect on the listener or use UPnP # to figure out the address. ip and port are required # example: 159.89.10.97:26656 external_address = "" # Comma separated list of seed nodes to connect to seeds = "" # Comma separated list of nodes to keep persistent connections to persistent_peers = "" # UPNP port forwarding upnp = false # Path to address book addr_book_file = "config/addrbook.json" # Set true for strict address routability rules # Set false for private or local networks addr_book_strict = true # Maximum number of inbound peers max_num_inbound_peers = 40 # Maximum number of outbound peers to connect to, excluding persistent peers max_num_outbound_peers = 10 # List of node IDs, to which a connection will be (re)established ignoring any existing limits unconditional_peer_ids = "" # Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) persistent_peers_max_dial_period = "0s" # Time to wait before flushing messages out on the connection flush_throttle_timeout = "100ms" # Maximum size of a message packet payload, in bytes max_packet_msg_payload_size = 1024 # Rate at which packets can be sent, in bytes/second send_rate = 5120000 # Rate at which packets can be received, in bytes/second recv_rate = 5120000 # Set true to enable the peer-exchange reactor pex = true # Seed mode, in which node constantly crawls the network and looks for # peers. If another node asks it for addresses, it responds and disconnects. # # Does not work if the peer-exchange reactor is disabled. seed_mode = false # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) private_peer_ids = "" # Toggle to disable guard against peers connecting from the same ip. allow_duplicate_ip = false # Peer connection configuration. handshake_timeout = "20s" dial_timeout = "3s" ####################################################### ### Mempool Configuration Option ### ####################################################### [mempool] # Mempool version to use: # 1) "v0" - (default) FIFO mempool. # 2) "v1" - prioritized mempool (deprecated; will be removed in the next release). version = "v0" recheck = true broadcast = true wal_dir = "" # Maximum number of transactions in the mempool size = 5000 # Limit the total size of all txs in the mempool. # This only accounts for raw transactions (e.g. given 1MB transactions and # max_txs_bytes=5MB, mempool will only accept 5 transactions). max_txs_bytes = 1073741824 # Size of the cache (used to filter transactions we saw earlier) in transactions cache_size = 10000 # Do not remove invalid transactions from the cache (default: false) # Set to true if it's not possible for any invalid transaction to become valid # again in the future. keep-invalid-txs-in-cache = false # Maximum size of a single transaction. # NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. max_tx_bytes = 1048576 # Maximum size of a batch of transactions to send to a peer # Including space needed by encoding (one varint per transaction). # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 max_batch_bytes = 0 # ttl-duration, if non-zero, defines the maximum amount of time a transaction # can exist for in the mempool. # # Note, if ttl-num-blocks is also defined, a transaction will be removed if it # has existed in the mempool at least ttl-num-blocks number of blocks or if it's # insertion time into the mempool is beyond ttl-duration. ttl-duration = "0s" # ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction # can exist for in the mempool. # # Note, if ttl-duration is also defined, a transaction will be removed if it # has existed in the mempool at least ttl-num-blocks number of blocks or if # it's insertion time into the mempool is beyond ttl-duration. ttl-num-blocks = 0 ####################################################### ### State Sync Configuration Options ### ####################################################### [statesync] # State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine # snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in # the network to take and serve state machine snapshots. State sync is not attempted if the node # has any local state (LastBlockHeight > 0). The node will have a truncated block history, # starting from the height of the snapshot. enable = false # RPC servers (comma-separated) for light client verification of the synced state machine and # retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding # header hash obtained from a trusted source, and a period during which validators can be trusted. # # For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 # weeks) during which they can be financially punished (slashed) for misbehavior. rpc_servers = "" trust_height = 0 trust_hash = "" trust_period = "168h0m0s" # Time to spend discovering snapshots before initiating a restore. discovery_time = "15s" # Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). # Will create a new, randomly named directory within, and remove it when done. temp_dir = "" # The timeout duration before re-requesting a chunk, possibly from a different # peer (default: 1 minute). chunk_request_timeout = "10s" # The number of concurrent chunk fetchers to run (default: 1). chunk_fetchers = "4" ####################################################### ### Block Sync Configuration Options ### ####################################################### [blocksync] # Block Sync version to use: # # In v0.37, v1 and v2 of the block sync protocols were deprecated. # Please use v0 instead. # # 1) "v0" - the default block sync implementation version = "v0" ####################################################### ### Consensus Configuration Options ### ####################################################### [consensus] wal_file = "data/cs.wal/wal" # How long we wait for a proposal block before prevoting nil timeout_propose = "3s" # How much timeout_propose increases with each round timeout_propose_delta = "500ms" # How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) timeout_prevote = "1s" # How much the timeout_prevote increases with each round timeout_prevote_delta = "500ms" # How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) timeout_precommit = "1s" # How much the timeout_precommit increases with each round timeout_precommit_delta = "500ms" # How long we wait after committing a block, before starting on the new # height (this gives us a chance to receive some more precommits, even # though we already have +2/3). timeout_commit = "1s" # How many blocks to look back to check existence of the node's consensus votes before joining consensus # When non-zero, the node will panic upon restart # if the same consensus key was used to sign {double_sign_check_height} last blocks. # So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. double_sign_check_height = 0 # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) skip_timeout_commit = false # EmptyBlocks mode and possible interval between empty blocks create_empty_blocks = true create_empty_blocks_interval = "0s" # Reactor sleep duration parameters peer_gossip_sleep_duration = "100ms" peer_query_maj23_sleep_duration = "2s" ####################################################### ### Storage Configuration Options ### ####################################################### [storage] # Set to true to discard ABCI responses from the state store, which can save a # considerable amount of disk space. Set to false to ensure ABCI responses are # persisted. ABCI responses are required for /block_results RPC queries, and to # reindex events in the command-line tool. discard_abci_responses = false ####################################################### ### Transaction Indexer Configuration Options ### ####################################################### [tx_index] # What indexer to use for transactions # # The application will set which txs to index. In some cases a node operator will be able # to decide which txs to index based on configuration set in the application. # # Options: # 1) "null" # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. # 3) "psql" - the indexer services backed by PostgreSQL. # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. indexer = "kv" # The PostgreSQL connection configuration, the connection format: # postgresql://:@:/? psql-conn = "" ####################################################### ### Instrumentation Configuration Options ### ####################################################### [instrumentation] # When true, Prometheus metrics are served under /metrics on # PrometheusListenAddr. # Check out the documentation for the list of available metrics. prometheus = true # Address to listen for Prometheus collector(s) connections prometheus_listen_addr = ":26660" # Maximum number of simultaneous connections. # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. max_open_connections = 3 # Instrumentation namespace namespace = "cometbft" ================================================ FILE: devnet/dial-peers.sh ================================================ #!/usr/bin/bash # dial-peers.sh informs node1 of the addresses of its peers. # This script performs a tendermint / cometbft rpc call to the remaining validators and queries their Id. # The ID is used to construct the peer address of the persistent peers in node1. # # Note: this script makes use of an 'unsafe' Tendermint RPC call, which is disabled by default. # To enable unsafe calls, the setting "unsafe" under p2p should be set to true in configs/config.toml set -e sleep 2 NODE2_ID="$(curl 'http://node2:26657/status' 2>/dev/null | jq --raw-output '.result.node_info.id')" echo "Node 2: $NODE2_ID" NODE3_ID="$(curl 'http://node3:26657/status' 2>/dev/null | jq --raw-output '.result.node_info.id')" echo "Node 3: $NODE3_ID" PEERS='\["'$NODE2_ID'@node2:26656","'$NODE3_ID'@node3:26656''"\]' echo "Peers: $PEERS" curl -i "http://node1:26657/dial_peers?persistent=true&peers=$PEERS" 2>/dev/null ================================================ FILE: devnet/docker-compose.yaml ================================================ version: '3.9' services: node1: &node build: &build context: ../. target: builder volumes: - node1:/root/sourcehub depends_on: gentx-builder: condition: service_completed_successfully entrypoint: /app/build/sourcehubd command: - start - --home - /root/sourcehub node2: <<: *node volumes: - node2:/root/sourcehub node3: <<: *node volumes: - node3:/root/sourcehub ports: - 26657:26657 # tendermint rpc - 1317:1317 # cosmos swagger setup-node1: &setup build: *build entrypoint: /app/devnet/setup-node.sh volumes: - node1:/root/sourcehub setup-node2: <<: *setup volumes: - node2:/root/sourcehub setup-node3: <<: *setup volumes: - node3:/root/sourcehub gentx-builder: build: *build entrypoint: /app/devnet/make-update-gentx.sh volumes: - node1:/root/sourcehub - node2:/root/node2 - node3:/root/node3 depends_on: setup-node1: condition: service_completed_successfully setup-node2: condition: service_completed_successfully setup-node3: condition: service_completed_successfully dial_peers: build: *build entrypoint: /app/devnet/dial-peers.sh depends_on: - node1 - node2 - node3 volumes: node1: node2: node3: ================================================ FILE: devnet/make-update-gentx.sh ================================================ #! /usr/bin/sh # make-update-gentx.sh uses node1 as a starting point and adds # genesis txs generated by nodes 2 and 3 to its data directory. # It then collects all these txs and generates the final genesis.json file # # The resulting genesis.json is then copied back into nodes 2 and 3. set -e AMOUNT="100000000000sourcebucks" PATH="/app/build:$PATH" STATE_DIR="/root/sourcehub" if [ -e $STATE_DIR/GENESIS_BUILT ]; then echo "Genesis Tx already collected" return 0; fi echo 'Fetching Validators addresses' VALIDATOR2_ADDR="$(cat /root/node2/validator-addr)" VALIDATOR3_ADDR="$(cat /root/node3/validator-addr)" echo "Validator 2: $VALIDATOR2_ADDR" echo "Validator 3: $VALIDATOR3_ADDR" echo 'Adding Validator Accounts' sourcehubd genesis add-genesis-account $VALIDATOR2_ADDR $AMOUNT --home $STATE_DIR sourcehubd genesis add-genesis-account $VALIDATOR3_ADDR $AMOUNT --home $STATE_DIR cp /root/node2/config/gentx/* /root/sourcehub/config/gentx/ cp /root/node3/config/gentx/* /root/sourcehub/config/gentx/ sourcehubd genesis collect-gentxs --home $STATE_DIR touch /root/sourcehub/GENESIS_BUILT # Mission critical step: make the sourcebucks sed -i 's/stake/sourcebucks/g' /root/sourcehub/config/genesis.json cp /root/sourcehub/config/genesis.json /root/node2/config/ cp /root/sourcehub/config/genesis.json /root/node3/config/ echo 'GenesisTx generated' ================================================ FILE: devnet/setup-node.sh ================================================ #!/usr/bin/sh # setup-node.sh initializes a sourcehub node, # creates a validator account on the test keyring # and self delegates some amount of sourcebucks. # # The signed tx is copied by make-update-gentx. set -e PATH="/app/build/:$PATH" CHAIN_ID="sourcehub-localnet" NODE_NAME="$(cat /etc/hostname)" CHAIN_STATE="$HOME/sourcehub" VALIDATOR_NAME="validator" AMOUNT="100000000000sourcebucks" CONFIGS_DIR="/app/devnet/configs" if [ -d $CHAIN_STATE/config ]; then echo "Chain has been previously initialize; exiting" return 0 fi sourcehubd init $NODE_NAME --chain-id $CHAIN_ID --home $CHAIN_STATE cp $CONFIGS_DIR/*.toml $CHAIN_STATE/config/ sourcehubd keys add $VALIDATOR_NAME --home $CHAIN_STATE --keyring-backend test VALIDATOR_ADDR=$(sourcehubd keys show $VALIDATOR_NAME --address --home $CHAIN_STATE --keyring-backend test) echo "Validator: $VALIDATOR_ADDR" echo -n $VALIDATOR_ADDR > $CHAIN_STATE/validator-addr sourcehubd genesis add-genesis-account $VALIDATOR_ADDR $AMOUNT --home $CHAIN_STATE sourcehubd genesis gentx $VALIDATOR_NAME $AMOUNT --chain-id $CHAIN_ID --home $CHAIN_STATE --keyring-backend test ================================================ FILE: docker/README.md ================================================ # SourceHub Dockerfile Dockerfile designed to make getting started with SourceHub easily. Dockerfile can be used to join a pre-existing network or used for a standalone test envrionment. To configure initialization set `MONIKER` for the node moniker and `CHAIN_ID` for the chain id. Validator, comet p2p and comet validator keys can be recovered and loaded for previously created keys, otherwise new keys will be generated. ## Usage modes ### Validator Recovery mode Validator recovery mode configures the sourcehub node to recover a validator credentials Set env var `MNEMONIC_PATH` to recover the sourcehub validator key. Set env var `CONSENSUS_KEY_PATH` to recover the CometBFT consensus key (ie. `priv_validator_key.json`). Set env var `COMET_NODE_KEY_PATH` to recover the CometBFT p2p key (ie. `node_key.json`) Set `GENESIS_PATH` to initialize the genesis file. ### RPC Mode RPC Mode joins an existing network as an RPC Node with a new set of keys. Set `GENESIS_PATH` to specify the network genesis. Ensure `CHAIN_ID` matches the chain id in the genesis file. ### RPC with account recovery To spin up an RPC node with a previously generated account key, follow the steps in RPC Mode and additionally set `MNEMONIC_PATH`. ## Standalone mode Standalone mode is ideal for local experimentation and test environments. During container startup, it generates a new network and genesis. Set `STANDALONE=1` at time of container creation to force standalone mode, all recovery variables are ignored in standalone mode. ## Environment Variable Reference - `MONIKER` sets the node moniker - `CHAIN_ID` sets the id for the chain which will be initialized - `GENESIS_PATH` is an optional variable which if set must point to a genesis file mounted in the container. The file is copied to the configuration directory during the first container initialization If empty, the entrypoint will generate a new genesis - `MNEMONIC_PATH` is an optional varible which, if set, must point to a file containing a cosmos key mnemonic. The mnemonic will be used to restore the node operator / validator key. If empty, the entrypoint will generate a new key - `CONSENSUS_KEY_PATH` is an optional variable which, if set, must point to a file containg a comebft consesus key for the validator. If empty, the entrypoint will generate a new key - `COMET_NODE_KEY_PATH` is an optional variable which, if set, must point to a file containg a comebft p2p node key. If empty, the entrypoint will generate a new key - `COMET_CONFIG_PATH` is an optional variable which, if set, will overwrite the default cofig.toml with the provided file. - `APP_CONFIG_PATH` is an optional variable which, if set, will overwrite the default app.toml with the provided file. - `STANDALONE` if set to `1` will initialize a new SourceHub network / genesis for local usage. The network will with no fees, a single validator and a funded faucet account. ================================================ FILE: docker/configs/app.toml ================================================ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml ############################################################################### ### Base Configuration ### ############################################################################### # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination # specified in this config (e.g. 0.25token1,0.0001token2). minimum-gas-prices = "0.001uopen,0.001ucredit" # The maximum gas a query coming over rest/grpc may consume. # If this is set to zero, the query can consume an unbounded amount of gas. query-gas-limit = "0" # default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) # everything: 2 latest states will be kept; pruning at 10 block intervals. # custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' pruning = "default" # These are applied if and only if the pruning strategy is custom. pruning-keep-recent = "0" pruning-interval = "0" # HaltHeight contains a non-zero block height at which a node will gracefully # halt and shutdown that can be used to assist upgrades and testing. # # Note: Commitment of state will be attempted on the corresponding block. halt-height = 0 # HaltTime contains a non-zero minimum block time (in Unix seconds) at which # a node will gracefully halt and shutdown that can be used to assist upgrades # and testing. # # Note: Commitment of state will be attempted on the corresponding block. halt-time = 0 # MinRetainBlocks defines the minimum block height offset from the current # block being committed, such that all blocks past this offset are pruned # from CometBFT. It is used as part of the process of determining the # ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates # that no blocks should be pruned. # # This configuration value is only responsible for pruning CometBFT blocks. # It has no bearing on application state pruning which is determined by the # "pruning-*" configurations. # # Note: CometBFT block pruning is dependant on this parameter in conjunction # with the unbonding (safety threshold) period, state pruning and state sync # snapshot parameters to determine the correct minimum value of # ResponseCommit.RetainHeight. min-retain-blocks = 0 # InterBlockCache enables inter-block caching. inter-block-cache = true # IndexEvents defines the set of events in the form {eventType}.{attributeKey}, # which informs CometBFT what to index. If empty, all events will be indexed. # # Example: # ["message.sender", "message.recipient"] index-events = [] # IavlCacheSize set the size of the iavl tree cache (in number of nodes). iavl-cache-size = 781250 # IAVLDisableFastNode enables or disables the fast node feature of IAVL. # Default is false. iavl-disable-fastnode = false # AppDBBackend defines the database backend type to use for the application and snapshots DBs. # An empty string indicates that a fallback will be used. # The fallback is the db_backend value set in CometBFT's config.toml. app-db-backend = "" ############################################################################### ### Telemetry Configuration ### ############################################################################### [telemetry] # Prefixed with keys to separate services. service-name = "" # Enabled enables the application telemetry functionality. When enabled, # an in-memory sink is also enabled by default. Operators may also enabled # other sinks such as Prometheus. enabled = false # Enable prefixing gauge values with hostname. enable-hostname = false # Enable adding hostname to labels. enable-hostname-label = false # Enable adding service to labels. enable-service-label = false # PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. prometheus-retention-time = 60 # GlobalLabels defines a global set of name/value label tuples applied to all # metrics emitted using the wrapper functions defined in telemetry package. # # Example: # [["chain_id", "cosmoshub-1"]] global-labels = [ ] # MetricsSink defines the type of metrics sink to use. metrics-sink = "" # StatsdAddr defines the address of a statsd server to send metrics to. # Only utilized if MetricsSink is set to "statsd" or "dogstatsd". statsd-addr = "" # DatadogHostname defines the hostname to use when emitting metrics to # Datadog. Only utilized if MetricsSink is set to "dogstatsd". datadog-hostname = "" ############################################################################### ### API Configuration ### ############################################################################### [api] # Enable defines if the API server should be enabled. enable = true # Swagger defines if swagger documentation should automatically be registered. swagger = true # Address defines the API server to listen on. address = "tcp://0.0.0.0:1317" # MaxOpenConnections defines the number of maximum open connections. max-open-connections = 1000 # RPCReadTimeout defines the CometBFT RPC read timeout (in seconds). rpc-read-timeout = 10 # RPCWriteTimeout defines the CometBFT RPC write timeout (in seconds). rpc-write-timeout = 0 # RPCMaxBodyBytes defines the CometBFT maximum request body (in bytes). rpc-max-body-bytes = 1000000 # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). enabled-unsafe-cors = true ############################################################################### ### gRPC Configuration ### ############################################################################### [grpc] # Enable defines if the gRPC server should be enabled. enable = true # Address defines the gRPC server address to bind to. address = "0.0.0.0:9090" # MaxRecvMsgSize defines the max message size in bytes the server can receive. # The default value is 10MB. max-recv-msg-size = "10485760" # MaxSendMsgSize defines the max message size in bytes the server can send. # The default value is math.MaxInt32. max-send-msg-size = "2147483647" ############################################################################### ### gRPC Web Configuration ### ############################################################################### [grpc-web] # GRPCWebEnable defines if the gRPC-web should be enabled. # NOTE: gRPC must also be enabled, otherwise, this configuration is a no-op. # NOTE: gRPC-Web uses the same address as the API server. enable = true ############################################################################### ### State Sync Configuration ### ############################################################################### # State sync snapshots allow other nodes to rapidly join the network without replaying historical # blocks, instead downloading and applying a snapshot of the application state at a given height. [state-sync] # snapshot-interval specifies the block interval at which local state sync snapshots are # taken (0 to disable). snapshot-interval = 0 # snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). snapshot-keep-recent = 2 ############################################################################### ### State Streaming ### ############################################################################### # Streaming allows nodes to stream state to external systems. [streaming] # streaming.abci specifies the configuration for the ABCI Listener streaming service. [streaming.abci] # List of kv store keys to stream out via gRPC. # The store key names MUST match the module's StoreKey name. # # Example: # ["acc", "bank", "gov", "staking", "mint"[,...]] # ["*"] to expose all keys. keys = [] # The plugin name used for streaming via gRPC. # Streaming is only enabled if this is set. # Supported plugins: abci plugin = "" # stop-node-on-err specifies whether to stop the node on message delivery error. stop-node-on-err = true ############################################################################### ### Mempool ### ############################################################################### [mempool] # Setting max-txs to 0 will allow for a unbounded amount of transactions in the mempool. # Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool (no-op mempool). # Setting max_txs to a positive number (> 0) will limit the number of transactions in the mempool, by the specified amount. # # Note, this configuration only applies to SDK built-in app-side mempool # implementations. max-txs = -1 ############################################################################### ### Faucet Configuration ### ############################################################################### [faucet] # Defines if the faucet service should be enabled. enable_faucet = true ================================================ FILE: docker/configs/client.toml ================================================ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml ############################################################################### ### Client Configuration ### ############################################################################### # The network chain ID chain-id = "" # The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) keyring-backend = "os" # CLI output format (text|json) output = "text" # : to CometBFT RPC interface for this chain node = "tcp://localhost:26657" # Transaction broadcasting mode (sync|async) broadcast-mode = "sync" ================================================ FILE: docker/configs/config.toml ================================================ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml # NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or # relative to the home directory (e.g. "data"). The home directory is # "$HOME/.cometbft" by default, but could be changed via $CMTHOME env variable # or --home cmd flag. # The version of the CometBFT binary that created or # last modified the config file. Do not modify this. version = "0.38.19" ####################################################################### ### Main Base Config Options ### ####################################################################### # TCP or UNIX socket address of the ABCI application, # or the name of an ABCI application compiled in with the CometBFT binary proxy_app = "tcp://127.0.0.1:26658" # A custom human readable name for this node moniker = "node" # Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) # - pure go # - stable # * cleveldb (uses levigo wrapper) # - fast # - requires gcc # - use cleveldb build tag (go build -tags cleveldb) # * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) # - EXPERIMENTAL # - may be faster is some use-cases (random reads - indexer) # - use boltdb build tag (go build -tags boltdb) # * rocksdb (uses github.com/tecbot/gorocksdb) # - EXPERIMENTAL # - requires gcc # - use rocksdb build tag (go build -tags rocksdb) # * badgerdb (uses github.com/dgraph-io/badger) # - EXPERIMENTAL # - use badgerdb build tag (go build -tags badgerdb) db_backend = "goleveldb" # Database directory db_dir = "data" # Output level for logging, including package level options log_level = "info" # Output format: 'plain' (colored text) or 'json' log_format = "plain" ##### additional base config options ##### # Path to the JSON file containing the initial validator set and other meta data genesis_file = "config/genesis.json" # Path to the JSON file containing the private key to use as a validator in the consensus protocol priv_validator_key_file = "config/priv_validator_key.json" # Path to the JSON file containing the last sign state of a validator priv_validator_state_file = "data/priv_validator_state.json" # TCP or UNIX socket address for CometBFT to listen on for # connections from an external PrivValidator process priv_validator_laddr = "" # Path to the JSON file containing the private key to use for node authentication in the p2p protocol node_key_file = "config/node_key.json" # Mechanism to connect to the ABCI application: socket | grpc abci = "socket" # If true, query the ABCI app on connecting to a new peer # so the app can decide if we should keep the connection or not filter_peers = false ####################################################################### ### Advanced Configuration Options ### ####################################################################### ####################################################### ### RPC Server Configuration Options ### ####################################################### [rpc] # TCP or UNIX socket address for the RPC server to listen on laddr = "tcp://0.0.0.0:26657" # A list of origins a cross-domain request can be executed from # Default value '[]' disables cors support # Use '["*"]' to allow any origin cors_allowed_origins = ["*"] # A list of methods the client is allowed to use with cross-domain requests cors_allowed_methods = ["HEAD", "GET", "POST", ] # A list of non simple headers the client is allowed to use with cross-domain requests cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] # TCP or UNIX socket address for the gRPC server to listen on # NOTE: This server only supports /broadcast_tx_commit grpc_laddr = "" # Maximum number of simultaneous connections. # Does not include RPC (HTTP&WebSocket) connections. See max_open_connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 grpc_max_open_connections = 900 # Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool unsafe = false # Maximum number of simultaneous connections (including WebSocket). # Does not include gRPC connections. See grpc_max_open_connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 max_open_connections = 900 # Maximum number of unique clientIDs that can /subscribe # If you're using /broadcast_tx_commit, set to the estimated maximum number # of broadcast_tx_commit calls per block. max_subscription_clients = 100 # Maximum number of unique queries a given client can /subscribe to # If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to # the estimated # maximum number of broadcast_tx_commit calls per block. max_subscriptions_per_client = 5 # Experimental parameter to specify the maximum number of events a node will # buffer, per subscription, before returning an error and closing the # subscription. Must be set to at least 100, but higher values will accommodate # higher event throughput rates (and will use more memory). experimental_subscription_buffer_size = 200 # Experimental parameter to specify the maximum number of RPC responses that # can be buffered per WebSocket client. If clients cannot read from the # WebSocket endpoint fast enough, they will be disconnected, so increasing this # parameter may reduce the chances of them being disconnected (but will cause # the node to use more memory). # # Must be at least the same as "experimental_subscription_buffer_size", # otherwise connections could be dropped unnecessarily. This value should # ideally be somewhat higher than "experimental_subscription_buffer_size" to # accommodate non-subscription-related RPC responses. experimental_websocket_write_buffer_size = 200 # If a WebSocket client cannot read fast enough, at present we may # silently drop events instead of generating an error or disconnecting the # client. # # Enabling this experimental parameter will cause the WebSocket connection to # be closed instead if it cannot read fast enough, allowing for greater # predictability in subscription behavior. experimental_close_on_slow_client = false # How long to wait for a tx to be committed during /broadcast_tx_commit. # WARNING: Using a value larger than 10s will result in increasing the # global HTTP write timeout, which applies to all connections and endpoints. # See https://github.com/tendermint/tendermint/issues/3435 timeout_broadcast_tx_commit = "10s" # Maximum number of requests that can be sent in a batch # If the value is set to '0' (zero-value), then no maximum batch size will be # enforced for a JSON-RPC batch request. max_request_batch_size = 10 # Maximum size of request body, in bytes max_body_bytes = 1000000 # Maximum size of request header, in bytes max_header_bytes = 1048576 # The path to a file containing certificate that is used to create the HTTPS server. # Might be either absolute path or path related to CometBFT's config directory. # If the certificate is signed by a certificate authority, # the certFile should be the concatenation of the server's certificate, any intermediates, # and the CA's certificate. # NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server. # Otherwise, HTTP server is run. tls_cert_file = "" # The path to a file containing matching private key that is used to create the HTTPS server. # Might be either absolute path or path related to CometBFT's config directory. # NOTE: both tls-cert-file and tls-key-file must be present for CometBFT to create HTTPS server. # Otherwise, HTTP server is run. tls_key_file = "" # pprof listen address (https://golang.org/pkg/net/http/pprof) pprof_laddr = "localhost:6060" ####################################################### ### P2P Configuration Options ### ####################################################### [p2p] # Address to listen for incoming connections laddr = "tcp://0.0.0.0:26656" # Address to advertise to peers for them to dial. If empty, will use the same # port as the laddr, and will introspect on the listener to figure out the # address. IP and port are required. Example: 159.89.10.97:26656 external_address = "" # Comma separated list of seed nodes to connect to seeds = "" # Comma separated list of nodes to keep persistent connections to persistent_peers = "" # Path to address book addr_book_file = "config/addrbook.json" # Set true for strict address routability rules # Set false for private or local networks addr_book_strict = true # Maximum number of inbound peers max_num_inbound_peers = 40 # Maximum number of outbound peers to connect to, excluding persistent peers max_num_outbound_peers = 10 # List of node IDs, to which a connection will be (re)established ignoring any existing limits unconditional_peer_ids = "" # Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) persistent_peers_max_dial_period = "0s" # Time to wait before flushing messages out on the connection flush_throttle_timeout = "100ms" # Maximum size of a message packet payload, in bytes max_packet_msg_payload_size = 1024 # Rate at which packets can be sent, in bytes/second send_rate = 5120000 # Rate at which packets can be received, in bytes/second recv_rate = 5120000 # Set true to enable the peer-exchange reactor pex = true # Seed mode, in which node constantly crawls the network and looks for # peers. If another node asks it for addresses, it responds and disconnects. # # Does not work if the peer-exchange reactor is disabled. seed_mode = false # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) private_peer_ids = "" # Toggle to disable guard against peers connecting from the same ip. allow_duplicate_ip = false # Peer connection configuration. handshake_timeout = "20s" dial_timeout = "3s" ####################################################### ### Mempool Configuration Option ### ####################################################### [mempool] # The type of mempool for this node to use. # # Possible types: # - "flood" : concurrent linked list mempool with flooding gossip protocol # (default) # - "nop" : nop-mempool (short for no operation; the ABCI app is responsible # for storing, disseminating and proposing txs). "create_empty_blocks=false" is # not supported. type = "flood" # Recheck (default: true) defines whether CometBFT should recheck the # validity for all remaining transaction in the mempool after a block. # Since a block affects the application state, some transactions in the # mempool may become invalid. If this does not apply to your application, # you can disable rechecking. recheck = true # recheck_timeout is the time the application has during the rechecking process # to return CheckTx responses, once all requests have been sent. Responses that # arrive after the timeout expires are discarded. It only applies to # non-local ABCI clients and when recheck is enabled. # # The ideal value will strongly depend on the application. It could roughly be estimated as the # average size of the mempool multiplied by the average time it takes the application to validate one # transaction. We consider that the ABCI application runs in the same location as the CometBFT binary # so that the recheck duration is not affected by network delays when making requests and receiving responses. recheck_timeout = "1s" # Broadcast (default: true) defines whether the mempool should relay # transactions to other peers. Setting this to false will stop the mempool # from relaying transactions to other peers until they are included in a # block. In other words, if Broadcast is disabled, only the peer you send # the tx to will see it until it is included in a block. broadcast = true # WalPath (default: "") configures the location of the Write Ahead Log # (WAL) for the mempool. The WAL is disabled by default. To enable, set # WalPath to where you want the WAL to be written (e.g. # "data/mempool.wal"). wal_dir = "" # Maximum number of transactions in the mempool size = 5000 # Limit the total size of all txs in the mempool. # This only accounts for raw transactions (e.g. given 1MB transactions and # max_txs_bytes=5MB, mempool will only accept 5 transactions). max_txs_bytes = 1073741824 # Size of the cache (used to filter transactions we saw earlier) in transactions cache_size = 10000 # Do not remove invalid transactions from the cache (default: false) # Set to true if it's not possible for any invalid transaction to become valid # again in the future. keep-invalid-txs-in-cache = false # Maximum size of a single transaction. # NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. max_tx_bytes = 1048576 # Maximum size of a batch of transactions to send to a peer # Including space needed by encoding (one varint per transaction). # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 max_batch_bytes = 0 # Experimental parameters to limit gossiping txs to up to the specified number of peers. # We use two independent upper values for persistent and non-persistent peers. # Unconditional peers are not affected by this feature. # If we are connected to more than the specified number of persistent peers, only send txs to # ExperimentalMaxGossipConnectionsToPersistentPeers of them. If one of those # persistent peers disconnects, activate another persistent peer. # Similarly for non-persistent peers, with an upper limit of # ExperimentalMaxGossipConnectionsToNonPersistentPeers. # If set to 0, the feature is disabled for the corresponding group of peers, that is, the # number of active connections to that group of peers is not bounded. # For non-persistent peers, if enabled, a value of 10 is recommended based on experimental # performance results using the default P2P configuration. experimental_max_gossip_connections_to_persistent_peers = 0 experimental_max_gossip_connections_to_non_persistent_peers = 0 ####################################################### ### State Sync Configuration Options ### ####################################################### [statesync] # State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine # snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in # the network to take and serve state machine snapshots. State sync is not attempted if the node # has any local state (LastBlockHeight > 0). The node will have a truncated block history, # starting from the height of the snapshot. enable = false # RPC servers (comma-separated) for light client verification of the synced state machine and # retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding # header hash obtained from a trusted source, and a period during which validators can be trusted. # # For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 # weeks) during which they can be financially punished (slashed) for misbehavior. rpc_servers = "" trust_height = 0 trust_hash = "" trust_period = "168h0m0s" # Time to spend discovering snapshots before initiating a restore. discovery_time = "15s" # Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). # Will create a new, randomly named directory within, and remove it when done. temp_dir = "" # The timeout duration before re-requesting a chunk, possibly from a different # peer (default: 1 minute). chunk_request_timeout = "10s" # The number of concurrent chunk fetchers to run (default: 1). chunk_fetchers = "4" ####################################################### ### Block Sync Configuration Options ### ####################################################### [blocksync] # Block Sync version to use: # # In v0.37, v1 and v2 of the block sync protocols were deprecated. # Please use v0 instead. # # 1) "v0" - the default block sync implementation version = "v0" ####################################################### ### Consensus Configuration Options ### ####################################################### [consensus] wal_file = "data/cs.wal/wal" # How long we wait for a proposal block before prevoting nil timeout_propose = "500ms" # How much timeout_propose increases with each round timeout_propose_delta = "500ms" # How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) timeout_prevote = "500ms" # How much the timeout_prevote increases with each round timeout_prevote_delta = "500ms" # How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) timeout_precommit = "500ms" # How much the timeout_precommit increases with each round timeout_precommit_delta = "500ms" # How long we wait after committing a block, before starting on the new # height (this gives us a chance to receive some more precommits, even # though we already have +2/3). timeout_commit = "1s" # How many blocks to look back to check existence of the node's consensus votes before joining consensus # When non-zero, the node will panic upon restart # if the same consensus key was used to sign {double_sign_check_height} last blocks. # So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. double_sign_check_height = 0 # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) skip_timeout_commit = false # EmptyBlocks mode and possible interval between empty blocks create_empty_blocks = true create_empty_blocks_interval = "0s" # Reactor sleep duration parameters peer_gossip_sleep_duration = "100ms" peer_query_maj23_sleep_duration = "2s" ####################################################### ### Storage Configuration Options ### ####################################################### [storage] # Set to true to discard ABCI responses from the state store, which can save a # considerable amount of disk space. Set to false to ensure ABCI responses are # persisted. ABCI responses are required for /block_results RPC queries, and to # reindex events in the command-line tool. discard_abci_responses = false ####################################################### ### Transaction Indexer Configuration Options ### ####################################################### [tx_index] # What indexer to use for transactions # # The application will set which txs to index. In some cases a node operator will be able # to decide which txs to index based on configuration set in the application. # # Options: # 1) "null" # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. # 3) "psql" - the indexer services backed by PostgreSQL. # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. indexer = "kv" # The PostgreSQL connection configuration, the connection format: # postgresql://:@:/? psql-conn = "" ####################################################### ### Instrumentation Configuration Options ### ####################################################### [instrumentation] # When true, Prometheus metrics are served under /metrics on # PrometheusListenAddr. # Check out the documentation for the list of available metrics. prometheus = true # Address to listen for Prometheus collector(s) connections prometheus_listen_addr = ":26660" # Maximum number of simultaneous connections. # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. max_open_connections = 3 # Instrumentation namespace namespace = "cometbft" ================================================ FILE: docker/entrypoint.sh ================================================ #!/bin/bash set -e DEFAULT_CHAIN_ID="sourcehub" DEFAULT_MONIKER="node" DEV_FACUET_MNEMONIC="comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold" if [ ! -d /sourcehub/.initialized ]; then echo "Initializing SourceHub" if [ -z "$CHAIN_ID" ]; then echo "CHAIN_ID not set: using default" CHAIN_ID=$DEFAULT_CHAIN_ID fi if [ -z "$MONIKER" ]; then echo "MONIKER not set: using default" MONIKER=$DEFAULT_MONIKER fi sourcehubd init "$MONIKER" --chain-id $CHAIN_ID --default-denom="uopen" 2>/dev/null # copy the container specific default config files, # which overrides some settings such as listening address cp /etc/sourcehub/*.toml /sourcehub/config/ # recover account mnemonic if [ -n "$MNEMONIC_PATH" ]; then echo "MNEMONIC_PATH set: recovering key" sourcehubd keys add validator --recover --source $MNEMONIC_PATH --keyring-backend test fi # if consensus key is set, we recover the full # node, including p2p and consensus key if [ -n "$CONSENSUS_KEY_PATH" ]; then echo "CONSENSUS_KEY_PATH set: recovering validator" test -s $CONSENSUS_KEY_PATH || (echo "error: consensus key file is empty" && exit 1) test -s $COMET_NODE_KEY_PATH || (echo "error: comet node key file is empty" && exit 1) cp $CONSENSUS_KEY_PATH /sourcehub/config/priv_validator_key.json cp $COMET_NODE_KEY_PATH /sourcehub/config/node_key.json fi # initialize chain in standalone if [ "$STANDALONE" = "1" ]; then echo "Standalone mode: generating new genesis" # initialize chain / create genesis sourcehubd keys add validator --keyring-backend test echo $DEV_FACUET_MNEMONIC | sourcehubd keys add faucet --keyring-backend test --recover VALIDATOR_ADDR=$(sourcehubd keys show validator -a --keyring-backend test) FAUCET_ADDR=$(sourcehubd keys show faucet -a --keyring-backend test) sourcehubd genesis add-genesis-account $VALIDATOR_ADDR 1000000000000000uopen # 1b open sourcehubd genesis add-genesis-account $FAUCET_ADDR 100000000000000uopen # 100m open sourcehubd genesis gentx validator 1000000000000000uopen --chain-id $CHAIN_ID --keyring-backend test # 1b open sourcehubd genesis collect-gentxs sed -i 's/"allow_zero_fee_txs": false,/"allow_zero_fee_txs": true,/' /sourcehub/config/genesis.json cp /etc/sourcehub/faucet-key.json /sourcehub/config/faucet-key.json echo "initialized sourcehub genesis" else if [ -z "$GENESIS_PATH" ]; then echo "GENESIS_PATH not set and standalone is false: provide a genesis file or set env STANDALONE=1" exit 1 fi cp $GENESIS_PATH /sourcehub/config/genesis.json echo "Loaded Genesis from $GENESIS_PATH" fi touch /sourcehub/.initialized else echo "Skipping initialization: container previously initialized" fi if [ -n "$COMET_CONFIG_PATH" ]; then echo "COMET_CONFIG_PATH set: updating comet config with $COMET_CONFIG_PATH" cp $COMET_CONFIG_PATH /sourcehub/config/config.toml fi if [ -n "$APP_CONFIG_PATH" ]; then echo "APP_CONFIG_PATH set: updating app config with $APP_CONFIG_PATH" cp $APP_CONFIG_PATH /sourcehub/config/app.toml fi exec $@ ================================================ FILE: docker/faucet-key.json ================================================ { "mnemonic": "comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold", "name": "faucet", "address": "source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt" } ================================================ FILE: docker-compose.yaml ================================================ services: sourcehub: build: context: . ports: - 1317:1317 - 26656:26656 - 26657:26657 - 9090:9090 environment: STANDALONE: 1 volumes: - data:/sourcehub volumes: data: ================================================ FILE: docs/docs.go ================================================ package docs import ( "embed" httptemplate "html/template" "net/http" "github.com/gorilla/mux" ) const ( apiFile = "/static/openapi.yml" indexFile = "template/index.tpl" ) //go:embed static var Static embed.FS //go:embed template var template embed.FS func RegisterOpenAPIService(appName string, rtr *mux.Router) { rtr.Handle(apiFile, http.FileServer(http.FS(Static))) rtr.HandleFunc("/", handler(appName)) } // handler returns an http handler that servers OpenAPI console for an OpenAPI spec at specURL. func handler(title string) http.HandlerFunc { t, _ := httptemplate.ParseFS(template, indexFile) return func(w http.ResponseWriter, req *http.Request) { t.Execute(w, struct { Title string URL string }{ title, apiFile, }) } } ================================================ FILE: docs/static/openapi.yml ================================================ swagger: '2.0' info: title: HTTP API Console name: '' description: '' paths: /cosmos.auth.v1beta1.Msg/UpdateParams: post: summary: >- UpdateParams defines a (governance) operation for updating the x/auth module parameters. The authority defaults to the x/gov module account. description: 'Since: cosmos-sdk 0.47' operationId: CosmosAuthV1Beta1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/auth parameters to update. NOTE: All parameters must be supplied. type: object properties: max_memo_characters: type: string format: uint64 tx_sig_limit: type: string format: uint64 tx_size_cost_per_byte: type: string format: uint64 sig_verify_cost_ed25519: type: string format: uint64 sig_verify_cost_secp256k1: type: string format: uint64 description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos/auth/v1beta1/account_info/{address}: get: summary: AccountInfo queries account info which is common to all account types. description: 'Since: cosmos-sdk 0.47' operationId: CosmosAuthV1Beta1Query_AccountInfo responses: '200': description: A successful response. schema: type: object properties: info: description: info is the account info which is represented by BaseAccount. type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } account_number: type: string format: uint64 sequence: type: string format: uint64 description: |- QueryAccountInfoResponse is the Query/AccountInfo response type. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: address description: address is the account address string. in: path required: true type: string tags: - Query /cosmos/auth/v1beta1/accounts: get: summary: Accounts returns all the existing accounts. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. Since: cosmos-sdk 0.43 operationId: CosmosAuthV1Beta1Query_Accounts responses: '200': description: A successful response. schema: type: object properties: accounts: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } title: accounts are the existing accounts pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAccountsResponse is the response type for the Query/Accounts RPC method. Since: cosmos-sdk 0.43 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/auth/v1beta1/accounts/{address}: get: summary: Account returns account details based on address. operationId: CosmosAuthV1Beta1Query_Account responses: '200': description: A successful response. schema: type: object properties: account: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- QueryAccountResponse is the response type for the Query/Account RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: address description: address defines the address to query for. in: path required: true type: string tags: - Query /cosmos/auth/v1beta1/address_by_id/{id}: get: summary: AccountAddressByID returns account address based on account number. description: 'Since: cosmos-sdk 0.46.2' operationId: CosmosAuthV1Beta1Query_AccountAddressByID responses: '200': description: A successful response. schema: type: object properties: account_address: type: string description: 'Since: cosmos-sdk 0.46.2' title: >- QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: id description: |- Deprecated, use account_id instead id is the account number of the address to be queried. This field should have been an uint64 (like all account numbers), and will be updated to uint64 in a future version of the auth query. in: path required: true type: string format: int64 - name: account_id description: |- account_id is the account number of the address to be queried. Since: cosmos-sdk 0.47 in: query required: false type: string format: uint64 tags: - Query /cosmos/auth/v1beta1/bech32: get: summary: Bech32Prefix queries bech32Prefix description: 'Since: cosmos-sdk 0.46' operationId: CosmosAuthV1Beta1Query_Bech32Prefix responses: '200': description: A successful response. schema: type: object properties: bech32_prefix: type: string description: >- Bech32PrefixResponse is the response type for Bech32Prefix rpc method. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/auth/v1beta1/bech32/{address_bytes}: get: summary: AddressBytesToString converts Account Address bytes to string description: 'Since: cosmos-sdk 0.46' operationId: CosmosAuthV1Beta1Query_AddressBytesToString responses: '200': description: A successful response. schema: type: object properties: address_string: type: string description: >- AddressBytesToStringResponse is the response type for AddressString rpc method. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: address_bytes in: path required: true type: string format: byte tags: - Query /cosmos/auth/v1beta1/bech32/{address_string}: get: summary: AddressStringToBytes converts Address string to bytes description: 'Since: cosmos-sdk 0.46' operationId: CosmosAuthV1Beta1Query_AddressStringToBytes responses: '200': description: A successful response. schema: type: object properties: address_bytes: type: string format: byte description: >- AddressStringToBytesResponse is the response type for AddressBytes rpc method. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: address_string in: path required: true type: string tags: - Query /cosmos/auth/v1beta1/module_accounts: get: summary: ModuleAccounts returns all the existing module accounts. description: 'Since: cosmos-sdk 0.46' operationId: CosmosAuthV1Beta1Query_ModuleAccounts responses: '200': description: A successful response. schema: type: object properties: accounts: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/auth/v1beta1/module_accounts/{name}: get: summary: ModuleAccountByName returns the module account info by module name operationId: CosmosAuthV1Beta1Query_ModuleAccountByName responses: '200': description: A successful response. schema: type: object properties: account: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: name in: path required: true type: string tags: - Query /cosmos/auth/v1beta1/params: get: summary: Params queries all parameters. operationId: CosmosAuthV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: max_memo_characters: type: string format: uint64 tx_sig_limit: type: string format: uint64 tx_size_cost_per_byte: type: string format: uint64 sig_verify_cost_ed25519: type: string format: uint64 sig_verify_cost_secp256k1: type: string format: uint64 description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/authz/v1beta1/grants: get: summary: Returns list of `Authorization`, granted to the grantee by the granter. operationId: CosmosAuthzV1Beta1Query_Grants responses: '200': description: A successful response. schema: type: object properties: grants: type: array items: type: object properties: authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- time when the grant will expire and will be pruned. If null, then the grant doesn't have a time expiration (other conditions in `authorization` may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. description: >- authorizations is a list of grants granted for grantee by granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGrantsResponse is the response type for the Query/Authorizations RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: granter in: query required: false type: string - name: grantee in: query required: false type: string - name: msg_type_url description: >- Optional, msg_type_url, when set, will query only grants matching given msg type. in: query required: false type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/authz/v1beta1/grants/grantee/{grantee}: get: summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. description: 'Since: cosmos-sdk 0.46' operationId: CosmosAuthzV1Beta1Query_GranteeGrants responses: '200': description: A successful response. schema: type: object properties: grants: type: array items: type: object properties: granter: type: string grantee: type: string authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto description: grants is a list of grants granted to the grantee. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: grantee in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/authz/v1beta1/grants/granter/{granter}: get: summary: GranterGrants returns list of `GrantAuthorization`, granted by granter. description: 'Since: cosmos-sdk 0.46' operationId: CosmosAuthzV1Beta1Query_GranterGrants responses: '200': description: A successful response. schema: type: object properties: grants: type: array items: type: object properties: granter: type: string grantee: type: string authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto description: grants is a list of grants granted by the granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: granter in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos.authz.v1beta1.Msg/Exec: post: summary: |- Exec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. operationId: CosmosAuthzV1Beta1Msg_Exec responses: '200': description: A successful response. schema: type: object properties: results: type: array items: type: string format: byte description: MsgExecResponse defines the Msg/MsgExecResponse response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgExec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. in: body required: true schema: type: object properties: grantee: type: string msgs: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- Execute Msg. The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. description: >- MsgExec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. tags: - Msg /cosmos.authz.v1beta1.Msg/Grant: post: summary: |- Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten. operationId: CosmosAuthzV1Beta1Msg_Grant responses: '200': description: A successful response. schema: type: object description: MsgGrantResponse defines the Msg/MsgGrant response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgGrant is a request type for Grant method. It declares authorization to the grantee on behalf of the granter with the provided expiration time. in: body required: true schema: type: object properties: granter: type: string grantee: type: string grant: type: object properties: authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- time when the grant will expire and will be pruned. If null, then the grant doesn't have a time expiration (other conditions in `authorization` may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. description: >- MsgGrant is a request type for Grant method. It declares authorization to the grantee on behalf of the granter with the provided expiration time. tags: - Msg /cosmos.authz.v1beta1.Msg/Revoke: post: summary: >- Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee. operationId: CosmosAuthzV1Beta1Msg_Revoke responses: '200': description: A successful response. schema: type: object description: MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgRevoke revokes any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee. in: body required: true schema: type: object properties: granter: type: string grantee: type: string msg_type_url: type: string description: >- MsgRevoke revokes any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee. tags: - Msg /cosmos.bank.v1beta1.Msg/MultiSend: post: summary: >- MultiSend defines a method for sending coins from some accounts to other accounts. operationId: CosmosBankV1Beta1Msg_MultiSend responses: '200': description: A successful response. schema: type: object description: MsgMultiSendResponse defines the Msg/MultiSend response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgMultiSend represents an arbitrary multi-in, multi-out send message. in: body required: true schema: type: object properties: inputs: type: array items: type: object properties: address: type: string coins: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Input models transaction input. description: >- Inputs, despite being `repeated`, only allows one sender input. This is checked in MsgMultiSend's ValidateBasic. outputs: type: array items: type: object properties: address: type: string coins: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Output models transaction outputs. description: >- MsgMultiSend represents an arbitrary multi-in, multi-out send message. tags: - Msg /cosmos.bank.v1beta1.Msg/Send: post: summary: >- Send defines a method for sending coins from one account to another account. operationId: CosmosBankV1Beta1Msg_Send responses: '200': description: A successful response. schema: type: object description: MsgSendResponse defines the Msg/Send response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgSend represents a message to send coins from one account to another. in: body required: true schema: type: object properties: from_address: type: string to_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgSend represents a message to send coins from one account to another. tags: - Msg /cosmos.bank.v1beta1.Msg/SetSendEnabled: post: summary: >- SetSendEnabled is a governance operation for setting the SendEnabled flag on any number of Denoms. Only the entries to add or update should be included. Entries that already exist in the store, but that aren't included in this message, will be left unchanged. description: 'Since: cosmos-sdk 0.47' operationId: CosmosBankV1Beta1Msg_SetSendEnabled responses: '200': description: A successful response. schema: type: object description: >- MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgSetSendEnabled is the Msg/SetSendEnabled request type. Only entries to add/update/delete need to be included. Existing SendEnabled entries that are not included in this message are left unchanged. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: authority is the address that controls the module. send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). description: send_enabled is the list of entries to add or update. use_default_for: type: array items: type: string description: >- use_default_for is a list of denoms that should use the params.default_send_enabled value. Denoms listed here will have their SendEnabled entries deleted. If a denom is included that doesn't have a SendEnabled entry, it will be ignored. description: |- MsgSetSendEnabled is the Msg/SetSendEnabled request type. Only entries to add/update/delete need to be included. Existing SendEnabled entries that are not included in this message are left unchanged. Since: cosmos-sdk 0.47 tags: - Msg /cosmos.bank.v1beta1.Msg/UpdateParams: post: summary: >- UpdateParams defines a governance operation for updating the x/bank module parameters. The authority is defined in the keeper. description: 'Since: cosmos-sdk 0.47' operationId: CosmosBankV1Beta1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/bank parameters to update. NOTE: All parameters must be supplied. type: object properties: send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). description: >- Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. default_send_enabled: type: boolean description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos/bank/v1beta1/balances/{address}: get: summary: AllBalances queries the balance of all coins for a single account. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1Query_AllBalances responses: '200': description: A successful response. schema: type: object properties: balances: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: balances is the balances of all the coins. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: address description: address is the address to query balances for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean - name: resolve_denom description: >- resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. Since: cosmos-sdk 0.50 in: query required: false type: boolean tags: - Query /cosmos/bank/v1beta1/balances/{address}/by_denom: get: summary: Balance queries the balance of a single coin for a single account. operationId: CosmosBankV1Beta1Query_Balance responses: '200': description: A successful response. schema: type: object properties: balance: description: balance is the balance of the coin. type: object properties: denom: type: string amount: type: string description: >- QueryBalanceResponse is the response type for the Query/Balance RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: address description: address is the address to query balances for. in: path required: true type: string - name: denom description: denom is the coin denom to query balances for. in: query required: false type: string tags: - Query /cosmos/bank/v1beta1/denom_owners/{denom}: get: summary: >- DenomOwners queries for all account addresses that own a particular token denomination. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. Since: cosmos-sdk 0.46 operationId: CosmosBankV1Beta1Query_DenomOwners responses: '200': description: A successful response. schema: type: object properties: denom_owners: type: array items: type: object properties: address: type: string description: >- address defines the address that owns a particular denomination. balance: description: >- balance is the balance of the denominated coin for an account. type: object properties: denom: type: string amount: type: string description: >- DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: denom description: >- denom defines the coin denomination to query all account holders for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/bank/v1beta1/denom_owners_by_query: get: summary: >- DenomOwnersByQuery queries for all account addresses that own a particular token denomination. description: 'Since: cosmos-sdk 0.50.3' operationId: CosmosBankV1Beta1Query_DenomOwnersByQuery responses: '200': description: A successful response. schema: type: object properties: denom_owners: type: array items: type: object properties: address: type: string description: >- address defines the address that owns a particular denomination. balance: description: >- balance is the balance of the denominated coin for an account. type: object properties: denom: type: string amount: type: string description: >- DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. Since: cosmos-sdk 0.50.3 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: denom description: >- denom defines the coin denomination to query all account holders for. in: query required: false type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/bank/v1beta1/denoms_metadata: get: summary: |- DenomsMetadata queries the client metadata for all registered coin denominations. operationId: CosmosBankV1Beta1Query_DenomsMetadata responses: '200': description: A successful response. schema: type: object properties: metadatas: type: array items: type: object properties: description: type: string denom_units: type: array items: type: object properties: denom: type: string description: >- denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: >- aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. title: >- denom_units represents the list of DenomUnit's for a given coin base: type: string description: >- base represents the base denom (should be the DenomUnit with exponent = 0). display: type: string description: |- display indicates the suggested denom that should be displayed in clients. name: type: string description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string description: >- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46 uri_hash: type: string description: >- URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. description: >- metadata provides the client information for all the registered tokens. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/bank/v1beta1/denoms_metadata/{denom}: get: summary: DenomMetadata queries the client metadata of a given coin denomination. operationId: CosmosBankV1Beta1Query_DenomMetadata responses: '200': description: A successful response. schema: type: object properties: metadata: description: >- metadata describes and provides all the client information for the requested token. type: object properties: description: type: string denom_units: type: array items: type: object properties: denom: type: string description: >- denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: >- aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. title: >- denom_units represents the list of DenomUnit's for a given coin base: type: string description: >- base represents the base denom (should be the DenomUnit with exponent = 0). display: type: string description: |- display indicates the suggested denom that should be displayed in clients. name: type: string description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string description: >- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46 uri_hash: type: string description: >- URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46 description: >- QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: denom description: denom is the coin denom to query the metadata for. in: path required: true type: string tags: - Query /cosmos/bank/v1beta1/denoms_metadata_by_query_string: get: summary: >- DenomMetadataByQueryString queries the client metadata of a given coin denomination. operationId: CosmosBankV1Beta1Query_DenomMetadataByQueryString responses: '200': description: A successful response. schema: type: object properties: metadata: description: >- metadata describes and provides all the client information for the requested token. type: object properties: description: type: string denom_units: type: array items: type: object properties: denom: type: string description: >- denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: >- aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. title: >- denom_units represents the list of DenomUnit's for a given coin base: type: string description: >- base represents the base denom (should be the DenomUnit with exponent = 0). display: type: string description: |- display indicates the suggested denom that should be displayed in clients. name: type: string description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string description: >- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46 uri_hash: type: string description: >- URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46 description: >- QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: denom description: denom is the coin denom to query the metadata for. in: query required: false type: string tags: - Query /cosmos/bank/v1beta1/params: get: summary: Params queries the parameters of x/bank module. operationId: CosmosBankV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params provides the parameters of the bank module. type: object properties: send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). description: >- Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. default_send_enabled: type: boolean description: >- QueryParamsResponse defines the response type for querying x/bank parameters. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/bank/v1beta1/send_enabled: get: summary: SendEnabled queries for SendEnabled entries. description: >- This query only returns denominations that have specific SendEnabled settings. Any denomination that does not have a specific setting will use the default params.default_send_enabled, and will not be returned by this query. Since: cosmos-sdk 0.47 operationId: CosmosBankV1Beta1Query_SendEnabled responses: '200': description: A successful response. schema: type: object properties: send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). pagination: description: >- pagination defines the pagination in the response. This field is only populated if the denoms field in the request is empty. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QuerySendEnabledResponse defines the RPC response of a SendEnable query. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: denoms description: >- denoms is the specific denoms you want look up. Leave empty to get all entries. in: query required: false type: array items: type: string collectionFormat: multi - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/bank/v1beta1/spendable_balances/{address}: get: summary: >- SpendableBalances queries the spendable balance of all coins for a single account. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. Since: cosmos-sdk 0.46 operationId: CosmosBankV1Beta1Query_SpendableBalances responses: '200': description: A successful response. schema: type: object properties: balances: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: balances is the spendable balances of all the coins. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QuerySpendableBalancesResponse defines the gRPC response structure for querying an account's spendable balances. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: address description: address is the address to query spendable balances for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom: get: summary: >- SpendableBalanceByDenom queries the spendable balance of a single denom for a single account. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. Since: cosmos-sdk 0.47 operationId: CosmosBankV1Beta1Query_SpendableBalanceByDenom responses: '200': description: A successful response. schema: type: object properties: balance: description: balance is the balance of the coin. type: object properties: denom: type: string amount: type: string description: >- QuerySpendableBalanceByDenomResponse defines the gRPC response structure for querying an account's spendable balance for a specific denom. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: address description: address is the address to query balances for. in: path required: true type: string - name: denom description: denom is the coin denom to query balances for. in: query required: false type: string tags: - Query /cosmos/bank/v1beta1/supply: get: summary: TotalSupply queries the total supply of all coins. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1Query_TotalSupply responses: '200': description: A successful response. schema: type: object properties: supply: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: supply is the supply of the coins pagination: description: |- pagination defines the pagination in the response. Since: cosmos-sdk 0.43 type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/bank/v1beta1/supply/by_denom: get: summary: SupplyOf queries the supply of a single coin. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1Query_SupplyOf responses: '200': description: A successful response. schema: type: object properties: amount: description: amount is the supply of the coin. type: object properties: denom: type: string amount: type: string description: >- QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: denom description: denom is the coin denom to query balances for. in: query required: false type: string tags: - Query /cosmos/base/node/v1beta1/config: get: summary: Config queries for the operator configuration. operationId: CosmosBaseNodeV1Beta1Service_Config responses: '200': description: A successful response. schema: type: object properties: minimum_gas_price: type: string pruning_keep_recent: type: string pruning_interval: type: string halt_height: type: string format: uint64 description: >- ConfigResponse defines the response structure for the Config gRPC query. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Service /cosmos/base/node/v1beta1/status: get: summary: Status queries for the node status. operationId: CosmosBaseNodeV1Beta1Service_Status responses: '200': description: A successful response. schema: type: object properties: 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 app_hash: type: string format: byte title: app hash of the current block validator_hash: type: string format: byte title: validator hash provided by the consensus header description: >- StateResponse defines the response structure for the status of a node. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Service /cosmos/base/tendermint/v1beta1/abci_query: get: summary: >- ABCIQuery defines a query handler that supports ABCI queries directly to the application, bypassing Tendermint completely. The ABCI query must contain a valid and supported path, including app, custom, p2p, and store. description: 'Since: cosmos-sdk 0.46' operationId: CosmosBaseTendermintV1Beta1Service_ABCIQuery responses: '200': description: A successful response. schema: type: object properties: code: type: integer format: int64 log: type: string title: nondeterministic info: type: string title: nondeterministic index: type: string format: int64 key: type: string format: byte value: type: string format: byte proof_ops: type: object properties: ops: type: array items: type: object properties: type: type: string key: type: string format: byte data: type: string format: byte description: >- ProofOp defines an operation used for calculating Merkle root. The data could be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. description: >- ProofOps is Merkle proof defined by the list of ProofOps. Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. height: type: string format: int64 codespace: type: string description: >- ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. Note: This type is a duplicate of the ResponseQuery proto type defined in Tendermint. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: data in: query required: false type: string format: byte - name: path in: query required: false type: string - name: height in: query required: false type: string format: int64 - name: prove in: query required: false type: boolean tags: - Service /cosmos/base/tendermint/v1beta1/blocks/latest: get: summary: GetLatestBlock returns the latest block. operationId: CosmosBaseTendermintV1Beta1Service_GetLatestBlock responses: '200': description: A successful response. schema: type: object properties: block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID block: title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: >- Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. sdk_block: title: 'Since: cosmos-sdk 0.47' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string description: >- proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. original proposer of the block description: Header defines the structure of a Tendermint block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: >- Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. description: >- Block is tendermint type Block, with the Header proposer address field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Service /cosmos/base/tendermint/v1beta1/blocks/{height}: get: summary: GetBlockByHeight queries block for given height. operationId: CosmosBaseTendermintV1Beta1Service_GetBlockByHeight responses: '200': description: A successful response. schema: type: object properties: block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID block: title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: >- Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. sdk_block: title: 'Since: cosmos-sdk 0.47' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string description: >- proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. original proposer of the block description: Header defines the structure of a Tendermint block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: >- Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. description: >- Block is tendermint type Block, with the Header proposer address field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: height in: path required: true type: string format: int64 tags: - Service /cosmos/base/tendermint/v1beta1/node_info: get: summary: GetNodeInfo queries the current node info. operationId: CosmosBaseTendermintV1Beta1Service_GetNodeInfo responses: '200': description: A successful response. schema: type: object properties: default_node_info: type: object properties: protocol_version: type: object properties: p2p: type: string format: uint64 block: type: string format: uint64 app: type: string format: uint64 default_node_id: type: string listen_addr: type: string network: type: string version: type: string channels: type: string format: byte moniker: type: string other: type: object properties: tx_index: type: string rpc_address: type: string application_version: type: object properties: name: type: string app_name: type: string version: type: string git_commit: type: string build_tags: type: string go_version: type: string build_deps: type: array items: type: object properties: path: type: string title: module path version: type: string title: module version sum: type: string title: checksum title: Module is the type for VersionInfo cosmos_sdk_version: type: string title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Service /cosmos/base/tendermint/v1beta1/syncing: get: summary: GetSyncing queries node syncing. operationId: CosmosBaseTendermintV1Beta1Service_GetSyncing responses: '200': description: A successful response. schema: type: object properties: syncing: type: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Service /cosmos/base/tendermint/v1beta1/validatorsets/latest: get: summary: GetLatestValidatorSet queries latest validator-set. operationId: CosmosBaseTendermintV1Beta1Service_GetLatestValidatorSet responses: '200': description: A successful response. schema: type: object properties: block_height: type: string format: int64 validators: type: array items: type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } voting_power: type: string format: int64 proposer_priority: type: string format: int64 description: Validator is the type for the validator-set. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Service /cosmos/base/tendermint/v1beta1/validatorsets/{height}: get: summary: GetValidatorSetByHeight queries validator-set at a given height. operationId: CosmosBaseTendermintV1Beta1Service_GetValidatorSetByHeight responses: '200': description: A successful response. schema: type: object properties: block_height: type: string format: int64 validators: type: array items: type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } voting_power: type: string format: int64 proposer_priority: type: string format: int64 description: Validator is the type for the validator-set. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: height in: path required: true type: string format: int64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Service /cosmos.circuit.v1.Msg/AuthorizeCircuitBreaker: post: summary: >- AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another account's circuit breaker permissions. operationId: CosmosCircuitV1Msg_AuthorizeCircuitBreaker responses: '200': description: A successful response. schema: type: object properties: success: type: boolean description: >- MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type. in: body required: true schema: type: object properties: granter: type: string description: >- granter is the granter of the circuit breaker permissions and must have LEVEL_SUPER_ADMIN. grantee: type: string description: >- grantee is the account authorized with the provided permissions. permissions: description: >- permissions are the circuit breaker permissions that the grantee receives. These will overwrite any existing permissions. LEVEL_NONE_UNSPECIFIED can be specified to revoke all permissions. type: object properties: level: description: level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: >- MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type. tags: - Msg /cosmos.circuit.v1.Msg/ResetCircuitBreaker: post: summary: >- ResetCircuitBreaker resumes processing of Msg's in the state machine that have been been paused using TripCircuitBreaker. operationId: CosmosCircuitV1Msg_ResetCircuitBreaker responses: '200': description: A successful response. schema: type: object properties: success: type: boolean description: >- MsgResetCircuitBreakerResponse defines the Msg/ResetCircuitBreaker response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type. in: body required: true schema: type: object properties: authority: type: string description: >- authority is the account authorized to trip or reset the circuit breaker. msg_type_urls: type: array items: type: string description: >- msg_type_urls specifies a list of Msg type URLs to resume processing. If it is left empty all Msg processing for type URLs that the account is authorized to trip will resume. description: >- MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type. tags: - Msg /cosmos.circuit.v1.Msg/TripCircuitBreaker: post: summary: TripCircuitBreaker pauses processing of Msg's in the state machine. operationId: CosmosCircuitV1Msg_TripCircuitBreaker responses: '200': description: A successful response. schema: type: object properties: success: type: boolean description: >- MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type. in: body required: true schema: type: object properties: authority: type: string description: >- authority is the account authorized to trip the circuit breaker. msg_type_urls: type: array items: type: string description: >- msg_type_urls specifies a list of type URLs to immediately stop processing. IF IT IS LEFT EMPTY, ALL MSG PROCESSING WILL STOP IMMEDIATELY. This value is validated against the authority's permissions and if the authority does not have permissions to trip the specified msg type URLs (or all URLs), the operation will fail. description: >- MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type. tags: - Msg /cosmos/circuit/v1/accounts: get: summary: Account returns account permissions. operationId: CosmosCircuitV1Query_Accounts responses: '200': description: A successful response. schema: type: object properties: accounts: type: array items: type: object properties: address: type: string permissions: type: object properties: level: description: >- level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: >- Permissions are the permissions that an account has to trip or reset the circuit breaker. title: >- GenesisAccountPermissions is the account permissions for the circuit breaker in genesis pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- AccountsResponse is the response type for the Query/Accounts RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/circuit/v1/accounts/{address}: get: summary: Account returns account permissions. operationId: CosmosCircuitV1Query_Account responses: '200': description: A successful response. schema: type: object properties: permission: type: object properties: level: description: level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: |- Permissions are the permissions that an account has to trip or reset the circuit breaker. description: >- AccountResponse is the response type for the Query/Account RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: address in: path required: true type: string tags: - Query /cosmos/circuit/v1/disable_list: get: summary: DisabledList returns a list of disabled message urls operationId: CosmosCircuitV1Query_DisabledList responses: '200': description: A successful response. schema: type: object properties: disabled_list: type: array items: type: string description: >- DisabledListResponse is the response type for the Query/DisabledList RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/consensus/v1/params: get: summary: Params queries the parameters of x/consensus module. operationId: CosmosConsensusV1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: >- params are the tendermint consensus params stored in the consensus module. Please note that `params.version` is not populated in this response, it is tracked separately in the x/upgrade module. type: object properties: block: type: object properties: max_bytes: type: string format: int64 title: |- Max block size, in bytes. Note: must be greater than 0 max_gas: type: string format: int64 title: |- Max gas per block. Note: must be greater or equal to -1 description: BlockParams contains limits on the block size. evidence: type: object properties: max_age_num_blocks: type: string format: int64 description: >- Max age of evidence, in blocks. The basic formula for calculating this is: MaxAgeDuration / {average block time}. max_age_duration: type: string description: >- Max age of evidence, in time. It should correspond with an app's "unbonding period" or other similar mechanism for handling [Nothing-At-Stake attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 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. and should fall comfortably under the max block bytes. Default is 1048576 or 1MB description: >- EvidenceParams determine how we handle evidence of malfeasance. validator: type: object properties: pub_key_types: type: array items: type: string description: >- ValidatorParams restrict the public key types validators can use. NOTE: uses ABCI pubkey naming, not Amino names. version: type: object properties: app: type: string format: uint64 description: VersionParams contains the ABCI application version. abci: type: object properties: vote_extensions_enable_height: type: string format: int64 description: >- vote_extensions_enable_height configures the first height during which vote extensions will be enabled. During this specified height, and for all subsequent heights, precommit messages that do not contain valid extension data will be considered invalid. Prior to this height, vote extensions will not be used or accepted by validators on the network. Once enabled, vote extensions will be created by the application in ExtendVote, passed to the application for validation in VerifyVoteExtension and given to the application to use when proposing a block during PrepareProposal. description: >- ABCIParams configure functionality specific to the Application Blockchain Interface. description: >- QueryParamsResponse defines the response type for querying x/consensus parameters. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos.consensus.v1.Msg/UpdateParams: post: summary: >- UpdateParams defines a governance operation for updating the x/consensus module parameters. The authority is defined in the keeper. description: 'Since: cosmos-sdk 0.47' operationId: CosmosConsensusV1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: MsgUpdateParams is the Msg/UpdateParams request type. in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). block: description: >- params defines the x/consensus parameters to update. VersionsParams is not included in this Msg because it is tracked separarately in x/upgrade. NOTE: All parameters must be supplied. type: object properties: max_bytes: type: string format: int64 title: |- Max block size, in bytes. Note: must be greater than 0 max_gas: type: string format: int64 title: |- Max gas per block. Note: must be greater or equal to -1 evidence: type: object properties: max_age_num_blocks: type: string format: int64 description: >- Max age of evidence, in blocks. The basic formula for calculating this is: MaxAgeDuration / {average block time}. max_age_duration: type: string description: >- Max age of evidence, in time. It should correspond with an app's "unbonding period" or other similar mechanism for handling [Nothing-At-Stake attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 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. and should fall comfortably under the max block bytes. Default is 1048576 or 1MB description: >- EvidenceParams determine how we handle evidence of malfeasance. validator: type: object properties: pub_key_types: type: array items: type: string description: >- ValidatorParams restrict the public key types validators can use. NOTE: uses ABCI pubkey naming, not Amino names. abci: title: 'Since: cosmos-sdk 0.50' type: object properties: vote_extensions_enable_height: type: string format: int64 description: >- vote_extensions_enable_height configures the first height during which vote extensions will be enabled. During this specified height, and for all subsequent heights, precommit messages that do not contain valid extension data will be considered invalid. Prior to this height, vote extensions will not be used or accepted by validators on the network. Once enabled, vote extensions will be created by the application in ExtendVote, passed to the application for validation in VerifyVoteExtension and given to the application to use when proposing a block during PrepareProposal. description: >- ABCIParams configure functionality specific to the Application Blockchain Interface. description: MsgUpdateParams is the Msg/UpdateParams request type. tags: - Msg /cosmos.crisis.v1beta1.Msg/UpdateParams: post: summary: >- UpdateParams defines a governance operation for updating the x/crisis module parameters. The authority is defined in the keeper. description: 'Since: cosmos-sdk 0.47' operationId: CosmosCrisisV1Beta1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). constant_fee: description: constant_fee defines the x/crisis parameter. type: object properties: denom: type: string amount: type: string description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos.crisis.v1beta1.Msg/VerifyInvariant: post: summary: VerifyInvariant defines a method to verify a particular invariant. operationId: CosmosCrisisV1Beta1Msg_VerifyInvariant responses: '200': description: A successful response. schema: type: object description: >- MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgVerifyInvariant represents a message to verify a particular invariance. in: body required: true schema: type: object properties: sender: type: string description: >- sender is the account address of private key to send coins to fee collector account. invariant_module_name: type: string description: name of the invariant module. invariant_route: type: string description: invariant_route is the msg's invariant route. description: >- MsgVerifyInvariant represents a message to verify a particular invariance. tags: - Msg /cosmos.distribution.v1beta1.Msg/CommunityPoolSpend: post: summary: >- CommunityPoolSpend defines a governance operation for sending tokens from the community pool in the x/distribution module to another account, which could be the governance module itself. The authority is defined in the keeper. description: 'Since: cosmos-sdk 0.47' operationId: CosmosDistributionV1Beta1Msg_CommunityPoolSpend responses: '200': description: A successful response. schema: type: object description: |- MsgCommunityPoolSpendResponse defines the response to executing a MsgCommunityPoolSpend message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgCommunityPoolSpend defines a message for sending tokens from the community pool to another account. This message is typically executed via a governance proposal with the governance module being the executing authority. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). recipient: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgCommunityPoolSpend defines a message for sending tokens from the community pool to another account. This message is typically executed via a governance proposal with the governance module being the executing authority. Since: cosmos-sdk 0.47 tags: - Msg /cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool: post: summary: >- DepositValidatorRewardsPool defines a method to provide additional rewards to delegators to a specific validator. description: 'Since: cosmos-sdk 0.50' operationId: CosmosDistributionV1Beta1Msg_DepositValidatorRewardsPool responses: '200': description: A successful response. schema: type: object description: >- MsgDepositValidatorRewardsPoolResponse defines the response to executing a MsgDepositValidatorRewardsPool message. Since: cosmos-sdk 0.50 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- DepositValidatorRewardsPool defines the request structure to provide additional rewards to delegators from a specific validator. Since: cosmos-sdk 0.50 in: body required: true schema: type: object properties: depositor: type: string validator_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- DepositValidatorRewardsPool defines the request structure to provide additional rewards to delegators from a specific validator. Since: cosmos-sdk 0.50 tags: - Msg /cosmos.distribution.v1beta1.Msg/FundCommunityPool: post: summary: |- FundCommunityPool defines a method to allow an account to directly fund the community pool. operationId: CosmosDistributionV1Beta1Msg_FundCommunityPool responses: '200': description: A successful response. schema: type: object description: >- MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgFundCommunityPool allows an account to directly fund the community pool. in: body required: true schema: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. depositor: type: string description: |- MsgFundCommunityPool allows an account to directly fund the community pool. tags: - Msg /cosmos.distribution.v1beta1.Msg/SetWithdrawAddress: post: summary: |- SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). operationId: CosmosDistributionV1Beta1Msg_SetWithdrawAddress responses: '200': description: A successful response. schema: type: object description: >- MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgSetWithdrawAddress sets the withdraw address for a delegator (or validator self-delegation). in: body required: true schema: type: object properties: delegator_address: type: string withdraw_address: type: string description: |- MsgSetWithdrawAddress sets the withdraw address for a delegator (or validator self-delegation). tags: - Msg /cosmos.distribution.v1beta1.Msg/UpdateParams: post: summary: >- UpdateParams defines a governance operation for updating the x/distribution module parameters. The authority is defined in the keeper. description: 'Since: cosmos-sdk 0.47' operationId: CosmosDistributionV1Beta1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/distribution parameters to update. NOTE: All parameters must be supplied. type: object properties: community_tax: type: string base_proposer_reward: type: string description: >- Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string description: >- Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward: post: summary: >- WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. operationId: CosmosDistributionV1Beta1Msg_WithdrawDelegatorReward responses: '200': description: A successful response. schema: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: 'Since: cosmos-sdk 0.46' description: >- MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator from a single validator. in: body required: true schema: type: object properties: delegator_address: type: string validator_address: type: string description: >- MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator from a single validator. tags: - Msg /cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission: post: summary: |- WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. operationId: CosmosDistributionV1Beta1Msg_WithdrawValidatorCommission responses: '200': description: A successful response. schema: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: 'Since: cosmos-sdk 0.46' description: |- MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: >- MsgWithdrawValidatorCommission withdraws the full commission to the validator address. in: body required: true schema: type: object properties: validator_address: type: string description: >- MsgWithdrawValidatorCommission withdraws the full commission to the validator address. tags: - Msg /cosmos/distribution/v1beta1/community_pool: get: summary: CommunityPool queries the community pool coins. operationId: CosmosDistributionV1Beta1Query_CommunityPool responses: '200': description: A successful response. schema: type: object properties: pool: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: pool defines community pool's coins. description: >- QueryCommunityPoolResponse is the response type for the Query/CommunityPool RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: get: summary: |- DelegationTotalRewards queries the total rewards accrued by each validator. operationId: CosmosDistributionV1Beta1Query_DelegationTotalRewards responses: '200': description: A successful response. schema: type: object properties: rewards: type: array items: type: object properties: validator_address: type: string reward: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: |- DelegationDelegatorReward represents the properties of a delegator's delegation reward. description: rewards defines all the rewards accrued by a delegator. total: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: total defines the sum of all the rewards. description: |- QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: delegator_address description: delegator_address defines the delegator address to query for. in: path required: true type: string tags: - Query /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}: get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: CosmosDistributionV1Beta1Query_DelegationRewards responses: '200': description: A successful response. schema: type: object properties: rewards: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: rewards defines the rewards accrued by a delegation. description: |- QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: delegator_address description: delegator_address defines the delegator address to query for. in: path required: true type: string - name: validator_address description: validator_address defines the validator address to query for. in: path required: true type: string tags: - Query /cosmos/distribution/v1beta1/delegators/{delegator_address}/validators: get: summary: DelegatorValidators queries the validators of a delegator. operationId: CosmosDistributionV1Beta1Query_DelegatorValidators responses: '200': description: A successful response. schema: type: object properties: validators: type: array items: type: string description: >- validators defines the validators a delegator is delegating for. description: |- QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: delegator_address description: delegator_address defines the delegator address to query for. in: path required: true type: string tags: - Query /cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address: get: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: CosmosDistributionV1Beta1Query_DelegatorWithdrawAddress responses: '200': description: A successful response. schema: type: object properties: withdraw_address: type: string description: withdraw_address defines the delegator address to query for. description: |- QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: delegator_address description: delegator_address defines the delegator address to query for. in: path required: true type: string tags: - Query /cosmos/distribution/v1beta1/params: get: summary: Params queries params of the distribution module. operationId: CosmosDistributionV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: community_tax: type: string base_proposer_reward: type: string description: >- Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string description: >- Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/distribution/v1beta1/validators/{validator_address}: get: summary: >- ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator operationId: CosmosDistributionV1Beta1Query_ValidatorDistributionInfo responses: '200': description: A successful response. schema: type: object properties: operator_address: type: string description: operator_address defines the validator operator address. self_bond_rewards: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: self_bond_rewards defines the self delegations rewards. commission: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: commission defines the commission the validator received. description: >- QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: validator_address description: validator_address defines the validator address to query for. in: path required: true type: string tags: - Query /cosmos/distribution/v1beta1/validators/{validator_address}/commission: get: summary: ValidatorCommission queries accumulated commission for a validator. operationId: CosmosDistributionV1Beta1Query_ValidatorCommission responses: '200': description: A successful response. schema: type: object properties: commission: description: commission defines the commission the validator received. type: object properties: commission: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. title: |- QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: validator_address description: validator_address defines the validator address to query for. in: path required: true type: string tags: - Query /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards: get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: CosmosDistributionV1Beta1Query_ValidatorOutstandingRewards responses: '200': description: A successful response. schema: type: object properties: rewards: type: object properties: rewards: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: >- ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards for a validator inexpensive to track, allows simple sanity checks. description: >- QueryValidatorOutstandingRewardsResponse is the response type for the Query/ValidatorOutstandingRewards RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: validator_address description: validator_address defines the validator address to query for. in: path required: true type: string tags: - Query /cosmos/distribution/v1beta1/validators/{validator_address}/slashes: get: summary: ValidatorSlashes queries slash events of a validator. operationId: CosmosDistributionV1Beta1Query_ValidatorSlashes responses: '200': description: A successful response. schema: type: object properties: slashes: type: array items: type: object properties: validator_period: type: string format: uint64 fraction: type: string description: >- ValidatorSlashEvent represents a validator slash event. Height is implicit within the store key. This is needed to calculate appropriate amount of staking tokens for delegations which are withdrawn after a slash has occurred. description: slashes defines the slashes the validator received. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: validator_address description: validator_address defines the validator address to query for. in: path required: true type: string - name: starting_height description: >- starting_height defines the optional starting height to query the slashes. in: query required: false type: string format: uint64 - name: ending_height description: >- starting_height defines the optional ending height to query the slashes. in: query required: false type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos.evidence.v1beta1.Msg/SubmitEvidence: post: summary: >- SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. operationId: CosmosEvidenceV1Beta1Msg_SubmitEvidence responses: '200': description: A successful response. schema: type: object properties: hash: type: string format: byte description: hash defines the hash of the evidence. description: >- MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgSubmitEvidence represents a message that supports submitting arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. in: body required: true schema: type: object properties: submitter: type: string description: submitter is the signer account address of evidence. evidence: description: evidence defines the evidence of misbehavior. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- MsgSubmitEvidence represents a message that supports submitting arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. tags: - Msg /cosmos/evidence/v1beta1/evidence: get: summary: AllEvidence queries all evidence. operationId: CosmosEvidenceV1Beta1Query_AllEvidence responses: '200': description: A successful response. schema: type: object properties: evidence: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: evidence returns all evidences. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/evidence/v1beta1/evidence/{hash}: get: summary: Evidence queries evidence based on evidence hash. operationId: CosmosEvidenceV1Beta1Query_Evidence responses: '200': description: A successful response. schema: type: object properties: evidence: description: evidence returns the requested evidence. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- QueryEvidenceResponse is the response type for the Query/Evidence RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: hash description: |- hash defines the evidence hash of the requested evidence. Since: cosmos-sdk 0.47 in: path required: true type: string - name: evidence_hash description: |- evidence_hash defines the hash of the requested evidence. Deprecated: Use hash, a HEX encoded string, instead. in: query required: false type: string format: byte tags: - Query /sourcehub/feegrant/v1beta1/allowance/{granter}/{grantee}: get: summary: Allowance returns granted allwance to the grantee by the granter. operationId: SourcehubFeegrantV1Beta1Query_Allowance responses: '200': description: A successful response. schema: type: object properties: allowance: description: allowance is a allowance granted for grantee by granter. type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: >- allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} title: >- Grant is stored in the KVStore to record a grant with full context description: >- QueryAllowanceResponse is the response type for the Query/Allowance RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: granter description: >- granter is the address of the user granting an allowance of their funds. in: path required: true type: string - name: grantee description: >- grantee is the address of the user being granted an allowance of another user's funds. in: path required: true type: string tags: - Query /sourcehub/feegrant/v1beta1/allowances/{grantee}: get: summary: Allowances returns all the grants for the given grantee address. operationId: SourcehubFeegrantV1Beta1Query_Allowances responses: '200': description: A successful response. schema: type: object properties: allowances: type: array items: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: >- allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} title: >- Grant is stored in the KVStore to record a grant with full context description: allowances are allowance's granted for grantee by granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllowancesResponse is the response type for the Query/Allowances RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: grantee in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /sourcehub/feegrant/v1beta1/issued/{granter}: get: summary: AllowancesByGranter returns all the grants given by an address description: 'Since: cosmos-sdk 0.46' operationId: SourcehubFeegrantV1Beta1Query_AllowancesByGranter responses: '200': description: A successful response. schema: type: object properties: allowances: type: array items: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: >- allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} title: >- Grant is stored in the KVStore to record a grant with full context description: allowances that have been issued by the granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: granter in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /sourcehub/feegrant/v1beta1/did_allowance/{granter}/{grantee_did}: get: summary: DIDAllowance returns granted allowance to the DID by the granter. operationId: SourcehubFeegrantV1Beta1Query_DIDAllowance responses: '200': description: A successful response. schema: type: object properties: allowance: type: object properties: granter: type: string description: granter is the address of the user granting an allowance of their funds. grantee: type: string description: grantee is the DID being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context description: QueryDIDAllowanceResponse is the response type for the Query/DIDAllowance RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: granter description: granter is the address of the user granting an allowance of their funds. in: path required: true type: string - name: grantee_did description: grantee_did is the DID being granted an allowance of another user's funds. in: path required: true type: string tags: - Query /sourcehub/feegrant/v1beta1/did_issued/{granter}: get: summary: DIDAllowancesByGranter returns all the DID grants given by an address. operationId: SourcehubFeegrantV1Beta1Query_DIDAllowancesByGranter responses: '200': description: A successful response. schema: type: object properties: allowances: type: array items: type: object properties: granter: type: string description: granter is the address of the user granting an allowance of their funds. grantee: type: string description: grantee is the DID being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context description: allowances that have been issued by the granter to DIDs. pagination: description: pagination defines a pagination for the response. type: object properties: next_key: type: string format: byte total: type: string format: uint64 description: QueryDIDAllowancesByGranterResponse is the response type for the Query/DIDAllowancesByGranter RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: granter in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /sourcehub.feegrant.v1beta1.Msg/GrantAllowance: post: summary: |- GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time. operationId: SourcehubFeegrantV1Beta1Msg_GrantAllowance responses: '200': description: A successful response. schema: type: object description: >- MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgGrantAllowance adds permission for Grantee to spend up to Allowance of fees from the account of Granter. in: body required: true schema: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: >- allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- MsgGrantAllowance adds permission for Grantee to spend up to Allowance of fees from the account of Granter. tags: - Msg /sourcehub.feegrant.v1beta1.Msg/PruneAllowances: post: summary: >- PruneAllowances prunes expired fee allowances, currently up to 75 at a time. description: Since cosmos-sdk 0.50 operationId: SourcehubFeegrantV1Beta1Msg_PruneAllowances responses: '200': description: A successful response. schema: type: object description: >- MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. Since cosmos-sdk 0.50 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgPruneAllowances prunes expired fee allowances. Since cosmos-sdk 0.50 in: body required: true schema: type: object properties: pruner: type: string description: pruner is the address of the user pruning expired allowances. description: |- MsgPruneAllowances prunes expired fee allowances. Since cosmos-sdk 0.50 tags: - Msg /sourcehub.feegrant.v1beta1.Msg/RevokeAllowance: post: summary: |- RevokeAllowance revokes any fee allowance of granter's account that has been granted to the grantee. operationId: SourcehubFeegrantV1Beta1Msg_RevokeAllowance responses: '200': description: A successful response. schema: type: object description: >- MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. in: body required: true schema: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. description: >- MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. tags: - Msg /cosmos/gov/v1/constitution: get: summary: Constitution queries the chain's constitution. operationId: CosmosGovV1Query_Constitution responses: '200': description: A successful response. schema: type: object properties: constitution: type: string title: >- QueryConstitutionResponse is the response type for the Query/Constitution RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/gov/v1/params/{params_type}: get: summary: Params queries all parameters of the gov module. operationId: CosmosGovV1Query_Params responses: '200': description: A successful response. schema: type: object properties: voting_params: description: |- Deprecated: Prefer to use `params` instead. voting_params defines the parameters related to voting. type: object properties: voting_period: type: string description: Duration of the voting period. deposit_params: description: |- Deprecated: Prefer to use `params` instead. deposit_params defines the parameters related to deposit. type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. tally_params: description: |- Deprecated: Prefer to use `params` instead. tally_params defines the parameters related to tally. type: object properties: quorum: type: string description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. params: description: |- params defines all the paramaters of x/gov module. Since: cosmos-sdk 0.47 type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. voting_period: type: string description: Duration of the voting period. quorum: type: string description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. min_initial_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value that must be paid at proposal submission. proposal_cancel_ratio: type: string description: >- The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Since: cosmos-sdk 0.50 proposal_cancel_dest: type: string description: >- The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Since: cosmos-sdk 0.50 expedited_voting_period: type: string description: |- Duration of the voting period of an expedited proposal. Since: cosmos-sdk 0.50 expedited_threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Since: cosmos-sdk 0.50 expedited_min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- Minimum expedited deposit for a proposal to enter voting period. burn_vote_quorum: type: boolean title: burn deposits if a proposal does not meet quorum burn_proposal_deposit_prevote: type: boolean title: burn deposits if the proposal does not enter voting period burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met min_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Since: cosmos-sdk 0.50 description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: params_type description: >- params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". in: path required: true type: string tags: - Query /cosmos/gov/v1/proposals: get: summary: Proposals queries all proposals based on given status. operationId: CosmosGovV1Query_Proposals responses: '200': description: A successful response. schema: type: object properties: proposals: type: array items: type: object properties: id: type: string format: uint64 description: id defines the unique id of the proposal. messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages are the arbitrary messages to be executed if the proposal passes. status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: >- abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: >- no_with_veto_count is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: >- voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. metadata: type: string title: >- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal proposer: type: string description: 'Since: cosmos-sdk 0.47' title: proposer is the address of the proposal sumbitter expedited: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited failed_reason: type: string description: 'Since: cosmos-sdk 0.50' title: failed_reason defines the reason why the proposal failed description: >- Proposal defines the core field members of a governance proposal. description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryProposalsResponse is the response type for the Query/Proposals RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_status description: |- proposal_status defines the status of the proposals. - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. in: query required: false type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - name: voter description: voter defines the voter address for the proposals. in: query required: false type: string - name: depositor description: depositor defines the deposit addresses from the proposals. in: query required: false type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/gov/v1/proposals/{proposal_id}: get: summary: Proposal queries proposal details based on ProposalID. operationId: CosmosGovV1Query_Proposal responses: '200': description: A successful response. schema: type: object properties: proposal: description: proposal is the requested governance proposal. type: object properties: id: type: string format: uint64 description: id defines the unique id of the proposal. messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages are the arbitrary messages to be executed if the proposal passes. status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: >- abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: >- no_with_veto_count is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: >- voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. metadata: type: string title: >- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal proposer: type: string description: 'Since: cosmos-sdk 0.47' title: proposer is the address of the proposal sumbitter expedited: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited failed_reason: type: string description: 'Since: cosmos-sdk 0.50' title: failed_reason defines the reason why the proposal failed description: >- QueryProposalResponse is the response type for the Query/Proposal RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 tags: - Query /cosmos/gov/v1/proposals/{proposal_id}/deposits: get: summary: Deposits queries all deposits of a single proposal. operationId: CosmosGovV1Query_Deposits responses: '200': description: A successful response. schema: type: object properties: deposits: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: >- depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDepositsResponse is the response type for the Query/Deposits RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}: get: summary: >- Deposit queries single deposit information based on proposalID, depositAddr. operationId: CosmosGovV1Query_Deposit responses: '200': description: A successful response. schema: type: object properties: deposit: description: deposit defines the requested deposit. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: >- depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: depositor description: depositor defines the deposit addresses from the proposals. in: path required: true type: string tags: - Query /cosmos/gov/v1/proposals/{proposal_id}/tally: get: summary: TallyResult queries the tally of a proposal vote. operationId: CosmosGovV1Query_TallyResult responses: '200': description: A successful response. schema: type: object properties: tally: description: tally defines the requested tally. type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: >- abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: >- no_with_veto_count is the number of no with veto votes on a proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 tags: - Query /cosmos/gov/v1/proposals/{proposal_id}/votes: get: summary: Votes queries votes of a given proposal. operationId: CosmosGovV1Query_Votes responses: '200': description: A successful response. schema: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: >- weight is the vote weight associated with the vote option. description: >- WeightedVoteOption defines a unit of vote for vote split. description: options is the weighted vote options. metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 description: >- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryVotesResponse is the response type for the Query/Votes RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}: get: summary: Vote queries voted information based on proposalID, voterAddr. operationId: CosmosGovV1Query_Vote responses: '200': description: A successful response. schema: type: object properties: vote: description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: >- weight is the vote weight associated with the vote option. description: >- WeightedVoteOption defines a unit of vote for vote split. description: options is the weighted vote options. metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 description: >- QueryVoteResponse is the response type for the Query/Vote RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: voter description: voter defines the voter address for the proposals. in: path required: true type: string tags: - Query /cosmos.gov.v1.Msg/CancelProposal: post: summary: CancelProposal defines a method to cancel governance proposal description: 'Since: cosmos-sdk 0.50' operationId: CosmosGovV1Msg_CancelProposal responses: '200': description: A successful response. schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. canceled_time: type: string format: date-time description: canceled_time is the time when proposal is canceled. canceled_height: type: string format: uint64 description: >- canceled_height defines the block height at which the proposal is canceled. description: >- MsgCancelProposalResponse defines the response structure for executing a MsgCancelProposal message. Since: cosmos-sdk 0.50 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgCancelProposal is the Msg/CancelProposal request type. Since: cosmos-sdk 0.50 in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. proposer: type: string description: proposer is the account address of the proposer. description: |- MsgCancelProposal is the Msg/CancelProposal request type. Since: cosmos-sdk 0.50 tags: - Msg /cosmos.gov.v1.Msg/Deposit: post: summary: Deposit defines a method to add deposit on a specific proposal. operationId: CosmosGovV1Msg_Deposit responses: '200': description: A successful response. schema: type: object description: MsgDepositResponse defines the Msg/Deposit response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgDeposit defines a message to submit a deposit to an existing proposal. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- MsgDeposit defines a message to submit a deposit to an existing proposal. tags: - Msg /cosmos.gov.v1.Msg/ExecLegacyContent: post: summary: |- ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal to execute a legacy content-based proposal. operationId: CosmosGovV1Msg_ExecLegacyContent responses: '200': description: A successful response. schema: type: object description: >- MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgExecLegacyContent is used to wrap the legacy content field into a message. This ensures backwards compatibility with v1beta1.MsgSubmitProposal. in: body required: true schema: type: object properties: content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} authority: type: string description: authority must be the gov module address. description: >- MsgExecLegacyContent is used to wrap the legacy content field into a message. This ensures backwards compatibility with v1beta1.MsgSubmitProposal. tags: - Msg /cosmos.gov.v1.Msg/SubmitProposal: post: summary: >- SubmitProposal defines a method to create new proposal given the messages. operationId: CosmosGovV1Msg_SubmitProposal responses: '200': description: A successful response. schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. description: >- MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content. in: body required: true schema: type: object properties: messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages are the arbitrary messages to be executed if proposal passes. initial_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- initial_deposit is the deposit value that must be paid at proposal submission. proposer: type: string description: proposer is the account address of the proposer. metadata: type: string description: metadata is any arbitrary metadata attached to the proposal. title: type: string description: |- title is the title of the proposal. Since: cosmos-sdk 0.47 summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is the summary of the proposal expedited: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited or not description: >- MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content. tags: - Msg /cosmos.gov.v1.Msg/UpdateParams: post: summary: >- UpdateParams defines a governance operation for updating the x/gov module parameters. The authority is defined in the keeper. description: 'Since: cosmos-sdk 0.47' operationId: CosmosGovV1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/gov parameters to update. NOTE: All parameters must be supplied. type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. voting_period: type: string description: Duration of the voting period. quorum: type: string description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. min_initial_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value that must be paid at proposal submission. proposal_cancel_ratio: type: string description: >- The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Since: cosmos-sdk 0.50 proposal_cancel_dest: type: string description: >- The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Since: cosmos-sdk 0.50 expedited_voting_period: type: string description: |- Duration of the voting period of an expedited proposal. Since: cosmos-sdk 0.50 expedited_threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Since: cosmos-sdk 0.50 expedited_min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- Minimum expedited deposit for a proposal to enter voting period. burn_vote_quorum: type: boolean title: burn deposits if a proposal does not meet quorum burn_proposal_deposit_prevote: type: boolean title: burn deposits if the proposal does not enter voting period burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met min_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Since: cosmos-sdk 0.50 description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos.gov.v1.Msg/Vote: post: summary: Vote defines a method to add a vote on a specific proposal. operationId: CosmosGovV1Msg_Vote responses: '200': description: A successful response. schema: type: object description: MsgVoteResponse defines the Msg/Vote response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgVote defines a message to cast a vote. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. option: description: option defines the vote option. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string description: metadata is any arbitrary metadata attached to the Vote. description: MsgVote defines a message to cast a vote. tags: - Msg /cosmos.gov.v1.Msg/VoteWeighted: post: summary: >- VoteWeighted defines a method to add a weighted vote on a specific proposal. operationId: CosmosGovV1Msg_VoteWeighted responses: '200': description: A successful response. schema: type: object description: >- MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgVoteWeighted defines a message to cast a vote. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: >- weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. description: options defines the weighted vote options. metadata: type: string description: >- metadata is any arbitrary metadata attached to the VoteWeighted. description: MsgVoteWeighted defines a message to cast a vote. tags: - Msg /cosmos.gov.v1beta1.Msg/Deposit: post: summary: Deposit defines a method to add deposit on a specific proposal. operationId: CosmosGovV1Beta1Msg_Deposit responses: '200': description: A successful response. schema: type: object description: MsgDepositResponse defines the Msg/Deposit response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgDeposit defines a message to submit a deposit to an existing proposal. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- MsgDeposit defines a message to submit a deposit to an existing proposal. tags: - Msg /cosmos.gov.v1beta1.Msg/SubmitProposal: post: summary: SubmitProposal defines a method to create new proposal given a content. operationId: CosmosGovV1Beta1Msg_SubmitProposal responses: '200': description: A successful response. schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. description: >- MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content. in: body required: true schema: type: object properties: content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} initial_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- initial_deposit is the deposit value that must be paid at proposal submission. proposer: type: string description: proposer is the account address of the proposer. description: >- MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content. tags: - Msg /cosmos.gov.v1beta1.Msg/Vote: post: summary: Vote defines a method to add a vote on a specific proposal. operationId: CosmosGovV1Beta1Msg_Vote responses: '200': description: A successful response. schema: type: object description: MsgVoteResponse defines the Msg/Vote response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgVote defines a message to cast a vote. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. option: description: option defines the vote option. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED description: MsgVote defines a message to cast a vote. tags: - Msg /cosmos.gov.v1beta1.Msg/VoteWeighted: post: summary: >- VoteWeighted defines a method to add a weighted vote on a specific proposal. description: 'Since: cosmos-sdk 0.43' operationId: CosmosGovV1Beta1Msg_VoteWeighted responses: '200': description: A successful response. schema: type: object description: >- MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. Since: cosmos-sdk 0.43 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgVoteWeighted defines a message to cast a vote. Since: cosmos-sdk 0.43 in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: >- weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 description: options defines the weighted vote options. description: |- MsgVoteWeighted defines a message to cast a vote. Since: cosmos-sdk 0.43 tags: - Msg /cosmos/gov/v1beta1/params/{params_type}: get: summary: Params queries all parameters of the gov module. operationId: CosmosGovV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: voting_params: description: voting_params defines the parameters related to voting. type: object properties: voting_period: type: string description: Duration of the voting period. deposit_params: description: deposit_params defines the parameters related to deposit. type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. tally_params: description: tally_params defines the parameters related to tally. type: object properties: quorum: type: string format: byte description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string format: byte description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string format: byte description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: params_type description: >- params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". in: path required: true type: string tags: - Query /cosmos/gov/v1beta1/proposals: get: summary: Proposals queries all proposals based on given status. operationId: CosmosGovV1Beta1Query_Proposals responses: '200': description: A successful response. schema: type: object properties: proposals: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: >- abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: >- no_with_veto is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: >- voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. description: >- Proposal defines the core field members of a governance proposal. description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryProposalsResponse is the response type for the Query/Proposals RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_status description: |- proposal_status defines the status of the proposals. - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. in: query required: false type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - name: voter description: voter defines the voter address for the proposals. in: query required: false type: string - name: depositor description: depositor defines the deposit addresses from the proposals. in: query required: false type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}: get: summary: Proposal queries proposal details based on ProposalID. operationId: CosmosGovV1Beta1Query_Proposal responses: '200': description: A successful response. schema: type: object properties: proposal: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: >- no_with_veto is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: >- voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. description: >- Proposal defines the core field members of a governance proposal. description: >- QueryProposalResponse is the response type for the Query/Proposal RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits: get: summary: Deposits queries all deposits of a single proposal. operationId: CosmosGovV1Beta1Query_Deposits responses: '200': description: A successful response. schema: type: object properties: deposits: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: >- depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDepositsResponse is the response type for the Query/Deposits RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: get: summary: >- Deposit queries single deposit information based on proposalID, depositor address. operationId: CosmosGovV1Beta1Query_Deposit responses: '200': description: A successful response. schema: type: object properties: deposit: description: deposit defines the requested deposit. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: >- depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: depositor description: depositor defines the deposit addresses from the proposals. in: path required: true type: string tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}/tally: get: summary: TallyResult queries the tally of a proposal vote. operationId: CosmosGovV1Beta1Query_TallyResult responses: '200': description: A successful response. schema: type: object properties: tally: description: tally defines the requested tally. type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: >- no_with_veto is the number of no with veto votes on a proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}/votes: get: summary: Votes queries votes of a given proposal. operationId: CosmosGovV1Beta1Query_Votes responses: '200': description: A successful response. schema: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: >- weight is the vote weight associated with the vote option. description: >- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 description: |- options is the weighted vote options. Since: cosmos-sdk 0.43 description: >- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryVotesResponse is the response type for the Query/Votes RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: get: summary: Vote queries voted information based on proposalID, voterAddr. operationId: CosmosGovV1Beta1Query_Vote responses: '200': description: A successful response. schema: type: object properties: vote: description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: >- weight is the vote weight associated with the vote option. description: >- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 description: |- options is the weighted vote options. Since: cosmos-sdk 0.43 description: >- QueryVoteResponse is the response type for the Query/Vote RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id defines the unique id of the proposal. in: path required: true type: string format: uint64 - name: voter description: voter defines the voter address for the proposals. in: path required: true type: string tags: - Query /cosmos.group.v1.Msg/CreateGroup: post: summary: >- CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. operationId: CosmosGroupV1Msg_CreateGroup responses: '200': description: A successful response. schema: type: object properties: group_id: type: string format: uint64 description: group_id is the unique ID of the newly created group. description: MsgCreateGroupResponse is the Msg/CreateGroup response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgCreateGroup is the Msg/CreateGroup request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the account address of the group admin. members: type: array items: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: >- metadata is any arbitrary metadata attached to the member. description: >- MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests. description: members defines the group members. metadata: type: string description: metadata is any arbitrary metadata to attached to the group. description: MsgCreateGroup is the Msg/CreateGroup request type. tags: - Msg /cosmos.group.v1.Msg/CreateGroupPolicy: post: summary: CreateGroupPolicy creates a new group policy using given DecisionPolicy. operationId: CosmosGroupV1Msg_CreateGroupPolicy responses: '200': description: A successful response. schema: type: object properties: address: type: string description: >- address is the account address of the newly created group policy. description: >- MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. metadata: type: string description: >- metadata is any arbitrary metadata attached to the group policy. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. tags: - Msg /cosmos.group.v1.Msg/CreateGroupWithPolicy: post: summary: CreateGroupWithPolicy creates a new group with policy. operationId: CosmosGroupV1Msg_CreateGroupWithPolicy responses: '200': description: A successful response. schema: type: object properties: group_id: type: string format: uint64 description: >- group_id is the unique ID of the newly created group with policy. group_policy_address: type: string description: >- group_policy_address is the account address of the newly created group policy. description: >- MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. in: body required: true schema: type: object properties: admin: type: string description: >- admin is the account address of the group and group policy admin. members: type: array items: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: >- metadata is any arbitrary metadata attached to the member. description: >- MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests. description: members defines the group members. group_metadata: type: string description: >- group_metadata is any arbitrary metadata attached to the group. group_policy_metadata: type: string description: >- group_policy_metadata is any arbitrary metadata attached to the group policy. group_policy_as_admin: type: boolean description: >- group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. tags: - Msg /cosmos.group.v1.Msg/Exec: post: summary: Exec executes a proposal. operationId: CosmosGroupV1Msg_Exec responses: '200': description: A successful response. schema: type: object properties: result: description: result is the final result of the proposal execution. type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED description: MsgExecResponse is the Msg/Exec request type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgExec is the Msg/Exec request type. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. executor: type: string description: executor is the account address used to execute the proposal. description: MsgExec is the Msg/Exec request type. tags: - Msg /cosmos.group.v1.Msg/LeaveGroup: post: summary: LeaveGroup allows a group member to leave the group. operationId: CosmosGroupV1Msg_LeaveGroup responses: '200': description: A successful response. schema: type: object description: MsgLeaveGroupResponse is the Msg/LeaveGroup response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgLeaveGroup is the Msg/LeaveGroup request type. in: body required: true schema: type: object properties: address: type: string description: address is the account address of the group member. group_id: type: string format: uint64 description: group_id is the unique ID of the group. description: MsgLeaveGroup is the Msg/LeaveGroup request type. tags: - Msg /cosmos.group.v1.Msg/SubmitProposal: post: summary: SubmitProposal submits a new proposal. operationId: CosmosGroupV1Msg_SubmitProposal responses: '200': description: A successful response. schema: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. description: MsgSubmitProposalResponse is the Msg/SubmitProposal response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgSubmitProposal is the Msg/SubmitProposal request type. in: body required: true schema: type: object properties: group_policy_address: type: string description: group_policy_address is the account address of group policy. proposers: type: array items: type: string description: |- proposers are the account addresses of the proposers. Proposers signatures will be counted as yes votes. metadata: type: string description: metadata is any arbitrary metadata attached to the proposal. messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. exec: description: |- exec defines the mode of execution of the proposal, whether it should be executed immediately on creation or not. If so, proposers signatures are considered as Yes votes. type: string enum: - EXEC_UNSPECIFIED - EXEC_TRY default: EXEC_UNSPECIFIED title: type: string description: |- title is the title of the proposal. Since: cosmos-sdk 0.47 summary: type: string description: |- summary is the summary of the proposal. Since: cosmos-sdk 0.47 description: MsgSubmitProposal is the Msg/SubmitProposal request type. tags: - Msg /cosmos.group.v1.Msg/UpdateGroupAdmin: post: summary: >- UpdateGroupAdmin updates the group admin with given group id and previous admin address. operationId: CosmosGroupV1Msg_UpdateGroupAdmin responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the current account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. new_admin: type: string description: new_admin is the group new admin account address. description: MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. tags: - Msg /cosmos.group.v1.Msg/UpdateGroupMembers: post: summary: >- UpdateGroupMembers updates the group members with given group id and admin address. operationId: CosmosGroupV1Msg_UpdateGroupMembers responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. member_updates: type: array items: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: >- metadata is any arbitrary metadata attached to the member. description: >- MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests. description: |- member_updates is the list of members to update, set weight to 0 to remove a member. description: MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. tags: - Msg /cosmos.group.v1.Msg/UpdateGroupMetadata: post: summary: >- UpdateGroupMetadata updates the group metadata with given group id and admin address. operationId: CosmosGroupV1Msg_UpdateGroupMetadata responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. metadata: type: string description: metadata is the updated group's metadata. description: >- MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. tags: - Msg /cosmos.group.v1.Msg/UpdateGroupPolicyAdmin: post: summary: UpdateGroupPolicyAdmin updates a group policy admin. operationId: CosmosGroupV1Msg_UpdateGroupPolicyAdmin responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the account address of the group admin. group_policy_address: type: string description: >- group_policy_address is the account address of the group policy. new_admin: type: string description: new_admin is the new group policy admin. description: >- MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. tags: - Msg /cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy: post: summary: >- UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. operationId: CosmosGroupV1Msg_UpdateGroupPolicyDecisionPolicy responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the account address of the group admin. group_policy_address: type: string description: group_policy_address is the account address of group policy. decision_policy: description: decision_policy is the updated group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. tags: - Msg /cosmos.group.v1.Msg/UpdateGroupPolicyMetadata: post: summary: UpdateGroupPolicyMetadata updates a group policy metadata. operationId: CosmosGroupV1Msg_UpdateGroupPolicyMetadata responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. in: body required: true schema: type: object properties: admin: type: string description: admin is the account address of the group admin. group_policy_address: type: string description: group_policy_address is the account address of group policy. metadata: type: string description: metadata is the group policy metadata to be updated. description: >- MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. tags: - Msg /cosmos.group.v1.Msg/Vote: post: summary: Vote allows a voter to vote on a proposal. operationId: CosmosGroupV1Msg_Vote responses: '200': description: A successful response. schema: type: object description: MsgVoteResponse is the Msg/Vote response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgVote is the Msg/Vote request type. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the voter account address. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string description: metadata is any arbitrary metadata attached to the vote. exec: description: |- exec defines whether the proposal should be executed immediately after voting or not. type: string enum: - EXEC_UNSPECIFIED - EXEC_TRY default: EXEC_UNSPECIFIED description: MsgVote is the Msg/Vote request type. tags: - Msg /cosmos.group.v1.Msg/WithdrawProposal: post: summary: WithdrawProposal withdraws a proposal. operationId: CosmosGroupV1Msg_WithdrawProposal responses: '200': description: A successful response. schema: type: object description: >- MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgWithdrawProposal is the Msg/WithdrawProposal request type. in: body required: true schema: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. address: type: string description: >- address is the admin of the group policy or one of the proposer of the proposal. description: MsgWithdrawProposal is the Msg/WithdrawProposal request type. tags: - Msg /cosmos/group/v1/group_info/{group_id}: get: summary: GroupInfo queries group info based on group id. operationId: CosmosGroupV1Query_GroupInfo responses: '200': description: A successful response. schema: type: object properties: info: description: info is the GroupInfo of the group. type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group was created. description: QueryGroupInfoResponse is the Query/GroupInfo response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: group_id description: group_id is the unique ID of the group. in: path required: true type: string format: uint64 tags: - Query /cosmos/group/v1/group_members/{group_id}: get: summary: GroupMembers queries members of a group by group id. operationId: CosmosGroupV1Query_GroupMembers responses: '200': description: A successful response. schema: type: object properties: members: type: array items: type: object properties: group_id: type: string format: uint64 description: group_id is the unique ID of the group. member: description: member is the member data. type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: >- metadata is any arbitrary metadata attached to the member. added_at: type: string format: date-time description: >- added_at is a timestamp specifying when a member was added. description: >- GroupMember represents the relationship between a group and a member. description: members are the members of the group with given group_id. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupMembersResponse is the Query/GroupMembersResponse response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: group_id description: group_id is the unique ID of the group. in: path required: true type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/group_policies_by_admin/{admin}: get: summary: GroupPoliciesByAdmin queries group policies by admin address. operationId: CosmosGroupV1Query_GroupPoliciesByAdmin responses: '200': description: A successful response. schema: type: object properties: group_policies: type: array items: type: object properties: address: type: string description: address is the account address of group policy. group_id: type: string format: uint64 description: group_id is the unique ID of the group. admin: type: string description: admin is the account address of the group admin. metadata: type: string title: >- metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 description: >- version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal. decision_policy: description: >- decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group policy was created. description: >- GroupPolicyInfo represents the high-level on-chain information for a group policy. description: >- group_policies are the group policies info with provided admin. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: admin description: admin is the admin address of the group policy. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/group_policies_by_group/{group_id}: get: summary: GroupPoliciesByGroup queries group policies by group id. operationId: CosmosGroupV1Query_GroupPoliciesByGroup responses: '200': description: A successful response. schema: type: object properties: group_policies: type: array items: type: object properties: address: type: string description: address is the account address of group policy. group_id: type: string format: uint64 description: group_id is the unique ID of the group. admin: type: string description: admin is the account address of the group admin. metadata: type: string title: >- metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 description: >- version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal. decision_policy: description: >- decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group policy was created. description: >- GroupPolicyInfo represents the high-level on-chain information for a group policy. description: >- group_policies are the group policies info associated with the provided group. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: group_id description: group_id is the unique ID of the group policy's group. in: path required: true type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/group_policy_info/{address}: get: summary: >- GroupPolicyInfo queries group policy info based on account address of group policy. operationId: CosmosGroupV1Query_GroupPolicyInfo responses: '200': description: A successful response. schema: type: object properties: info: description: info is the GroupPolicyInfo of the group policy. type: object properties: address: type: string description: address is the account address of group policy. group_id: type: string format: uint64 description: group_id is the unique ID of the group. admin: type: string description: admin is the account address of the group admin. metadata: type: string title: >- metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 description: >- version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal. decision_policy: description: >- decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group policy was created. description: >- QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: address description: address is the account address of the group policy. in: path required: true type: string tags: - Query /cosmos/group/v1/groups: get: summary: Groups queries all groups in state. description: 'Since: cosmos-sdk 0.47.1' operationId: CosmosGroupV1Query_Groups responses: '200': description: A successful response. schema: type: object properties: groups: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group was created. description: >- GroupInfo represents the high-level on-chain information for a group. description: '`groups` is all the groups present in state.' pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryGroupsResponse is the Query/Groups response type. Since: cosmos-sdk 0.47.1 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/groups_by_admin/{admin}: get: summary: GroupsByAdmin queries groups by admin address. operationId: CosmosGroupV1Query_GroupsByAdmin responses: '200': description: A successful response. schema: type: object properties: groups: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group was created. description: >- GroupInfo represents the high-level on-chain information for a group. description: groups are the groups info with the provided admin. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: admin description: admin is the account address of a group's admin. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/groups_by_member/{address}: get: summary: GroupsByMember queries groups by member address. operationId: CosmosGroupV1Query_GroupsByMember responses: '200': description: A successful response. schema: type: object properties: groups: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group was created. description: >- GroupInfo represents the high-level on-chain information for a group. description: groups are the groups info with the provided group member. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupsByMemberResponse is the Query/GroupsByMember response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: address description: address is the group member address. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/proposal/{proposal_id}: get: summary: Proposal queries a proposal based on proposal id. operationId: CosmosGroupV1Query_Proposal responses: '200': description: A successful response. schema: type: object properties: proposal: description: proposal is the proposal info. type: object properties: id: type: string format: uint64 description: id is the unique id of the proposal. group_policy_address: type: string description: >- group_policy_address is the account address of group policy. metadata: type: string title: >- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: type: string description: proposers are the account addresses of the proposers. submit_time: type: string format: date-time description: >- submit_time is a timestamp specifying when a proposal was submitted. group_version: type: string format: uint64 description: >- group_version tracks the version of the group at proposal submission. This field is here for informational purposes only. group_policy_version: type: string format: uint64 description: >- group_policy_version tracks the version of the group policy at proposal submission. When a decision policy is changed, existing proposals from previous policy versions will become invalid with the `ABORTED` status. This field is here for informational purposes only. status: description: >- status represents the high level position in the life cycle of the proposal. Initial value is Submitted. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_SUBMITTED - PROPOSAL_STATUS_ACCEPTED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_ABORTED - PROPOSAL_STATUS_WITHDRAWN default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result contains the sums of all weighted votes for this proposal for each vote option. It is empty at submission, and only populated after tallying, at voting period end or at proposal execution, whichever happens first. type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. voting_period_end: type: string format: date-time description: >- voting_period_end is the timestamp before which voting must be done. Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying will be done at this point, and the `final_tally_result`and `status` fields will be accordingly updated. executor_result: description: >- executor_result is the final result of the proposal execution. Initial value is NotRun. type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal description: QueryProposalResponse is the Query/Proposal response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id is the unique ID of a proposal. in: path required: true type: string format: uint64 tags: - Query /cosmos/group/v1/proposals/{proposal_id}/tally: get: summary: >- TallyResult returns the tally result of a proposal. If the proposal is still in voting period, then this query computes the current tally state, which might not be final. On the other hand, if the proposal is final, then it simply returns the `final_tally_result` state stored in the proposal itself. operationId: CosmosGroupV1Query_TallyResult responses: '200': description: A successful response. schema: type: object properties: tally: description: tally defines the requested tally. type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. description: QueryTallyResultResponse is the Query/TallyResult response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id is the unique id of a proposal. in: path required: true type: string format: uint64 tags: - Query /cosmos/group/v1/proposals_by_group_policy/{address}: get: summary: >- ProposalsByGroupPolicy queries proposals based on account address of group policy. operationId: CosmosGroupV1Query_ProposalsByGroupPolicy responses: '200': description: A successful response. schema: type: object properties: proposals: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique id of the proposal. group_policy_address: type: string description: >- group_policy_address is the account address of group policy. metadata: type: string title: >- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: type: string description: proposers are the account addresses of the proposers. submit_time: type: string format: date-time description: >- submit_time is a timestamp specifying when a proposal was submitted. group_version: type: string format: uint64 description: >- group_version tracks the version of the group at proposal submission. This field is here for informational purposes only. group_policy_version: type: string format: uint64 description: >- group_policy_version tracks the version of the group policy at proposal submission. When a decision policy is changed, existing proposals from previous policy versions will become invalid with the `ABORTED` status. This field is here for informational purposes only. status: description: >- status represents the high level position in the life cycle of the proposal. Initial value is Submitted. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_SUBMITTED - PROPOSAL_STATUS_ACCEPTED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_ABORTED - PROPOSAL_STATUS_WITHDRAWN default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result contains the sums of all weighted votes for this proposal for each vote option. It is empty at submission, and only populated after tallying, at voting period end or at proposal execution, whichever happens first. type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. voting_period_end: type: string format: date-time description: >- voting_period_end is the timestamp before which voting must be done. Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying will be done at this point, and the `final_tally_result`and `status` fields will be accordingly updated. executor_result: description: >- executor_result is the final result of the proposal execution. Initial value is NotRun. type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit a proposal for a group policy to decide upon. A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal passes as well as some optional metadata associated with the proposal. description: proposals are the proposals with given group policy. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: address description: >- address is the account address of the group policy related to proposals. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}: get: summary: VoteByProposalVoter queries a vote by proposal id and voter. operationId: CosmosGroupV1Query_VoteByProposalVoter responses: '200': description: A successful response. schema: type: object properties: vote: description: vote is the vote with given proposal_id and voter. type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the account address of the voter. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 submit_time: type: string format: date-time description: submit_time is the timestamp when the vote was submitted. title: Vote represents a vote for a proposal.string metadata description: >- QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id is the unique ID of a proposal. in: path required: true type: string format: uint64 - name: voter description: voter is a proposal voter account address. in: path required: true type: string tags: - Query /cosmos/group/v1/votes_by_proposal/{proposal_id}: get: summary: VotesByProposal queries a vote by proposal id. operationId: CosmosGroupV1Query_VotesByProposal responses: '200': description: A successful response. schema: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the account address of the voter. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 submit_time: type: string format: date-time description: >- submit_time is the timestamp when the vote was submitted. title: Vote represents a vote for a proposal.string metadata description: votes are the list of votes for given proposal_id. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryVotesByProposalResponse is the Query/VotesByProposal response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: proposal_id description: proposal_id is the unique ID of a proposal. in: path required: true type: string format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/group/v1/votes_by_voter/{voter}: get: summary: VotesByVoter queries a vote by voter. operationId: CosmosGroupV1Query_VotesByVoter responses: '200': description: A successful response. schema: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the account address of the voter. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 submit_time: type: string format: date-time description: >- submit_time is the timestamp when the vote was submitted. title: Vote represents a vote for a proposal.string metadata description: votes are the list of votes by given voter. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: QueryVotesByVoterResponse is the Query/VotesByVoter response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: voter description: voter is a proposal voter account address. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos.mint.v1beta1.Msg/UpdateParams: post: summary: >- UpdateParams defines a governance operation for updating the x/mint module parameters. The authority is defaults to the x/gov module account. description: 'Since: cosmos-sdk 0.47' operationId: CosmosMintV1Beta1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/mint parameters to update. NOTE: All parameters must be supplied. type: object properties: mint_denom: type: string title: type of coin to mint inflation_rate_change: type: string title: maximum annual change in inflation rate inflation_max: type: string title: maximum inflation rate inflation_min: type: string title: minimum inflation rate goal_bonded: type: string title: goal of percent bonded atoms blocks_per_year: type: string format: uint64 title: expected blocks per year description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos/mint/v1beta1/annual_provisions: get: summary: AnnualProvisions current minting annual provisions value. operationId: CosmosMintV1Beta1Query_AnnualProvisions responses: '200': description: A successful response. schema: type: object properties: annual_provisions: type: string format: byte description: >- annual_provisions is the current minting annual provisions value. description: |- QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/mint/v1beta1/inflation: get: summary: Inflation returns the current minting inflation value. operationId: CosmosMintV1Beta1Query_Inflation responses: '200': description: A successful response. schema: type: object properties: inflation: type: string format: byte description: inflation is the current minting inflation value. description: >- QueryInflationResponse is the response type for the Query/Inflation RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/mint/v1beta1/params: get: summary: Params returns the total set of minting parameters. operationId: CosmosMintV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: mint_denom: type: string title: type of coin to mint inflation_rate_change: type: string title: maximum annual change in inflation rate inflation_max: type: string title: maximum inflation rate inflation_min: type: string title: minimum inflation rate goal_bonded: type: string title: goal of percent bonded atoms blocks_per_year: type: string format: uint64 title: expected blocks per year description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/params/v1beta1/params: get: summary: |- Params queries a specific parameter of a module, given its subspace and key. operationId: CosmosParamsV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: param: description: param defines the queried parameter. type: object properties: subspace: type: string key: type: string value: type: string description: >- QueryParamsResponse is response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: subspace description: subspace defines the module to query the parameter for. in: query required: false type: string - name: key description: key defines the key of the parameter in the subspace. in: query required: false type: string tags: - Query /cosmos/params/v1beta1/subspaces: get: summary: >- Subspaces queries for all registered subspaces and all keys for a subspace. description: 'Since: cosmos-sdk 0.46' operationId: CosmosParamsV1Beta1Query_Subspaces responses: '200': description: A successful response. schema: type: object properties: subspaces: type: array items: type: object properties: subspace: type: string keys: type: array items: type: string description: >- Subspace defines a parameter subspace name and all the keys that exist for the subspace. Since: cosmos-sdk 0.46 description: >- QuerySubspacesResponse defines the response types for querying for all registered subspaces and all keys for a subspace. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos.slashing.v1beta1.Msg/Unjail: post: summary: >- Unjail defines a method for unjailing a jailed validator, thus returning them into the bonded validator set, so they can begin receiving provisions and rewards again. operationId: CosmosSlashingV1Beta1Msg_Unjail responses: '200': description: A successful response. schema: type: object title: MsgUnjailResponse defines the Msg/Unjail response type default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: validator_addr: type: string title: MsgUnjail defines the Msg/Unjail request type tags: - Msg /cosmos.slashing.v1beta1.Msg/UpdateParams: post: summary: >- UpdateParams defines a governance operation for updating the x/slashing module parameters. The authority defaults to the x/gov module account. description: 'Since: cosmos-sdk 0.47' operationId: CosmosSlashingV1Beta1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/slashing parameters to update. NOTE: All parameters must be supplied. type: object properties: signed_blocks_window: type: string format: int64 min_signed_per_window: type: string format: byte downtime_jail_duration: type: string slash_fraction_double_sign: type: string format: byte slash_fraction_downtime: type: string format: byte description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos/slashing/v1beta1/params: get: summary: Params queries the parameters of slashing module operationId: CosmosSlashingV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: type: object properties: signed_blocks_window: type: string format: int64 min_signed_per_window: type: string format: byte downtime_jail_duration: type: string slash_fraction_double_sign: type: string format: byte slash_fraction_downtime: type: string format: byte description: >- Params represents the parameters used for by the slashing module. title: >- QueryParamsResponse is the response type for the Query/Params RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /cosmos/slashing/v1beta1/signing_infos: get: summary: SigningInfos queries signing info of all validators operationId: CosmosSlashingV1Beta1Query_SigningInfos responses: '200': description: A successful response. schema: type: object properties: info: type: array items: type: object properties: address: type: string start_height: type: string format: int64 title: >- Height at which validator was first a candidate OR was un-jailed index_offset: type: string format: int64 description: >- Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap. jailed_until: type: string format: date-time description: >- Timestamp until which the validator is jailed due to liveness downtime. tombstoned: type: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior. missed_blocks_counter: type: string format: int64 description: >- A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap. description: >- ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. title: info is the signing info of all validators pagination: type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } title: >- QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/slashing/v1beta1/signing_infos/{cons_address}: get: summary: SigningInfo queries the signing info of given cons address operationId: CosmosSlashingV1Beta1Query_SigningInfo responses: '200': description: A successful response. schema: type: object properties: val_signing_info: title: >- val_signing_info is the signing info of requested val cons address type: object properties: address: type: string start_height: type: string format: int64 title: >- Height at which validator was first a candidate OR was un-jailed index_offset: type: string format: int64 description: >- Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap. jailed_until: type: string format: date-time description: >- Timestamp until which the validator is jailed due to liveness downtime. tombstoned: type: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior. missed_blocks_counter: type: string format: int64 description: >- A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap. description: >- ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. title: >- QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: cons_address description: cons_address is the address to query signing info of in: path required: true type: string tags: - Query /cosmos/staking/v1beta1/delegations/{delegator_addr}: get: summary: >- DelegatorDelegations queries all delegations of a given delegator address. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Query_DelegatorDelegations responses: '200': description: A successful response. schema: type: object properties: delegation_responses: type: array items: type: object properties: delegation: type: object properties: delegator_address: type: string description: >- delegator_address is the encoded address of the delegator. validator_address: type: string description: >- validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: >- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. balance: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses. description: >- delegation_responses defines all the delegations' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: get: summary: Redelegations queries redelegations of given address. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Query_Redelegations responses: '200': description: A successful response. schema: type: object properties: redelegation_responses: type: array items: type: object properties: redelegation: type: object properties: delegator_address: type: string description: >- delegator_address is the bech32-encoded address of the delegator. validator_src_address: type: string description: >- validator_src_address is the validator redelegation source operator address. validator_dst_address: type: string description: >- validator_dst_address is the validator redelegation destination operator address. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: >- completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. description: |- entries are the redelegation entries. redelegation entries description: >- Redelegation contains the list of a particular delegator's redelegating bonds from a particular source validator to a particular destination validator. entries: type: array items: type: object properties: redelegation_entry: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: >- completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. balance: type: string description: >- RedelegationEntryResponse is equivalent to a RedelegationEntry except that it contains a balance in addition to shares which is more suitable for client responses. description: >- RedelegationResponse is equivalent to a Redelegation except that its entries contain a balance in addition to shares which is more suitable for client responses. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryRedelegationsResponse is response type for the Query/Redelegations RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string - name: src_validator_addr description: src_validator_addr defines the validator address to redelegate from. in: query required: false type: string - name: dst_validator_addr description: dst_validator_addr defines the validator address to redelegate to. in: query required: false type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: get: summary: >- DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Query_DelegatorUnbondingDelegations responses: '200': description: A successful response. schema: type: object properties: unbonding_responses: type: array items: type: object properties: delegator_address: type: string description: >- delegator_address is the encoded address of the delegator. validator_address: type: string description: >- validator_address is the encoded address of the validator. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: >- completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: >- balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: |- entries are the unbonding delegation entries. unbonding delegation entries description: >- UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryUnbondingDelegatorDelegationsResponse is response type for the Query/UnbondingDelegatorDelegations RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: get: summary: |- DelegatorValidators queries all validators info for given delegator address. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Query_DelegatorValidators responses: '200': description: A successful response. schema: type: object properties: validators: type: array items: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: >- status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: >- tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: >- description defines the description terms for the validator. type: object properties: moniker: type: string description: >- moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: get: summary: |- DelegatorValidator queries validator info for given delegator validator pair. operationId: CosmosStakingV1Beta1Query_DelegatorValidator responses: '200': description: A successful response. schema: type: object properties: validator: description: validator defines the validator info. type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: >- status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: >- tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: >- description defines the description terms for the validator. type: object properties: moniker: type: string description: >- moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string - name: validator_addr description: validator_addr defines the validator address to query for. in: path required: true type: string tags: - Query /cosmos/staking/v1beta1/historical_info/{height}: get: summary: HistoricalInfo queries the historical info for given height. operationId: CosmosStakingV1Beta1Query_HistoricalInfo responses: '200': description: A successful response. schema: type: object properties: hist: description: hist defines the historical info at the given height. type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: title: prev block info type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. valset: type: array items: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: >- status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: >- tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: >- description defines the description terms for the validator. type: object properties: moniker: type: string description: >- moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. description: >- QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: height description: height defines at which height to query the historical info. in: path required: true type: string format: int64 tags: - Query /cosmos/staking/v1beta1/params: get: summary: Parameters queries the staking parameters. operationId: CosmosStakingV1Beta1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params holds all the parameters of this module. type: object properties: unbonding_time: type: string description: unbonding_time is the time duration of unbonding. max_validators: type: integer format: int64 description: max_validators is the maximum number of validators. max_entries: type: integer format: int64 description: >- max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). historical_entries: type: integer format: int64 description: >- historical_entries is the number of historical entries to persist. bond_denom: type: string description: bond_denom defines the bondable coin denomination. min_commission_rate: type: string title: >- min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators description: >- QueryParamsResponse is response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/staking/v1beta1/pool: get: summary: Pool queries the pool info. operationId: CosmosStakingV1Beta1Query_Pool responses: '200': description: A successful response. schema: type: object properties: pool: description: pool defines the pool info. type: object properties: not_bonded_tokens: type: string bonded_tokens: type: string description: QueryPoolResponse is response type for the Query/Pool RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/staking/v1beta1/validators: get: summary: Validators queries all validators that match the given status. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Query_Validators responses: '200': description: A successful response. schema: type: object properties: validators: type: array items: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: >- status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: >- tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: >- description defines the description terms for the validator. type: object properties: moniker: type: string description: >- moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. description: validators contains all the queried validators. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryValidatorsResponse is response type for the Query/Validators RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: status description: status enables to query for validators matching a given status. in: query required: false type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/staking/v1beta1/validators/{validator_addr}: get: summary: Validator queries validator info for given validator address. operationId: CosmosStakingV1Beta1Query_Validator responses: '200': description: A successful response. schema: type: object properties: validator: description: validator defines the validator info. type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: >- status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: >- tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: >- description defines the description terms for the validator. type: object properties: moniker: type: string description: >- moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator title: >- QueryValidatorResponse is response type for the Query/Validator RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. in: path required: true type: string tags: - Query /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: get: summary: ValidatorDelegations queries delegate info for given validator. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Query_ValidatorDelegations responses: '200': description: A successful response. schema: type: object properties: delegation_responses: type: array items: type: object properties: delegation: type: object properties: delegator_address: type: string description: >- delegator_address is the encoded address of the delegator. validator_address: type: string description: >- validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: >- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. balance: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: |- QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: get: summary: Delegation queries delegate info for given validator delegator pair. operationId: CosmosStakingV1Beta1Query_Delegation responses: '200': description: A successful response. schema: type: object properties: delegation_response: description: >- delegation_responses defines the delegation info of a delegation. type: object properties: delegation: type: object properties: delegator_address: type: string description: >- delegator_address is the encoded address of the delegator. validator_address: type: string description: >- validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: >- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. balance: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- QueryDelegationResponse is response type for the Query/Delegation RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. in: path required: true type: string - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string tags: - Query /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation: get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator pair. operationId: CosmosStakingV1Beta1Query_UnbondingDelegation responses: '200': description: A successful response. schema: type: object properties: unbond: description: unbond defines the unbonding information of a delegation. type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: >- completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: |- entries are the unbonding delegation entries. unbonding delegation entries description: >- QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. in: path required: true type: string - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string tags: - Query /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations: get: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a validator. description: >- When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Query_ValidatorUnbondingDelegations responses: '200': description: A successful response. schema: type: object properties: unbonding_responses: type: array items: type: object properties: delegator_address: type: string description: >- delegator_address is the encoded address of the delegator. validator_address: type: string description: >- validator_address is the encoded address of the validator. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: >- completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: >- balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: |- entries are the unbonding delegation entries. unbonding delegation entries description: >- UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryValidatorUnbondingDelegationsResponse is response type for the Query/ValidatorUnbondingDelegations RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /cosmos.staking.v1beta1.Msg/BeginRedelegate: post: summary: >- BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator. operationId: CosmosStakingV1Beta1Msg_BeginRedelegate responses: '200': description: A successful response. schema: type: object properties: completion_time: type: string format: date-time description: >- MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgBeginRedelegate defines a SDK message for performing a redelegation of coins from a delegator and source validator to a destination validator. in: body required: true schema: type: object properties: delegator_address: type: string validator_src_address: type: string validator_dst_address: type: string amount: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgBeginRedelegate defines a SDK message for performing a redelegation of coins from a delegator and source validator to a destination validator. tags: - Msg /cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation: post: summary: >- CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation and delegate back to previous validator. description: 'Since: cosmos-sdk 0.46' operationId: CosmosStakingV1Beta1Msg_CancelUnbondingDelegation responses: '200': description: A successful response. schema: type: object description: 'Since: cosmos-sdk 0.46' title: MsgCancelUnbondingDelegationResponse default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: 'Since: cosmos-sdk 0.46' in: body required: true schema: type: object properties: delegator_address: type: string validator_address: type: string amount: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: >- amount is always less than or equal to unbonding delegation entry balance creation_height: type: string format: int64 description: creation_height is the height which the unbonding took place. description: 'Since: cosmos-sdk 0.46' title: >- MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator tags: - Msg /cosmos.staking.v1beta1.Msg/CreateValidator: post: summary: CreateValidator defines a method for creating a new validator. operationId: CosmosStakingV1Beta1Msg_CreateValidator responses: '200': description: A successful response. schema: type: object description: >- MsgCreateValidatorResponse defines the Msg/CreateValidator response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgCreateValidator defines a SDK message for creating a new validator. in: body required: true schema: type: object properties: description: type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. description: Description defines a validator description. commission: type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. description: >- CommissionRates defines the initial commission rates to be used for creating a validator. min_self_delegation: type: string delegator_address: type: string description: >- Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation). validator_address: type: string pubkey: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } value: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgCreateValidator defines a SDK message for creating a new validator. tags: - Msg /cosmos.staking.v1beta1.Msg/Delegate: post: summary: |- Delegate defines a method for performing a delegation of coins from a delegator to a validator. operationId: CosmosStakingV1Beta1Msg_Delegate responses: '200': description: A successful response. schema: type: object description: MsgDelegateResponse defines the Msg/Delegate response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgDelegate defines a SDK message for performing a delegation of coins from a delegator to a validator. in: body required: true schema: type: object properties: delegator_address: type: string validator_address: type: string amount: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgDelegate defines a SDK message for performing a delegation of coins from a delegator to a validator. tags: - Msg /cosmos.staking.v1beta1.Msg/EditValidator: post: summary: EditValidator defines a method for editing an existing validator. operationId: CosmosStakingV1Beta1Msg_EditValidator responses: '200': description: A successful response. schema: type: object description: >- MsgEditValidatorResponse defines the Msg/EditValidator response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgEditValidator defines a SDK message for editing an existing validator. in: body required: true schema: type: object properties: description: type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. description: Description defines a validator description. validator_address: type: string commission_rate: type: string title: >- We pass a reference to the new commission rate and min self delegation as it's not mandatory to update. If not updated, the deserialized rate will be zero with no way to distinguish if an update was intended. REF: #2373 min_self_delegation: type: string description: >- MsgEditValidator defines a SDK message for editing an existing validator. tags: - Msg /cosmos.staking.v1beta1.Msg/Undelegate: post: summary: |- Undelegate defines a method for performing an undelegation from a delegate and a validator. operationId: CosmosStakingV1Beta1Msg_Undelegate responses: '200': description: A successful response. schema: type: object properties: completion_time: type: string format: date-time amount: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: amount returns the amount of undelegated coins description: MsgUndelegateResponse defines the Msg/Undelegate response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgUndelegate defines a SDK message for performing an undelegation from a delegate and a validator. in: body required: true schema: type: object properties: delegator_address: type: string validator_address: type: string amount: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgUndelegate defines a SDK message for performing an undelegation from a delegate and a validator. tags: - Msg /cosmos.staking.v1beta1.Msg/UpdateParams: post: summary: |- UpdateParams defines an operation for updating the x/staking module parameters. Since: cosmos-sdk 0.47 operationId: CosmosStakingV1Beta1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/staking parameters to update. NOTE: All parameters must be supplied. type: object properties: unbonding_time: type: string description: unbonding_time is the time duration of unbonding. max_validators: type: integer format: int64 description: max_validators is the maximum number of validators. max_entries: type: integer format: int64 description: >- max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). historical_entries: type: integer format: int64 description: >- historical_entries is the number of historical entries to persist. bond_denom: type: string description: bond_denom defines the bondable coin denomination. min_commission_rate: type: string title: >- min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 tags: - Msg /cosmos/tx/v1beta1/decode: post: summary: TxDecode decodes the transaction. description: 'Since: cosmos-sdk 0.47' operationId: CosmosTxV1Beta1Service_TxDecode responses: '200': description: A successful response. schema: $ref: '#/definitions/cosmos.tx.v1beta1.TxDecodeResponse' default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- TxDecodeRequest is the request type for the Service.TxDecode RPC method. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: tx_bytes: type: string format: byte description: tx_bytes is the raw transaction. description: |- TxDecodeRequest is the request type for the Service.TxDecode RPC method. Since: cosmos-sdk 0.47 tags: - Service /cosmos/tx/v1beta1/decode/amino: post: summary: TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. description: 'Since: cosmos-sdk 0.47' operationId: CosmosTxV1Beta1Service_TxDecodeAmino responses: '200': description: A successful response. schema: type: object properties: amino_json: type: string description: >- TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino RPC method. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino RPC method. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: amino_binary: type: string format: byte description: >- TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino RPC method. Since: cosmos-sdk 0.47 tags: - Service /cosmos/tx/v1beta1/encode: post: summary: TxEncode encodes the transaction. description: 'Since: cosmos-sdk 0.47' operationId: CosmosTxV1Beta1Service_TxEncode responses: '200': description: A successful response. schema: type: object properties: tx_bytes: type: string format: byte description: tx_bytes is the encoded transaction bytes. description: |- TxEncodeResponse is the response type for the Service.TxEncode method. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- TxEncodeRequest is the request type for the Service.TxEncode RPC method. Since: cosmos-sdk 0.47 in: body required: true schema: $ref: '#/definitions/cosmos.tx.v1beta1.TxEncodeRequest' tags: - Service /cosmos/tx/v1beta1/encode/amino: post: summary: TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. description: 'Since: cosmos-sdk 0.47' operationId: CosmosTxV1Beta1Service_TxEncodeAmino responses: '200': description: A successful response. schema: type: object properties: amino_binary: type: string format: byte description: >- TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino RPC method. Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino RPC method. Since: cosmos-sdk 0.47 in: body required: true schema: type: object properties: amino_json: type: string description: >- TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino RPC method. Since: cosmos-sdk 0.47 tags: - Service /cosmos/tx/v1beta1/simulate: post: summary: Simulate simulates executing a transaction for estimating gas usage. operationId: CosmosTxV1Beta1Service_Simulate responses: '200': description: A successful response. schema: type: object properties: gas_info: description: gas_info is the information about gas used in the simulation. type: object properties: gas_wanted: type: string format: uint64 description: >- GasWanted is the maximum units of work we allow this tx to perform. gas_used: type: string format: uint64 description: GasUsed is the amount of gas actually consumed. result: description: result is the result of the simulation. type: object properties: data: type: string format: byte description: >- Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. Deprecated. This field is still populated, but prefer msg_response instead because it also contains the Msg response typeURL. log: type: string description: >- Log contains the log information from message or handler execution. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events contains a slice of Event objects that were emitted during message or handler execution. msg_responses: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- msg_responses contains the Msg handler responses type packed in Anys. Since: cosmos-sdk 0.46 description: |- SimulateResponse is the response type for the Service.SimulateRPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- SimulateRequest is the request type for the Service.Simulate RPC method. in: body required: true schema: $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' tags: - Service /cosmos/tx/v1beta1/txs: get: summary: GetTxsEvent fetches txs by event. operationId: CosmosTxV1Beta1Service_GetTxsEvent responses: '200': description: A successful response. schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: events description: >- events is the list of transaction event type. Deprecated post v0.47.x: use query instead, which should contain a valid events query. in: query required: false type: array items: type: string collectionFormat: multi - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean - name: order_by description: |2- - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order - ORDER_BY_DESC: ORDER_BY_DESC defines descending order in: query required: false type: string enum: - ORDER_BY_UNSPECIFIED - ORDER_BY_ASC - ORDER_BY_DESC default: ORDER_BY_UNSPECIFIED - name: page description: |- page is the page number to query, starts at 1. If not provided, will default to first page. in: query required: false type: string format: uint64 - name: limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: query description: >- query defines the transaction event query that is proxied to Tendermint's TxSearch RPC method. The query must be valid. Since cosmos-sdk 0.50 in: query required: false type: string tags: - Service post: summary: BroadcastTx broadcast transaction. operationId: CosmosTxV1Beta1Service_BroadcastTx responses: '200': description: A successful response. schema: type: object properties: tx_response: description: tx_response is the queried TxResponses. type: object properties: height: type: string format: int64 title: The block height txhash: type: string description: The transaction hash. codespace: type: string title: Namespace for the Code code: type: integer format: int64 description: Response code. data: type: string description: Result bytes, if any. raw_log: type: string description: >- The output of the application's logger (raw string). May be non-deterministic. logs: type: array items: type: object properties: msg_index: type: integer format: int64 log: type: string events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string description: >- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. description: >- StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. description: >- Events contains a slice of Event objects that were emitted during some execution. description: >- ABCIMessageLog defines a structure containing an indexed tx ABCI message log. description: >- The output of the application's logger (typed). May be non-deterministic. info: type: string description: Additional information. May be non-deterministic. gas_wanted: type: string format: int64 description: Amount of gas requested for transaction. gas_used: type: string format: int64 description: Amount of gas consumed by transaction. tx: description: The request transaction bytes. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} timestamp: type: string description: >- Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: |- BroadcastTxResponse is the response type for the Service.BroadcastTx method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- BroadcastTxRequest is the request type for the Service.BroadcastTxRequest RPC method. in: body required: true schema: type: object properties: tx_bytes: type: string format: byte description: tx_bytes is the raw transaction. mode: type: string enum: - BROADCAST_MODE_UNSPECIFIED - BROADCAST_MODE_BLOCK - BROADCAST_MODE_SYNC - BROADCAST_MODE_ASYNC default: BROADCAST_MODE_UNSPECIFIED description: >- BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns immediately. description: >- BroadcastTxRequest is the request type for the Service.BroadcastTxRequest RPC method. tags: - Service /cosmos/tx/v1beta1/txs/block/{height}: get: summary: GetBlockWithTxs fetches a block with decoded txs. description: 'Since: cosmos-sdk 0.45.2' operationId: CosmosTxV1Beta1Service_GetBlockWithTxs responses: '200': description: A successful response. schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: height description: height is the height of the block to query. in: path required: true type: string format: int64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Service /cosmos/tx/v1beta1/txs/{hash}: get: summary: GetTx fetches a tx by hash. operationId: CosmosTxV1Beta1Service_GetTx responses: '200': description: A successful response. schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: hash description: hash is the tx hash to query, encoded as a hex string. in: path required: true type: string tags: - Service /cosmos.upgrade.v1beta1.Msg/CancelUpgrade: post: summary: |- CancelUpgrade is a governance operation for cancelling a previously approved software upgrade. description: 'Since: cosmos-sdk 0.46' operationId: CosmosUpgradeV1Beta1Msg_CancelUpgrade responses: '200': description: A successful response. schema: type: object description: |- MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgCancelUpgrade is the Msg/CancelUpgrade request type. Since: cosmos-sdk 0.46 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). description: |- MsgCancelUpgrade is the Msg/CancelUpgrade request type. Since: cosmos-sdk 0.46 tags: - Msg /cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade: post: summary: >- SoftwareUpgrade is a governance operation for initiating a software upgrade. description: 'Since: cosmos-sdk 0.46' operationId: CosmosUpgradeV1Beta1Msg_SoftwareUpgrade responses: '200': description: A successful response. schema: type: object description: >- MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. Since: cosmos-sdk 0.46 in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). plan: description: plan is the upgrade plan. type: object properties: name: type: string description: >- Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. time: type: string format: date-time description: >- Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. height: type: string format: int64 description: The height at which the upgrade must be performed. info: type: string title: >- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: description: >- Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: |- MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. Since: cosmos-sdk 0.46 tags: - Msg /cosmos/upgrade/v1beta1/applied_plan/{name}: get: summary: AppliedPlan queries a previously applied upgrade plan by its name. operationId: CosmosUpgradeV1Beta1Query_AppliedPlan responses: '200': description: A successful response. schema: type: object properties: height: type: string format: int64 description: height is the block height at which the plan was applied. description: >- QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: name description: name is the name of the applied plan to query for. in: path required: true type: string tags: - Query /cosmos/upgrade/v1beta1/authority: get: summary: Returns the account with authority to conduct upgrades description: 'Since: cosmos-sdk 0.46' operationId: CosmosUpgradeV1Beta1Query_Authority responses: '200': description: A successful response. schema: type: object properties: address: type: string description: 'Since: cosmos-sdk 0.46' title: QueryAuthorityResponse is the response type for Query/Authority default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/upgrade/v1beta1/current_plan: get: summary: CurrentPlan queries the current upgrade plan. operationId: CosmosUpgradeV1Beta1Query_CurrentPlan responses: '200': description: A successful response. schema: type: object properties: plan: description: plan is the current upgrade plan. type: object properties: name: type: string description: >- Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. time: type: string format: date-time description: >- Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. height: type: string format: int64 description: The height at which the upgrade must be performed. info: type: string title: >- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: description: >- Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /cosmos/upgrade/v1beta1/module_versions: get: summary: ModuleVersions queries the list of module versions from state. description: 'Since: cosmos-sdk 0.43' operationId: CosmosUpgradeV1Beta1Query_ModuleVersions responses: '200': description: A successful response. schema: type: object properties: module_versions: type: array items: type: object properties: name: type: string title: name of the app module version: type: string format: uint64 title: consensus version of the app module description: |- ModuleVersion specifies a module and its consensus version. Since: cosmos-sdk 0.43 description: >- module_versions is a list of module names with their consensus versions. description: >- QueryModuleVersionsResponse is the response type for the Query/ModuleVersions RPC method. Since: cosmos-sdk 0.43 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: module_name description: |- module_name is a field to query a specific module consensus version from state. Leaving this empty will fetch the full list of module versions from state in: query required: false type: string tags: - Query /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: get: summary: >- UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) operationId: CosmosUpgradeV1Beta1Query_UpgradedConsensusState responses: '200': description: A successful response. schema: type: object properties: upgraded_consensus_state: type: string format: byte title: 'Since: cosmos-sdk 0.43' description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: last_height description: |- last height of the current chain must be sent in request as this is the height under which next consensus state is stored in: path required: true type: string format: int64 tags: - Query /cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount: post: summary: |- CreatePeriodicVestingAccount defines a method that enables creating a periodic vesting account. description: 'Since: cosmos-sdk 0.46' operationId: CosmosVestingV1Beta1Msg_CreatePeriodicVestingAccount responses: '200': description: A successful response. schema: type: object description: >- MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount response type. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgCreateVestingAccount defines a message that enables creating a vesting account. Since: cosmos-sdk 0.46 in: body required: true schema: type: object properties: from_address: type: string to_address: type: string start_time: type: string format: int64 description: start of vesting as unix time (in seconds). vesting_periods: type: array items: type: object properties: length: type: string format: int64 description: Period duration in seconds. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- Period defines a length of time and amount of coins that will vest. description: >- MsgCreateVestingAccount defines a message that enables creating a vesting account. Since: cosmos-sdk 0.46 tags: - Msg /cosmos.vesting.v1beta1.Msg/CreatePermanentLockedAccount: post: summary: >- CreatePermanentLockedAccount defines a method that enables creating a permanent locked account. description: 'Since: cosmos-sdk 0.46' operationId: CosmosVestingV1Beta1Msg_CreatePermanentLockedAccount responses: '200': description: A successful response. schema: type: object description: >- MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. Since: cosmos-sdk 0.46 default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgCreatePermanentLockedAccount defines a message that enables creating a permanent locked account. Since: cosmos-sdk 0.46 in: body required: true schema: type: object properties: from_address: type: string to_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgCreatePermanentLockedAccount defines a message that enables creating a permanent locked account. Since: cosmos-sdk 0.46 tags: - Msg /cosmos.vesting.v1beta1.Msg/CreateVestingAccount: post: summary: |- CreateVestingAccount defines a method that enables creating a vesting account. operationId: CosmosVestingV1Beta1Msg_CreateVestingAccount responses: '200': description: A successful response. schema: type: object description: >- MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgCreateVestingAccount defines a message that enables creating a vesting account. in: body required: true schema: type: object properties: from_address: type: string to_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. end_time: type: string format: int64 description: end of vesting as unix time (in seconds). delayed: type: boolean description: >- MsgCreateVestingAccount defines a message that enables creating a vesting account. tags: - Msg /ibc.applications.fee.v1.Msg/PayPacketFee: post: summary: >- PayPacketFee defines a rpc handler method for MsgPayPacketFee PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of the packet at the next sequence NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows initiates the lifecycle of the incentivized packet operationId: IbcApplicationsFeeV1Msg_PayPacketFee responses: '200': description: A successful response. schema: type: object title: >- MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee source_port_id: type: string title: the source port unique identifier source_channel_id: type: string title: the source channel unique identifer signer: type: string title: account address to refund fee if necessary relayers: type: array items: type: string title: optional list of relayers permitted to the receive packet fees title: >- MsgPayPacketFee defines the request type for the PayPacketFee rpc This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be paid for tags: - Msg /ibc.applications.fee.v1.Msg/PayPacketFeeAsync: post: summary: >- PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of a known packet (i.e. at a particular sequence) operationId: IbcApplicationsFeeV1Msg_PayPacketFeeAsync responses: '200': description: A successful response. schema: type: object title: >- MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fee: title: the packet fee associated with a particular IBC packet type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) tags: - Msg /ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee: post: summary: >- RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty payee address before relaying. This ensures they will be properly compensated for forward relaying since the destination chain must include the registered counterparty payee address in the acknowledgement. This function may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. operationId: IbcApplicationsFeeV1Msg_RegisterCounterpartyPayee responses: '200': description: A successful response. schema: type: object title: >- MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: port_id: type: string title: unique port identifier channel_id: type: string title: unique channel identifier relayer: type: string title: the relayer address counterparty_payee: type: string title: the counterparty payee address title: >- MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc tags: - Msg /ibc.applications.fee.v1.Msg/RegisterPayee: post: summary: >- RegisterPayee defines a rpc handler method for MsgRegisterPayee RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on the source chain from which packets originate as this is where fee distribution takes place. This function may be called more than once by a relayer, in which case, the latest payee is always used. operationId: IbcApplicationsFeeV1Msg_RegisterPayee responses: '200': description: A successful response. schema: type: object title: >- MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: port_id: type: string title: unique port identifier channel_id: type: string title: unique channel identifier relayer: type: string title: the relayer address payee: type: string title: the payee address title: >- MsgRegisterPayee defines the request type for the RegisterPayee rpc tags: - Msg /ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled: get: summary: >- FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel operationId: IbcApplicationsFeeV1Query_FeeEnabledChannel responses: '200': description: A successful response. schema: type: object properties: fee_enabled: type: boolean title: boolean flag representing the fee enabled channel status title: >- QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: unique channel identifier in: path required: true type: string - name: port_id description: unique port identifier in: path required: true type: string tags: - Query /ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets: get: summary: Gets all incentivized packets for a specific channel operationId: IbcApplicationsFeeV1Query_IncentivizedPacketsForChannel responses: '200': description: A successful response. schema: type: object properties: incentivized_packets: type: array items: type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fees: type: array items: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: >- optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers title: list of packet fees title: >- IdentifiedPacketFees contains a list of type PacketFee and associated PacketId title: Map of all incentivized_packets pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id in: path required: true type: string - name: port_id in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean - name: query_height description: Height to query at in: query required: false type: string format: uint64 tags: - Query /ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee: get: summary: >- CounterpartyPayee returns the registered counterparty payee for forward relaying operationId: IbcApplicationsFeeV1Query_CounterpartyPayee responses: '200': description: A successful response. schema: type: object properties: counterparty_payee: type: string title: >- the counterparty payee address used to compensate forward relaying title: >- QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: unique channel identifier in: path required: true type: string - name: relayer description: the relayer address to which the counterparty is registered in: path required: true type: string tags: - Query /ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee: get: summary: >- Payee returns the registered payee address for a specific channel given the relayer address operationId: IbcApplicationsFeeV1Query_Payee responses: '200': description: A successful response. schema: type: object properties: payee_address: type: string title: the payee address to which packet fees are paid out title: QueryPayeeResponse defines the response type for the Payee rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: unique channel identifier in: path required: true type: string - name: relayer description: the relayer address to which the distribution address is registered in: path required: true type: string tags: - Query /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/incentivized_packet: get: summary: >- IncentivizedPacket returns all packet fees for a packet given its identifier operationId: IbcApplicationsFeeV1Query_IncentivizedPacket responses: '200': description: A successful response. schema: type: object properties: incentivized_packet: title: the identified fees for the incentivized packet type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fees: type: array items: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers title: list of packet fees title: >- QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: packet_id.channel_id description: channel unique identifier in: path required: true type: string - name: packet_id.port_id description: channel port identifier in: path required: true type: string - name: packet_id.sequence description: packet sequence in: path required: true type: string format: uint64 - name: query_height description: block height at which to query in: query required: false type: string format: uint64 tags: - Query /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_ack_fees: get: summary: >- TotalAckFees returns the total acknowledgement fees for a packet given its identifier operationId: IbcApplicationsFeeV1Query_TotalAckFees responses: '200': description: A successful response. schema: type: object properties: ack_fees: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the total packet acknowledgement fees title: >- QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: packet_id.channel_id description: channel unique identifier in: path required: true type: string - name: packet_id.port_id description: channel port identifier in: path required: true type: string - name: packet_id.sequence description: packet sequence in: path required: true type: string format: uint64 tags: - Query /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_recv_fees: get: summary: >- TotalRecvFees returns the total receive fees for a packet given its identifier operationId: IbcApplicationsFeeV1Query_TotalRecvFees responses: '200': description: A successful response. schema: type: object properties: recv_fees: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the total packet receive fees title: >- QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: packet_id.channel_id description: channel unique identifier in: path required: true type: string - name: packet_id.port_id description: channel port identifier in: path required: true type: string - name: packet_id.sequence description: packet sequence in: path required: true type: string format: uint64 tags: - Query /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_timeout_fees: get: summary: >- TotalTimeoutFees returns the total timeout fees for a packet given its identifier operationId: IbcApplicationsFeeV1Query_TotalTimeoutFees responses: '200': description: A successful response. schema: type: object properties: timeout_fees: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the total packet timeout fees title: >- QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: packet_id.channel_id description: channel unique identifier in: path required: true type: string - name: packet_id.port_id description: channel port identifier in: path required: true type: string - name: packet_id.sequence description: packet sequence in: path required: true type: string format: uint64 tags: - Query /ibc/apps/fee/v1/fee_enabled: get: summary: FeeEnabledChannels returns a list of all fee enabled channels operationId: IbcApplicationsFeeV1Query_FeeEnabledChannels responses: '200': description: A successful response. schema: type: object properties: fee_enabled_channels: type: array items: type: object properties: port_id: type: string title: unique port identifier channel_id: type: string title: unique channel identifier title: >- FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel title: list of fee enabled channels pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean - name: query_height description: block height at which to query in: query required: false type: string format: uint64 tags: - Query /ibc/apps/fee/v1/incentivized_packets: get: summary: >- IncentivizedPackets returns all incentivized packets and their associated fees operationId: IbcApplicationsFeeV1Query_IncentivizedPackets responses: '200': description: A successful response. schema: type: object properties: incentivized_packets: type: array items: type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fees: type: array items: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: >- optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers title: list of packet fees title: >- IdentifiedPacketFees contains a list of type PacketFee and associated PacketId title: list of identified fees for incentivized packets pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean - name: query_height description: block height at which to query in: query required: false type: string format: uint64 tags: - Query /ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount: post: summary: >- RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. operationId: >- IbcApplicationsInterchainAccountsControllerV1Msg_RegisterInterchainAccount responses: '200': description: A successful response. schema: type: object properties: channel_id: type: string port_id: type: string title: >- MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: owner: type: string connection_id: type: string version: type: string title: >- MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount tags: - Msg /ibc.applications.interchain_accounts.controller.v1.Msg/SendTx: post: summary: SendTx defines a rpc handler for MsgSendTx. operationId: IbcApplicationsInterchainAccountsControllerV1Msg_SendTx responses: '200': description: A successful response. schema: type: object properties: sequence: type: string format: uint64 title: MsgSendTxResponse defines the response for MsgSendTx default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: owner: type: string connection_id: type: string packet_data: type: object properties: type: type: string enum: - TYPE_UNSPECIFIED - TYPE_EXECUTE_TX default: TYPE_UNSPECIFIED description: |- - TYPE_UNSPECIFIED: Default zero value enumeration - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain title: >- Type defines a classification of message issued from a controller chain to its associated interchain accounts host data: type: string format: byte memo: type: string description: >- InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. relative_timeout: type: string format: uint64 description: >- Relative timeout timestamp provided will be added to the current block time during transaction execution. The timeout timestamp must be non-zero. title: MsgSendTx defines the payload for Msg/SendTx tags: - Msg /ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams: post: summary: UpdateParams defines a rpc handler for MsgUpdateParams. operationId: IbcApplicationsInterchainAccountsControllerV1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object title: MsgUpdateParamsResponse defines the response for Msg/UpdateParams default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: signer: type: string title: signer address params: description: >- params defines the 27-interchain-accounts/controller parameters to update. NOTE: All parameters must be supplied. type: object properties: controller_enabled: type: boolean description: >- controller_enabled enables or disables the controller submodule. title: MsgUpdateParams defines the payload for Msg/UpdateParams tags: - Msg /ibc/apps/interchain_accounts/controller/v1/owners/{owner}/connections/{connection_id}: get: summary: >- InterchainAccount returns the interchain account address for a given owner address on a given connection operationId: IbcApplicationsInterchainAccountsControllerV1Query_InterchainAccount responses: '200': description: A successful response. schema: type: object properties: address: type: string description: >- QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: owner in: path required: true type: string - name: connection_id in: path required: true type: string tags: - Query /ibc/apps/interchain_accounts/controller/v1/params: get: summary: Params queries all parameters of the ICA controller submodule. operationId: IbcApplicationsInterchainAccountsControllerV1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: controller_enabled: type: boolean description: >- controller_enabled enables or disables the controller submodule. description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams: post: summary: UpdateParams defines a rpc handler for MsgUpdateParams. operationId: IbcApplicationsInterchainAccountsHostV1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object title: MsgUpdateParamsResponse defines the response for Msg/UpdateParams default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: signer: type: string title: signer address params: description: >- params defines the 27-interchain-accounts/host parameters to update. NOTE: All parameters must be supplied. type: object properties: host_enabled: type: boolean description: host_enabled enables or disables the host submodule. allow_messages: type: array items: type: string description: >- allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. title: MsgUpdateParams defines the payload for Msg/UpdateParams tags: - Msg /ibc/apps/interchain_accounts/host/v1/params: get: summary: Params queries all parameters of the ICA host submodule. operationId: IbcApplicationsInterchainAccountsHostV1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: host_enabled: type: boolean description: host_enabled enables or disables the host submodule. allow_messages: type: array items: type: string description: >- allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /ibc.applications.transfer.v1.Msg/Transfer: post: summary: Transfer defines a rpc handler method for MsgTransfer. operationId: IbcApplicationsTransferV1Msg_Transfer responses: '200': description: A successful response. schema: type: object properties: sequence: type: string format: uint64 title: sequence number of the transfer packet sent description: MsgTransferResponse defines the Msg/Transfer response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: source_port: type: string title: the port on which the packet will be sent source_channel: type: string title: the channel by which the packet will be sent token: title: the tokens to be transferred type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. sender: type: string title: the sender address receiver: type: string title: the recipient address on the destination chain timeout_height: description: |- Timeout height relative to the current block height. The timeout is disabled when set to 0. type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients timeout_timestamp: type: string format: uint64 description: |- Timeout timestamp in absolute nanoseconds since unix epoch. The timeout is disabled when set to 0. memo: type: string title: optional memo title: >- MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between ICS20 enabled chains. See ICS Spec here: https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures tags: - Msg /ibc.applications.transfer.v1.Msg/UpdateParams: post: summary: UpdateParams defines a rpc handler for MsgUpdateParams. operationId: IbcApplicationsTransferV1Msg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: MsgUpdateParams is the Msg/UpdateParams request type. in: body required: true schema: type: object properties: signer: type: string title: signer address params: description: |- params defines the transfer parameters to update. NOTE: All parameters must be supplied. type: object properties: send_enabled: type: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this chain. receive_enabled: type: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this chain. description: MsgUpdateParams is the Msg/UpdateParams request type. tags: - Msg /ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address: get: summary: >- EscrowAddress returns the escrow address for a particular port and channel id. operationId: IbcApplicationsTransferV1Query_EscrowAddress responses: '200': description: A successful response. schema: type: object properties: escrow_address: type: string title: the escrow account address description: >- QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: channel_id description: unique channel identifier in: path required: true type: string - name: port_id description: unique port identifier in: path required: true type: string tags: - Query /ibc/apps/transfer/v1/denom_hashes/{trace}: get: summary: DenomHash queries a denomination hash information. operationId: IbcApplicationsTransferV1Query_DenomHash responses: '200': description: A successful response. schema: type: object properties: hash: type: string description: hash (in hex format) of the denomination trace information. description: >- QueryDenomHashResponse is the response type for the Query/DenomHash RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: trace description: The denomination trace ([port_id]/[channel_id])+/[denom] in: path required: true type: string pattern: .+ tags: - Query /ibc/apps/transfer/v1/denom_traces: get: summary: DenomTraces queries all denomination traces. operationId: IbcApplicationsTransferV1Query_DenomTraces responses: '200': description: A successful response. schema: type: object properties: denom_traces: type: array items: type: object properties: path: type: string description: >- path defines the chain of port/channel identifiers used for tracing the source of the fungible token. base_denom: type: string description: base denomination of the relayed fungible token. description: >- DenomTrace contains the base denomination for ICS20 fungible tokens and the source tracing information path. description: denom_traces returns all denominations trace information. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc/apps/transfer/v1/denom_traces/{hash}: get: summary: DenomTrace queries a denomination trace information. operationId: IbcApplicationsTransferV1Query_DenomTrace responses: '200': description: A successful response. schema: type: object properties: denom_trace: description: >- denom_trace returns the requested denomination trace information. type: object properties: path: type: string description: >- path defines the chain of port/channel identifiers used for tracing the source of the fungible token. base_denom: type: string description: base denomination of the relayed fungible token. description: >- QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: hash description: >- hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. in: path required: true type: string pattern: .+ tags: - Query /ibc/apps/transfer/v1/denoms/{denom}/total_escrow: get: summary: >- TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom. operationId: IbcApplicationsTransferV1Query_TotalEscrowForDenom responses: '200': description: A successful response. schema: type: object properties: amount: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: denom in: path required: true type: string pattern: .+ tags: - Query /ibc/apps/transfer/v1/params: get: summary: Params queries all parameters of the ibc-transfer module. operationId: IbcApplicationsTransferV1Query_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: send_enabled: type: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this chain. receive_enabled: type: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this chain. description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /ibc.core.channel.v1.Msg/Acknowledgement: post: summary: Acknowledgement defines a rpc handler method for MsgAcknowledgement. operationId: IbcCoreChannelV1Msg_Acknowledgement responses: '200': description: A successful response. schema: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: >- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: >- MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: >- actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: >- block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC acknowledgement: type: string format: byte proof_acked: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string title: MsgAcknowledgement receives incoming IBC acknowledgement tags: - Msg /ibc.core.channel.v1.Msg/ChannelCloseConfirm: post: summary: |- ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. operationId: IbcCoreChannelV1Msg_ChannelCloseConfirm responses: '200': description: A successful response. schema: type: object description: >- MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to CLOSED on Chain A. in: body required: true schema: type: object properties: port_id: type: string channel_id: type: string proof_init: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: |- MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to CLOSED on Chain A. tags: - Msg /ibc.core.channel.v1.Msg/ChannelCloseInit: post: summary: ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. operationId: IbcCoreChannelV1Msg_ChannelCloseInit responses: '200': description: A successful response. schema: type: object description: >- MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgChannelCloseInit defines a msg sent by a Relayer to Chain A to close a channel with Chain B. in: body required: true schema: type: object properties: port_id: type: string channel_id: type: string signer: type: string description: |- MsgChannelCloseInit defines a msg sent by a Relayer to Chain A to close a channel with Chain B. tags: - Msg /ibc.core.channel.v1.Msg/ChannelOpenAck: post: summary: ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. operationId: IbcCoreChannelV1Msg_ChannelOpenAck responses: '200': description: A successful response. schema: type: object description: >- MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of channel state to TRYOPEN on Chain B. in: body required: true schema: type: object properties: port_id: type: string channel_id: type: string counterparty_channel_id: type: string counterparty_version: type: string proof_try: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: >- MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of channel state to TRYOPEN on Chain B. tags: - Msg /ibc.core.channel.v1.Msg/ChannelOpenConfirm: post: summary: >- ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. operationId: IbcCoreChannelV1Msg_ChannelOpenConfirm responses: '200': description: A successful response. schema: type: object description: >- MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to OPEN on Chain A. in: body required: true schema: type: object properties: port_id: type: string channel_id: type: string proof_ack: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: >- MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to OPEN on Chain A. tags: - Msg /ibc.core.channel.v1.Msg/ChannelOpenInit: post: summary: ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. operationId: IbcCoreChannelV1Msg_ChannelOpenInit responses: '200': description: A successful response. schema: type: object properties: channel_id: type: string version: type: string description: >- MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It is called by a relayer on Chain A. in: body required: true schema: type: object properties: port_id: type: string channel: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: >- opaque channel version, which is agreed upon during the handshake description: >- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. signer: type: string description: >- MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It is called by a relayer on Chain A. tags: - Msg /ibc.core.channel.v1.Msg/ChannelOpenTry: post: summary: ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. operationId: IbcCoreChannelV1Msg_ChannelOpenTry responses: '200': description: A successful response. schema: type: object properties: version: type: string channel_id: type: string description: >- MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel on Chain B. The version field within the Channel field has been deprecated. Its value will be ignored by core IBC. in: body required: true schema: type: object properties: port_id: type: string previous_channel_id: type: string description: >- Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. channel: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: >- opaque channel version, which is agreed upon during the handshake description: >- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. counterparty_version: type: string proof_init: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: >- MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel on Chain B. The version field within the Channel field has been deprecated. Its value will be ignored by core IBC. tags: - Msg /ibc.core.channel.v1.Msg/RecvPacket: post: summary: RecvPacket defines a rpc handler method for MsgRecvPacket. operationId: IbcCoreChannelV1Msg_RecvPacket responses: '200': description: A successful response. schema: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: >- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: MsgRecvPacketResponse defines the Msg/RecvPacket response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: >- actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: >- block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC proof_commitment: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string title: MsgRecvPacket receives incoming IBC packet tags: - Msg /ibc.core.channel.v1.Msg/Timeout: post: summary: Timeout defines a rpc handler method for MsgTimeout. operationId: IbcCoreChannelV1Msg_Timeout responses: '200': description: A successful response. schema: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: >- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: MsgTimeoutResponse defines the Msg/Timeout response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: >- actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: >- block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC proof_unreceived: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients next_sequence_recv: type: string format: uint64 signer: type: string title: MsgTimeout receives timed-out packet tags: - Msg /ibc.core.channel.v1.Msg/TimeoutOnClose: post: summary: TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. operationId: IbcCoreChannelV1Msg_TimeoutOnClose responses: '200': description: A successful response. schema: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: >- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: >- MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgTimeoutOnClose timed-out packet upon counterparty channel closure. in: body required: true schema: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: >- actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: >- block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC proof_unreceived: type: string format: byte proof_close: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients next_sequence_recv: type: string format: uint64 signer: type: string description: >- MsgTimeoutOnClose timed-out packet upon counterparty channel closure. tags: - Msg /ibc/core/channel/v1/channels: get: summary: Channels queries all the IBC channels of a chain. operationId: IbcCoreChannelV1Query_Channels responses: '200': description: A successful response. schema: type: object properties: channels: type: array items: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: >- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: >- opaque channel version, which is agreed upon during the handshake port_id: type: string title: port identifier channel_id: type: string title: channel identifier description: >- IdentifiedChannel defines a channel with additional port and channel identifier fields. description: list of stored channels of the chain. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryChannelsResponse is the response type for the Query/Channels RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}: get: summary: Channel queries an IBC Channel. operationId: IbcCoreChannelV1Query_Channel responses: '200': description: A successful response. schema: type: object properties: channel: title: channel associated with the request identifiers type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: >- opaque channel version, which is agreed upon during the handshake description: >- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryChannelResponse is the response type for the Query/Channel RPC method. Besides the Channel end, it includes a proof and the height from which the proof was retrieved. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state: get: summary: >- ChannelClientState queries for the client state for the channel associated with the provided channel identifiers. operationId: IbcCoreChannelV1Query_ChannelClientState responses: '200': description: A successful response. schema: type: object properties: identified_client_state: title: client state associated with the channel type: object properties: client_id: type: string title: client identifier client_state: title: client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- IdentifiedClientState defines a client state with an additional client identifier field. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}: get: summary: |- ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers. operationId: IbcCoreChannelV1Query_ChannelConsensusState responses: '200': description: A successful response. schema: type: object properties: consensus_state: title: consensus state associated with the channel type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } client_id: type: string title: client ID associated with the consensus state proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: revision_number description: revision number of the consensus state in: path required: true type: string format: uint64 - name: revision_height description: revision height of the consensus state in: path required: true type: string format: uint64 tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence: get: summary: >- NextSequenceReceive returns the next receive sequence for a given channel. operationId: IbcCoreChannelV1Query_NextSequenceReceive responses: '200': description: A successful response. schema: type: object 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence_send: get: summary: NextSequenceSend returns the next send sequence for a given channel. operationId: IbcCoreChannelV1Query_NextSequenceSend responses: '200': description: A successful response. schema: type: object 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryNextSequenceSendResponse is the request type for the Query/QueryNextSequenceSend RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements: get: summary: >- PacketAcknowledgements returns all the packet acknowledgements associated with a channel. operationId: IbcCoreChannelV1Query_PacketAcknowledgements responses: '200': description: A successful response. schema: type: object properties: acknowledgements: type: array items: type: object properties: port_id: type: string description: channel port identifier. channel_id: type: string description: channel unique identifier. sequence: type: string format: uint64 description: packet sequence. data: type: string format: byte description: embedded data that represents packet state. description: >- PacketState defines the generic type necessary to retrieve and store packet commitments, acknowledgements, and receipts. Caller is responsible for knowing the context necessary to interpret this state as a commitment, acknowledgement, or a receipt. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryPacketAcknowledgemetsResponse is the request type for the Query/QueryPacketAcknowledgements RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean - name: packet_commitment_sequences description: list of packet sequences in: query required: false type: array items: type: string format: uint64 collectionFormat: multi tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}: get: summary: PacketAcknowledgement queries a stored packet acknowledgement hash. operationId: IbcCoreChannelV1Query_PacketAcknowledgement responses: '200': description: A successful response. schema: type: object 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- QueryPacketAcknowledgementResponse defines the client query response for a packet which also includes a proof and the height from which the proof was retrieved default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: sequence description: packet sequence in: path required: true type: string format: uint64 tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments: get: summary: |- PacketCommitments returns all the packet commitments hashes associated with a channel. operationId: IbcCoreChannelV1Query_PacketCommitments responses: '200': description: A successful response. schema: type: object properties: commitments: type: array items: type: object properties: port_id: type: string description: channel port identifier. channel_id: type: string description: channel unique identifier. sequence: type: string format: uint64 description: packet sequence. data: type: string format: byte description: embedded data that represents packet state. description: >- PacketState defines the generic type necessary to retrieve and store packet commitments, acknowledgements, and receipts. Caller is responsible for knowing the context necessary to interpret this state as a commitment, acknowledgement, or a receipt. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks: get: summary: >- UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences. operationId: IbcCoreChannelV1Query_UnreceivedAcks responses: '200': description: A successful response. schema: type: object properties: sequences: type: array items: type: string format: uint64 title: list of unreceived acknowledgement sequences height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryUnreceivedAcksResponse is the response type for the Query/UnreceivedAcks RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: packet_ack_sequences description: list of acknowledgement sequences in: path required: true type: array items: type: string format: uint64 collectionFormat: csv minItems: 1 tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets: get: summary: >- UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences. operationId: IbcCoreChannelV1Query_UnreceivedPackets responses: '200': description: A successful response. schema: type: object properties: sequences: type: array items: type: string format: uint64 title: list of unreceived packet sequences height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: packet_commitment_sequences description: list of packet sequences in: path required: true type: array items: type: string format: uint64 collectionFormat: csv minItems: 1 tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}: get: summary: PacketCommitment queries a stored packet commitment hash. operationId: IbcCoreChannelV1Query_PacketCommitment responses: '200': description: A successful response. schema: 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- QueryPacketCommitmentResponse defines the client query response for a packet which also includes a proof and the height from which the proof was retrieved default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: sequence description: packet sequence in: path required: true type: string format: uint64 tags: - Query /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}: get: summary: >- PacketReceipt queries if a given packet sequence has been received on the queried chain operationId: IbcCoreChannelV1Query_PacketReceipt responses: '200': description: A successful response. schema: type: object properties: received: type: boolean title: success flag for if receipt exists proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- QueryPacketReceiptResponse defines the client query response for a packet receipt which also includes a proof, and the height from which the proof was retrieved default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: channel_id description: channel unique identifier in: path required: true type: string - name: port_id description: port unique identifier in: path required: true type: string - name: sequence description: packet sequence in: path required: true type: string format: uint64 tags: - Query /ibc/core/channel/v1/connections/{connection}/channels: get: summary: |- ConnectionChannels queries all the channels associated with a connection end. operationId: IbcCoreChannelV1Query_ConnectionChannels responses: '200': description: A successful response. schema: type: object properties: channels: type: array items: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: >- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: >- opaque channel version, which is agreed upon during the handshake port_id: type: string title: port identifier channel_id: type: string title: channel identifier description: >- IdentifiedChannel defines a channel with additional port and channel identifier fields. description: list of channels associated with a connection. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: connection description: connection unique identifier in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc.core.client.v1.Msg/CreateClient: post: summary: CreateClient defines a rpc handler method for MsgCreateClient. operationId: IbcCoreClientV1Msg_CreateClient responses: '200': description: A successful response. schema: type: object description: >- MsgCreateClientResponse defines the Msg/CreateClient response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: client_state: title: light client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } consensus_state: description: >- consensus state associated with the client that corresponds to a given height. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} signer: type: string title: signer address title: MsgCreateClient defines a message to create an IBC client tags: - Msg /ibc.core.client.v1.Msg/IBCSoftwareUpgrade: post: summary: >- IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. operationId: IbcCoreClientV1Msg_IBCSoftwareUpgrade responses: '200': description: A successful response. schema: type: object description: >- MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: plan: type: object properties: name: type: string description: >- Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. time: type: string format: date-time description: >- Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. height: type: string format: int64 description: The height at which the upgrade must be performed. info: type: string title: >- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: description: >- Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- Plan specifies information about a planned upgrade and when it should occur. upgraded_client_state: description: >- An UpgradedClientState must be provided to perform an IBC breaking upgrade. This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs, so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the previous version of the chain. This will allow IBC connections to persist smoothly across planned chain upgrades. Correspondingly, the UpgradedClientState field has been deprecated in the Cosmos SDK to allow for this logic to exist solely in the 02-client module. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} signer: type: string title: signer address title: >- MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal tags: - Msg /ibc.core.client.v1.Msg/RecoverClient: post: summary: RecoverClient defines a rpc handler method for MsgRecoverClient. operationId: IbcCoreClientV1Msg_RecoverClient responses: '200': description: A successful response. schema: type: object description: >- MsgRecoverClientResponse defines the Msg/RecoverClient response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgRecoverClient defines the message used to recover a frozen or expired client. in: body required: true schema: type: object properties: subject_client_id: type: string title: >- the client identifier for the client to be updated if the proposal passes substitute_client_id: type: string title: >- the substitute client identifier for the client which will replace the subject client signer: type: string title: signer address description: >- MsgRecoverClient defines the message used to recover a frozen or expired client. tags: - Msg /ibc.core.client.v1.Msg/SubmitMisbehaviour: post: summary: >- SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. operationId: IbcCoreClientV1Msg_SubmitMisbehaviour responses: '200': description: A successful response. schema: type: object description: >- MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for light client misbehaviour. This message has been deprecated. Use MsgUpdateClient instead. in: body required: true schema: type: object properties: client_id: type: string title: client unique identifier misbehaviour: title: misbehaviour used for freezing the light client type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } signer: type: string title: signer address description: >- MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for light client misbehaviour. This message has been deprecated. Use MsgUpdateClient instead. tags: - Msg /ibc.core.client.v1.Msg/UpdateClient: post: summary: UpdateClient defines a rpc handler method for MsgUpdateClient. operationId: IbcCoreClientV1Msg_UpdateClient responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateClientResponse defines the Msg/UpdateClient response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgUpdateClient defines an sdk.Msg to update a IBC client state using the given client message. in: body required: true schema: type: object properties: client_id: type: string title: client unique identifier client_message: title: client message to update the light client type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } signer: type: string title: signer address description: >- MsgUpdateClient defines an sdk.Msg to update a IBC client state using the given client message. tags: - Msg /ibc.core.client.v1.Msg/UpdateClientParams: post: summary: UpdateClientParams defines a rpc handler method for MsgUpdateParams. operationId: IbcCoreClientV1Msg_UpdateClientParams responses: '200': description: A successful response. schema: type: object description: MsgUpdateParamsResponse defines the MsgUpdateParams response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgUpdateParams defines the sdk.Msg type to update the client parameters. in: body required: true schema: type: object properties: signer: type: string title: signer address params: description: |- params defines the client parameters to update. NOTE: All parameters must be supplied. type: object properties: allowed_clients: type: array items: type: string description: >- allowed_clients defines the list of allowed client state types which can be created and interacted with. If a client type is removed from the allowed clients list, usage of this client will be disabled until it is added again to the list. description: >- MsgUpdateParams defines the sdk.Msg type to update the client parameters. tags: - Msg /ibc.core.client.v1.Msg/UpgradeClient: post: summary: UpgradeClient defines a rpc handler method for MsgUpgradeClient. operationId: IbcCoreClientV1Msg_UpgradeClient responses: '200': description: A successful response. schema: type: object description: >- MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body in: body required: true schema: type: object properties: client_id: type: string title: client unique identifier client_state: title: upgraded client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } consensus_state: title: >- upgraded consensus state, only contains enough information to serve as a basis of trust in update logic type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof_upgrade_client: type: string format: byte title: proof that old chain committed to new client proof_upgrade_consensus_state: type: string format: byte title: proof that old chain committed to new consensus state signer: type: string title: signer address title: >- MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state tags: - Msg /ibc/core/client/v1/client_states: get: summary: ClientStates queries all the IBC light clients of a chain. operationId: IbcCoreClientV1Query_ClientStates responses: '200': description: A successful response. schema: type: object properties: client_states: type: array items: type: object properties: client_id: type: string title: client identifier client_state: title: client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- IdentifiedClientState defines a client state with an additional client identifier field. description: list of stored ClientStates of the chain. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } description: >- QueryClientStatesResponse is the response type for the Query/ClientStates RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc/core/client/v1/client_states/{client_id}: get: summary: ClientState queries an IBC light client. operationId: IbcCoreClientV1Query_ClientState responses: '200': description: A successful response. schema: type: object properties: client_state: title: client state associated with the request identifier type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryClientStateResponse is the response type for the Query/ClientState RPC method. Besides the client state, it includes a proof and the height from which the proof was retrieved. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: client_id description: client state unique identifier in: path required: true type: string tags: - Query /ibc/core/client/v1/client_status/{client_id}: get: summary: Status queries the status of an IBC client. operationId: IbcCoreClientV1Query_ClientStatus responses: '200': description: A successful response. schema: type: object properties: status: type: string description: >- QueryClientStatusResponse is the response type for the Query/ClientStatus RPC method. It returns the current status of the IBC client. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: client_id description: client unique identifier in: path required: true type: string tags: - Query /ibc/core/client/v1/consensus_states/{client_id}: get: summary: |- ConsensusStates queries all the consensus state associated with a given client. operationId: IbcCoreClientV1Query_ConsensusStates responses: '200': description: A successful response. schema: type: object properties: consensus_states: type: array items: type: object properties: height: title: consensus state height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset consensus_state: title: consensus state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. title: consensus states associated with the identifier pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } title: |- QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: client_id description: client identifier in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc/core/client/v1/consensus_states/{client_id}/heights: get: summary: >- ConsensusStateHeights queries the height of every consensus states associated with a given client. operationId: IbcCoreClientV1Query_ConsensusStateHeights responses: '200': description: A successful response. schema: type: object properties: consensus_state_heights: type: array items: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients title: consensus state heights pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } title: |- QueryConsensusStateHeightsResponse is the response type for the Query/ConsensusStateHeights RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: client_id description: client identifier in: path required: true type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}: get: summary: >- ConsensusState queries a consensus state associated with a client state at a given height. operationId: IbcCoreClientV1Query_ConsensusState responses: '200': description: A successful response. schema: type: object properties: consensus_state: title: >- consensus state associated with the client identifier at the given height type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: client_id description: client identifier in: path required: true type: string - name: revision_number description: consensus state revision number in: path required: true type: string format: uint64 - name: revision_height description: consensus state revision height in: path required: true type: string format: uint64 - name: latest_height description: >- latest_height overrrides the height field and queries the latest stored ConsensusState in: query required: false type: boolean tags: - Query /ibc/core/client/v1/params: get: summary: ClientParams queries all parameters of the ibc client submodule. operationId: IbcCoreClientV1Query_ClientParams responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: allowed_clients: type: array items: type: string description: >- allowed_clients defines the list of allowed client state types which can be created and interacted with. If a client type is removed from the allowed clients list, usage of this client will be disabled until it is added again to the list. description: >- QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /ibc/core/client/v1/upgraded_client_states: get: summary: UpgradedClientState queries an Upgraded IBC light client. operationId: IbcCoreClientV1Query_UpgradedClientState responses: '200': description: A successful response. schema: type: object properties: upgraded_client_state: title: client state associated with the request identifier type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- QueryUpgradedClientStateResponse is the response type for the Query/UpgradedClientState RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /ibc/core/client/v1/upgraded_consensus_states: get: summary: UpgradedConsensusState queries an Upgraded IBC consensus state. operationId: IbcCoreClientV1Query_UpgradedConsensusState responses: '200': description: A successful response. schema: type: object properties: upgraded_consensus_state: title: Consensus state associated with the request identifier type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /ibc/core/connection/v1/client_connections/{client_id}: get: summary: |- ClientConnections queries the connection paths associated with a client state. operationId: IbcCoreConnectionV1Query_ClientConnections responses: '200': description: A successful response. schema: type: object properties: connection_paths: type: array items: type: string description: slice of all the connection paths associated with a client. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was generated type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: client_id description: client identifier associated with a connection in: path required: true type: string tags: - Query /ibc/core/connection/v1/connections: get: summary: Connections queries all the IBC connections of a chain. operationId: IbcCoreConnectionV1Query_Connections responses: '200': description: A successful response. schema: type: object properties: connections: type: array items: type: object properties: id: type: string description: connection identifier. client_id: type: string description: client associated with this connection. versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: >- list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection state: description: current state of the connection end. type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN default: STATE_UNINITIALIZED_UNSPECIFIED counterparty: description: counterparty chain associated with this connection. type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) delay_period: type: string format: uint64 description: delay period associated with this connection. description: >- IdentifiedConnection defines a connection with additional connection identifier field. description: list of stored connections of the chain. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryConnectionsResponse is the response type for the Query/Connections RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. in: query required: false type: string format: byte - name: pagination.offset description: >- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. in: query required: false type: string format: uint64 - name: pagination.limit description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. in: query required: false type: string format: uint64 - name: pagination.count_total description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. in: query required: false type: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 in: query required: false type: boolean tags: - Query /ibc/core/connection/v1/connections/{connection_id}: get: summary: Connection queries an IBC connection end. operationId: IbcCoreConnectionV1Query_Connection responses: '200': description: A successful response. schema: type: object properties: connection: title: connection associated with the request identifier type: object properties: client_id: type: string description: client associated with this connection. versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: >- list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. description: >- IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection. state: description: current state of the connection end. type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN default: STATE_UNINITIALIZED_UNSPECIFIED counterparty: description: counterparty chain associated with this connection. type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) delay_period: type: string format: uint64 description: >- delay period that must pass before a consensus state can be used for packet-verification NOTE: delay period logic is only implemented by some clients. description: >- ConnectionEnd defines a stateful object on a chain connected to another separate one. NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryConnectionResponse is the response type for the Query/Connection RPC method. Besides the connection end, it includes a proof and the height from which the proof was retrieved. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: connection_id description: connection unique identifier in: path required: true type: string tags: - Query /ibc/core/connection/v1/connections/{connection_id}/client_state: get: summary: |- ConnectionClientState queries the client state associated with the connection. operationId: IbcCoreConnectionV1Query_ConnectionClientState responses: '200': description: A successful response. schema: type: object properties: identified_client_state: title: client state associated with the channel type: object properties: client_id: type: string title: client identifier client_state: title: client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- IdentifiedClientState defines a client state with an additional client identifier field. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: connection_id description: connection identifier in: path required: true type: string tags: - Query /ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}: get: summary: |- ConnectionConsensusState queries the consensus state associated with the connection. operationId: IbcCoreConnectionV1Query_ConnectionConsensusState responses: '200': description: A successful response. schema: type: object properties: consensus_state: title: consensus state associated with the channel type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } client_id: type: string title: client ID associated with the consensus state proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: connection_id description: connection identifier in: path required: true type: string - name: revision_number in: path required: true type: string format: uint64 - name: revision_height in: path required: true type: string format: uint64 tags: - Query /ibc/core/connection/v1/params: get: summary: ConnectionParams queries all parameters of the ibc connection submodule. operationId: IbcCoreConnectionV1Query_ConnectionParams responses: '200': description: A successful response. schema: type: object properties: params: description: params defines the parameters of the module. type: object properties: max_expected_time_per_block: type: string format: uint64 description: >- maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the largest amount of time that the chain might reasonably take to produce the next block under normal operating conditions. A safe choice is 3-5x the expected time per block. description: >- QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } tags: - Query /ibc.core.connection.v1.Msg/ConnectionOpenAck: post: summary: ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. operationId: IbcCoreConnectionV1Msg_ConnectionOpenAck responses: '200': description: A successful response. schema: type: object description: >- MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: |- MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of connection state to TRYOPEN on Chain B. in: body required: true schema: type: object properties: connection_id: type: string counterparty_connection_id: type: string version: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. client_state: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients proof_try: type: string format: byte title: >- proof of the initialization the connection on Chain B: `UNITIALIZED -> TRYOPEN` proof_client: type: string format: byte title: proof of client state included in message proof_consensus: type: string format: byte title: proof of client consensus state consensus_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string host_consensus_state_proof: type: string format: byte title: >- optional proof data for host state machines that are unable to introspect their own consensus state description: |- MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of connection state to TRYOPEN on Chain B. tags: - Msg /ibc.core.connection.v1.Msg/ConnectionOpenConfirm: post: summary: |- ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. operationId: IbcCoreConnectionV1Msg_ConnectionOpenConfirm responses: '200': description: A successful response. schema: type: object description: >- MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of connection state to OPEN on Chain A. in: body required: true schema: type: object properties: connection_id: type: string proof_ack: type: string format: byte title: >- proof for the change of the connection state on Chain A: `INIT -> OPEN` proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: >- MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of connection state to OPEN on Chain A. tags: - Msg /ibc.core.connection.v1.Msg/ConnectionOpenInit: post: summary: >- ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. operationId: IbcCoreConnectionV1Msg_ConnectionOpenInit responses: '200': description: A successful response. schema: type: object description: >- MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgConnectionOpenInit defines the msg sent by an account on Chain A to initialize a connection with Chain B. in: body required: true schema: type: object properties: client_id: type: string counterparty: type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) description: >- Counterparty defines the counterparty chain associated with a connection end. version: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. delay_period: type: string format: uint64 signer: type: string description: >- MsgConnectionOpenInit defines the msg sent by an account on Chain A to initialize a connection with Chain B. tags: - Msg /ibc.core.connection.v1.Msg/ConnectionOpenTry: post: summary: ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. operationId: IbcCoreConnectionV1Msg_ConnectionOpenTry responses: '200': description: A successful response. schema: type: object description: >- MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a connection on Chain B. in: body required: true schema: type: object properties: client_id: type: string previous_connection_id: type: string description: >- Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. client_state: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } counterparty: type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) description: >- Counterparty defines the counterparty chain associated with a connection end. delay_period: type: string format: uint64 counterparty_versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: >- list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients proof_init: type: string format: byte title: >- proof of the initialization the connection on Chain A: `UNITIALIZED -> INIT` proof_client: type: string format: byte title: proof of client state included in message proof_consensus: type: string format: byte title: proof of client consensus state consensus_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string host_consensus_state_proof: type: string format: byte title: >- optional proof data for host state machines that are unable to introspect their own consensus state description: >- MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a connection on Chain B. tags: - Msg /ibc.core.connection.v1.Msg/UpdateConnectionParams: post: summary: |- UpdateConnectionParams defines a rpc handler method for MsgUpdateParams. operationId: IbcCoreConnectionV1Msg_UpdateConnectionParams responses: '200': description: A successful response. schema: type: object description: MsgUpdateParamsResponse defines the MsgUpdateParams response type. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } parameters: - name: body description: >- MsgUpdateParams defines the sdk.Msg type to update the connection parameters. in: body required: true schema: type: object properties: signer: type: string title: signer address params: description: |- params defines the connection parameters to update. NOTE: All parameters must be supplied. type: object properties: max_expected_time_per_block: type: string format: uint64 description: >- maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the largest amount of time that the chain might reasonably take to produce the next block under normal operating conditions. A safe choice is 3-5x the expected time per block. description: >- MsgUpdateParams defines the sdk.Msg type to update the connection parameters. tags: - Msg /sourcehub.acp.Msg/BearerPolicyCmd: post: summary: >- The Msg authenticates the actor initiating the command through a Bearer token. This token MUST be issued and signed by some DID Actor, the verification of the signature is used as authentication proof. Lastly, the Bearer token MUST be bound to some SourceHub account. operationId: SourcehubAcpMsg_BearerPolicyCmd responses: '200': description: A successful response. schema: type: object properties: result: type: object properties: set_relationship_result: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: >- Subject specifies the target of a Relationship. description: >- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: >- archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_result: type: object properties: record_found: type: boolean title: >- DeleteRelationshipCmdResult removes a Relationship in a Policy register_object_result: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: >- Subject specifies the target of a Relationship. description: >- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: >- archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: RegisterObjectCmdResult registers an Object in a Policy unregister_object_result: type: object properties: found: type: boolean relationships_removed: type: string format: uint64 title: >- UnregisterObjectCmdResult unregisters an Object in a Policy default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string bearer_token: type: string policy_id: type: string cmd: type: object properties: set_relationship_cmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: >- Relationship models an access control rule. It states that the given subject has relation with object. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_cmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: >- Relationship models an access control rule. It states that the given subject has relation with object. title: DeleteRelationshipCmd removes a Relationship in a Policy register_object_cmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: RegisterObjectCmd registers an Object in a Policy unregister_object_cmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: UnregisterObjectCmd unregisters an Object in a Policy creation_time: type: string format: date-time tags: - Msg /sourcehub.acp.Msg/CheckAccess: post: summary: >- CheckAccess executes an Access Request for an User and stores the result of the evaluation in SourceHub. The resulting evaluation is used to generate a cryptographic proof that the given Access Request was valid at a particular block height. operationId: SourcehubAcpMsg_CheckAccess responses: '200': description: A successful response. schema: type: object properties: decision: type: object properties: id: type: string policy_id: type: string title: used as part of id generation creator: type: string title: used as part of id generation creator_acc_sequence: type: string format: uint64 title: used as part of id generation operations: type: array items: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: target object for operation permission: type: string title: permission required to perform operation description: Operation represents an action over an object. title: used as part of id generation actor: type: string title: used as part of id generation params: title: used as part of id generation type: object properties: decision_expiration_delta: type: string format: uint64 title: number of blocks a Decision is valid for proof_expiration_delta: type: string format: uint64 title: number of blocks a DecisionProof is valid for ticket_expiration_delta: type: string format: uint64 title: number of blocks an AccessTicket is valid for creation_time: type: string format: date-time issued_height: type: string format: uint64 title: >- issued_height stores the block height when the Decision was evaluated title: >- AccessDecision models the result of evaluating a set of AccessRequests for an Actor default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string policy_id: type: string creation_time: type: string format: date-time access_request: type: object properties: operations: type: array items: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: target object for operation permission: type: string title: permission required to perform operation description: Operation represents an action over an object. actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. title: actor requesting operations title: >- AccessRequest represents the wish to perform a set of operations by an actor tags: - Msg /sourcehub.acp.Msg/CreatePolicy: post: summary: |- CreatePolicy adds a new Policy to SourceHub. The Policy models an aplication's high level access control rules. operationId: SourcehubAcpMsg_CreatePolicy responses: '200': description: A successful response. schema: type: object properties: policy: type: object properties: id: type: string name: type: string description: type: string creation_time: type: string format: date-time attributes: type: object additionalProperties: type: string resources: type: array items: type: object properties: name: type: string doc: type: string permissions: type: array items: type: object properties: name: type: string doc: type: string expression: type: string description: >- Permission models a special type of Relation which is evaluated at runtime. A permission often maps to an operation defined for a resource which an actor may attempt. relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: >- list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: >- resource_name scopes permissible actors resource relation_name: type: string title: >- relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- Resource models a namespace for objects in a Policy. Appications will have multiple entities which they must manage such as files or groups. A Resource represents a set of entities of a certain type. actor_resource: type: object properties: name: type: string doc: type: string relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: >- list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: >- resource_name scopes permissible actors resource relation_name: type: string title: >- relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- ActorResource represents a special Resource which is reserved for Policy actors. creator: type: string description: >- Policy represents an ACP module Policy definition. Each Policy defines a set of high level rules over how the acces control system should behave. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string policy: type: string marshal_type: type: string enum: - UNKNOWN - YAML default: UNKNOWN description: >- PolicyMarshalingType enumerates supported marshaling types for policies. - UNKNOWN: Fallback value for a missing Marshaling Type - YAML: YAML Marshaled Policy creation_time: type: string format: date-time tags: - Msg /sourcehub.acp.Msg/DeleteRelationship: post: summary: |- DelereRelationship removes a Relationship from a Policy. If the Relationship was not found in a Policy, this Msg is a no-op. operationId: SourcehubAcpMsg_DeleteRelationship responses: '200': description: A successful response. schema: type: object properties: record_found: type: boolean default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. tags: - Msg /sourcehub.acp.Msg/DirectPolicyCmd: post: operationId: SourcehubAcpMsg_DirectPolicyCmd responses: '200': description: A successful response. schema: type: object default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string tags: - Msg /sourcehub.acp.Msg/RegisterObject: post: summary: |- Attempting to register a previously registered Object is an error, Object IDs are therefore assumed to be unique within a Policy. operationId: SourcehubAcpMsg_RegisterObject responses: '200': description: A successful response. schema: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string policy_id: type: string object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. creation_time: type: string format: date-time tags: - Msg /sourcehub.acp.Msg/SetRelationship: post: summary: >- SetRelationship creates or updates a Relationship within a Policy A Relationship is a statement which ties together an object and a subjecto with a "relation", which means the set of high level rules defined in the Policy will apply to these entities. operationId: SourcehubAcpMsg_SetRelationship responses: '200': description: A successful response. schema: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string policy_id: type: string creation_time: type: string format: date-time relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. tags: - Msg /sourcehub.acp.Msg/SignedPolicyCmd: post: summary: >- SignedPolicyCmd is a wrapper for a Command which is executed within the Context of a Policy. The Command is signed by the Actor issuing it. operationId: SourcehubAcpMsg_SignedPolicyCmd responses: '200': description: A successful response. schema: type: object properties: result: type: object properties: set_relationship_result: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: >- Subject specifies the target of a Relationship. description: >- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: >- archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_result: type: object properties: record_found: type: boolean title: >- DeleteRelationshipCmdResult removes a Relationship in a Policy register_object_result: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: >- Subject specifies the target of a Relationship. description: >- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: >- archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: RegisterObjectCmdResult registers an Object in a Policy unregister_object_result: type: object properties: found: type: boolean relationships_removed: type: string format: uint64 title: >- UnregisterObjectCmdResult unregisters an Object in a Policy default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string payload: type: string type: type: string enum: - UNKNOWN - JWS default: UNKNOWN tags: - Msg /sourcehub.acp.Msg/UnregisterObject: post: summary: >- Suppose Bob owns object Foo, which is shared with Bob but not Eve. Eve wants to access Foo but was not given permission to, they could "hijack" Bob's object by waiting for Bob to Unregister Foo, then submitting a RegisterObject Msg, effectively becoming Foo's new owner. If Charlie has a copy of the object, Eve could convince Charlie to share his copy, granting Eve access to Foo. The previous scenario where an unauthorized user is able to claim ownership to data previously unaccessible to them is an "ownership hijack". operationId: SourcehubAcpMsg_UnregisterObject responses: '200': description: A successful response. schema: type: object properties: found: type: boolean default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string policy_id: type: string object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. tags: - Msg /sourcehub.acp.Msg/UpdateParams: post: summary: |- UpdateParams defines a (governance) operation for updating the module parameters. The authority defaults to the x/gov module account. operationId: SourcehubAcpMsg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: MsgUpdateParams is the Msg/UpdateParams request type. in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: 'NOTE: All parameters must be supplied.' type: object properties: policy_command_max_expiration_delta: type: string format: uint64 description: >- policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. description: MsgUpdateParams is the Msg/UpdateParams request type. tags: - Msg /sourcenetwork/sourcehub/acp/access_decision/{id}: get: summary: >- AccessDecision queries the system for an AccessDecision with the given ID. operationId: SourcehubAcpQuery_AccessDecision responses: '200': description: A successful response. schema: type: object properties: decision: type: object properties: id: type: string policy_id: type: string title: used as part of id generation creator: type: string title: used as part of id generation creator_acc_sequence: type: string format: uint64 title: used as part of id generation operations: type: array items: type: object properties: object: title: target object for operation type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. permission: type: string title: permission required to perform operation description: Operation represents an action over an object. title: used as part of id generation actor: type: string title: used as part of id generation params: title: used as part of id generation type: object properties: decision_expiration_delta: type: string format: uint64 title: number of blocks a Decision is valid for proof_expiration_delta: type: string format: uint64 title: number of blocks a DecisionProof is valid for ticket_expiration_delta: type: string format: uint64 title: number of blocks an AccessTicket is valid for creation_time: type: string format: date-time issued_height: type: string format: uint64 title: >- issued_height stores the block height when the Decision was evaluated title: >- AccessDecision models the result of evaluating a set of AccessRequests for an Actor default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: id in: path required: true type: string tags: - Query /sourcenetwork/sourcehub/acp/filter_relationships/{policy_id}: get: summary: FilterRelationships returns filtered set of Relationships in a Policy. operationId: SourcehubAcpQuery_FilterRelationships responses: '200': description: A successful response. schema: type: object properties: records: type: array items: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: >- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: >- archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: policy_id in: path required: true type: string - name: selector.object_selector.object.resource in: query required: false type: string - name: selector.object_selector.object.id in: query required: false type: string - name: selector.relation_selector.relation description: >- relation specifies a relation name which must exactly match the Relationship's in: query required: false type: string - name: selector.subject_selector.subject.actor.id in: query required: false type: string - name: selector.subject_selector.subject.actor_set.object.resource in: query required: false type: string - name: selector.subject_selector.subject.actor_set.object.id in: query required: false type: string - name: selector.subject_selector.subject.actor_set.relation in: query required: false type: string - name: selector.subject_selector.subject.object.resource in: query required: false type: string - name: selector.subject_selector.subject.object.id in: query required: false type: string tags: - Query /sourcenetwork/sourcehub/acp/object_owner/{policy_id}/{object.resource}/{object.id}: get: summary: ObjectOwner returns the Actor ID of the the given Object's owner operationId: SourcehubAcpQuery_ObjectOwner responses: '200': description: A successful response. schema: type: object properties: is_registered: type: boolean owner_id: type: string default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: policy_id in: path required: true type: string - name: object.resource in: path required: true type: string - name: object.id in: path required: true type: string tags: - Query /sourcenetwork/sourcehub/acp/params: get: summary: Parameters queries the parameters of the module. operationId: SourcehubAcpQuery_Params responses: '200': description: A successful response. schema: type: object properties: params: description: params holds all the parameters of this module. type: object properties: policy_command_max_expiration_delta: type: string format: uint64 description: >- policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. description: >- QueryParamsResponse is response type for the Query/Params RPC method. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /sourcenetwork/sourcehub/acp/policy/{id}: get: summary: Policy returns a Policy with the given ID. operationId: SourcehubAcpQuery_Policy responses: '200': description: A successful response. schema: type: object properties: policy: type: object properties: id: type: string name: type: string description: type: string creation_time: type: string format: date-time attributes: type: object additionalProperties: type: string resources: type: array items: type: object properties: name: type: string doc: type: string permissions: type: array items: type: object properties: name: type: string doc: type: string expression: type: string description: >- Permission models a special type of Relation which is evaluated at runtime. A permission often maps to an operation defined for a resource which an actor may attempt. relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: >- list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: >- resource_name scopes permissible actors resource relation_name: type: string title: >- relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- Resource models a namespace for objects in a Policy. Appications will have multiple entities which they must manage such as files or groups. A Resource represents a set of entities of a certain type. actor_resource: type: object properties: name: type: string doc: type: string relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: >- list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: >- resource_name scopes permissible actors resource relation_name: type: string title: >- relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- ActorResource represents a special Resource which is reserved for Policy actors. creator: type: string description: >- Policy represents an ACP module Policy definition. Each Policy defines a set of high level rules over how the acces control system should behave. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: id in: path required: true type: string tags: - Query /sourcenetwork/sourcehub/acp/policy_ids: get: summary: PolicyIds returns list of Ids for Policies registered in the system. operationId: SourcehubAcpQuery_PolicyIds responses: '200': description: A successful response. schema: type: object properties: ids: type: array items: type: string title: cosmos.base.query.v1beta1.PageResponse pagination = 1; default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} tags: - Query /sourcenetwork/sourcehub/acp/validate_policy/{policy}: get: summary: >- ValidatePolicy verifies whether the given Policy definition is properly formatted operationId: SourcehubAcpQuery_ValidatePolicy responses: '200': description: A successful response. schema: type: object properties: valid: type: boolean default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: policy in: path required: true type: string - name: marshal_type description: |2- - UNKNOWN: Fallback value for a missing Marshaling Type - YAML: YAML Marshaled Policy in: query required: false type: string enum: - UNKNOWN - YAML default: UNKNOWN tags: - Query /sourcenetwork/sourcehub/acp/verify_access_request/{policy_id}: get: summary: >- VerifyAccessRequest verifies whether an Access Request is accepted with respect to the given Policy's Relation Graph. operationId: SourcehubAcpQuery_VerifyAccessRequest responses: '200': description: A successful response. schema: type: object properties: valid: type: boolean default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: policy_id in: path required: true type: string - name: access_request.actor.id in: query required: false type: string tags: - Query /sourcehub.bulletin.Msg/CreatePost: post: operationId: SourcehubBulletinMsg_CreatePost responses: '200': description: A successful response. schema: type: object default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body in: body required: true schema: type: object properties: creator: type: string namespace: type: string payload: type: string format: byte proof: type: string format: byte tags: - Msg /sourcehub.bulletin.Msg/UpdateParams: post: summary: |- UpdateParams defines a (governance) operation for updating the module parameters. The authority defaults to the x/gov module account. operationId: SourcehubBulletinMsg_UpdateParams responses: '200': description: A successful response. schema: type: object description: >- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. default: description: An unexpected error response. schema: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string additionalProperties: {} parameters: - name: body description: MsgUpdateParams is the Msg/UpdateParams request type. in: body required: true schema: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: 'NOTE: All parameters must be supplied.' type: object description: MsgUpdateParams is the Msg/UpdateParams request type. tags: - Msg definitions: google.protobuf.Any: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } google.rpc.Status: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } cosmos.auth.v1beta1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/auth parameters to update. NOTE: All parameters must be supplied. type: object properties: max_memo_characters: type: string format: uint64 tx_sig_limit: type: string format: uint64 tx_size_cost_per_byte: type: string format: uint64 sig_verify_cost_ed25519: type: string format: uint64 sig_verify_cost_secp256k1: type: string format: uint64 description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.auth.v1beta1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.auth.v1beta1.Params: type: object properties: max_memo_characters: type: string format: uint64 tx_sig_limit: type: string format: uint64 tx_size_cost_per_byte: type: string format: uint64 sig_verify_cost_ed25519: type: string format: uint64 sig_verify_cost_secp256k1: type: string format: uint64 description: Params defines the parameters for the auth module. cosmos.auth.v1beta1.AddressBytesToStringResponse: type: object properties: address_string: type: string description: >- AddressBytesToStringResponse is the response type for AddressString rpc method. Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.AddressStringToBytesResponse: type: object properties: address_bytes: type: string format: byte description: >- AddressStringToBytesResponse is the response type for AddressBytes rpc method. Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.BaseAccount: type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } account_number: type: string format: uint64 sequence: type: string format: uint64 description: >- BaseAccount defines a base account type. It contains all the necessary fields for basic account functionality. Any custom account type should extend this type for additional functionality (e.g. vesting). cosmos.auth.v1beta1.Bech32PrefixResponse: type: object properties: bech32_prefix: type: string description: |- Bech32PrefixResponse is the response type for Bech32Prefix rpc method. Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.QueryAccountAddressByIDResponse: type: object properties: account_address: type: string description: 'Since: cosmos-sdk 0.46.2' title: >- QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method cosmos.auth.v1beta1.QueryAccountInfoResponse: type: object properties: info: description: info is the account info which is represented by BaseAccount. type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } account_number: type: string format: uint64 sequence: type: string format: uint64 description: |- QueryAccountInfoResponse is the Query/AccountInfo response type. Since: cosmos-sdk 0.47 cosmos.auth.v1beta1.QueryAccountResponse: type: object properties: account: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- QueryAccountResponse is the response type for the Query/Account RPC method. cosmos.auth.v1beta1.QueryAccountsResponse: type: object properties: accounts: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } title: accounts are the existing accounts pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAccountsResponse is the response type for the Query/Accounts RPC method. Since: cosmos-sdk 0.43 cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: type: object properties: account: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. cosmos.auth.v1beta1.QueryModuleAccountsResponse: type: object properties: accounts: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.QueryParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: max_memo_characters: type: string format: uint64 tx_sig_limit: type: string format: uint64 tx_size_cost_per_byte: type: string format: uint64 sig_verify_cost_ed25519: type: string format: uint64 sig_verify_cost_secp256k1: type: string format: uint64 description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.base.query.v1beta1.PageRequest: type: object properties: key: type: string format: byte description: |- key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. offset: type: string format: uint64 description: |- offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. limit: type: string format: uint64 description: >- limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. count_total: type: boolean description: >- count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. reverse: type: boolean description: >- reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43 description: |- message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; } title: |- PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: cosmos.base.query.v1beta1.PageResponse: type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: |- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } cosmos.authz.v1beta1.Grant: type: object properties: authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- time when the grant will expire and will be pruned. If null, then the grant doesn't have a time expiration (other conditions in `authorization` may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. cosmos.authz.v1beta1.GrantAuthorization: type: object properties: granter: type: string grantee: type: string authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto cosmos.authz.v1beta1.QueryGranteeGrantsResponse: type: object properties: grants: type: array items: type: object properties: granter: type: string grantee: type: string authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto description: grants is a list of grants granted to the grantee. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. cosmos.authz.v1beta1.QueryGranterGrantsResponse: type: object properties: grants: type: array items: type: object properties: granter: type: string grantee: type: string authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto description: grants is a list of grants granted by the granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. cosmos.authz.v1beta1.QueryGrantsResponse: type: object properties: grants: type: array items: type: object properties: authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- time when the grant will expire and will be pruned. If null, then the grant doesn't have a time expiration (other conditions in `authorization` may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. description: authorizations is a list of grants granted for grantee by granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGrantsResponse is the response type for the Query/Authorizations RPC method. cosmos.authz.v1beta1.MsgExec: type: object properties: grantee: type: string msgs: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- Execute Msg. The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. description: |- MsgExec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. cosmos.authz.v1beta1.MsgExecResponse: type: object properties: results: type: array items: type: string format: byte description: MsgExecResponse defines the Msg/MsgExecResponse response type. cosmos.authz.v1beta1.MsgGrant: type: object properties: granter: type: string grantee: type: string grant: type: object properties: authorization: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } expiration: type: string format: date-time title: >- time when the grant will expire and will be pruned. If null, then the grant doesn't have a time expiration (other conditions in `authorization` may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. description: >- MsgGrant is a request type for Grant method. It declares authorization to the grantee on behalf of the granter with the provided expiration time. cosmos.authz.v1beta1.MsgGrantResponse: type: object description: MsgGrantResponse defines the Msg/MsgGrant response type. cosmos.authz.v1beta1.MsgRevoke: type: object properties: granter: type: string grantee: type: string msg_type_url: type: string description: |- MsgRevoke revokes any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee. cosmos.authz.v1beta1.MsgRevokeResponse: type: object description: MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. cosmos.bank.v1beta1.Input: type: object properties: address: type: string coins: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Input models transaction input. cosmos.bank.v1beta1.MsgMultiSend: type: object properties: inputs: type: array items: type: object properties: address: type: string coins: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Input models transaction input. description: >- Inputs, despite being `repeated`, only allows one sender input. This is checked in MsgMultiSend's ValidateBasic. outputs: type: array items: type: object properties: address: type: string coins: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Output models transaction outputs. description: MsgMultiSend represents an arbitrary multi-in, multi-out send message. cosmos.bank.v1beta1.MsgMultiSendResponse: type: object description: MsgMultiSendResponse defines the Msg/MultiSend response type. cosmos.bank.v1beta1.MsgSend: type: object properties: from_address: type: string to_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: MsgSend represents a message to send coins from one account to another. cosmos.bank.v1beta1.MsgSendResponse: type: object description: MsgSendResponse defines the Msg/Send response type. cosmos.bank.v1beta1.MsgSetSendEnabled: type: object properties: authority: type: string description: authority is the address that controls the module. send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). description: send_enabled is the list of entries to add or update. use_default_for: type: array items: type: string description: >- use_default_for is a list of denoms that should use the params.default_send_enabled value. Denoms listed here will have their SendEnabled entries deleted. If a denom is included that doesn't have a SendEnabled entry, it will be ignored. description: |- MsgSetSendEnabled is the Msg/SetSendEnabled request type. Only entries to add/update/delete need to be included. Existing SendEnabled entries that are not included in this message are left unchanged. Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.MsgSetSendEnabledResponse: type: object description: |- MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/bank parameters to update. NOTE: All parameters must be supplied. type: object properties: send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). description: >- Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. default_send_enabled: type: boolean description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.Output: type: object properties: address: type: string coins: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Output models transaction outputs. cosmos.bank.v1beta1.Params: type: object properties: send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). description: >- Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. default_send_enabled: type: boolean description: Params defines the parameters for the bank module. cosmos.bank.v1beta1.SendEnabled: type: object properties: denom: type: string enabled: type: boolean description: |- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). cosmos.base.v1beta1.Coin: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. cosmos.bank.v1beta1.DenomOwner: type: object properties: address: type: string description: address defines the address that owns a particular denomination. balance: description: balance is the balance of the denominated coin for an account. type: object properties: denom: type: string amount: type: string description: |- DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.DenomUnit: type: object properties: denom: type: string description: denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. cosmos.bank.v1beta1.Metadata: type: object properties: description: type: string denom_units: type: array items: type: object properties: denom: type: string description: >- denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. title: denom_units represents the list of DenomUnit's for a given coin base: type: string description: >- base represents the base denom (should be the DenomUnit with exponent = 0). display: type: string description: |- display indicates the suggested denom that should be displayed in clients. name: type: string description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string description: >- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46 uri_hash: type: string description: >- URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. cosmos.bank.v1beta1.QueryAllBalancesResponse: type: object properties: balances: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: balances is the balances of all the coins. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method. cosmos.bank.v1beta1.QueryBalanceResponse: type: object properties: balance: description: balance is the balance of the coin. type: object properties: denom: type: string amount: type: string description: >- QueryBalanceResponse is the response type for the Query/Balance RPC method. cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse: type: object properties: metadata: description: >- metadata describes and provides all the client information for the requested token. type: object properties: description: type: string denom_units: type: array items: type: object properties: denom: type: string description: >- denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. title: denom_units represents the list of DenomUnit's for a given coin base: type: string description: >- base represents the base denom (should be the DenomUnit with exponent = 0). display: type: string description: |- display indicates the suggested denom that should be displayed in clients. name: type: string description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string description: >- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46 uri_hash: type: string description: >- URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46 description: >- QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. cosmos.bank.v1beta1.QueryDenomMetadataResponse: type: object properties: metadata: description: >- metadata describes and provides all the client information for the requested token. type: object properties: description: type: string denom_units: type: array items: type: object properties: denom: type: string description: >- denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. title: denom_units represents the list of DenomUnit's for a given coin base: type: string description: >- base represents the base denom (should be the DenomUnit with exponent = 0). display: type: string description: |- display indicates the suggested denom that should be displayed in clients. name: type: string description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string description: >- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46 uri_hash: type: string description: >- URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46 description: >- QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC method. cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse: type: object properties: denom_owners: type: array items: type: object properties: address: type: string description: address defines the address that owns a particular denomination. balance: description: balance is the balance of the denominated coin for an account. type: object properties: denom: type: string amount: type: string description: >- DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. Since: cosmos-sdk 0.50.3 cosmos.bank.v1beta1.QueryDenomOwnersResponse: type: object properties: denom_owners: type: array items: type: object properties: address: type: string description: address defines the address that owns a particular denomination. balance: description: balance is the balance of the denominated coin for an account. type: object properties: denom: type: string amount: type: string description: >- DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.QueryDenomsMetadataResponse: type: object properties: metadatas: type: array items: type: object properties: description: type: string denom_units: type: array items: type: object properties: denom: type: string description: >- denom represents the string name of the given denom unit (e.g uatom). exponent: type: integer format: int64 description: >- exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). aliases: type: array items: type: string title: aliases is a list of string aliases for the given denom description: |- DenomUnit represents a struct that describes a given denomination unit of the basic token. title: denom_units represents the list of DenomUnit's for a given coin base: type: string description: >- base represents the base denom (should be the DenomUnit with exponent = 0). display: type: string description: |- display indicates the suggested denom that should be displayed in clients. name: type: string description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string description: >- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46 uri_hash: type: string description: >- URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. description: >- metadata provides the client information for all the registered tokens. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC method. cosmos.bank.v1beta1.QueryParamsResponse: type: object properties: params: description: params provides the parameters of the bank module. type: object properties: send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). description: >- Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. default_send_enabled: type: boolean description: >- QueryParamsResponse defines the response type for querying x/bank parameters. cosmos.bank.v1beta1.QuerySendEnabledResponse: type: object properties: send_enabled: type: array items: type: object properties: denom: type: string enabled: type: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). pagination: description: |- pagination defines the pagination in the response. This field is only populated if the denoms field in the request is empty. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QuerySendEnabledResponse defines the RPC response of a SendEnable query. Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse: type: object properties: balance: description: balance is the balance of the coin. type: object properties: denom: type: string amount: type: string description: >- QuerySpendableBalanceByDenomResponse defines the gRPC response structure for querying an account's spendable balance for a specific denom. Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.QuerySpendableBalancesResponse: type: object properties: balances: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: balances is the spendable balances of all the coins. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QuerySpendableBalancesResponse defines the gRPC response structure for querying an account's spendable balances. Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.QuerySupplyOfResponse: type: object properties: amount: description: amount is the supply of the coin. type: object properties: denom: type: string amount: type: string description: >- QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. cosmos.bank.v1beta1.QueryTotalSupplyResponse: type: object properties: supply: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: supply is the supply of the coins pagination: description: |- pagination defines the pagination in the response. Since: cosmos-sdk 0.43 type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC method cosmos.base.node.v1beta1.ConfigResponse: type: object properties: minimum_gas_price: type: string pruning_keep_recent: type: string pruning_interval: type: string halt_height: type: string format: uint64 description: ConfigResponse defines the response structure for the Config gRPC query. cosmos.base.node.v1beta1.StatusResponse: type: object properties: 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 app_hash: type: string format: byte title: app hash of the current block validator_hash: type: string format: byte title: validator hash provided by the consensus header description: StateResponse defines the response structure for the status of a node. cosmos.base.tendermint.v1beta1.ABCIQueryResponse: type: object properties: code: type: integer format: int64 log: type: string title: nondeterministic info: type: string title: nondeterministic index: type: string format: int64 key: type: string format: byte value: type: string format: byte proof_ops: type: object properties: ops: type: array items: type: object properties: type: type: string key: type: string format: byte data: type: string format: byte description: >- ProofOp defines an operation used for calculating Merkle root. The data could be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. description: >- ProofOps is Merkle proof defined by the list of ProofOps. Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. height: type: string format: int64 codespace: type: string description: >- ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. Note: This type is a duplicate of the ResponseQuery proto type defined in Tendermint. cosmos.base.tendermint.v1beta1.Block: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string description: >- proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. original proposer of the block description: Header defines the structure of a Tendermint block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. description: |- Block is tendermint type Block, with the Header proposer address field converted to bech32 string. cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: type: object properties: block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID block: title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. sdk_block: title: 'Since: cosmos-sdk 0.47' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string description: >- proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. original proposer of the block description: Header defines the structure of a Tendermint block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. description: |- Block is tendermint type Block, with the Header proposer address field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: type: object properties: block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID block: title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. sdk_block: title: 'Since: cosmos-sdk 0.47' type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string description: >- proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. original proposer of the block description: Header defines the structure of a Tendermint block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. description: |- Block is tendermint type Block, with the Header proposer address field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: type: object properties: block_height: type: string format: int64 validators: type: array items: type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } voting_power: type: string format: int64 proposer_priority: type: string format: int64 description: Validator is the type for the validator-set. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: type: object properties: default_node_info: type: object properties: protocol_version: type: object properties: p2p: type: string format: uint64 block: type: string format: uint64 app: type: string format: uint64 default_node_id: type: string listen_addr: type: string network: type: string version: type: string channels: type: string format: byte moniker: type: string other: type: object properties: tx_index: type: string rpc_address: type: string application_version: type: object properties: name: type: string app_name: type: string version: type: string git_commit: type: string build_tags: type: string go_version: type: string build_deps: type: array items: type: object properties: path: type: string title: module path version: type: string title: module version sum: type: string title: checksum title: Module is the type for VersionInfo cosmos_sdk_version: type: string title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. cosmos.base.tendermint.v1beta1.GetSyncingResponse: type: object properties: syncing: type: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: type: object properties: block_height: type: string format: int64 validators: type: array items: type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } voting_power: type: string format: int64 proposer_priority: type: string format: int64 description: Validator is the type for the validator-set. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. cosmos.base.tendermint.v1beta1.Header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string description: >- proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. original proposer of the block description: Header defines the structure of a Tendermint block header. cosmos.base.tendermint.v1beta1.Module: type: object properties: path: type: string title: module path version: type: string title: module version sum: type: string title: checksum title: Module is the type for VersionInfo cosmos.base.tendermint.v1beta1.ProofOp: type: object properties: type: type: string key: type: string format: byte data: type: string format: byte description: >- ProofOp defines an operation used for calculating Merkle root. The data could be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. cosmos.base.tendermint.v1beta1.ProofOps: type: object properties: ops: type: array items: type: object properties: type: type: string key: type: string format: byte data: type: string format: byte description: >- ProofOp defines an operation used for calculating Merkle root. The data could be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. description: >- ProofOps is Merkle proof defined by the list of ProofOps. Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. cosmos.base.tendermint.v1beta1.Validator: type: object properties: address: type: string pub_key: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } voting_power: type: string format: int64 proposer_priority: type: string format: int64 description: Validator is the type for the validator-set. cosmos.base.tendermint.v1beta1.VersionInfo: type: object properties: name: type: string app_name: type: string version: type: string git_commit: type: string build_tags: type: string go_version: type: string build_deps: type: array items: type: object properties: path: type: string title: module path version: type: string title: module version sum: type: string title: checksum title: Module is the type for VersionInfo cosmos_sdk_version: type: string title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. tendermint.crypto.PublicKey: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators tendermint.p2p.DefaultNodeInfo: type: object properties: protocol_version: type: object properties: p2p: type: string format: uint64 block: type: string format: uint64 app: type: string format: uint64 default_node_id: type: string listen_addr: type: string network: type: string version: type: string channels: type: string format: byte moniker: type: string other: type: object properties: tx_index: type: string rpc_address: type: string tendermint.p2p.DefaultNodeInfoOther: type: object properties: tx_index: type: string rpc_address: type: string tendermint.p2p.ProtocolVersion: type: object properties: p2p: type: string format: uint64 block: type: string format: uint64 app: type: string format: uint64 tendermint.types.Block: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. tendermint.types.BlockID: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID tendermint.types.BlockIDFlag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for tendermint.types.Commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. tendermint.types.CommitSig: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. tendermint.types.Data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block tendermint.types.DuplicateVoteEvidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: |- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: |- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: |- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: |- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: |- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: |- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. tendermint.types.Evidence: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: |- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: |- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: |- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: |- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. tendermint.types.EvidenceList: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. tendermint.types.Header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. tendermint.types.LightBlock: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 tendermint.types.LightClientAttackEvidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. tendermint.types.PartSetHeader: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader tendermint.types.SignedHeader: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. tendermint.types.SignedMsgType: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: |- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals tendermint.types.Validator: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 tendermint.types.ValidatorSet: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 tendermint.types.Vote: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: |- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: |- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: |- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: |- Vote represents a prevote or precommit vote from validators for consensus. tendermint.version.Consensus: type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. cosmos.circuit.v1.MsgAuthorizeCircuitBreaker: type: object properties: granter: type: string description: >- granter is the granter of the circuit breaker permissions and must have LEVEL_SUPER_ADMIN. grantee: type: string description: grantee is the account authorized with the provided permissions. permissions: description: >- permissions are the circuit breaker permissions that the grantee receives. These will overwrite any existing permissions. LEVEL_NONE_UNSPECIFIED can be specified to revoke all permissions. type: object properties: level: description: level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: >- MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type. cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse: type: object properties: success: type: boolean description: >- MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. cosmos.circuit.v1.MsgResetCircuitBreaker: type: object properties: authority: type: string description: >- authority is the account authorized to trip or reset the circuit breaker. msg_type_urls: type: array items: type: string description: >- msg_type_urls specifies a list of Msg type URLs to resume processing. If it is left empty all Msg processing for type URLs that the account is authorized to trip will resume. description: MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type. cosmos.circuit.v1.MsgResetCircuitBreakerResponse: type: object properties: success: type: boolean description: >- MsgResetCircuitBreakerResponse defines the Msg/ResetCircuitBreaker response type. cosmos.circuit.v1.MsgTripCircuitBreaker: type: object properties: authority: type: string description: authority is the account authorized to trip the circuit breaker. msg_type_urls: type: array items: type: string description: >- msg_type_urls specifies a list of type URLs to immediately stop processing. IF IT IS LEFT EMPTY, ALL MSG PROCESSING WILL STOP IMMEDIATELY. This value is validated against the authority's permissions and if the authority does not have permissions to trip the specified msg type URLs (or all URLs), the operation will fail. description: MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type. cosmos.circuit.v1.MsgTripCircuitBreakerResponse: type: object properties: success: type: boolean description: >- MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. cosmos.circuit.v1.Permissions: type: object properties: level: description: level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: |- Permissions are the permissions that an account has to trip or reset the circuit breaker. cosmos.circuit.v1.Permissions.Level: type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED description: |- Level is the permission level. - LEVEL_NONE_UNSPECIFIED: LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit breaker permissions. - LEVEL_SOME_MSGS: LEVEL_SOME_MSGS indicates that the account will have permission to trip or reset the circuit breaker for some Msg type URLs. If this level is chosen, a non-empty list of Msg type URLs must be provided in limit_type_urls. - LEVEL_ALL_MSGS: LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit breaker for Msg's of all type URLs. - LEVEL_SUPER_ADMIN: LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker actions and can grant permissions to other accounts. cosmos.circuit.v1.AccountResponse: type: object properties: permission: type: object properties: level: description: level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: |- Permissions are the permissions that an account has to trip or reset the circuit breaker. description: AccountResponse is the response type for the Query/Account RPC method. cosmos.circuit.v1.AccountsResponse: type: object properties: accounts: type: array items: type: object properties: address: type: string permissions: type: object properties: level: description: level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: |- Permissions are the permissions that an account has to trip or reset the circuit breaker. title: >- GenesisAccountPermissions is the account permissions for the circuit breaker in genesis pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: AccountsResponse is the response type for the Query/Accounts RPC method. cosmos.circuit.v1.DisabledListResponse: type: object properties: disabled_list: type: array items: type: string description: >- DisabledListResponse is the response type for the Query/DisabledList RPC method. cosmos.circuit.v1.GenesisAccountPermissions: type: object properties: address: type: string permissions: type: object properties: level: description: level is the level of permissions granted to this account. type: string enum: - LEVEL_NONE_UNSPECIFIED - LEVEL_SOME_MSGS - LEVEL_ALL_MSGS - LEVEL_SUPER_ADMIN default: LEVEL_NONE_UNSPECIFIED limit_type_urls: type: array items: type: string description: >- limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. description: |- Permissions are the permissions that an account has to trip or reset the circuit breaker. title: >- GenesisAccountPermissions is the account permissions for the circuit breaker in genesis cosmos.consensus.v1.QueryParamsResponse: type: object properties: params: description: >- params are the tendermint consensus params stored in the consensus module. Please note that `params.version` is not populated in this response, it is tracked separately in the x/upgrade module. type: object properties: block: type: object properties: max_bytes: type: string format: int64 title: |- Max block size, in bytes. Note: must be greater than 0 max_gas: type: string format: int64 title: |- Max gas per block. Note: must be greater or equal to -1 description: BlockParams contains limits on the block size. evidence: type: object properties: max_age_num_blocks: type: string format: int64 description: >- Max age of evidence, in blocks. The basic formula for calculating this is: MaxAgeDuration / {average block time}. max_age_duration: type: string description: >- Max age of evidence, in time. It should correspond with an app's "unbonding period" or other similar mechanism for handling [Nothing-At-Stake attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 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. and should fall comfortably under the max block bytes. Default is 1048576 or 1MB description: EvidenceParams determine how we handle evidence of malfeasance. validator: type: object properties: pub_key_types: type: array items: type: string description: |- ValidatorParams restrict the public key types validators can use. NOTE: uses ABCI pubkey naming, not Amino names. version: type: object properties: app: type: string format: uint64 description: VersionParams contains the ABCI application version. abci: type: object properties: vote_extensions_enable_height: type: string format: int64 description: >- vote_extensions_enable_height configures the first height during which vote extensions will be enabled. During this specified height, and for all subsequent heights, precommit messages that do not contain valid extension data will be considered invalid. Prior to this height, vote extensions will not be used or accepted by validators on the network. Once enabled, vote extensions will be created by the application in ExtendVote, passed to the application for validation in VerifyVoteExtension and given to the application to use when proposing a block during PrepareProposal. description: >- ABCIParams configure functionality specific to the Application Blockchain Interface. description: >- QueryParamsResponse defines the response type for querying x/consensus parameters. tendermint.types.ABCIParams: type: object properties: vote_extensions_enable_height: type: string format: int64 description: >- vote_extensions_enable_height configures the first height during which vote extensions will be enabled. During this specified height, and for all subsequent heights, precommit messages that do not contain valid extension data will be considered invalid. Prior to this height, vote extensions will not be used or accepted by validators on the network. Once enabled, vote extensions will be created by the application in ExtendVote, passed to the application for validation in VerifyVoteExtension and given to the application to use when proposing a block during PrepareProposal. description: >- ABCIParams configure functionality specific to the Application Blockchain Interface. tendermint.types.BlockParams: type: object properties: max_bytes: type: string format: int64 title: |- Max block size, in bytes. Note: must be greater than 0 max_gas: type: string format: int64 title: |- Max gas per block. Note: must be greater or equal to -1 description: BlockParams contains limits on the block size. tendermint.types.ConsensusParams: type: object properties: block: type: object properties: max_bytes: type: string format: int64 title: |- Max block size, in bytes. Note: must be greater than 0 max_gas: type: string format: int64 title: |- Max gas per block. Note: must be greater or equal to -1 description: BlockParams contains limits on the block size. evidence: type: object properties: max_age_num_blocks: type: string format: int64 description: >- Max age of evidence, in blocks. The basic formula for calculating this is: MaxAgeDuration / {average block time}. max_age_duration: type: string description: >- Max age of evidence, in time. It should correspond with an app's "unbonding period" or other similar mechanism for handling [Nothing-At-Stake attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 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. and should fall comfortably under the max block bytes. Default is 1048576 or 1MB description: EvidenceParams determine how we handle evidence of malfeasance. validator: type: object properties: pub_key_types: type: array items: type: string description: |- ValidatorParams restrict the public key types validators can use. NOTE: uses ABCI pubkey naming, not Amino names. version: type: object properties: app: type: string format: uint64 description: VersionParams contains the ABCI application version. abci: type: object properties: vote_extensions_enable_height: type: string format: int64 description: >- vote_extensions_enable_height configures the first height during which vote extensions will be enabled. During this specified height, and for all subsequent heights, precommit messages that do not contain valid extension data will be considered invalid. Prior to this height, vote extensions will not be used or accepted by validators on the network. Once enabled, vote extensions will be created by the application in ExtendVote, passed to the application for validation in VerifyVoteExtension and given to the application to use when proposing a block during PrepareProposal. description: >- ABCIParams configure functionality specific to the Application Blockchain Interface. description: |- ConsensusParams contains consensus critical parameters that determine the validity of blocks. tendermint.types.EvidenceParams: type: object properties: max_age_num_blocks: type: string format: int64 description: >- Max age of evidence, in blocks. The basic formula for calculating this is: MaxAgeDuration / {average block time}. max_age_duration: type: string description: >- Max age of evidence, in time. It should correspond with an app's "unbonding period" or other similar mechanism for handling [Nothing-At-Stake attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 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. and should fall comfortably under the max block bytes. Default is 1048576 or 1MB description: EvidenceParams determine how we handle evidence of malfeasance. tendermint.types.ValidatorParams: type: object properties: pub_key_types: type: array items: type: string description: |- ValidatorParams restrict the public key types validators can use. NOTE: uses ABCI pubkey naming, not Amino names. tendermint.types.VersionParams: type: object properties: app: type: string format: uint64 description: VersionParams contains the ABCI application version. cosmos.consensus.v1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). block: description: |- params defines the x/consensus parameters to update. VersionsParams is not included in this Msg because it is tracked separarately in x/upgrade. NOTE: All parameters must be supplied. type: object properties: max_bytes: type: string format: int64 title: |- Max block size, in bytes. Note: must be greater than 0 max_gas: type: string format: int64 title: |- Max gas per block. Note: must be greater or equal to -1 evidence: type: object properties: max_age_num_blocks: type: string format: int64 description: >- Max age of evidence, in blocks. The basic formula for calculating this is: MaxAgeDuration / {average block time}. max_age_duration: type: string description: >- Max age of evidence, in time. It should correspond with an app's "unbonding period" or other similar mechanism for handling [Nothing-At-Stake attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 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. and should fall comfortably under the max block bytes. Default is 1048576 or 1MB description: EvidenceParams determine how we handle evidence of malfeasance. validator: type: object properties: pub_key_types: type: array items: type: string description: |- ValidatorParams restrict the public key types validators can use. NOTE: uses ABCI pubkey naming, not Amino names. abci: title: 'Since: cosmos-sdk 0.50' type: object properties: vote_extensions_enable_height: type: string format: int64 description: >- vote_extensions_enable_height configures the first height during which vote extensions will be enabled. During this specified height, and for all subsequent heights, precommit messages that do not contain valid extension data will be considered invalid. Prior to this height, vote extensions will not be used or accepted by validators on the network. Once enabled, vote extensions will be created by the application in ExtendVote, passed to the application for validation in VerifyVoteExtension and given to the application to use when proposing a block during PrepareProposal. description: >- ABCIParams configure functionality specific to the Application Blockchain Interface. description: MsgUpdateParams is the Msg/UpdateParams request type. cosmos.consensus.v1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. cosmos.crisis.v1beta1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). constant_fee: description: constant_fee defines the x/crisis parameter. type: object properties: denom: type: string amount: type: string description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.crisis.v1beta1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.crisis.v1beta1.MsgVerifyInvariant: type: object properties: sender: type: string description: >- sender is the account address of private key to send coins to fee collector account. invariant_module_name: type: string description: name of the invariant module. invariant_route: type: string description: invariant_route is the msg's invariant route. description: MsgVerifyInvariant represents a message to verify a particular invariance. cosmos.crisis.v1beta1.MsgVerifyInvariantResponse: type: object description: MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. cosmos.distribution.v1beta1.MsgCommunityPoolSpend: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). recipient: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgCommunityPoolSpend defines a message for sending tokens from the community pool to another account. This message is typically executed via a governance proposal with the governance module being the executing authority. Since: cosmos-sdk 0.47 cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse: type: object description: |- MsgCommunityPoolSpendResponse defines the response to executing a MsgCommunityPoolSpend message. Since: cosmos-sdk 0.47 cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool: type: object properties: depositor: type: string validator_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: |- DepositValidatorRewardsPool defines the request structure to provide additional rewards to delegators from a specific validator. Since: cosmos-sdk 0.50 cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse: type: object description: |- MsgDepositValidatorRewardsPoolResponse defines the response to executing a MsgDepositValidatorRewardsPool message. Since: cosmos-sdk 0.50 cosmos.distribution.v1beta1.MsgFundCommunityPool: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. depositor: type: string description: |- MsgFundCommunityPool allows an account to directly fund the community pool. cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse: type: object description: >- MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. cosmos.distribution.v1beta1.MsgSetWithdrawAddress: type: object properties: delegator_address: type: string withdraw_address: type: string description: |- MsgSetWithdrawAddress sets the withdraw address for a delegator (or validator self-delegation). cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse: type: object description: |- MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. cosmos.distribution.v1beta1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/distribution parameters to update. NOTE: All parameters must be supplied. type: object properties: community_tax: type: string base_proposer_reward: type: string description: >- Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string description: >- Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.distribution.v1beta1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward: type: object properties: delegator_address: type: string validator_address: type: string description: |- MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator from a single validator. cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: 'Since: cosmos-sdk 0.46' description: |- MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission: type: object properties: validator_address: type: string description: >- MsgWithdrawValidatorCommission withdraws the full commission to the validator address. cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: 'Since: cosmos-sdk 0.46' description: |- MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. cosmos.distribution.v1beta1.Params: type: object properties: community_tax: type: string base_proposer_reward: type: string description: >- Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string description: >- Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: Params defines the set of params for the distribution module. cosmos.base.v1beta1.DecCoin: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. cosmos.distribution.v1beta1.DelegationDelegatorReward: type: object properties: validator_address: type: string reward: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: |- DelegationDelegatorReward represents the properties of a delegator's delegation reward. cosmos.distribution.v1beta1.QueryCommunityPoolResponse: type: object properties: pool: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: pool defines community pool's coins. description: >- QueryCommunityPoolResponse is the response type for the Query/CommunityPool RPC method. cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: type: object properties: rewards: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: rewards defines the rewards accrued by a delegation. description: |- QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: type: object properties: rewards: type: array items: type: object properties: validator_address: type: string reward: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: |- DelegationDelegatorReward represents the properties of a delegator's delegation reward. description: rewards defines all the rewards accrued by a delegator. total: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: total defines the sum of all the rewards. description: |- QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: type: object properties: validators: type: array items: type: string description: validators defines the validators a delegator is delegating for. description: |- QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: type: object properties: withdraw_address: type: string description: withdraw_address defines the delegator address to query for. description: |- QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. cosmos.distribution.v1beta1.QueryParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: community_tax: type: string base_proposer_reward: type: string description: >- Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string description: >- Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: type: object properties: commission: description: commission defines the commission the validator received. type: object properties: commission: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. title: |- QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse: type: object properties: operator_address: type: string description: operator_address defines the validator operator address. self_bond_rewards: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: self_bond_rewards defines the self delegations rewards. commission: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: commission defines the commission the validator received. description: >- QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: type: object properties: rewards: type: object properties: rewards: type: array items: type: object properties: denom: type: string amount: type: string description: >- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: >- ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards for a validator inexpensive to track, allows simple sanity checks. description: |- QueryValidatorOutstandingRewardsResponse is the response type for the Query/ValidatorOutstandingRewards RPC method. cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: type: object properties: slashes: type: array items: type: object properties: validator_period: type: string format: uint64 fraction: type: string description: |- ValidatorSlashEvent represents a validator slash event. Height is implicit within the store key. This is needed to calculate appropriate amount of staking tokens for delegations which are withdrawn after a slash has occurred. description: slashes defines the slashes the validator received. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: type: object properties: commission: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: |- ValidatorAccumulatedCommission represents accumulated commission for a validator kept as a running counter, can be withdrawn at any time. cosmos.distribution.v1beta1.ValidatorOutstandingRewards: type: object properties: rewards: type: array items: type: object properties: denom: type: string amount: type: string description: |- DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto. description: |- ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards for a validator inexpensive to track, allows simple sanity checks. cosmos.distribution.v1beta1.ValidatorSlashEvent: type: object properties: validator_period: type: string format: uint64 fraction: type: string description: |- ValidatorSlashEvent represents a validator slash event. Height is implicit within the store key. This is needed to calculate appropriate amount of staking tokens for delegations which are withdrawn after a slash has occurred. cosmos.evidence.v1beta1.MsgSubmitEvidence: type: object properties: submitter: type: string description: submitter is the signer account address of evidence. evidence: description: evidence defines the evidence of misbehavior. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: |- MsgSubmitEvidence represents a message that supports submitting arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse: type: object properties: hash: type: string format: byte description: hash defines the hash of the evidence. description: MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. cosmos.evidence.v1beta1.QueryAllEvidenceResponse: type: object properties: evidence: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: evidence returns all evidences. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method. cosmos.evidence.v1beta1.QueryEvidenceResponse: type: object properties: evidence: description: evidence returns the requested evidence. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- QueryEvidenceResponse is the response type for the Query/Evidence RPC method. sourcehub.feegrant.v1beta1.Grant: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context sourcehub.feegrant.v1beta1.QueryAllowanceResponse: type: object properties: allowance: description: allowance is a allowance granted for grantee by granter. type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context description: >- QueryAllowanceResponse is the response type for the Query/Allowance RPC method. sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse: type: object properties: allowances: type: array items: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context description: allowances that have been issued by the granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. Since: cosmos-sdk 0.46 sourcehub.feegrant.v1beta1.QueryAllowancesResponse: type: object properties: allowances: type: array items: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context description: allowances are allowance's granted for grantee by granter. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryAllowancesResponse is the response type for the Query/Allowances RPC method. sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse: type: object properties: allowance: description: allowance is a allowance granted for DID by granter. type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the DID being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context description: >- QueryDIDAllowanceResponse is the response type for the Query/DIDAllowance RPC method. sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse: type: object properties: allowances: type: array items: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the DID being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string additionalProperties: {} title: Grant is stored in the KVStore to record a grant with full context description: allowances that have been issued by the granter to DIDs. pagination: description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte total: type: string format: uint64 description: >- QueryDIDAllowancesByGranterResponse is the response type for the Query/DIDAllowancesByGranter RPC method. sourcehub.feegrant.v1beta1.MsgGrantAllowance: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. allowance: description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: |- MsgGrantAllowance adds permission for Grantee to spend up to Allowance of fees from the account of Granter. sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse: type: object description: >- MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. sourcehub.feegrant.v1beta1.MsgPruneAllowances: type: object properties: pruner: type: string description: pruner is the address of the user pruning expired allowances. description: |- MsgPruneAllowances prunes expired fee allowances. Since cosmos-sdk 0.50 sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse: type: object description: >- MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. Since cosmos-sdk 0.50 sourcehub.feegrant.v1beta1.MsgRevokeAllowance: type: object properties: granter: type: string description: >- granter is the address of the user granting an allowance of their funds. grantee: type: string description: >- grantee is the address of the user being granted an allowance of another user's funds. description: MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse: type: object description: >- MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. cosmos.gov.v1.Deposit: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: |- Deposit defines an amount deposited by an account address to an active proposal. cosmos.gov.v1.DepositParams: type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. description: DepositParams defines the params for deposits on governance proposals. cosmos.gov.v1.Params: type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. voting_period: type: string description: Duration of the voting period. quorum: type: string description: |- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: |- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. min_initial_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value that must be paid at proposal submission. proposal_cancel_ratio: type: string description: >- The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Since: cosmos-sdk 0.50 proposal_cancel_dest: type: string description: >- The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Since: cosmos-sdk 0.50 expedited_voting_period: type: string description: |- Duration of the voting period of an expedited proposal. Since: cosmos-sdk 0.50 expedited_threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Since: cosmos-sdk 0.50 expedited_min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum expedited deposit for a proposal to enter voting period. burn_vote_quorum: type: boolean title: burn deposits if a proposal does not meet quorum burn_proposal_deposit_prevote: type: boolean title: burn deposits if the proposal does not enter voting period burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met min_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Since: cosmos-sdk 0.50 description: |- Params defines the parameters for the x/gov module. Since: cosmos-sdk 0.47 cosmos.gov.v1.Proposal: type: object properties: id: type: string format: uint64 description: id defines the unique id of the proposal. messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages are the arbitrary messages to be executed if the proposal passes. status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: |- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: >- no_with_veto_count is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. metadata: type: string title: |- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal proposer: type: string description: 'Since: cosmos-sdk 0.47' title: proposer is the address of the proposal sumbitter expedited: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited failed_reason: type: string description: 'Since: cosmos-sdk 0.50' title: failed_reason defines the reason why the proposal failed description: Proposal defines the core field members of a governance proposal. cosmos.gov.v1.ProposalStatus: type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED description: |- ProposalStatus enumerates the valid statuses of a proposal. - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. cosmos.gov.v1.QueryConstitutionResponse: type: object properties: constitution: type: string title: >- QueryConstitutionResponse is the response type for the Query/Constitution RPC method cosmos.gov.v1.QueryDepositResponse: type: object properties: deposit: description: deposit defines the requested deposit. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. cosmos.gov.v1.QueryDepositsResponse: type: object properties: deposits: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDepositsResponse is the response type for the Query/Deposits RPC method. cosmos.gov.v1.QueryParamsResponse: type: object properties: voting_params: description: |- Deprecated: Prefer to use `params` instead. voting_params defines the parameters related to voting. type: object properties: voting_period: type: string description: Duration of the voting period. deposit_params: description: |- Deprecated: Prefer to use `params` instead. deposit_params defines the parameters related to deposit. type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. tally_params: description: |- Deprecated: Prefer to use `params` instead. tally_params defines the parameters related to tally. type: object properties: quorum: type: string description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. params: description: |- params defines all the paramaters of x/gov module. Since: cosmos-sdk 0.47 type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. voting_period: type: string description: Duration of the voting period. quorum: type: string description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. min_initial_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value that must be paid at proposal submission. proposal_cancel_ratio: type: string description: >- The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Since: cosmos-sdk 0.50 proposal_cancel_dest: type: string description: >- The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Since: cosmos-sdk 0.50 expedited_voting_period: type: string description: |- Duration of the voting period of an expedited proposal. Since: cosmos-sdk 0.50 expedited_threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Since: cosmos-sdk 0.50 expedited_min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum expedited deposit for a proposal to enter voting period. burn_vote_quorum: type: boolean title: burn deposits if a proposal does not meet quorum burn_proposal_deposit_prevote: type: boolean title: burn deposits if the proposal does not enter voting period burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met min_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Since: cosmos-sdk 0.50 description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.gov.v1.QueryProposalResponse: type: object properties: proposal: description: proposal is the requested governance proposal. type: object properties: id: type: string format: uint64 description: id defines the unique id of the proposal. messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages are the arbitrary messages to be executed if the proposal passes. status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: >- no_with_veto_count is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. metadata: type: string title: |- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal proposer: type: string description: 'Since: cosmos-sdk 0.47' title: proposer is the address of the proposal sumbitter expedited: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited failed_reason: type: string description: 'Since: cosmos-sdk 0.50' title: failed_reason defines the reason why the proposal failed description: >- QueryProposalResponse is the response type for the Query/Proposal RPC method. cosmos.gov.v1.QueryProposalsResponse: type: object properties: proposals: type: array items: type: object properties: id: type: string format: uint64 description: id defines the unique id of the proposal. messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages are the arbitrary messages to be executed if the proposal passes. status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: >- no_with_veto_count is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. metadata: type: string title: |- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal proposer: type: string description: 'Since: cosmos-sdk 0.47' title: proposer is the address of the proposal sumbitter expedited: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited failed_reason: type: string description: 'Since: cosmos-sdk 0.50' title: failed_reason defines the reason why the proposal failed description: Proposal defines the core field members of a governance proposal. description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryProposalsResponse is the response type for the Query/Proposals RPC method. cosmos.gov.v1.QueryTallyResultResponse: type: object properties: tally: description: tally defines the requested tally. type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: >- no_with_veto_count is the number of no with veto votes on a proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. cosmos.gov.v1.QueryVoteResponse: type: object properties: vote: description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. description: options is the weighted vote options. metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 description: QueryVoteResponse is the response type for the Query/Vote RPC method. cosmos.gov.v1.QueryVotesResponse: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. description: options is the weighted vote options. metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: QueryVotesResponse is the response type for the Query/Votes RPC method. cosmos.gov.v1.TallyParams: type: object properties: quorum: type: string description: |- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: |- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. description: TallyParams defines the params for tallying votes on governance proposals. cosmos.gov.v1.TallyResult: type: object properties: yes_count: type: string description: yes_count is the number of yes votes on a proposal. abstain_count: type: string description: abstain_count is the number of abstain votes on a proposal. no_count: type: string description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string description: no_with_veto_count is the number of no with veto votes on a proposal. description: TallyResult defines a standard tally for a governance proposal. cosmos.gov.v1.Vote: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. description: options is the weighted vote options. metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. cosmos.gov.v1.VoteOption: type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED description: >- VoteOption enumerates the valid vote options for a given governance proposal. - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. cosmos.gov.v1.VotingParams: type: object properties: voting_period: type: string description: Duration of the voting period. description: VotingParams defines the params for voting on governance proposals. cosmos.gov.v1.WeightedVoteOption: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. cosmos.gov.v1.MsgCancelProposal: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. proposer: type: string description: proposer is the account address of the proposer. description: |- MsgCancelProposal is the Msg/CancelProposal request type. Since: cosmos-sdk 0.50 cosmos.gov.v1.MsgCancelProposalResponse: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. canceled_time: type: string format: date-time description: canceled_time is the time when proposal is canceled. canceled_height: type: string format: uint64 description: >- canceled_height defines the block height at which the proposal is canceled. description: |- MsgCancelProposalResponse defines the response structure for executing a MsgCancelProposal message. Since: cosmos-sdk 0.50 cosmos.gov.v1.MsgDeposit: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: MsgDeposit defines a message to submit a deposit to an existing proposal. cosmos.gov.v1.MsgDepositResponse: type: object description: MsgDepositResponse defines the Msg/Deposit response type. cosmos.gov.v1.MsgExecLegacyContent: type: object properties: content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} authority: type: string description: authority must be the gov module address. description: >- MsgExecLegacyContent is used to wrap the legacy content field into a message. This ensures backwards compatibility with v1beta1.MsgSubmitProposal. cosmos.gov.v1.MsgExecLegacyContentResponse: type: object description: >- MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. cosmos.gov.v1.MsgSubmitProposal: type: object properties: messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: messages are the arbitrary messages to be executed if proposal passes. initial_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- initial_deposit is the deposit value that must be paid at proposal submission. proposer: type: string description: proposer is the account address of the proposer. metadata: type: string description: metadata is any arbitrary metadata attached to the proposal. title: type: string description: |- title is the title of the proposal. Since: cosmos-sdk 0.47 summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is the summary of the proposal expedited: type: boolean description: 'Since: cosmos-sdk 0.50' title: expedited defines if the proposal is expedited or not description: >- MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content. cosmos.gov.v1.MsgSubmitProposalResponse: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. cosmos.gov.v1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/gov parameters to update. NOTE: All parameters must be supplied. type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. voting_period: type: string description: Duration of the voting period. quorum: type: string description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. min_initial_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value that must be paid at proposal submission. proposal_cancel_ratio: type: string description: >- The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Since: cosmos-sdk 0.50 proposal_cancel_dest: type: string description: >- The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Since: cosmos-sdk 0.50 expedited_voting_period: type: string description: |- Duration of the voting period of an expedited proposal. Since: cosmos-sdk 0.50 expedited_threshold: type: string description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Since: cosmos-sdk 0.50 expedited_min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum expedited deposit for a proposal to enter voting period. burn_vote_quorum: type: boolean title: burn deposits if a proposal does not meet quorum burn_proposal_deposit_prevote: type: boolean title: burn deposits if the proposal does not enter voting period burn_vote_veto: type: boolean title: burn deposits if quorum with vote type no_veto is met min_deposit_ratio: type: string description: >- The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Since: cosmos-sdk 0.50 description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.gov.v1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.gov.v1.MsgVote: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. option: description: option defines the vote option. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string description: metadata is any arbitrary metadata attached to the Vote. description: MsgVote defines a message to cast a vote. cosmos.gov.v1.MsgVoteResponse: type: object description: MsgVoteResponse defines the Msg/Vote response type. cosmos.gov.v1.MsgVoteWeighted: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. description: options defines the weighted vote options. metadata: type: string description: metadata is any arbitrary metadata attached to the VoteWeighted. description: MsgVoteWeighted defines a message to cast a vote. cosmos.gov.v1.MsgVoteWeightedResponse: type: object description: MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. cosmos.gov.v1beta1.MsgDeposit: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: MsgDeposit defines a message to submit a deposit to an existing proposal. cosmos.gov.v1beta1.MsgDepositResponse: type: object description: MsgDepositResponse defines the Msg/Deposit response type. cosmos.gov.v1beta1.MsgSubmitProposal: type: object properties: content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} initial_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- initial_deposit is the deposit value that must be paid at proposal submission. proposer: type: string description: proposer is the account address of the proposer. description: >- MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content. cosmos.gov.v1beta1.MsgSubmitProposalResponse: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. cosmos.gov.v1beta1.MsgVote: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. option: description: option defines the vote option. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED description: MsgVote defines a message to cast a vote. cosmos.gov.v1beta1.MsgVoteResponse: type: object description: MsgVoteResponse defines the Msg/Vote response type. cosmos.gov.v1beta1.MsgVoteWeighted: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address for the proposal. options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 description: options defines the weighted vote options. description: |- MsgVoteWeighted defines a message to cast a vote. Since: cosmos-sdk 0.43 cosmos.gov.v1beta1.MsgVoteWeightedResponse: type: object description: |- MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. Since: cosmos-sdk 0.43 cosmos.gov.v1beta1.VoteOption: type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED description: >- VoteOption enumerates the valid vote options for a given governance proposal. - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. cosmos.gov.v1beta1.WeightedVoteOption: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 cosmos.gov.v1beta1.Deposit: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: |- Deposit defines an amount deposited by an account address to an active proposal. cosmos.gov.v1beta1.DepositParams: type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. description: DepositParams defines the params for deposits on governance proposals. cosmos.gov.v1beta1.Proposal: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: |- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: no_with_veto is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. description: Proposal defines the core field members of a governance proposal. cosmos.gov.v1beta1.ProposalStatus: type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED description: |- ProposalStatus enumerates the valid statuses of a proposal. - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. cosmos.gov.v1beta1.QueryDepositResponse: type: object properties: deposit: description: deposit defines the requested deposit. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. cosmos.gov.v1beta1.QueryDepositsResponse: type: object properties: deposits: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. depositor: type: string description: depositor defines the deposit addresses from the proposals. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryDepositsResponse is the response type for the Query/Deposits RPC method. cosmos.gov.v1beta1.QueryParamsResponse: type: object properties: voting_params: description: voting_params defines the parameters related to voting. type: object properties: voting_period: type: string description: Duration of the voting period. deposit_params: description: deposit_params defines the parameters related to deposit. type: object properties: min_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Minimum deposit for a proposal to enter voting period. max_deposit_period: type: string description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. tally_params: description: tally_params defines the parameters related to tally. type: object properties: quorum: type: string format: byte description: >- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string format: byte description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string format: byte description: >- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.gov.v1beta1.QueryProposalResponse: type: object properties: proposal: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: >- no_with_veto is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. description: Proposal defines the core field members of a governance proposal. description: >- QueryProposalResponse is the response type for the Query/Proposal RPC method. cosmos.gov.v1beta1.QueryProposalsResponse: type: object properties: proposals: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. content: description: content is the proposal's content. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} status: description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: >- no_with_veto is the number of no with veto votes on a proposal. submit_time: type: string format: date-time description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time description: deposit_end_time is the end time for deposition. total_deposit: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time description: voting_end_time is the end time of voting on a proposal. description: Proposal defines the core field members of a governance proposal. description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryProposalsResponse is the response type for the Query/Proposals RPC method. cosmos.gov.v1beta1.QueryTallyResultResponse: type: object properties: tally: description: tally defines the requested tally. type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: no_with_veto is the number of no with veto votes on a proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. cosmos.gov.v1beta1.QueryVoteResponse: type: object properties: vote: description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 description: |- options is the weighted vote options. Since: cosmos-sdk 0.43 description: QueryVoteResponse is the response type for the Query/Vote RPC method. cosmos.gov.v1beta1.QueryVotesResponse: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 description: |- options is the weighted vote options. Since: cosmos-sdk 0.43 description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: QueryVotesResponse is the response type for the Query/Votes RPC method. cosmos.gov.v1beta1.TallyParams: type: object properties: quorum: type: string format: byte description: |- Minimum percentage of total stake needed to vote for a result to be considered valid. threshold: type: string format: byte description: >- Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. veto_threshold: type: string format: byte description: |- Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. description: TallyParams defines the params for tallying votes on governance proposals. cosmos.gov.v1beta1.TallyResult: type: object properties: 'yes': type: string description: yes is the number of yes votes on a proposal. abstain: type: string description: abstain is the number of abstain votes on a proposal. 'no': type: string description: no is the number of no votes on a proposal. no_with_veto: type: string description: no_with_veto is the number of no with veto votes on a proposal. description: TallyResult defines a standard tally for a governance proposal. cosmos.gov.v1beta1.Vote: type: object properties: proposal_id: type: string format: uint64 description: proposal_id defines the unique id of the proposal. voter: type: string description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED options: type: array items: type: object properties: option: description: >- option defines the valid vote options, it must not contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED weight: type: string description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 description: |- options is the weighted vote options. Since: cosmos-sdk 0.43 description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. cosmos.gov.v1beta1.VotingParams: type: object properties: voting_period: type: string description: Duration of the voting period. description: VotingParams defines the params for voting on governance proposals. cosmos.group.v1.Exec: type: string enum: - EXEC_UNSPECIFIED - EXEC_TRY default: EXEC_UNSPECIFIED description: |- Exec defines modes of execution of a proposal on creation or on new vote. - EXEC_UNSPECIFIED: An empty value means that there should be a separate MsgExec request for the proposal to execute. - EXEC_TRY: Try to execute the proposal immediately. If the proposal is not allowed per the DecisionPolicy, the proposal will still be open and could be executed at a later point. cosmos.group.v1.MemberRequest: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: weight is the member's voting weight that should be greater than 0. metadata: type: string description: metadata is any arbitrary metadata attached to the member. description: |- MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests. cosmos.group.v1.MsgCreateGroup: type: object properties: admin: type: string description: admin is the account address of the group admin. members: type: array items: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: metadata is any arbitrary metadata attached to the member. description: >- MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests. description: members defines the group members. metadata: type: string description: metadata is any arbitrary metadata to attached to the group. description: MsgCreateGroup is the Msg/CreateGroup request type. cosmos.group.v1.MsgCreateGroupPolicy: type: object properties: admin: type: string description: admin is the account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. metadata: type: string description: metadata is any arbitrary metadata attached to the group policy. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. cosmos.group.v1.MsgCreateGroupPolicyResponse: type: object properties: address: type: string description: address is the account address of the newly created group policy. description: MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. cosmos.group.v1.MsgCreateGroupResponse: type: object properties: group_id: type: string format: uint64 description: group_id is the unique ID of the newly created group. description: MsgCreateGroupResponse is the Msg/CreateGroup response type. cosmos.group.v1.MsgCreateGroupWithPolicy: type: object properties: admin: type: string description: admin is the account address of the group and group policy admin. members: type: array items: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: metadata is any arbitrary metadata attached to the member. description: >- MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests. description: members defines the group members. group_metadata: type: string description: group_metadata is any arbitrary metadata attached to the group. group_policy_metadata: type: string description: >- group_policy_metadata is any arbitrary metadata attached to the group policy. group_policy_as_admin: type: boolean description: >- group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. cosmos.group.v1.MsgCreateGroupWithPolicyResponse: type: object properties: group_id: type: string format: uint64 description: group_id is the unique ID of the newly created group with policy. group_policy_address: type: string description: >- group_policy_address is the account address of the newly created group policy. description: >- MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. cosmos.group.v1.MsgExec: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. executor: type: string description: executor is the account address used to execute the proposal. description: MsgExec is the Msg/Exec request type. cosmos.group.v1.MsgExecResponse: type: object properties: result: description: result is the final result of the proposal execution. type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED description: MsgExecResponse is the Msg/Exec request type. cosmos.group.v1.MsgLeaveGroup: type: object properties: address: type: string description: address is the account address of the group member. group_id: type: string format: uint64 description: group_id is the unique ID of the group. description: MsgLeaveGroup is the Msg/LeaveGroup request type. cosmos.group.v1.MsgLeaveGroupResponse: type: object description: MsgLeaveGroupResponse is the Msg/LeaveGroup response type. cosmos.group.v1.MsgSubmitProposal: type: object properties: group_policy_address: type: string description: group_policy_address is the account address of group policy. proposers: type: array items: type: string description: |- proposers are the account addresses of the proposers. Proposers signatures will be counted as yes votes. metadata: type: string description: metadata is any arbitrary metadata attached to the proposal. messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. exec: description: |- exec defines the mode of execution of the proposal, whether it should be executed immediately on creation or not. If so, proposers signatures are considered as Yes votes. type: string enum: - EXEC_UNSPECIFIED - EXEC_TRY default: EXEC_UNSPECIFIED title: type: string description: |- title is the title of the proposal. Since: cosmos-sdk 0.47 summary: type: string description: |- summary is the summary of the proposal. Since: cosmos-sdk 0.47 description: MsgSubmitProposal is the Msg/SubmitProposal request type. cosmos.group.v1.MsgSubmitProposalResponse: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. description: MsgSubmitProposalResponse is the Msg/SubmitProposal response type. cosmos.group.v1.MsgUpdateGroupAdmin: type: object properties: admin: type: string description: admin is the current account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. new_admin: type: string description: new_admin is the group new admin account address. description: MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. cosmos.group.v1.MsgUpdateGroupAdminResponse: type: object description: MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. cosmos.group.v1.MsgUpdateGroupMembers: type: object properties: admin: type: string description: admin is the account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. member_updates: type: array items: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: metadata is any arbitrary metadata attached to the member. description: >- MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests. description: |- member_updates is the list of members to update, set weight to 0 to remove a member. description: MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. cosmos.group.v1.MsgUpdateGroupMembersResponse: type: object description: MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. cosmos.group.v1.MsgUpdateGroupMetadata: type: object properties: admin: type: string description: admin is the account address of the group admin. group_id: type: string format: uint64 description: group_id is the unique ID of the group. metadata: type: string description: metadata is the updated group's metadata. description: MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. cosmos.group.v1.MsgUpdateGroupMetadataResponse: type: object description: >- MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. cosmos.group.v1.MsgUpdateGroupPolicyAdmin: type: object properties: admin: type: string description: admin is the account address of the group admin. group_policy_address: type: string description: group_policy_address is the account address of the group policy. new_admin: type: string description: new_admin is the new group policy admin. description: MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse: type: object description: >- MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy: type: object properties: admin: type: string description: admin is the account address of the group admin. group_policy_address: type: string description: group_policy_address is the account address of group policy. decision_policy: description: decision_policy is the updated group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse: type: object description: >- MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. cosmos.group.v1.MsgUpdateGroupPolicyMetadata: type: object properties: admin: type: string description: admin is the account address of the group admin. group_policy_address: type: string description: group_policy_address is the account address of group policy. metadata: type: string description: metadata is the group policy metadata to be updated. description: >- MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse: type: object description: >- MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. cosmos.group.v1.MsgVote: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the voter account address. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string description: metadata is any arbitrary metadata attached to the vote. exec: description: |- exec defines whether the proposal should be executed immediately after voting or not. type: string enum: - EXEC_UNSPECIFIED - EXEC_TRY default: EXEC_UNSPECIFIED description: MsgVote is the Msg/Vote request type. cosmos.group.v1.MsgVoteResponse: type: object description: MsgVoteResponse is the Msg/Vote response type. cosmos.group.v1.MsgWithdrawProposal: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. address: type: string description: >- address is the admin of the group policy or one of the proposer of the proposal. description: MsgWithdrawProposal is the Msg/WithdrawProposal request type. cosmos.group.v1.MsgWithdrawProposalResponse: type: object description: MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. cosmos.group.v1.ProposalExecutorResult: type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED description: |- ProposalExecutorResult defines types of proposal executor results. - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: An empty value is not allowed. - PROPOSAL_EXECUTOR_RESULT_NOT_RUN: We have not yet run the executor. - PROPOSAL_EXECUTOR_RESULT_SUCCESS: The executor was successful and proposed action updated state. - PROPOSAL_EXECUTOR_RESULT_FAILURE: The executor returned an error and proposed action didn't update state. cosmos.group.v1.VoteOption: type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED description: |- VoteOption enumerates the valid vote options for a given proposal. - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will return an error. - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. cosmos.group.v1.GroupInfo: type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: created_at is a timestamp specifying when a group was created. description: GroupInfo represents the high-level on-chain information for a group. cosmos.group.v1.GroupMember: type: object properties: group_id: type: string format: uint64 description: group_id is the unique ID of the group. member: description: member is the member data. type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: metadata is any arbitrary metadata attached to the member. added_at: type: string format: date-time description: added_at is a timestamp specifying when a member was added. description: GroupMember represents the relationship between a group and a member. cosmos.group.v1.GroupPolicyInfo: type: object properties: address: type: string description: address is the account address of group policy. group_id: type: string format: uint64 description: group_id is the unique ID of the group. admin: type: string description: admin is the account address of the group admin. metadata: type: string title: |- metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 description: >- version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} created_at: type: string format: date-time description: created_at is a timestamp specifying when a group policy was created. description: >- GroupPolicyInfo represents the high-level on-chain information for a group policy. cosmos.group.v1.Member: type: object properties: address: type: string description: address is the member's account address. weight: type: string description: weight is the member's voting weight that should be greater than 0. metadata: type: string description: metadata is any arbitrary metadata attached to the member. added_at: type: string format: date-time description: added_at is a timestamp specifying when a member was added. description: |- Member represents a group member with an account address, non-zero weight, metadata and added_at timestamp. cosmos.group.v1.Proposal: type: object properties: id: type: string format: uint64 description: id is the unique id of the proposal. group_policy_address: type: string description: group_policy_address is the account address of group policy. metadata: type: string title: |- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: type: string description: proposers are the account addresses of the proposers. submit_time: type: string format: date-time description: submit_time is a timestamp specifying when a proposal was submitted. group_version: type: string format: uint64 description: |- group_version tracks the version of the group at proposal submission. This field is here for informational purposes only. group_policy_version: type: string format: uint64 description: >- group_policy_version tracks the version of the group policy at proposal submission. When a decision policy is changed, existing proposals from previous policy versions will become invalid with the `ABORTED` status. This field is here for informational purposes only. status: description: >- status represents the high level position in the life cycle of the proposal. Initial value is Submitted. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_SUBMITTED - PROPOSAL_STATUS_ACCEPTED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_ABORTED - PROPOSAL_STATUS_WITHDRAWN default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result contains the sums of all weighted votes for this proposal for each vote option. It is empty at submission, and only populated after tallying, at voting period end or at proposal execution, whichever happens first. type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. voting_period_end: type: string format: date-time description: >- voting_period_end is the timestamp before which voting must be done. Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying will be done at this point, and the `final_tally_result`and `status` fields will be accordingly updated. executor_result: description: >- executor_result is the final result of the proposal execution. Initial value is NotRun. type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit a proposal for a group policy to decide upon. A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal passes as well as some optional metadata associated with the proposal. cosmos.group.v1.ProposalStatus: type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_SUBMITTED - PROPOSAL_STATUS_ACCEPTED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_ABORTED - PROPOSAL_STATUS_WITHDRAWN default: PROPOSAL_STATUS_UNSPECIFIED description: |- ProposalStatus defines proposal statuses. - PROPOSAL_STATUS_UNSPECIFIED: An empty value is invalid and not allowed. - PROPOSAL_STATUS_SUBMITTED: Initial status of a proposal when submitted. - PROPOSAL_STATUS_ACCEPTED: Final status of a proposal when the final tally is done and the outcome passes the group policy's decision policy. - PROPOSAL_STATUS_REJECTED: Final status of a proposal when the final tally is done and the outcome is rejected by the group policy's decision policy. - PROPOSAL_STATUS_ABORTED: Final status of a proposal when the group policy is modified before the final tally. - PROPOSAL_STATUS_WITHDRAWN: A proposal can be withdrawn before the voting start time by the owner. When this happens the final status is Withdrawn. cosmos.group.v1.QueryGroupInfoResponse: type: object properties: info: description: info is the GroupInfo of the group. type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: created_at is a timestamp specifying when a group was created. description: QueryGroupInfoResponse is the Query/GroupInfo response type. cosmos.group.v1.QueryGroupMembersResponse: type: object properties: members: type: array items: type: object properties: group_id: type: string format: uint64 description: group_id is the unique ID of the group. member: description: member is the member data. type: object properties: address: type: string description: address is the member's account address. weight: type: string description: >- weight is the member's voting weight that should be greater than 0. metadata: type: string description: metadata is any arbitrary metadata attached to the member. added_at: type: string format: date-time description: added_at is a timestamp specifying when a member was added. description: >- GroupMember represents the relationship between a group and a member. description: members are the members of the group with given group_id. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: QueryGroupMembersResponse is the Query/GroupMembersResponse response type. cosmos.group.v1.QueryGroupPoliciesByAdminResponse: type: object properties: group_policies: type: array items: type: object properties: address: type: string description: address is the account address of group policy. group_id: type: string format: uint64 description: group_id is the unique ID of the group. admin: type: string description: admin is the account address of the group admin. metadata: type: string title: >- metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 description: >- version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group policy was created. description: >- GroupPolicyInfo represents the high-level on-chain information for a group policy. description: group_policies are the group policies info with provided admin. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. cosmos.group.v1.QueryGroupPoliciesByGroupResponse: type: object properties: group_policies: type: array items: type: object properties: address: type: string description: address is the account address of group policy. group_id: type: string format: uint64 description: group_id is the unique ID of the group. admin: type: string description: admin is the account address of the group admin. metadata: type: string title: >- metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 description: >- version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group policy was created. description: >- GroupPolicyInfo represents the high-level on-chain information for a group policy. description: >- group_policies are the group policies info associated with the provided group. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. cosmos.group.v1.QueryGroupPolicyInfoResponse: type: object properties: info: description: info is the GroupPolicyInfo of the group policy. type: object properties: address: type: string description: address is the account address of group policy. group_id: type: string format: uint64 description: group_id is the unique ID of the group. admin: type: string description: admin is the account address of the group admin. metadata: type: string title: |- metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 description: >- version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal. decision_policy: description: decision_policy specifies the group policy's decision policy. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} created_at: type: string format: date-time description: >- created_at is a timestamp specifying when a group policy was created. description: QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. cosmos.group.v1.QueryGroupsByAdminResponse: type: object properties: groups: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: created_at is a timestamp specifying when a group was created. description: >- GroupInfo represents the high-level on-chain information for a group. description: groups are the groups info with the provided admin. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. cosmos.group.v1.QueryGroupsByMemberResponse: type: object properties: groups: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: created_at is a timestamp specifying when a group was created. description: >- GroupInfo represents the high-level on-chain information for a group. description: groups are the groups info with the provided group member. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: QueryGroupsByMemberResponse is the Query/GroupsByMember response type. cosmos.group.v1.QueryGroupsResponse: type: object properties: groups: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique ID of the group. admin: type: string description: admin is the account address of the group's admin. metadata: type: string title: >- metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 version: type: string format: uint64 title: >- version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail total_weight: type: string description: total_weight is the sum of the group members' weights. created_at: type: string format: date-time description: created_at is a timestamp specifying when a group was created. description: >- GroupInfo represents the high-level on-chain information for a group. description: '`groups` is all the groups present in state.' pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryGroupsResponse is the Query/Groups response type. Since: cosmos-sdk 0.47.1 cosmos.group.v1.QueryProposalResponse: type: object properties: proposal: description: proposal is the proposal info. type: object properties: id: type: string format: uint64 description: id is the unique id of the proposal. group_policy_address: type: string description: group_policy_address is the account address of group policy. metadata: type: string title: |- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: type: string description: proposers are the account addresses of the proposers. submit_time: type: string format: date-time description: >- submit_time is a timestamp specifying when a proposal was submitted. group_version: type: string format: uint64 description: >- group_version tracks the version of the group at proposal submission. This field is here for informational purposes only. group_policy_version: type: string format: uint64 description: >- group_policy_version tracks the version of the group policy at proposal submission. When a decision policy is changed, existing proposals from previous policy versions will become invalid with the `ABORTED` status. This field is here for informational purposes only. status: description: >- status represents the high level position in the life cycle of the proposal. Initial value is Submitted. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_SUBMITTED - PROPOSAL_STATUS_ACCEPTED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_ABORTED - PROPOSAL_STATUS_WITHDRAWN default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result contains the sums of all weighted votes for this proposal for each vote option. It is empty at submission, and only populated after tallying, at voting period end or at proposal execution, whichever happens first. type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. voting_period_end: type: string format: date-time description: >- voting_period_end is the timestamp before which voting must be done. Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying will be done at this point, and the `final_tally_result`and `status` fields will be accordingly updated. executor_result: description: >- executor_result is the final result of the proposal execution. Initial value is NotRun. type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal description: QueryProposalResponse is the Query/Proposal response type. cosmos.group.v1.QueryProposalsByGroupPolicyResponse: type: object properties: proposals: type: array items: type: object properties: id: type: string format: uint64 description: id is the unique id of the proposal. group_policy_address: type: string description: group_policy_address is the account address of group policy. metadata: type: string title: |- metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: type: string description: proposers are the account addresses of the proposers. submit_time: type: string format: date-time description: >- submit_time is a timestamp specifying when a proposal was submitted. group_version: type: string format: uint64 description: >- group_version tracks the version of the group at proposal submission. This field is here for informational purposes only. group_policy_version: type: string format: uint64 description: >- group_policy_version tracks the version of the group policy at proposal submission. When a decision policy is changed, existing proposals from previous policy versions will become invalid with the `ABORTED` status. This field is here for informational purposes only. status: description: >- status represents the high level position in the life cycle of the proposal. Initial value is Submitted. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_SUBMITTED - PROPOSAL_STATUS_ACCEPTED - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_ABORTED - PROPOSAL_STATUS_WITHDRAWN default: PROPOSAL_STATUS_UNSPECIFIED final_tally_result: description: >- final_tally_result contains the sums of all weighted votes for this proposal for each vote option. It is empty at submission, and only populated after tallying, at voting period end or at proposal execution, whichever happens first. type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. voting_period_end: type: string format: date-time description: >- voting_period_end is the timestamp before which voting must be done. Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying will be done at this point, and the `final_tally_result`and `status` fields will be accordingly updated. executor_result: description: >- executor_result is the final result of the proposal execution. Initial value is NotRun. type: string enum: - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - PROPOSAL_EXECUTOR_RESULT_SUCCESS - PROPOSAL_EXECUTOR_RESULT_FAILURE default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. title: type: string description: 'Since: cosmos-sdk 0.47' title: title is the title of the proposal summary: type: string description: 'Since: cosmos-sdk 0.47' title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit a proposal for a group policy to decide upon. A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal passes as well as some optional metadata associated with the proposal. description: proposals are the proposals with given group policy. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. cosmos.group.v1.QueryTallyResultResponse: type: object properties: tally: description: tally defines the requested tally. type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. description: QueryTallyResultResponse is the Query/TallyResult response type. cosmos.group.v1.QueryVoteByProposalVoterResponse: type: object properties: vote: description: vote is the vote with given proposal_id and voter. type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the account address of the voter. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 submit_time: type: string format: date-time description: submit_time is the timestamp when the vote was submitted. title: Vote represents a vote for a proposal.string metadata description: >- QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. cosmos.group.v1.QueryVotesByProposalResponse: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the account address of the voter. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 submit_time: type: string format: date-time description: submit_time is the timestamp when the vote was submitted. title: Vote represents a vote for a proposal.string metadata description: votes are the list of votes for given proposal_id. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: QueryVotesByProposalResponse is the Query/VotesByProposal response type. cosmos.group.v1.QueryVotesByVoterResponse: type: object properties: votes: type: array items: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the account address of the voter. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 submit_time: type: string format: date-time description: submit_time is the timestamp when the vote was submitted. title: Vote represents a vote for a proposal.string metadata description: votes are the list of votes by given voter. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: QueryVotesByVoterResponse is the Query/VotesByVoter response type. cosmos.group.v1.TallyResult: type: object properties: yes_count: type: string description: yes_count is the weighted sum of yes votes. abstain_count: type: string description: abstain_count is the weighted sum of abstainers. no_count: type: string description: no_count is the weighted sum of no votes. no_with_veto_count: type: string description: no_with_veto_count is the weighted sum of veto. description: TallyResult represents the sum of weighted votes for each vote option. cosmos.group.v1.Vote: type: object properties: proposal_id: type: string format: uint64 description: proposal is the unique ID of the proposal. voter: type: string description: voter is the account address of the voter. option: description: option is the voter's choice on the proposal. type: string enum: - VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_YES - VOTE_OPTION_ABSTAIN - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED metadata: type: string title: >- metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 submit_time: type: string format: date-time description: submit_time is the timestamp when the vote was submitted. title: Vote represents a vote for a proposal.string metadata cosmos.mint.v1beta1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/mint parameters to update. NOTE: All parameters must be supplied. type: object properties: mint_denom: type: string title: type of coin to mint inflation_rate_change: type: string title: maximum annual change in inflation rate inflation_max: type: string title: maximum inflation rate inflation_min: type: string title: minimum inflation rate goal_bonded: type: string title: goal of percent bonded atoms blocks_per_year: type: string format: uint64 title: expected blocks per year description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.mint.v1beta1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.mint.v1beta1.Params: type: object properties: mint_denom: type: string title: type of coin to mint inflation_rate_change: type: string title: maximum annual change in inflation rate inflation_max: type: string title: maximum inflation rate inflation_min: type: string title: minimum inflation rate goal_bonded: type: string title: goal of percent bonded atoms blocks_per_year: type: string format: uint64 title: expected blocks per year description: Params defines the parameters for the x/mint module. cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: type: object properties: annual_provisions: type: string format: byte description: annual_provisions is the current minting annual provisions value. description: |- QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. cosmos.mint.v1beta1.QueryInflationResponse: type: object properties: inflation: type: string format: byte description: inflation is the current minting inflation value. description: |- QueryInflationResponse is the response type for the Query/Inflation RPC method. cosmos.mint.v1beta1.QueryParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: mint_denom: type: string title: type of coin to mint inflation_rate_change: type: string title: maximum annual change in inflation rate inflation_max: type: string title: maximum inflation rate inflation_min: type: string title: minimum inflation rate goal_bonded: type: string title: goal of percent bonded atoms blocks_per_year: type: string format: uint64 title: expected blocks per year description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.params.v1beta1.ParamChange: type: object properties: subspace: type: string key: type: string value: type: string description: |- ParamChange defines an individual parameter change, for use in ParameterChangeProposal. cosmos.params.v1beta1.QueryParamsResponse: type: object properties: param: description: param defines the queried parameter. type: object properties: subspace: type: string key: type: string value: type: string description: QueryParamsResponse is response type for the Query/Params RPC method. cosmos.params.v1beta1.QuerySubspacesResponse: type: object properties: subspaces: type: array items: type: object properties: subspace: type: string keys: type: array items: type: string description: >- Subspace defines a parameter subspace name and all the keys that exist for the subspace. Since: cosmos-sdk 0.46 description: |- QuerySubspacesResponse defines the response types for querying for all registered subspaces and all keys for a subspace. Since: cosmos-sdk 0.46 cosmos.params.v1beta1.Subspace: type: object properties: subspace: type: string keys: type: array items: type: string description: |- Subspace defines a parameter subspace name and all the keys that exist for the subspace. Since: cosmos-sdk 0.46 cosmos.slashing.v1beta1.MsgUnjail: type: object properties: validator_addr: type: string title: MsgUnjail defines the Msg/Unjail request type cosmos.slashing.v1beta1.MsgUnjailResponse: type: object title: MsgUnjailResponse defines the Msg/Unjail response type cosmos.slashing.v1beta1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/slashing parameters to update. NOTE: All parameters must be supplied. type: object properties: signed_blocks_window: type: string format: int64 min_signed_per_window: type: string format: byte downtime_jail_duration: type: string slash_fraction_double_sign: type: string format: byte slash_fraction_downtime: type: string format: byte description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.slashing.v1beta1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.slashing.v1beta1.Params: type: object properties: signed_blocks_window: type: string format: int64 min_signed_per_window: type: string format: byte downtime_jail_duration: type: string slash_fraction_double_sign: type: string format: byte slash_fraction_downtime: type: string format: byte description: Params represents the parameters used for by the slashing module. cosmos.slashing.v1beta1.QueryParamsResponse: type: object properties: params: type: object properties: signed_blocks_window: type: string format: int64 min_signed_per_window: type: string format: byte downtime_jail_duration: type: string slash_fraction_double_sign: type: string format: byte slash_fraction_downtime: type: string format: byte description: Params represents the parameters used for by the slashing module. title: QueryParamsResponse is the response type for the Query/Params RPC method cosmos.slashing.v1beta1.QuerySigningInfoResponse: type: object properties: val_signing_info: title: val_signing_info is the signing info of requested val cons address type: object properties: address: type: string start_height: type: string format: int64 title: Height at which validator was first a candidate OR was un-jailed index_offset: type: string format: int64 description: >- Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap. jailed_until: type: string format: date-time description: >- Timestamp until which the validator is jailed due to liveness downtime. tombstoned: type: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior. missed_blocks_counter: type: string format: int64 description: >- A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap. description: >- ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. title: >- QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC method cosmos.slashing.v1beta1.QuerySigningInfosResponse: type: object properties: info: type: array items: type: object properties: address: type: string start_height: type: string format: int64 title: Height at which validator was first a candidate OR was un-jailed index_offset: type: string format: int64 description: >- Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap. jailed_until: type: string format: date-time description: >- Timestamp until which the validator is jailed due to liveness downtime. tombstoned: type: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior. missed_blocks_counter: type: string format: int64 description: >- A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap. description: >- ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. title: info is the signing info of all validators pagination: type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } title: >- QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method cosmos.slashing.v1beta1.ValidatorSigningInfo: type: object properties: address: type: string start_height: type: string format: int64 title: Height at which validator was first a candidate OR was un-jailed index_offset: type: string format: int64 description: >- Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap. jailed_until: type: string format: date-time description: >- Timestamp until which the validator is jailed due to liveness downtime. tombstoned: type: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior. missed_blocks_counter: type: string format: int64 description: |- A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap. description: >- ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. cosmos.staking.v1beta1.BondStatus: type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED description: |- BondStatus is the status of a validator. - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. cosmos.staking.v1beta1.Commission: type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: update_time is the last time the commission rate was changed. description: Commission defines commission parameters for a given validator. cosmos.staking.v1beta1.CommissionRates: type: object properties: rate: type: string description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. description: >- CommissionRates defines the initial commission rates to be used for creating a validator. cosmos.staking.v1beta1.Delegation: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: |- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. cosmos.staking.v1beta1.DelegationResponse: type: object properties: delegation: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: |- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. balance: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: |- DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses. cosmos.staking.v1beta1.Description: type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: security_contact defines an optional email for security contact. details: type: string description: details define other optional details. description: Description defines a validator description. cosmos.staking.v1beta1.HistoricalInfo: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: title: prev block info type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. valset: type: array items: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: description defines the description terms for the validator. type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. description: >- HistoricalInfo contains header and validator information for a given block. It is stored as part of staking module's state, which persists the `n` most recent HistoricalInfo (`n` is set by the staking module's `historical_entries` parameter). cosmos.staking.v1beta1.Params: type: object properties: unbonding_time: type: string description: unbonding_time is the time duration of unbonding. max_validators: type: integer format: int64 description: max_validators is the maximum number of validators. max_entries: type: integer format: int64 description: >- max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). historical_entries: type: integer format: int64 description: historical_entries is the number of historical entries to persist. bond_denom: type: string description: bond_denom defines the bondable coin denomination. min_commission_rate: type: string title: >- min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators description: Params defines the parameters for the x/staking module. cosmos.staking.v1beta1.Pool: type: object properties: not_bonded_tokens: type: string bonded_tokens: type: string description: |- Pool is used for tracking bonded and not-bonded token supply of the bond denomination. cosmos.staking.v1beta1.QueryDelegationResponse: type: object properties: delegation_response: description: delegation_responses defines the delegation info of a delegation. type: object properties: delegation: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: >- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. balance: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- QueryDelegationResponse is response type for the Query/Delegation RPC method. cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: type: object properties: delegation_responses: type: array items: type: object properties: delegation: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: >- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. balance: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses. description: delegation_responses defines all the delegations' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: type: object properties: unbonding_responses: type: array items: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: |- entries are the unbonding delegation entries. unbonding delegation entries description: >- UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryUnbondingDelegatorDelegationsResponse is response type for the Query/UnbondingDelegatorDelegations RPC method. cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: type: object properties: validator: description: validator defines the validator info. type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: description defines the description terms for the validator. type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: type: object properties: validators: type: array items: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: description defines the description terms for the validator. type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. cosmos.staking.v1beta1.QueryHistoricalInfoResponse: type: object properties: hist: description: hist defines the historical info at the given height. type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: title: prev block info type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. valset: type: array items: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: description defines the description terms for the validator. type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. description: >- QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC method. cosmos.staking.v1beta1.QueryParamsResponse: type: object properties: params: description: params holds all the parameters of this module. type: object properties: unbonding_time: type: string description: unbonding_time is the time duration of unbonding. max_validators: type: integer format: int64 description: max_validators is the maximum number of validators. max_entries: type: integer format: int64 description: >- max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). historical_entries: type: integer format: int64 description: historical_entries is the number of historical entries to persist. bond_denom: type: string description: bond_denom defines the bondable coin denomination. min_commission_rate: type: string title: >- min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators description: QueryParamsResponse is response type for the Query/Params RPC method. cosmos.staking.v1beta1.QueryPoolResponse: type: object properties: pool: description: pool defines the pool info. type: object properties: not_bonded_tokens: type: string bonded_tokens: type: string description: QueryPoolResponse is response type for the Query/Pool RPC method. cosmos.staking.v1beta1.QueryRedelegationsResponse: type: object properties: redelegation_responses: type: array items: type: object properties: redelegation: type: object properties: delegator_address: type: string description: >- delegator_address is the bech32-encoded address of the delegator. validator_src_address: type: string description: >- validator_src_address is the validator redelegation source operator address. validator_dst_address: type: string description: >- validator_dst_address is the validator redelegation destination operator address. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: >- completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. description: |- entries are the redelegation entries. redelegation entries description: >- Redelegation contains the list of a particular delegator's redelegating bonds from a particular source validator to a particular destination validator. entries: type: array items: type: object properties: redelegation_entry: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: >- completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. balance: type: string description: >- RedelegationEntryResponse is equivalent to a RedelegationEntry except that it contains a balance in addition to shares which is more suitable for client responses. description: >- RedelegationResponse is equivalent to a Redelegation except that its entries contain a balance in addition to shares which is more suitable for client responses. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryRedelegationsResponse is response type for the Query/Redelegations RPC method. cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: type: object properties: unbond: description: unbond defines the unbonding information of a delegation. type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: |- entries are the unbonding delegation entries. unbonding delegation entries description: |- QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: type: object properties: delegation_responses: type: array items: type: object properties: delegation: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. shares: type: string description: shares define the delegation shares received. description: >- Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. balance: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: |- QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method cosmos.staking.v1beta1.QueryValidatorResponse: type: object properties: validator: description: validator defines the validator info. type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: description defines the description terms for the validator. type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator title: QueryValidatorResponse is response type for the Query/Validator RPC method cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: type: object properties: unbonding_responses: type: array items: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: |- entries are the unbonding delegation entries. unbonding delegation entries description: >- UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- QueryValidatorUnbondingDelegationsResponse is response type for the Query/ValidatorUnbondingDelegations RPC method. cosmos.staking.v1beta1.QueryValidatorsResponse: type: object properties: validators: type: array items: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: description defines the description terms for the validator. type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: >- security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: >- update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. description: validators contains all the queried validators. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryValidatorsResponse is response type for the Query/Validators RPC method cosmos.staking.v1beta1.Redelegation: type: object properties: delegator_address: type: string description: delegator_address is the bech32-encoded address of the delegator. validator_src_address: type: string description: >- validator_src_address is the validator redelegation source operator address. validator_dst_address: type: string description: >- validator_dst_address is the validator redelegation destination operator address. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: >- completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. description: |- entries are the redelegation entries. redelegation entries description: >- Redelegation contains the list of a particular delegator's redelegating bonds from a particular source validator to a particular destination validator. cosmos.staking.v1beta1.RedelegationEntry: type: object properties: creation_height: type: string format: int64 description: creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: completion_time defines the unix time for redelegation completion. initial_balance: type: string description: initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: RedelegationEntry defines a redelegation object with relevant metadata. cosmos.staking.v1beta1.RedelegationEntryResponse: type: object properties: redelegation_entry: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. balance: type: string description: >- RedelegationEntryResponse is equivalent to a RedelegationEntry except that it contains a balance in addition to shares which is more suitable for client responses. cosmos.staking.v1beta1.RedelegationResponse: type: object properties: redelegation: type: object properties: delegator_address: type: string description: delegator_address is the bech32-encoded address of the delegator. validator_src_address: type: string description: >- validator_src_address is the validator redelegation source operator address. validator_dst_address: type: string description: >- validator_dst_address is the validator redelegation destination operator address. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: >- completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. description: |- entries are the redelegation entries. redelegation entries description: >- Redelegation contains the list of a particular delegator's redelegating bonds from a particular source validator to a particular destination validator. entries: type: array items: type: object properties: redelegation_entry: type: object properties: creation_height: type: string format: int64 description: >- creation_height defines the height which the redelegation took place. completion_time: type: string format: date-time description: >- completion_time defines the unix time for redelegation completion. initial_balance: type: string description: >- initial_balance defines the initial balance when redelegation started. shares_dst: type: string description: >- shares_dst is the amount of destination-validator shares created by redelegation. 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 description: >- RedelegationEntry defines a redelegation object with relevant metadata. balance: type: string description: >- RedelegationEntryResponse is equivalent to a RedelegationEntry except that it contains a balance in addition to shares which is more suitable for client responses. description: >- RedelegationResponse is equivalent to a Redelegation except that its entries contain a balance in addition to shares which is more suitable for client responses. cosmos.staking.v1beta1.UnbondingDelegation: type: object properties: delegator_address: type: string description: delegator_address is the encoded address of the delegator. validator_address: type: string description: validator_address is the encoded address of the validator. entries: type: array items: type: object properties: creation_height: type: string format: int64 description: creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: |- entries are the unbonding delegation entries. unbonding delegation entries description: |- UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list. cosmos.staking.v1beta1.UnbondingDelegationEntry: type: object properties: creation_height: type: string format: int64 description: creation_height is the height which the unbonding took place. completion_time: type: string format: date-time description: completion_time is the unix time for unbonding completion. initial_balance: type: string description: >- initial_balance defines the tokens initially scheduled to receive at completion. balance: type: string description: balance defines the tokens to receive at completion. 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 description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. cosmos.staking.v1beta1.Validator: type: object properties: operator_address: type: string description: >- operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: description: >- consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} jailed: type: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. status: description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - BOND_STATUS_UNSPECIFIED - BOND_STATUS_UNBONDED - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED tokens: type: string description: tokens define the delegated tokens (incl. self-delegation). delegator_shares: type: string description: >- delegator_shares defines total shares issued to a validator's delegators. description: description: description defines the description terms for the validator. type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: security_contact defines an optional email for security contact. details: type: string description: details define other optional details. unbonding_height: type: string format: int64 description: >- unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. unbonding_time: type: string format: date-time description: >- unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. commission: description: commission defines the commission parameters. type: object properties: commission_rates: description: >- commission_rates defines the initial commission rates to be used for creating a validator. type: object properties: rate: type: string description: >- rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. update_time: type: string format: date-time description: update_time is the last time the commission rate was changed. min_self_delegation: type: string description: >- min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46 unbonding_on_hold_ref_count: type: string format: int64 title: >- strictly positive if this validator's unbonding has been stopped by external modules unbonding_ids: type: array items: type: string format: uint64 title: >- list of unbonding ids, each uniquely identifing an unbonding of this validator description: >- Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. cosmos.staking.v1beta1.MsgBeginRedelegate: type: object properties: delegator_address: type: string validator_src_address: type: string validator_dst_address: type: string amount: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: |- MsgBeginRedelegate defines a SDK message for performing a redelegation of coins from a delegator and source validator to a destination validator. cosmos.staking.v1beta1.MsgBeginRedelegateResponse: type: object properties: completion_time: type: string format: date-time description: MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. cosmos.staking.v1beta1.MsgCancelUnbondingDelegation: type: object properties: delegator_address: type: string validator_address: type: string amount: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: >- amount is always less than or equal to unbonding delegation entry balance creation_height: type: string format: int64 description: creation_height is the height which the unbonding took place. description: 'Since: cosmos-sdk 0.46' title: >- MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse: type: object description: 'Since: cosmos-sdk 0.46' title: MsgCancelUnbondingDelegationResponse cosmos.staking.v1beta1.MsgCreateValidator: type: object properties: description: type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: security_contact defines an optional email for security contact. details: type: string description: details define other optional details. description: Description defines a validator description. commission: type: object properties: rate: type: string description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- max_rate defines the maximum commission rate which validator can ever charge, as a fraction. max_change_rate: type: string description: >- max_change_rate defines the maximum daily increase of the validator commission, as a fraction. description: >- CommissionRates defines the initial commission rates to be used for creating a validator. min_self_delegation: type: string delegator_address: type: string description: >- Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation). validator_address: type: string pubkey: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } value: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: MsgCreateValidator defines a SDK message for creating a new validator. cosmos.staking.v1beta1.MsgCreateValidatorResponse: type: object description: MsgCreateValidatorResponse defines the Msg/CreateValidator response type. cosmos.staking.v1beta1.MsgDelegate: type: object properties: delegator_address: type: string validator_address: type: string amount: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: |- MsgDelegate defines a SDK message for performing a delegation of coins from a delegator to a validator. cosmos.staking.v1beta1.MsgDelegateResponse: type: object description: MsgDelegateResponse defines the Msg/Delegate response type. cosmos.staking.v1beta1.MsgEditValidator: type: object properties: description: type: object properties: moniker: type: string description: moniker defines a human-readable name for the validator. identity: type: string description: >- identity defines an optional identity signature (ex. UPort or Keybase). website: type: string description: website defines an optional website link. security_contact: type: string description: security_contact defines an optional email for security contact. details: type: string description: details define other optional details. description: Description defines a validator description. validator_address: type: string commission_rate: type: string title: >- We pass a reference to the new commission rate and min self delegation as it's not mandatory to update. If not updated, the deserialized rate will be zero with no way to distinguish if an update was intended. REF: #2373 min_self_delegation: type: string description: MsgEditValidator defines a SDK message for editing an existing validator. cosmos.staking.v1beta1.MsgEditValidatorResponse: type: object description: MsgEditValidatorResponse defines the Msg/EditValidator response type. cosmos.staking.v1beta1.MsgUndelegate: type: object properties: delegator_address: type: string validator_address: type: string amount: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: |- MsgUndelegate defines a SDK message for performing an undelegation from a delegate and a validator. cosmos.staking.v1beta1.MsgUndelegateResponse: type: object properties: completion_time: type: string format: date-time amount: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: amount returns the amount of undelegated coins description: MsgUndelegateResponse defines the Msg/Undelegate response type. cosmos.staking.v1beta1.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: |- params defines the x/staking parameters to update. NOTE: All parameters must be supplied. type: object properties: unbonding_time: type: string description: unbonding_time is the time duration of unbonding. max_validators: type: integer format: int64 description: max_validators is the maximum number of validators. max_entries: type: integer format: int64 description: >- max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). historical_entries: type: integer format: int64 description: historical_entries is the number of historical entries to persist. bond_denom: type: string description: bond_denom defines the bondable coin denomination. min_commission_rate: type: string title: >- min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators description: |- MsgUpdateParams is the Msg/UpdateParams request type. Since: cosmos-sdk 0.47 cosmos.staking.v1beta1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47 cosmos.base.abci.v1beta1.ABCIMessageLog: type: object properties: msg_index: type: integer format: int64 log: type: string events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string description: >- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. description: |- StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. description: |- Events contains a slice of Event objects that were emitted during some execution. description: >- ABCIMessageLog defines a structure containing an indexed tx ABCI message log. cosmos.base.abci.v1beta1.Attribute: type: object properties: key: type: string value: type: string description: |- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. cosmos.base.abci.v1beta1.GasInfo: type: object properties: gas_wanted: type: string format: uint64 description: GasWanted is the maximum units of work we allow this tx to perform. gas_used: type: string format: uint64 description: GasUsed is the amount of gas actually consumed. description: GasInfo defines tx execution gas context. cosmos.base.abci.v1beta1.Result: type: object properties: data: type: string format: byte description: >- Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. Deprecated. This field is still populated, but prefer msg_response instead because it also contains the Msg response typeURL. log: type: string description: Log contains the log information from message or handler execution. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events contains a slice of Event objects that were emitted during message or handler execution. msg_responses: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- msg_responses contains the Msg handler responses type packed in Anys. Since: cosmos-sdk 0.46 description: Result is the union of ResponseFormat and ResponseCheckTx. cosmos.base.abci.v1beta1.StringEvent: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string description: |- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. description: |- StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. cosmos.base.abci.v1beta1.TxResponse: type: object properties: height: type: string format: int64 title: The block height txhash: type: string description: The transaction hash. codespace: type: string title: Namespace for the Code code: type: integer format: int64 description: Response code. data: type: string description: Result bytes, if any. raw_log: type: string description: |- The output of the application's logger (raw string). May be non-deterministic. logs: type: array items: type: object properties: msg_index: type: integer format: int64 log: type: string events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string description: >- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. description: >- StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. description: >- Events contains a slice of Event objects that were emitted during some execution. description: >- ABCIMessageLog defines a structure containing an indexed tx ABCI message log. description: >- The output of the application's logger (typed). May be non-deterministic. info: type: string description: Additional information. May be non-deterministic. gas_wanted: type: string format: int64 description: Amount of gas requested for transaction. gas_used: type: string format: int64 description: Amount of gas consumed by transaction. tx: description: The request transaction bytes. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} timestamp: type: string description: >- Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The tags are stringified and the log is JSON decoded. cosmos.crypto.multisig.v1beta1.CompactBitArray: type: object properties: extra_bits_stored: type: integer format: int64 elems: type: string format: byte description: |- CompactBitArray is an implementation of a space efficient bit array. This is used to ensure that the encoded data takes up a minimal amount of space after proto encoding. This is not thread safe, and is not intended for concurrent usage. cosmos.tx.signing.v1beta1.SignMode: type: string enum: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: |- SignMode represents a signing mode with its own security guarantees. This enum should be considered a registry of all known sign modes in the Cosmos ecosystem. Apps are not expected to support all known sign modes. Apps that would like to support custom sign modes are encouraged to open a small PR against this file to add a new case to this SignMode enum describing their sign mode so that different apps have a consistent version of this enum. - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified with raw bytes from Tx. - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable textual representation on top of the binary representation from SIGN_MODE_DIRECT. Since: cosmos-sdk 0.50 - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not require signers signing over other signers' `signer_info`. Since: cosmos-sdk 0.46 - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses Amino JSON and will be removed in the future. - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, but is not implemented on the SDK by default. To enable EIP-191, you need to pass a custom `TxConfig` that has an implementation of `SignModeHandler` for EIP-191. The SDK may decide to fully support EIP-191 in the future. Since: cosmos-sdk 0.45.2 cosmos.tx.v1beta1.AuthInfo: type: object properties: signer_infos: type: array items: type: object $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' description: >- signer_infos defines the signing modes for the required signers. The number and order of elements must match the required signers from TxBody's messages. The first element is the primary signer and the one which pays the fee. fee: description: >- Fee is the fee and gas limit for the transaction. The first signer is the primary signer and the one which pays the fee. The fee can be calculated based on the cost of evaluating the body and doing signature verification of the signers. This can be estimated via simulation. type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: amount is the amount of coins to be paid as a fee gas_limit: type: string format: uint64 title: >- gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs payer: type: string description: >- if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. the payer must be a tx signer (and thus have signed this field in AuthInfo). setting this field does *not* change the ordering of required signers for the transaction. granter: type: string title: >- if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does not support fee grants, this will fail tip: description: >- Tip is the optional tip used for transactions fees paid in another denom. This field is ignored if the chain didn't enable tips, i.e. didn't add the `TipDecorator` in its posthandler. Since: cosmos-sdk 0.46 type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: amount is the amount of the tip tipper: type: string title: tipper is the address of the account paying for the tip description: |- AuthInfo describes the fee and signer modes that are used to sign a transaction. cosmos.tx.v1beta1.BroadcastMode: type: string enum: - BROADCAST_MODE_UNSPECIFIED - BROADCAST_MODE_BLOCK - BROADCAST_MODE_SYNC - BROADCAST_MODE_ASYNC default: BROADCAST_MODE_UNSPECIFIED description: |- BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns immediately. cosmos.tx.v1beta1.BroadcastTxRequest: type: object properties: tx_bytes: type: string format: byte description: tx_bytes is the raw transaction. mode: type: string enum: - BROADCAST_MODE_UNSPECIFIED - BROADCAST_MODE_BLOCK - BROADCAST_MODE_SYNC - BROADCAST_MODE_ASYNC default: BROADCAST_MODE_UNSPECIFIED description: >- BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns immediately. description: |- BroadcastTxRequest is the request type for the Service.BroadcastTxRequest RPC method. cosmos.tx.v1beta1.BroadcastTxResponse: type: object properties: tx_response: description: tx_response is the queried TxResponses. type: object properties: height: type: string format: int64 title: The block height txhash: type: string description: The transaction hash. codespace: type: string title: Namespace for the Code code: type: integer format: int64 description: Response code. data: type: string description: Result bytes, if any. raw_log: type: string description: |- The output of the application's logger (raw string). May be non-deterministic. logs: type: array items: type: object properties: msg_index: type: integer format: int64 log: type: string events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string description: >- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. description: >- StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. description: >- Events contains a slice of Event objects that were emitted during some execution. description: >- ABCIMessageLog defines a structure containing an indexed tx ABCI message log. description: >- The output of the application's logger (typed). May be non-deterministic. info: type: string description: Additional information. May be non-deterministic. gas_wanted: type: string format: int64 description: Amount of gas requested for transaction. gas_used: type: string format: int64 description: Amount of gas consumed by transaction. tx: description: The request transaction bytes. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} timestamp: type: string description: >- Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: |- BroadcastTxResponse is the response type for the Service.BroadcastTx method. cosmos.tx.v1beta1.Fee: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: amount is the amount of coins to be paid as a fee gas_limit: type: string format: uint64 title: >- gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs payer: type: string description: >- if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. the payer must be a tx signer (and thus have signed this field in AuthInfo). setting this field does *not* change the ordering of required signers for the transaction. granter: type: string title: >- if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does not support fee grants, this will fail description: >- Fee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some miminum to be accepted into the mempool. cosmos.tx.v1beta1.GetBlockWithTxsResponse: type: object properties: txs: type: array items: type: object $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: txs are the transactions in the block. block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID block: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: Header defines the structure of a block header. data: type: object properties: txs: type: array items: type: string format: byte description: >- Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block evidence: type: object properties: evidence: type: array items: type: object properties: duplicate_vote_evidence: type: object properties: vote_a: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. vote_b: type: object properties: type: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN - SIGNED_MSG_TYPE_PREVOTE - SIGNED_MSG_TYPE_PRECOMMIT - SIGNED_MSG_TYPE_PROPOSAL default: SIGNED_MSG_TYPE_UNKNOWN description: >- SignedMsgType is a type of signed message in the consensus. - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID description: zero if vote is nil. timestamp: type: string format: date-time validator_address: type: string format: byte validator_index: type: integer format: int32 signature: type: string format: byte description: >- Vote signature by the validator if they participated in consensus for the associated block. extension: type: string format: byte description: >- Vote extension provided by the application. Only valid for precommit messages. extension_signature: type: string format: byte description: >- Vote extension signature by the validator if they participated in consensus for the associated block. Only valid for precommit messages. description: >- Vote represents a prevote or precommit vote from validators for consensus. total_voting_power: type: string format: int64 validator_power: type: string format: int64 timestamp: type: string format: date-time description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. light_client_attack_evidence: type: object properties: conflicting_block: type: object properties: signed_header: type: object properties: header: type: object properties: version: title: basic block info type: object properties: block: type: string format: uint64 app: type: string format: uint64 description: >- Consensus captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine. chain_id: type: string height: type: string format: int64 time: type: string format: date-time last_block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID last_commit_hash: type: string format: byte description: >- commit from validators from the last block title: hashes of block data data_hash: type: string format: byte title: transactions validators_hash: type: string format: byte description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte title: validators for the next block consensus_hash: type: string format: byte title: consensus params for current block app_hash: type: string format: byte title: state after txs from the previous block last_results_hash: type: string format: byte title: >- root hash of all results from the txs from the previous block evidence_hash: type: string format: byte description: evidence included in the block title: consensus info proposer_address: type: string format: byte title: original proposer of the block description: >- Header defines the structure of a block header. commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: >- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: >- BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: >- CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. validator_set: type: object properties: validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 proposer: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 common_height: type: string format: int64 byzantine_validators: type: array items: type: object properties: address: type: string format: byte pub_key: type: object properties: ed25519: type: string format: byte secp256k1: type: string format: byte title: >- PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 total_voting_power: type: string format: int64 timestamp: type: string format: date-time description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. last_commit: type: object properties: height: type: string format: int64 round: type: integer format: int32 block_id: type: object properties: hash: type: string format: byte part_set_header: type: object properties: total: type: integer format: int64 hash: type: string format: byte title: PartsetHeader title: BlockID signatures: type: array items: type: object properties: block_id_flag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN - BLOCK_ID_FLAG_ABSENT - BLOCK_ID_FLAG_COMMIT - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN description: |- - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition - BLOCK_ID_FLAG_ABSENT: the vote was not received - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority - BLOCK_ID_FLAG_NIL: voted for nil title: BlockIdFlag indicates which BlockID the signature is for validator_address: type: string format: byte timestamp: type: string format: date-time signature: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. description: >- Commit contains the evidence that a block was committed by a set of validators. pagination: description: pagination defines a pagination for the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. Since: cosmos-sdk 0.45.2 cosmos.tx.v1beta1.GetTxResponse: type: object properties: tx: $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: tx is the queried transaction. tx_response: description: tx_response is the queried TxResponses. type: object properties: height: type: string format: int64 title: The block height txhash: type: string description: The transaction hash. codespace: type: string title: Namespace for the Code code: type: integer format: int64 description: Response code. data: type: string description: Result bytes, if any. raw_log: type: string description: |- The output of the application's logger (raw string). May be non-deterministic. logs: type: array items: type: object properties: msg_index: type: integer format: int64 log: type: string events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string description: >- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. description: >- StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. description: >- Events contains a slice of Event objects that were emitted during some execution. description: >- ABCIMessageLog defines a structure containing an indexed tx ABCI message log. description: >- The output of the application's logger (typed). May be non-deterministic. info: type: string description: Additional information. May be non-deterministic. gas_wanted: type: string format: int64 description: Amount of gas requested for transaction. gas_used: type: string format: int64 description: Amount of gas consumed by transaction. tx: description: The request transaction bytes. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} timestamp: type: string description: >- Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: GetTxResponse is the response type for the Service.GetTx method. cosmos.tx.v1beta1.GetTxsEventResponse: type: object properties: txs: type: array items: type: object $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: txs is the list of queried transactions. tx_responses: type: array items: type: object properties: height: type: string format: int64 title: The block height txhash: type: string description: The transaction hash. codespace: type: string title: Namespace for the Code code: type: integer format: int64 description: Response code. data: type: string description: Result bytes, if any. raw_log: type: string description: |- The output of the application's logger (raw string). May be non-deterministic. logs: type: array items: type: object properties: msg_index: type: integer format: int64 log: type: string events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string description: >- Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. description: >- StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. description: >- Events contains a slice of Event objects that were emitted during some execution. description: >- ABCIMessageLog defines a structure containing an indexed tx ABCI message log. description: >- The output of the application's logger (typed). May be non-deterministic. info: type: string description: Additional information. May be non-deterministic. gas_wanted: type: string format: int64 description: Amount of gas requested for transaction. gas_used: type: string format: int64 description: Amount of gas consumed by transaction. tx: description: The request transaction bytes. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} timestamp: type: string description: >- Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The tags are stringified and the log is JSON decoded. description: tx_responses is the list of queried TxResponses. pagination: description: |- pagination defines a pagination for the response. Deprecated post v0.46.x: use total instead. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise total: type: string format: uint64 title: total is total number of results available description: |- GetTxsEventResponse is the response type for the Service.TxsByEvents RPC method. cosmos.tx.v1beta1.ModeInfo: type: object properties: single: title: single represents a single signer type: object properties: mode: title: mode is the signing mode of the single signer type: string enum: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: >- SignMode represents a signing mode with its own security guarantees. This enum should be considered a registry of all known sign modes in the Cosmos ecosystem. Apps are not expected to support all known sign modes. Apps that would like to support custom sign modes are encouraged to open a small PR against this file to add a new case to this SignMode enum describing their sign mode so that different apps have a consistent version of this enum. - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified with raw bytes from Tx. - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable textual representation on top of the binary representation from SIGN_MODE_DIRECT. Since: cosmos-sdk 0.50 - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not require signers signing over other signers' `signer_info`. Since: cosmos-sdk 0.46 - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses Amino JSON and will be removed in the future. - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, but is not implemented on the SDK by default. To enable EIP-191, you need to pass a custom `TxConfig` that has an implementation of `SignModeHandler` for EIP-191. The SDK may decide to fully support EIP-191 in the future. Since: cosmos-sdk 0.45.2 multi: $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' title: multi represents a nested multisig signer description: ModeInfo describes the signing mode of a single or nested multisig signer. cosmos.tx.v1beta1.ModeInfo.Multi: type: object properties: bitarray: title: bitarray specifies which keys within the multisig are signing type: object properties: extra_bits_stored: type: integer format: int64 elems: type: string format: byte description: >- CompactBitArray is an implementation of a space efficient bit array. This is used to ensure that the encoded data takes up a minimal amount of space after proto encoding. This is not thread safe, and is not intended for concurrent usage. mode_infos: type: array items: type: object $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' title: |- mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys title: Multi is the mode info for a multisig public key cosmos.tx.v1beta1.ModeInfo.Single: type: object properties: mode: title: mode is the signing mode of the single signer type: string enum: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: >- SignMode represents a signing mode with its own security guarantees. This enum should be considered a registry of all known sign modes in the Cosmos ecosystem. Apps are not expected to support all known sign modes. Apps that would like to support custom sign modes are encouraged to open a small PR against this file to add a new case to this SignMode enum describing their sign mode so that different apps have a consistent version of this enum. - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified with raw bytes from Tx. - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable textual representation on top of the binary representation from SIGN_MODE_DIRECT. Since: cosmos-sdk 0.50 - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not require signers signing over other signers' `signer_info`. Since: cosmos-sdk 0.46 - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses Amino JSON and will be removed in the future. - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, but is not implemented on the SDK by default. To enable EIP-191, you need to pass a custom `TxConfig` that has an implementation of `SignModeHandler` for EIP-191. The SDK may decide to fully support EIP-191 in the future. Since: cosmos-sdk 0.45.2 title: |- Single is the mode info for a single signer. It is structured as a message to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future cosmos.tx.v1beta1.OrderBy: type: string enum: - ORDER_BY_UNSPECIFIED - ORDER_BY_ASC - ORDER_BY_DESC default: ORDER_BY_UNSPECIFIED description: >- - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order - ORDER_BY_DESC: ORDER_BY_DESC defines descending order title: OrderBy defines the sorting order cosmos.tx.v1beta1.SignerInfo: type: object properties: public_key: description: >- public_key is the public key of the signer. It is optional for accounts that already exist in state. If unset, the verifier can use the required \ signer address for this position and lookup the public key. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} mode_info: $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' title: |- mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's sequence: type: string format: uint64 description: >- sequence is the sequence of the account, which describes the number of committed transactions signed by a given address. It is used to prevent replay attacks. description: |- SignerInfo describes the public key and signing mode of a single top-level signer. cosmos.tx.v1beta1.SimulateRequest: type: object properties: tx: $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: |- tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. tx_bytes: type: string format: byte description: |- tx_bytes is the raw transaction. Since: cosmos-sdk 0.43 description: |- SimulateRequest is the request type for the Service.Simulate RPC method. cosmos.tx.v1beta1.SimulateResponse: type: object properties: gas_info: description: gas_info is the information about gas used in the simulation. type: object properties: gas_wanted: type: string format: uint64 description: >- GasWanted is the maximum units of work we allow this tx to perform. gas_used: type: string format: uint64 description: GasUsed is the amount of gas actually consumed. result: description: result is the result of the simulation. type: object properties: data: type: string format: byte description: >- Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. Deprecated. This field is still populated, but prefer msg_response instead because it also contains the Msg response typeURL. log: type: string description: >- Log contains the log information from message or handler execution. events: type: array items: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. description: >- Events contains a slice of Event objects that were emitted during message or handler execution. msg_responses: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- msg_responses contains the Msg handler responses type packed in Anys. Since: cosmos-sdk 0.46 description: |- SimulateResponse is the response type for the Service.SimulateRPC method. cosmos.tx.v1beta1.Tip: type: object properties: amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: amount is the amount of the tip tipper: type: string title: tipper is the address of the account paying for the tip description: |- Tip is the tip used for meta-transactions. Since: cosmos-sdk 0.46 cosmos.tx.v1beta1.Tx: type: object properties: body: title: body is the processable content of the transaction type: object properties: messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction. memo: type: string description: >- memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). timeout_height: type: string format: uint64 title: |- timeout is the block height after which this transaction will not be processed by the chain extension_options: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } title: >- extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected non_critical_extension_options: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } title: >- extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored description: TxBody is the body of a transaction that all signers sign over. auth_info: $ref: '#/definitions/cosmos.tx.v1beta1.AuthInfo' title: |- auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee signatures: type: array items: type: string format: byte description: >- signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to allow connecting signature meta information like public key and signing mode by position. description: Tx is the standard type used for broadcasting transactions. cosmos.tx.v1beta1.TxBody: type: object properties: messages: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction. memo: type: string description: >- memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). timeout_height: type: string format: uint64 title: |- timeout is the block height after which this transaction will not be processed by the chain extension_options: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } title: >- extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected non_critical_extension_options: type: array items: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } title: >- extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored description: TxBody is the body of a transaction that all signers sign over. cosmos.tx.v1beta1.TxDecodeAminoRequest: type: object properties: amino_binary: type: string format: byte description: |- TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino RPC method. Since: cosmos-sdk 0.47 cosmos.tx.v1beta1.TxDecodeAminoResponse: type: object properties: amino_json: type: string description: |- TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino RPC method. Since: cosmos-sdk 0.47 cosmos.tx.v1beta1.TxDecodeRequest: type: object properties: tx_bytes: type: string format: byte description: tx_bytes is the raw transaction. description: |- TxDecodeRequest is the request type for the Service.TxDecode RPC method. Since: cosmos-sdk 0.47 cosmos.tx.v1beta1.TxDecodeResponse: type: object properties: tx: $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: tx is the decoded transaction. description: |- TxDecodeResponse is the response type for the Service.TxDecode method. Since: cosmos-sdk 0.47 cosmos.tx.v1beta1.TxEncodeAminoRequest: type: object properties: amino_json: type: string description: |- TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino RPC method. Since: cosmos-sdk 0.47 cosmos.tx.v1beta1.TxEncodeAminoResponse: type: object properties: amino_binary: type: string format: byte description: |- TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino RPC method. Since: cosmos-sdk 0.47 cosmos.tx.v1beta1.TxEncodeRequest: type: object properties: tx: $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: tx is the transaction to encode. description: |- TxEncodeRequest is the request type for the Service.TxEncode RPC method. Since: cosmos-sdk 0.47 cosmos.tx.v1beta1.TxEncodeResponse: type: object properties: tx_bytes: type: string format: byte description: tx_bytes is the encoded transaction bytes. description: |- TxEncodeResponse is the response type for the Service.TxEncode method. Since: cosmos-sdk 0.47 tendermint.abci.Event: type: object properties: type: type: string attributes: type: array items: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: EventAttribute is a single key-value pair, associated with an event. description: |- Event allows application developers to attach additional information to ResponseFinalizeBlock and ResponseCheckTx. Later, transactions may be queried using these events. tendermint.abci.EventAttribute: type: object properties: key: type: string value: type: string index: type: boolean title: nondeterministic description: EventAttribute is a single key-value pair, associated with an event. cosmos.upgrade.v1beta1.MsgCancelUpgrade: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). description: |- MsgCancelUpgrade is the Msg/CancelUpgrade request type. Since: cosmos-sdk 0.46 cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse: type: object description: |- MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. Since: cosmos-sdk 0.46 cosmos.upgrade.v1beta1.MsgSoftwareUpgrade: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). plan: description: plan is the upgrade plan. type: object properties: name: type: string description: >- Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. time: type: string format: date-time description: >- Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. height: type: string format: int64 description: The height at which the upgrade must be performed. info: type: string title: >- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: description: >- Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: |- MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. Since: cosmos-sdk 0.46 cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse: type: object description: |- MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. Since: cosmos-sdk 0.46 cosmos.upgrade.v1beta1.Plan: type: object properties: name: type: string description: >- Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. time: type: string format: date-time description: >- Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. height: type: string format: int64 description: The height at which the upgrade must be performed. info: type: string title: |- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: description: >- Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- Plan specifies information about a planned upgrade and when it should occur. cosmos.upgrade.v1beta1.ModuleVersion: type: object properties: name: type: string title: name of the app module version: type: string format: uint64 title: consensus version of the app module description: |- ModuleVersion specifies a module and its consensus version. Since: cosmos-sdk 0.43 cosmos.upgrade.v1beta1.QueryAppliedPlanResponse: type: object properties: height: type: string format: int64 description: height is the block height at which the plan was applied. description: >- QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC method. cosmos.upgrade.v1beta1.QueryAuthorityResponse: type: object properties: address: type: string description: 'Since: cosmos-sdk 0.46' title: QueryAuthorityResponse is the response type for Query/Authority cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: type: object properties: plan: description: plan is the current upgrade plan. type: object properties: name: type: string description: >- Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. time: type: string format: date-time description: >- Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. height: type: string format: int64 description: The height at which the upgrade must be performed. info: type: string title: >- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: description: >- Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method. cosmos.upgrade.v1beta1.QueryModuleVersionsResponse: type: object properties: module_versions: type: array items: type: object properties: name: type: string title: name of the app module version: type: string format: uint64 title: consensus version of the app module description: |- ModuleVersion specifies a module and its consensus version. Since: cosmos-sdk 0.43 description: >- module_versions is a list of module names with their consensus versions. description: >- QueryModuleVersionsResponse is the response type for the Query/ModuleVersions RPC method. Since: cosmos-sdk 0.43 cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: type: object properties: upgraded_consensus_state: type: string format: byte title: 'Since: cosmos-sdk 0.43' description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount: type: object properties: from_address: type: string to_address: type: string start_time: type: string format: int64 description: start of vesting as unix time (in seconds). vesting_periods: type: array items: type: object properties: length: type: string format: int64 description: Period duration in seconds. amount: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Period defines a length of time and amount of coins that will vest. description: |- MsgCreateVestingAccount defines a message that enables creating a vesting account. Since: cosmos-sdk 0.46 cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse: type: object description: >- MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount response type. Since: cosmos-sdk 0.46 cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount: type: object properties: from_address: type: string to_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- MsgCreatePermanentLockedAccount defines a message that enables creating a permanent locked account. Since: cosmos-sdk 0.46 cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse: type: object description: >- MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. Since: cosmos-sdk 0.46 cosmos.vesting.v1beta1.MsgCreateVestingAccount: type: object properties: from_address: type: string to_address: type: string amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. end_time: type: string format: int64 description: end of vesting as unix time (in seconds). delayed: type: boolean description: |- MsgCreateVestingAccount defines a message that enables creating a vesting account. cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse: type: object description: >- MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. cosmos.vesting.v1beta1.Period: type: object properties: length: type: string format: int64 description: Period duration in seconds. amount: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: Period defines a length of time and amount of coins that will vest. ibc.applications.fee.v1.Fee: type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee title: Fee defines the ICS29 receive, acknowledgement and timeout fees ibc.applications.fee.v1.MsgPayPacketFee: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee source_port_id: type: string title: the source port unique identifier source_channel_id: type: string title: the source channel unique identifer signer: type: string title: account address to refund fee if necessary relayers: type: array items: type: string title: optional list of relayers permitted to the receive packet fees title: >- MsgPayPacketFee defines the request type for the PayPacketFee rpc This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be paid for ibc.applications.fee.v1.MsgPayPacketFeeAsync: type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fee: title: the packet fee associated with a particular IBC packet type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse: type: object title: >- MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc ibc.applications.fee.v1.MsgPayPacketFeeResponse: type: object title: MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc ibc.applications.fee.v1.MsgRegisterCounterpartyPayee: type: object properties: port_id: type: string title: unique port identifier channel_id: type: string title: unique channel identifier relayer: type: string title: the relayer address counterparty_payee: type: string title: the counterparty payee address title: >- MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse: type: object title: >- MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc ibc.applications.fee.v1.MsgRegisterPayee: type: object properties: port_id: type: string title: unique port identifier channel_id: type: string title: unique channel identifier relayer: type: string title: the relayer address payee: type: string title: the payee address title: MsgRegisterPayee defines the request type for the RegisterPayee rpc ibc.applications.fee.v1.MsgRegisterPayeeResponse: type: object title: >- MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc ibc.applications.fee.v1.PacketFee: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers ibc.core.channel.v1.PacketId: type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence title: |- PacketId is an identifer for a unique Packet Source chains refer to packets by source port/channel Destination chains refer to packets by destination port/channel ibc.applications.fee.v1.FeeEnabledChannel: type: object properties: port_id: type: string title: unique port identifier channel_id: type: string title: unique channel identifier title: >- FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel ibc.applications.fee.v1.IdentifiedPacketFees: type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fees: type: array items: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers title: list of packet fees title: >- IdentifiedPacketFees contains a list of type PacketFee and associated PacketId ibc.applications.fee.v1.QueryCounterpartyPayeeResponse: type: object properties: counterparty_payee: type: string title: the counterparty payee address used to compensate forward relaying title: >- QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc ibc.applications.fee.v1.QueryFeeEnabledChannelResponse: type: object properties: fee_enabled: type: boolean title: boolean flag representing the fee enabled channel status title: >- QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse: type: object properties: fee_enabled_channels: type: array items: type: object properties: port_id: type: string title: unique port identifier channel_id: type: string title: unique channel identifier title: >- FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel title: list of fee enabled channels pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc ibc.applications.fee.v1.QueryIncentivizedPacketResponse: type: object properties: incentivized_packet: title: the identified fees for the incentivized packet type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fees: type: array items: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers title: list of packet fees title: >- QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse: type: object properties: incentivized_packets: type: array items: type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fees: type: array items: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers title: list of packet fees title: >- IdentifiedPacketFees contains a list of type PacketFee and associated PacketId title: Map of all incentivized_packets pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC ibc.applications.fee.v1.QueryIncentivizedPacketsResponse: type: object properties: incentivized_packets: type: array items: type: object properties: packet_id: title: >- unique packet identifier comprised of the channel ID, port ID and sequence type: object properties: port_id: type: string title: channel port identifier channel_id: type: string title: channel unique identifier sequence: type: string format: uint64 title: packet sequence packet_fees: type: array items: type: object properties: fee: title: >- fee encapsulates the recv, ack and timeout fees associated with an IBC packet type: object properties: recv_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet receive fee ack_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet acknowledgement fee timeout_fee: type: array items: type: object properties: denom: type: string amount: type: string description: >- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the packet timeout fee refund_address: type: string title: the refund address for unspent fees relayers: type: array items: type: string title: optional list of relayers permitted to receive fees title: >- PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers title: list of packet fees title: >- IdentifiedPacketFees contains a list of type PacketFee and associated PacketId title: list of identified fees for incentivized packets pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise title: >- QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc ibc.applications.fee.v1.QueryPayeeResponse: type: object properties: payee_address: type: string title: the payee address to which packet fees are paid out title: QueryPayeeResponse defines the response type for the Payee rpc ibc.applications.fee.v1.QueryTotalAckFeesResponse: type: object properties: ack_fees: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the total packet acknowledgement fees title: >- QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc ibc.applications.fee.v1.QueryTotalRecvFeesResponse: type: object properties: recv_fees: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the total packet receive fees title: >- QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse: type: object properties: timeout_fees: type: array items: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: the total packet timeout fees title: >- QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount: type: object properties: owner: type: string connection_id: type: string version: type: string title: MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse: type: object properties: channel_id: type: string port_id: type: string title: >- MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount ibc.applications.interchain_accounts.controller.v1.MsgSendTx: type: object properties: owner: type: string connection_id: type: string packet_data: type: object properties: type: type: string enum: - TYPE_UNSPECIFIED - TYPE_EXECUTE_TX default: TYPE_UNSPECIFIED description: |- - TYPE_UNSPECIFIED: Default zero value enumeration - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain title: >- Type defines a classification of message issued from a controller chain to its associated interchain accounts host data: type: string format: byte memo: type: string description: >- InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. relative_timeout: type: string format: uint64 description: >- Relative timeout timestamp provided will be added to the current block time during transaction execution. The timeout timestamp must be non-zero. title: MsgSendTx defines the payload for Msg/SendTx ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse: type: object properties: sequence: type: string format: uint64 title: MsgSendTxResponse defines the response for MsgSendTx ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams: type: object properties: signer: type: string title: signer address params: description: >- params defines the 27-interchain-accounts/controller parameters to update. NOTE: All parameters must be supplied. type: object properties: controller_enabled: type: boolean description: controller_enabled enables or disables the controller submodule. title: MsgUpdateParams defines the payload for Msg/UpdateParams ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse: type: object title: MsgUpdateParamsResponse defines the response for Msg/UpdateParams ibc.applications.interchain_accounts.controller.v1.Params: type: object properties: controller_enabled: type: boolean description: controller_enabled enables or disables the controller submodule. description: |- Params defines the set of on-chain interchain accounts parameters. The following parameters may be used to disable the controller submodule. ibc.applications.interchain_accounts.v1.InterchainAccountPacketData: type: object properties: type: type: string enum: - TYPE_UNSPECIFIED - TYPE_EXECUTE_TX default: TYPE_UNSPECIFIED description: |- - TYPE_UNSPECIFIED: Default zero value enumeration - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain title: >- Type defines a classification of message issued from a controller chain to its associated interchain accounts host data: type: string format: byte memo: type: string description: >- InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. ibc.applications.interchain_accounts.v1.Type: type: string enum: - TYPE_UNSPECIFIED - TYPE_EXECUTE_TX default: TYPE_UNSPECIFIED description: |- - TYPE_UNSPECIFIED: Default zero value enumeration - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain title: >- Type defines a classification of message issued from a controller chain to its associated interchain accounts host ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse: type: object properties: address: type: string description: >- QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: controller_enabled: type: boolean description: controller_enabled enables or disables the controller submodule. description: QueryParamsResponse is the response type for the Query/Params RPC method. ibc.applications.interchain_accounts.host.v1.MsgUpdateParams: type: object properties: signer: type: string title: signer address params: description: |- params defines the 27-interchain-accounts/host parameters to update. NOTE: All parameters must be supplied. type: object properties: host_enabled: type: boolean description: host_enabled enables or disables the host submodule. allow_messages: type: array items: type: string description: >- allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. title: MsgUpdateParams defines the payload for Msg/UpdateParams ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse: type: object title: MsgUpdateParamsResponse defines the response for Msg/UpdateParams ibc.applications.interchain_accounts.host.v1.Params: type: object properties: host_enabled: type: boolean description: host_enabled enables or disables the host submodule. allow_messages: type: array items: type: string description: >- allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. description: |- Params defines the set of on-chain interchain accounts parameters. The following parameters may be used to disable the host submodule. ibc.applications.interchain_accounts.host.v1.QueryParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: host_enabled: type: boolean description: host_enabled enables or disables the host submodule. allow_messages: type: array items: type: string description: >- allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. description: QueryParamsResponse is the response type for the Query/Params RPC method. ibc.applications.transfer.v1.MsgTransfer: type: object properties: source_port: type: string title: the port on which the packet will be sent source_channel: type: string title: the channel by which the packet will be sent token: title: the tokens to be transferred type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. sender: type: string title: the sender address receiver: type: string title: the recipient address on the destination chain timeout_height: description: |- Timeout height relative to the current block height. The timeout is disabled when set to 0. type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients timeout_timestamp: type: string format: uint64 description: |- Timeout timestamp in absolute nanoseconds since unix epoch. The timeout is disabled when set to 0. memo: type: string title: optional memo title: >- MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between ICS20 enabled chains. See ICS Spec here: https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures ibc.applications.transfer.v1.MsgTransferResponse: type: object properties: sequence: type: string format: uint64 title: sequence number of the transfer packet sent description: MsgTransferResponse defines the Msg/Transfer response type. ibc.applications.transfer.v1.MsgUpdateParams: type: object properties: signer: type: string title: signer address params: description: |- params defines the transfer parameters to update. NOTE: All parameters must be supplied. type: object properties: send_enabled: type: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this chain. receive_enabled: type: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this chain. description: MsgUpdateParams is the Msg/UpdateParams request type. ibc.applications.transfer.v1.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. ibc.applications.transfer.v1.Params: type: object properties: send_enabled: type: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this chain. receive_enabled: type: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this chain. description: >- Params defines the set of IBC transfer parameters. NOTE: To prevent a single token from being transferred, set the TransfersEnabled parameter to true and then set the bank module's SendEnabled parameter for the denomination to false. ibc.core.client.v1.Height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: |- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients ibc.applications.transfer.v1.DenomTrace: type: object properties: path: type: string description: >- path defines the chain of port/channel identifiers used for tracing the source of the fungible token. base_denom: type: string description: base denomination of the relayed fungible token. description: >- DenomTrace contains the base denomination for ICS20 fungible tokens and the source tracing information path. ibc.applications.transfer.v1.QueryDenomHashResponse: type: object properties: hash: type: string description: hash (in hex format) of the denomination trace information. description: |- QueryDenomHashResponse is the response type for the Query/DenomHash RPC method. ibc.applications.transfer.v1.QueryDenomTraceResponse: type: object properties: denom_trace: description: denom_trace returns the requested denomination trace information. type: object properties: path: type: string description: >- path defines the chain of port/channel identifiers used for tracing the source of the fungible token. base_denom: type: string description: base denomination of the relayed fungible token. description: |- QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method. ibc.applications.transfer.v1.QueryDenomTracesResponse: type: object properties: denom_traces: type: array items: type: object properties: path: type: string description: >- path defines the chain of port/channel identifiers used for tracing the source of the fungible token. base_denom: type: string description: base denomination of the relayed fungible token. description: >- DenomTrace contains the base denomination for ICS20 fungible tokens and the source tracing information path. description: denom_traces returns all denominations trace information. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: >- QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method. ibc.applications.transfer.v1.QueryEscrowAddressResponse: type: object properties: escrow_address: type: string title: the escrow account address description: >- QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. ibc.applications.transfer.v1.QueryParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: send_enabled: type: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this chain. receive_enabled: type: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this chain. description: QueryParamsResponse is the response type for the Query/Params RPC method. ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse: type: object properties: amount: type: object properties: denom: type: string amount: type: string description: |- Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method. ibc.core.channel.v1.Channel: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: |- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: opaque channel version, which is agreed upon during the handshake description: |- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. ibc.core.channel.v1.Counterparty: type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain title: Counterparty defines a channel end counterparty ibc.core.channel.v1.MsgAcknowledgement: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC acknowledgement: type: string format: byte proof_acked: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string title: MsgAcknowledgement receives incoming IBC acknowledgement ibc.core.channel.v1.MsgAcknowledgementResponse: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: |- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. ibc.core.channel.v1.MsgChannelCloseConfirm: type: object properties: port_id: type: string channel_id: type: string proof_init: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: |- MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to CLOSED on Chain A. ibc.core.channel.v1.MsgChannelCloseConfirmResponse: type: object description: >- MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. ibc.core.channel.v1.MsgChannelCloseInit: type: object properties: port_id: type: string channel_id: type: string signer: type: string description: |- MsgChannelCloseInit defines a msg sent by a Relayer to Chain A to close a channel with Chain B. ibc.core.channel.v1.MsgChannelCloseInitResponse: type: object description: >- MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. ibc.core.channel.v1.MsgChannelOpenAck: type: object properties: port_id: type: string channel_id: type: string counterparty_channel_id: type: string counterparty_version: type: string proof_try: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: >- MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of channel state to TRYOPEN on Chain B. ibc.core.channel.v1.MsgChannelOpenAckResponse: type: object description: MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. ibc.core.channel.v1.MsgChannelOpenConfirm: type: object properties: port_id: type: string channel_id: type: string proof_ack: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: |- MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to OPEN on Chain A. ibc.core.channel.v1.MsgChannelOpenConfirmResponse: type: object description: |- MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. ibc.core.channel.v1.MsgChannelOpenInit: type: object properties: port_id: type: string channel: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: opaque channel version, which is agreed upon during the handshake description: >- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. signer: type: string description: >- MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It is called by a relayer on Chain A. ibc.core.channel.v1.MsgChannelOpenInitResponse: type: object properties: channel_id: type: string version: type: string description: MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. ibc.core.channel.v1.MsgChannelOpenTry: type: object properties: port_id: type: string previous_channel_id: type: string description: >- Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. channel: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: opaque channel version, which is agreed upon during the handshake description: >- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. counterparty_version: type: string proof_init: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: >- MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel on Chain B. The version field within the Channel field has been deprecated. Its value will be ignored by core IBC. ibc.core.channel.v1.MsgChannelOpenTryResponse: type: object properties: version: type: string channel_id: type: string description: MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. ibc.core.channel.v1.MsgRecvPacket: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC proof_commitment: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string title: MsgRecvPacket receives incoming IBC packet ibc.core.channel.v1.MsgRecvPacketResponse: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: |- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: MsgRecvPacketResponse defines the Msg/RecvPacket response type. ibc.core.channel.v1.MsgTimeout: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC proof_unreceived: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients next_sequence_recv: type: string format: uint64 signer: type: string title: MsgTimeout receives timed-out packet ibc.core.channel.v1.MsgTimeoutOnClose: type: object properties: packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC proof_unreceived: type: string format: byte proof_close: type: string format: byte proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients next_sequence_recv: type: string format: uint64 signer: type: string description: MsgTimeoutOnClose timed-out packet upon counterparty channel closure. ibc.core.channel.v1.MsgTimeoutOnCloseResponse: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: |- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. ibc.core.channel.v1.MsgTimeoutResponse: type: object properties: result: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: |- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message description: MsgTimeoutResponse defines the Msg/Timeout response type. ibc.core.channel.v1.Order: type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent title: Order defines if a channel is ORDERED or UNORDERED ibc.core.channel.v1.Packet: type: object properties: sequence: type: string format: uint64 description: >- number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. source_port: type: string description: identifies the port on the sending chain. source_channel: type: string description: identifies the channel end on the sending chain. destination_port: type: string description: identifies the port on the receiving chain. destination_channel: type: string description: identifies the channel end on the receiving chain. data: type: string format: byte title: actual opaque bytes transferred directly to the application module timeout_height: title: block height after which the packet times out type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset timeout_timestamp: type: string format: uint64 title: block timestamp (in nanoseconds) after which the packet times out title: >- Packet defines a type that carries data across different chains through IBC ibc.core.channel.v1.ResponseResultType: type: string enum: - RESPONSE_RESULT_TYPE_UNSPECIFIED - RESPONSE_RESULT_TYPE_NOOP - RESPONSE_RESULT_TYPE_SUCCESS default: RESPONSE_RESULT_TYPE_UNSPECIFIED description: |- - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully title: >- ResponseResultType defines the possible outcomes of the execution of a message ibc.core.channel.v1.State: type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ibc.core.channel.v1.IdentifiedChannel: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: |- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: opaque channel version, which is agreed upon during the handshake port_id: type: string title: port identifier channel_id: type: string title: channel identifier description: |- IdentifiedChannel defines a channel with additional port and channel identifier fields. ibc.core.channel.v1.PacketState: type: object properties: port_id: type: string description: channel port identifier. channel_id: type: string description: channel unique identifier. sequence: type: string format: uint64 description: packet sequence. data: type: string format: byte description: embedded data that represents packet state. description: |- PacketState defines the generic type necessary to retrieve and store packet commitments, acknowledgements, and receipts. Caller is responsible for knowing the context necessary to interpret this state as a commitment, acknowledgement, or a receipt. ibc.core.channel.v1.QueryChannelClientStateResponse: type: object properties: identified_client_state: title: client state associated with the channel type: object properties: client_id: type: string title: client identifier client_state: title: client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- IdentifiedClientState defines a client state with an additional client identifier field. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method ibc.core.channel.v1.QueryChannelConsensusStateResponse: type: object properties: consensus_state: title: consensus state associated with the channel type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } client_id: type: string title: client ID associated with the consensus state proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method ibc.core.channel.v1.QueryChannelResponse: type: object properties: channel: title: channel associated with the request identifiers type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: opaque channel version, which is agreed upon during the handshake description: >- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryChannelResponse is the response type for the Query/Channel RPC method. Besides the Channel end, it includes a proof and the height from which the proof was retrieved. ibc.core.channel.v1.QueryChannelsResponse: type: object properties: channels: type: array items: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: >- opaque channel version, which is agreed upon during the handshake port_id: type: string title: port identifier channel_id: type: string title: channel identifier description: |- IdentifiedChannel defines a channel with additional port and channel identifier fields. description: list of stored channels of the chain. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryChannelsResponse is the response type for the Query/Channels RPC method. ibc.core.channel.v1.QueryConnectionChannelsResponse: type: object properties: channels: type: array items: type: object properties: state: title: current state of the channel end type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN - STATE_CLOSED default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A channel has just started the opening handshake. - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A channel has completed the handshake. Open channels are ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. ordering: title: whether the channel is ordered or unordered type: string enum: - ORDER_NONE_UNSPECIFIED - ORDER_UNORDERED - ORDER_ORDERED default: ORDER_NONE_UNSPECIFIED description: |- - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent counterparty: title: counterparty channel end type: object properties: port_id: type: string description: >- port on the counterparty chain which owns the other end of the channel. channel_id: type: string title: channel end on the counterparty chain connection_hops: type: array items: type: string title: >- list of connection identifiers, in order, along which packets sent on this channel will travel version: type: string title: >- opaque channel version, which is agreed upon during the handshake port_id: type: string title: port identifier channel_id: type: string title: channel identifier description: |- IdentifiedChannel defines a channel with additional port and channel identifier fields. description: list of channels associated with a connection. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method ibc.core.channel.v1.QueryNextSequenceReceiveResponse: type: object 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method ibc.core.channel.v1.QueryNextSequenceSendResponse: type: object 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryNextSequenceSendResponse is the request type for the Query/QueryNextSequenceSend RPC method ibc.core.channel.v1.QueryPacketAcknowledgementResponse: type: object 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryPacketAcknowledgementResponse defines the client query response for a packet which also includes a proof and the height from which the proof was retrieved ibc.core.channel.v1.QueryPacketAcknowledgementsResponse: type: object properties: acknowledgements: type: array items: type: object properties: port_id: type: string description: channel port identifier. channel_id: type: string description: channel unique identifier. sequence: type: string format: uint64 description: packet sequence. data: type: string format: byte description: embedded data that represents packet state. description: >- PacketState defines the generic type necessary to retrieve and store packet commitments, acknowledgements, and receipts. Caller is responsible for knowing the context necessary to interpret this state as a commitment, acknowledgement, or a receipt. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryPacketAcknowledgemetsResponse is the request type for the Query/QueryPacketAcknowledgements RPC method ibc.core.channel.v1.QueryPacketCommitmentResponse: 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 type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- QueryPacketCommitmentResponse defines the client query response for a packet which also includes a proof and the height from which the proof was retrieved ibc.core.channel.v1.QueryPacketCommitmentsResponse: type: object properties: commitments: type: array items: type: object properties: port_id: type: string description: channel port identifier. channel_id: type: string description: channel unique identifier. sequence: type: string format: uint64 description: packet sequence. data: type: string format: byte description: embedded data that represents packet state. description: >- PacketState defines the generic type necessary to retrieve and store packet commitments, acknowledgements, and receipts. Caller is responsible for knowing the context necessary to interpret this state as a commitment, acknowledgement, or a receipt. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method ibc.core.channel.v1.QueryPacketReceiptResponse: type: object properties: received: type: boolean title: success flag for if receipt exists proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- QueryPacketReceiptResponse defines the client query response for a packet receipt which also includes a proof, and the height from which the proof was retrieved ibc.core.channel.v1.QueryUnreceivedAcksResponse: type: object properties: sequences: type: array items: type: string format: uint64 title: list of unreceived acknowledgement sequences height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryUnreceivedAcksResponse is the response type for the Query/UnreceivedAcks RPC method ibc.core.channel.v1.QueryUnreceivedPacketsResponse: type: object properties: sequences: type: array items: type: string format: uint64 title: list of unreceived packet sequences height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method ibc.core.client.v1.IdentifiedClientState: type: object properties: client_id: type: string title: client identifier client_state: title: client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- IdentifiedClientState defines a client state with an additional client identifier field. ibc.core.client.v1.MsgCreateClient: type: object properties: client_state: title: light client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } consensus_state: description: |- consensus state associated with the client that corresponds to a given height. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} signer: type: string title: signer address title: MsgCreateClient defines a message to create an IBC client ibc.core.client.v1.MsgCreateClientResponse: type: object description: MsgCreateClientResponse defines the Msg/CreateClient response type. ibc.core.client.v1.MsgIBCSoftwareUpgrade: type: object properties: plan: type: object properties: name: type: string description: >- Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. time: type: string format: date-time description: >- Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. height: type: string format: int64 description: The height at which the upgrade must be performed. info: type: string title: >- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: description: >- Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- Plan specifies information about a planned upgrade and when it should occur. upgraded_client_state: description: >- An UpgradedClientState must be provided to perform an IBC breaking upgrade. This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs, so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the previous version of the chain. This will allow IBC connections to persist smoothly across planned chain upgrades. Correspondingly, the UpgradedClientState field has been deprecated in the Cosmos SDK to allow for this logic to exist solely in the 02-client module. type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} signer: type: string title: signer address title: >- MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse: type: object description: >- MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. ibc.core.client.v1.MsgRecoverClient: type: object properties: subject_client_id: type: string title: >- the client identifier for the client to be updated if the proposal passes substitute_client_id: type: string title: >- the substitute client identifier for the client which will replace the subject client signer: type: string title: signer address description: >- MsgRecoverClient defines the message used to recover a frozen or expired client. ibc.core.client.v1.MsgRecoverClientResponse: type: object description: MsgRecoverClientResponse defines the Msg/RecoverClient response type. ibc.core.client.v1.MsgSubmitMisbehaviour: type: object properties: client_id: type: string title: client unique identifier misbehaviour: title: misbehaviour used for freezing the light client type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } signer: type: string title: signer address description: |- MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for light client misbehaviour. This message has been deprecated. Use MsgUpdateClient instead. ibc.core.client.v1.MsgSubmitMisbehaviourResponse: type: object description: |- MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. ibc.core.client.v1.MsgUpdateClient: type: object properties: client_id: type: string title: client unique identifier client_message: title: client message to update the light client type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } signer: type: string title: signer address description: |- MsgUpdateClient defines an sdk.Msg to update a IBC client state using the given client message. ibc.core.client.v1.MsgUpdateClientResponse: type: object description: MsgUpdateClientResponse defines the Msg/UpdateClient response type. ibc.core.client.v1.MsgUpdateParams: type: object properties: signer: type: string title: signer address params: description: |- params defines the client parameters to update. NOTE: All parameters must be supplied. type: object properties: allowed_clients: type: array items: type: string description: >- allowed_clients defines the list of allowed client state types which can be created and interacted with. If a client type is removed from the allowed clients list, usage of this client will be disabled until it is added again to the list. description: MsgUpdateParams defines the sdk.Msg type to update the client parameters. ibc.core.client.v1.MsgUpdateParamsResponse: type: object description: MsgUpdateParamsResponse defines the MsgUpdateParams response type. ibc.core.client.v1.MsgUpgradeClient: type: object properties: client_id: type: string title: client unique identifier client_state: title: upgraded client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } consensus_state: title: >- upgraded consensus state, only contains enough information to serve as a basis of trust in update logic type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof_upgrade_client: type: string format: byte title: proof that old chain committed to new client proof_upgrade_consensus_state: type: string format: byte title: proof that old chain committed to new consensus state signer: type: string title: signer address title: >- MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state ibc.core.client.v1.MsgUpgradeClientResponse: type: object description: MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. ibc.core.client.v1.Params: type: object properties: allowed_clients: type: array items: type: string description: >- allowed_clients defines the list of allowed client state types which can be created and interacted with. If a client type is removed from the allowed clients list, usage of this client will be disabled until it is added again to the list. description: Params defines the set of IBC light client parameters. ibc.core.client.v1.ConsensusStateWithHeight: type: object properties: height: title: consensus state height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset consensus_state: title: consensus state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. ibc.core.client.v1.QueryClientParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: allowed_clients: type: array items: type: string description: >- allowed_clients defines the list of allowed client state types which can be created and interacted with. If a client type is removed from the allowed clients list, usage of this client will be disabled until it is added again to the list. description: >- QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. ibc.core.client.v1.QueryClientStateResponse: type: object properties: client_state: title: client state associated with the request identifier type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryClientStateResponse is the response type for the Query/ClientState RPC method. Besides the client state, it includes a proof and the height from which the proof was retrieved. ibc.core.client.v1.QueryClientStatesResponse: type: object properties: client_states: type: array items: type: object properties: client_id: type: string title: client identifier client_state: title: client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- IdentifiedClientState defines a client state with an additional client identifier field. description: list of stored ClientStates of the chain. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } description: >- QueryClientStatesResponse is the response type for the Query/ClientStates RPC method. ibc.core.client.v1.QueryClientStatusResponse: type: object properties: status: type: string description: >- QueryClientStatusResponse is the response type for the Query/ClientStatus RPC method. It returns the current status of the IBC client. ibc.core.client.v1.QueryConsensusStateHeightsResponse: type: object properties: consensus_state_heights: type: array items: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients title: consensus state heights pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } title: |- QueryConsensusStateHeightsResponse is the response type for the Query/ConsensusStateHeights RPC method ibc.core.client.v1.QueryConsensusStateResponse: type: object properties: consensus_state: title: >- consensus state associated with the client identifier at the given height type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState RPC method ibc.core.client.v1.QueryConsensusStatesResponse: type: object properties: consensus_states: type: array items: type: object properties: height: title: consensus state height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset consensus_state: title: consensus state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. title: consensus states associated with the identifier pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } title: |- QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method ibc.core.client.v1.QueryUpgradedClientStateResponse: type: object properties: upgraded_client_state: title: client state associated with the request identifier type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- QueryUpgradedClientStateResponse is the response type for the Query/UpgradedClientState RPC method. ibc.core.client.v1.QueryUpgradedConsensusStateResponse: type: object properties: upgraded_consensus_state: title: Consensus state associated with the request identifier type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. ibc.core.commitment.v1.MerklePrefix: type: object properties: key_prefix: type: string format: byte title: |- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) ibc.core.connection.v1.ConnectionEnd: type: object properties: client_id: type: string description: client associated with this connection. versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. description: >- IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection. state: description: current state of the connection end. type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN default: STATE_UNINITIALIZED_UNSPECIFIED counterparty: description: counterparty chain associated with this connection. type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) delay_period: type: string format: uint64 description: >- delay period that must pass before a consensus state can be used for packet-verification NOTE: delay period logic is only implemented by some clients. description: |- ConnectionEnd defines a stateful object on a chain connected to another separate one. NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains. ibc.core.connection.v1.Counterparty: type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) description: >- Counterparty defines the counterparty chain associated with a connection end. ibc.core.connection.v1.IdentifiedConnection: type: object properties: id: type: string description: connection identifier. client_id: type: string description: client associated with this connection. versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection state: description: current state of the connection end. type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN default: STATE_UNINITIALIZED_UNSPECIFIED counterparty: description: counterparty chain associated with this connection. type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) delay_period: type: string format: uint64 description: delay period associated with this connection. description: |- IdentifiedConnection defines a connection with additional connection identifier field. ibc.core.connection.v1.Params: type: object properties: max_expected_time_per_block: type: string format: uint64 description: >- maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the largest amount of time that the chain might reasonably take to produce the next block under normal operating conditions. A safe choice is 3-5x the expected time per block. description: Params defines the set of Connection parameters. ibc.core.connection.v1.QueryClientConnectionsResponse: type: object properties: connection_paths: type: array items: type: string description: slice of all the connection paths associated with a client. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was generated type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method ibc.core.connection.v1.QueryConnectionClientStateResponse: type: object properties: identified_client_state: title: client state associated with the channel type: object properties: client_id: type: string title: client identifier client_state: title: client state type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } description: |- IdentifiedClientState defines a client state with an additional client identifier field. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method ibc.core.connection.v1.QueryConnectionConsensusStateResponse: type: object properties: consensus_state: title: consensus state associated with the channel type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } client_id: type: string title: client ID associated with the consensus state proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method ibc.core.connection.v1.QueryConnectionParamsResponse: type: object properties: params: description: params defines the parameters of the module. type: object properties: max_expected_time_per_block: type: string format: uint64 description: >- maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the largest amount of time that the chain might reasonably take to produce the next block under normal operating conditions. A safe choice is 3-5x the expected time per block. description: >- QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. ibc.core.connection.v1.QueryConnectionResponse: type: object properties: connection: title: connection associated with the request identifier type: object properties: client_id: type: string description: client associated with this connection. versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. description: >- IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection. state: description: current state of the connection end. type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN default: STATE_UNINITIALIZED_UNSPECIFIED counterparty: description: counterparty chain associated with this connection. type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) delay_period: type: string format: uint64 description: >- delay period that must pass before a consensus state can be used for packet-verification NOTE: delay period logic is only implemented by some clients. description: >- ConnectionEnd defines a stateful object on a chain connected to another separate one. NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains. proof: type: string format: byte title: merkle proof of existence proof_height: title: height at which the proof was retrieved type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryConnectionResponse is the response type for the Query/Connection RPC method. Besides the connection end, it includes a proof and the height from which the proof was retrieved. ibc.core.connection.v1.QueryConnectionsResponse: type: object properties: connections: type: array items: type: object properties: id: type: string description: connection identifier. client_id: type: string description: client associated with this connection. versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection state: description: current state of the connection end. type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN default: STATE_UNINITIALIZED_UNSPECIFIED counterparty: description: counterparty chain associated with this connection. type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) delay_period: type: string format: uint64 description: delay period associated with this connection. description: |- IdentifiedConnection defines a connection with additional connection identifier field. description: list of stored connections of the chain. pagination: title: pagination response type: object properties: next_key: type: string format: byte description: |- next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. total: type: string format: uint64 title: >- total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise description: |- PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; } height: title: query block height type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset description: >- QueryConnectionsResponse is the response type for the Query/Connections RPC method. ibc.core.connection.v1.State: type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED - STATE_INIT - STATE_TRYOPEN - STATE_OPEN default: STATE_UNINITIALIZED_UNSPECIFIED description: |- State defines if a connection is in one of the following states: INIT, TRYOPEN, OPEN or UNINITIALIZED. - STATE_UNINITIALIZED_UNSPECIFIED: Default State - STATE_INIT: A connection end has just started the opening handshake. - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A connection end has completed the handshake. ibc.core.connection.v1.Version: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: |- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. ibc.core.connection.v1.MsgConnectionOpenAck: type: object properties: connection_id: type: string counterparty_connection_id: type: string version: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. client_state: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients proof_try: type: string format: byte title: |- proof of the initialization the connection on Chain B: `UNITIALIZED -> TRYOPEN` proof_client: type: string format: byte title: proof of client state included in message proof_consensus: type: string format: byte title: proof of client consensus state consensus_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string host_consensus_state_proof: type: string format: byte title: >- optional proof data for host state machines that are unable to introspect their own consensus state description: |- MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of connection state to TRYOPEN on Chain B. ibc.core.connection.v1.MsgConnectionOpenAckResponse: type: object description: >- MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. ibc.core.connection.v1.MsgConnectionOpenConfirm: type: object properties: connection_id: type: string proof_ack: type: string format: byte title: >- proof for the change of the connection state on Chain A: `INIT -> OPEN` proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string description: |- MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of connection state to OPEN on Chain A. ibc.core.connection.v1.MsgConnectionOpenConfirmResponse: type: object description: |- MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. ibc.core.connection.v1.MsgConnectionOpenInit: type: object properties: client_id: type: string counterparty: type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) description: >- Counterparty defines the counterparty chain associated with a connection end. version: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. delay_period: type: string format: uint64 signer: type: string description: |- MsgConnectionOpenInit defines the msg sent by an account on Chain A to initialize a connection with Chain B. ibc.core.connection.v1.MsgConnectionOpenInitResponse: type: object description: |- MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. ibc.core.connection.v1.MsgConnectionOpenTry: type: object properties: client_id: type: string previous_connection_id: type: string description: >- Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. client_state: type: object properties: '@type': type: string description: >- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. additionalProperties: {} description: >- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } counterparty: type: object properties: client_id: type: string description: >- identifies the client on the counterparty chain associated with a given connection. connection_id: type: string description: >- identifies the connection end on the counterparty chain associated with a given connection. prefix: description: commitment merkle prefix of the counterparty chain. type: object properties: key_prefix: type: string format: byte title: >- MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) description: >- Counterparty defines the counterparty chain associated with a connection end. delay_period: type: string format: uint64 counterparty_versions: type: array items: type: object properties: identifier: type: string title: unique version identifier features: type: array items: type: string title: list of features compatible with the specified identifier description: >- Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake. proof_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients proof_init: type: string format: byte title: |- proof of the initialization the connection on Chain A: `UNITIALIZED -> INIT` proof_client: type: string format: byte title: proof of client state included in message proof_consensus: type: string format: byte title: proof of client consensus state consensus_height: type: object properties: revision_number: type: string format: uint64 title: the revision that the client is currently on revision_height: type: string format: uint64 title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset title: >- Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients signer: type: string host_consensus_state_proof: type: string format: byte title: >- optional proof data for host state machines that are unable to introspect their own consensus state description: |- MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a connection on Chain B. ibc.core.connection.v1.MsgConnectionOpenTryResponse: type: object description: >- MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. ibc.core.connection.v1.MsgUpdateParams: type: object properties: signer: type: string title: signer address params: description: |- params defines the connection parameters to update. NOTE: All parameters must be supplied. type: object properties: max_expected_time_per_block: type: string format: uint64 description: >- maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the largest amount of time that the chain might reasonably take to produce the next block under normal operating conditions. A safe choice is 3-5x the expected time per block. description: >- MsgUpdateParams defines the sdk.Msg type to update the connection parameters. ibc.core.connection.v1.MsgUpdateParamsResponse: type: object description: MsgUpdateParamsResponse defines the MsgUpdateParams response type. sourcehub.acp.AccessDecision: type: object properties: id: type: string policy_id: type: string title: used as part of id generation creator: type: string title: used as part of id generation creator_acc_sequence: type: string format: uint64 title: used as part of id generation operations: type: array items: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: target object for operation permission: type: string title: permission required to perform operation description: Operation represents an action over an object. title: used as part of id generation actor: type: string title: used as part of id generation params: title: used as part of id generation type: object properties: decision_expiration_delta: type: string format: uint64 title: number of blocks a Decision is valid for proof_expiration_delta: type: string format: uint64 title: number of blocks a DecisionProof is valid for ticket_expiration_delta: type: string format: uint64 title: number of blocks an AccessTicket is valid for creation_time: type: string format: date-time issued_height: type: string format: uint64 title: issued_height stores the block height when the Decision was evaluated title: >- AccessDecision models the result of evaluating a set of AccessRequests for an Actor sourcehub.acp.AccessRequest: type: object properties: operations: type: array items: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: target object for operation permission: type: string title: permission required to perform operation description: Operation represents an action over an object. actor: type: object properties: id: type: string description: Actor represents an entity which makes access requests to a Policy. title: actor requesting operations title: >- AccessRequest represents the wish to perform a set of operations by an actor sourcehub.acp.Actor: type: object properties: id: type: string description: Actor represents an entity which makes access requests to a Policy. sourcehub.acp.ActorResource: type: object properties: name: type: string doc: type: string relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- ActorResource represents a special Resource which is reserved for Policy actors. sourcehub.acp.ActorSet: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: |- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. sourcehub.acp.AllActors: type: object description: |- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. sourcehub.acp.DecisionParams: type: object properties: decision_expiration_delta: type: string format: uint64 title: number of blocks a Decision is valid for proof_expiration_delta: type: string format: uint64 title: number of blocks a DecisionProof is valid for ticket_expiration_delta: type: string format: uint64 title: number of blocks an AccessTicket is valid for title: >- DecisionParams stores auxiliary information regarding the validity of a decision sourcehub.acp.DeleteRelationshipCmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. title: DeleteRelationshipCmd removes a Relationship in a Policy sourcehub.acp.DeleteRelationshipCmdResult: type: object properties: record_found: type: boolean title: DeleteRelationshipCmdResult removes a Relationship in a Policy sourcehub.acp.MsgBearerPolicyCmd: type: object properties: creator: type: string bearer_token: type: string policy_id: type: string cmd: type: object properties: set_relationship_cmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_cmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. title: DeleteRelationshipCmd removes a Relationship in a Policy register_object_cmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: RegisterObjectCmd registers an Object in a Policy unregister_object_cmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: UnregisterObjectCmd unregisters an Object in a Policy creation_time: type: string format: date-time sourcehub.acp.MsgBearerPolicyCmdResponse: type: object properties: result: type: object properties: set_relationship_result: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_result: type: object properties: record_found: type: boolean title: DeleteRelationshipCmdResult removes a Relationship in a Policy register_object_result: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: RegisterObjectCmdResult registers an Object in a Policy unregister_object_result: type: object properties: found: type: boolean relationships_removed: type: string format: uint64 title: UnregisterObjectCmdResult unregisters an Object in a Policy sourcehub.acp.MsgCheckAccess: type: object properties: creator: type: string policy_id: type: string creation_time: type: string format: date-time access_request: type: object properties: operations: type: array items: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: target object for operation permission: type: string title: permission required to perform operation description: Operation represents an action over an object. actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. title: actor requesting operations title: >- AccessRequest represents the wish to perform a set of operations by an actor sourcehub.acp.MsgCheckAccessResponse: type: object properties: decision: type: object properties: id: type: string policy_id: type: string title: used as part of id generation creator: type: string title: used as part of id generation creator_acc_sequence: type: string format: uint64 title: used as part of id generation operations: type: array items: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: target object for operation permission: type: string title: permission required to perform operation description: Operation represents an action over an object. title: used as part of id generation actor: type: string title: used as part of id generation params: title: used as part of id generation type: object properties: decision_expiration_delta: type: string format: uint64 title: number of blocks a Decision is valid for proof_expiration_delta: type: string format: uint64 title: number of blocks a DecisionProof is valid for ticket_expiration_delta: type: string format: uint64 title: number of blocks an AccessTicket is valid for creation_time: type: string format: date-time issued_height: type: string format: uint64 title: >- issued_height stores the block height when the Decision was evaluated title: >- AccessDecision models the result of evaluating a set of AccessRequests for an Actor sourcehub.acp.MsgCreatePolicy: type: object properties: creator: type: string policy: type: string marshal_type: type: string enum: - UNKNOWN - YAML default: UNKNOWN description: |- PolicyMarshalingType enumerates supported marshaling types for policies. - UNKNOWN: Fallback value for a missing Marshaling Type - YAML: YAML Marshaled Policy creation_time: type: string format: date-time sourcehub.acp.MsgCreatePolicyResponse: type: object properties: policy: type: object properties: id: type: string name: type: string description: type: string creation_time: type: string format: date-time attributes: type: object additionalProperties: type: string resources: type: array items: type: object properties: name: type: string doc: type: string permissions: type: array items: type: object properties: name: type: string doc: type: string expression: type: string description: >- Permission models a special type of Relation which is evaluated at runtime. A permission often maps to an operation defined for a resource which an actor may attempt. relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- Resource models a namespace for objects in a Policy. Appications will have multiple entities which they must manage such as files or groups. A Resource represents a set of entities of a certain type. actor_resource: type: object properties: name: type: string doc: type: string relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- ActorResource represents a special Resource which is reserved for Policy actors. creator: type: string description: >- Policy represents an ACP module Policy definition. Each Policy defines a set of high level rules over how the acces control system should behave. sourcehub.acp.MsgDeleteRelationship: type: object properties: creator: type: string policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. sourcehub.acp.MsgDeleteRelationshipResponse: type: object properties: record_found: type: boolean sourcehub.acp.MsgDirectPolicyCmd: type: object properties: creator: type: string sourcehub.acp.MsgDirectPolicyCmdResponse: type: object sourcehub.acp.MsgRegisterObject: type: object properties: creator: type: string policy_id: type: string object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. creation_time: type: string format: date-time sourcehub.acp.MsgRegisterObjectResponse: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. sourcehub.acp.MsgSetRelationship: type: object properties: creator: type: string policy_id: type: string creation_time: type: string format: date-time relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. sourcehub.acp.MsgSetRelationshipResponse: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. sourcehub.acp.MsgSignedPolicyCmd: type: object properties: creator: type: string payload: type: string type: type: string enum: - UNKNOWN - JWS default: UNKNOWN sourcehub.acp.MsgSignedPolicyCmd.ContentType: type: string enum: - UNKNOWN - JWS default: UNKNOWN sourcehub.acp.MsgSignedPolicyCmdResponse: type: object properties: result: type: object properties: set_relationship_result: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_result: type: object properties: record_found: type: boolean title: DeleteRelationshipCmdResult removes a Relationship in a Policy register_object_result: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: >- actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: RegisterObjectCmdResult registers an Object in a Policy unregister_object_result: type: object properties: found: type: boolean relationships_removed: type: string format: uint64 title: UnregisterObjectCmdResult unregisters an Object in a Policy sourcehub.acp.MsgUnregisterObject: type: object properties: creator: type: string policy_id: type: string object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. sourcehub.acp.MsgUnregisterObjectResponse: type: object properties: found: type: boolean sourcehub.acp.MsgUpdateParams: type: object properties: authority: type: string description: >- authority is the address that controls the module (defaults to x/gov unless overwritten). params: description: 'NOTE: All parameters must be supplied.' type: object properties: policy_command_max_expiration_delta: type: string format: uint64 description: >- policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. description: MsgUpdateParams is the Msg/UpdateParams request type. sourcehub.acp.MsgUpdateParamsResponse: type: object description: |- MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. sourcehub.acp.Object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. sourcehub.acp.Operation: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: target object for operation permission: type: string title: permission required to perform operation description: Operation represents an action over an object. sourcehub.acp.Params: type: object properties: policy_command_max_expiration_delta: type: string format: uint64 description: >- policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. description: Params defines the parameters for the module. sourcehub.acp.Permission: type: object properties: name: type: string doc: type: string expression: type: string description: >- Permission models a special type of Relation which is evaluated at runtime. A permission often maps to an operation defined for a resource which an actor may attempt. sourcehub.acp.Policy: type: object properties: id: type: string name: type: string description: type: string creation_time: type: string format: date-time attributes: type: object additionalProperties: type: string resources: type: array items: type: object properties: name: type: string doc: type: string permissions: type: array items: type: object properties: name: type: string doc: type: string expression: type: string description: >- Permission models a special type of Relation which is evaluated at runtime. A permission often maps to an operation defined for a resource which an actor may attempt. relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- Resource models a namespace for objects in a Policy. Appications will have multiple entities which they must manage such as files or groups. A Resource represents a set of entities of a certain type. actor_resource: type: object properties: name: type: string doc: type: string relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- ActorResource represents a special Resource which is reserved for Policy actors. creator: type: string description: >- Policy represents an ACP module Policy definition. Each Policy defines a set of high level rules over how the acces control system should behave. sourcehub.acp.PolicyCmd: type: object properties: set_relationship_cmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_cmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. title: DeleteRelationshipCmd removes a Relationship in a Policy register_object_cmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: RegisterObjectCmd registers an Object in a Policy unregister_object_cmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: UnregisterObjectCmd unregisters an Object in a Policy sourcehub.acp.PolicyCmdResult: type: object properties: set_relationship_result: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: SetRelationshipCmd sets a Relationship in a Policy delete_relationship_result: type: object properties: record_found: type: boolean title: DeleteRelationshipCmdResult removes a Relationship in a Policy register_object_result: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: RegisterObjectCmdResult registers an Object in a Policy unregister_object_result: type: object properties: found: type: boolean relationships_removed: type: string format: uint64 title: UnregisterObjectCmdResult unregisters an Object in a Policy sourcehub.acp.PolicyMarshalingType: type: string enum: - UNKNOWN - YAML default: UNKNOWN description: |- PolicyMarshalingType enumerates supported marshaling types for policies. - UNKNOWN: Fallback value for a missing Marshaling Type - YAML: YAML Marshaled Policy sourcehub.acp.RegisterObjectCmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: RegisterObjectCmd registers an Object in a Policy sourcehub.acp.RegisterObjectCmdResult: type: object properties: result: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: RegisterObjectCmdResult registers an Object in a Policy sourcehub.acp.RegistrationResult: type: string enum: - NoOp - Registered - Unarchived default: NoOp description: >- - NoOp: NoOp indicates no action was take. The operation failed or the Object already existed and was active - Registered: Registered indicates the Object was sucessfuly registered to the Actor. - Unarchived: Unarchived indicates that a previously deleted Object is active again. Only the original owners can Unarchive an object. title: >- RegistrationResult encodes the possible result set from Registering an Object sourcehub.acp.Relation: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: |- Restriction models a specification which a Relationship's actor should meet. title: value restriction types sourcehub.acp.Relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: |- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: |- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. sourcehub.acp.RelationshipRecord: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. sourcehub.acp.Resource: type: object properties: name: type: string doc: type: string permissions: type: array items: type: object properties: name: type: string doc: type: string expression: type: string description: >- Permission models a special type of Relation which is evaluated at runtime. A permission often maps to an operation defined for a resource which an actor may attempt. relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- Resource models a namespace for objects in a Policy. Appications will have multiple entities which they must manage such as files or groups. A Resource represents a set of entities of a certain type. sourcehub.acp.Restriction: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: |- Restriction models a specification which a Relationship's actor should meet. sourcehub.acp.SetRelationshipCmd: type: object properties: relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. title: SetRelationshipCmd sets a Relationship in a Policy sourcehub.acp.SetRelationshipCmdResult: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: SetRelationshipCmd sets a Relationship in a Policy sourcehub.acp.Subject: type: object properties: actor: type: object properties: id: type: string description: Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: |- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: |- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. sourcehub.acp.UnregisterObjectCmd: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: UnregisterObjectCmd unregisters an Object in a Policy sourcehub.acp.UnregisterObjectCmdResult: type: object properties: found: type: boolean relationships_removed: type: string format: uint64 title: UnregisterObjectCmdResult unregisters an Object in a Policy sourcehub.acp.ObjectSelector: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: object specifies an object which the Relationship must contain wildcard: title: wildcard matches any object type: object title: ObjectSelector models a filter for Relationship Objects sourcehub.acp.QueryAccessDecisionResponse: type: object properties: decision: type: object properties: id: type: string policy_id: type: string title: used as part of id generation creator: type: string title: used as part of id generation creator_acc_sequence: type: string format: uint64 title: used as part of id generation operations: type: array items: type: object properties: object: title: target object for operation type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. permission: type: string title: permission required to perform operation description: Operation represents an action over an object. title: used as part of id generation actor: type: string title: used as part of id generation params: title: used as part of id generation type: object properties: decision_expiration_delta: type: string format: uint64 title: number of blocks a Decision is valid for proof_expiration_delta: type: string format: uint64 title: number of blocks a DecisionProof is valid for ticket_expiration_delta: type: string format: uint64 title: number of blocks an AccessTicket is valid for creation_time: type: string format: date-time issued_height: type: string format: uint64 title: >- issued_height stores the block height when the Decision was evaluated title: >- AccessDecision models the result of evaluating a set of AccessRequests for an Actor sourcehub.acp.QueryFilterRelationshipsResponse: type: object properties: records: type: array items: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. sourcehub.acp.QueryObjectOwnerResponse: type: object properties: is_registered: type: boolean owner_id: type: string sourcehub.acp.QueryParamsResponse: type: object properties: params: description: params holds all the parameters of this module. type: object properties: policy_command_max_expiration_delta: type: string format: uint64 description: >- policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. description: QueryParamsResponse is response type for the Query/Params RPC method. sourcehub.acp.QueryPolicyIdsResponse: type: object properties: ids: type: array items: type: string title: cosmos.base.query.v1beta1.PageResponse pagination = 1; sourcehub.acp.QueryPolicyResponse: type: object properties: policy: type: object properties: id: type: string name: type: string description: type: string creation_time: type: string format: date-time attributes: type: object additionalProperties: type: string resources: type: array items: type: object properties: name: type: string doc: type: string permissions: type: array items: type: object properties: name: type: string doc: type: string expression: type: string description: >- Permission models a special type of Relation which is evaluated at runtime. A permission often maps to an operation defined for a resource which an actor may attempt. relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- Resource models a namespace for objects in a Policy. Appications will have multiple entities which they must manage such as files or groups. A Resource represents a set of entities of a certain type. actor_resource: type: object properties: name: type: string doc: type: string relations: type: array items: type: object properties: name: type: string doc: type: string manages: type: array items: type: string title: list of relations managed by the current relation vr_types: type: array items: type: object properties: resource_name: type: string title: resource_name scopes permissible actors resource relation_name: type: string title: relation_name scopes permissible actors relation description: >- Restriction models a specification which a Relationship's actor should meet. title: value restriction types description: >- ActorResource represents a special Resource which is reserved for Policy actors. creator: type: string description: >- Policy represents an ACP module Policy definition. Each Policy defines a set of high level rules over how the acces control system should behave. sourcehub.acp.QueryValidatePolicyResponse: type: object properties: valid: type: boolean sourcehub.acp.QueryVerifyAccessRequestResponse: type: object properties: valid: type: boolean sourcehub.acp.RelationSelector: type: object properties: relation: type: string title: >- relation specifies a relation name which must exactly match the Relationship's wildcard: title: wildcard matches any relation type: object title: RelationsSelector models a filter for Relationship Relations sourcehub.acp.RelationshipSelector: type: object properties: object_selector: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. title: object specifies an object which the Relationship must contain wildcard: title: wildcard matches any object type: object title: ObjectSelector models a filter for Relationship Objects relation_selector: type: object properties: relation: type: string title: >- relation specifies a relation name which must exactly match the Relationship's wildcard: title: wildcard matches any relation type: object title: RelationsSelector models a filter for Relationship Relations subject_selector: type: object properties: subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. title: >- subject requires an exact match between the given subject and a Relationship's subject wildcard: title: wildcard matches any subject in a Relationship type: object title: SubjectSelector models a filter for Relationship Subjects description: >- RelationshipSelector models a set of predicates which are used to filter through Relationships in a Policy. sourcehub.acp.SubjectSelector: type: object properties: subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: |- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: |- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. title: >- subject requires an exact match between the given subject and a Relationship's subject wildcard: title: wildcard matches any subject in a Relationship type: object title: SubjectSelector models a filter for Relationship Subjects sourcehub.acp.WildcardSelector: type: object title: WildcardSelector matches anything in a context sourcehub.bulletin.MsgCreatePost: type: object properties: record_existed: type: boolean title: >- Indicates whether the given Relationship previously existed, ie the Tx was a no op record: type: object properties: creation_time: type: string format: date-time creator: type: string description: >- msg_signer is the SourceHub address of the account that submited the message responsible for this record It's used for auditing only. actor: type: string title: actor is the DID of the Actor which created the relationship policy_id: type: string relationship: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string subject: type: object properties: actor: type: object properties: id: type: string description: >- Actor represents an entity which makes access requests to a Policy. actor_set: type: object properties: object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. relation: type: string description: >- ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive. all_actors: type: object description: >- AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included. object: type: object properties: resource: type: string id: type: string description: >- Object represents an entity which must be access controlled within a Policy. description: Subject specifies the target of a Relationship. description: |- Relationship models an access control rule. It states that the given subject has relation with object. archived: type: boolean title: archived indicates whether an object has been unregistered description: >- RelationshipRecord represents a document contained a Relationship and additional data. title: SetRelationshipCmd sets a Relationship in a Policy sourcehub.acp.UnregisterObjectCmdResult: type: object properties: found: type: boolean relationships_removed: type: string format: uint64 title: UnregisterObjectCmdResult unregisters an Object in a Policy sourcehub.bulletin.Params: type: object description: Params defines the parameters for the module. ================================================ FILE: docs/template/index.tpl ================================================ {{ .Title }}
Footer © 2022 GitHub, Inc. Footer navigation ================================================ FILE: example/access_ticket/main.go ================================================ package main import ( "context" "log" "time" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocdc "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/davecgh/go-spew/spew" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/sdk" "github.com/sourcenetwork/sourcehub/x/acp/access_ticket" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) const nodeAddrDefault = "tcp://localhost:26657" const chainIdFlag = "chain-id" const nodeAddrFlag = "node-addr" var policy string = ` name: access ticket example resources: - name: file permissions: - name: read ` func main() { cmd := cobra.Command{ Use: "access_ticket_demo [validator-key-name]", Short: "acces_ticket_demo executes a self-contained example of the access ticket flow. Receives name of the validator key to send Txs from", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { name := args[0] runDemo( cmd.Flag(chainIdFlag).Value.String(), cmd.Flag(nodeAddrFlag).Value.String(), name, ) }, } flags := cmd.Flags() flags.String(chainIdFlag, "sourcehub-dev", "sets the chain-id") flags.String(nodeAddrFlag, nodeAddrDefault, "sets the address of the node to communicate with") cmd.Execute() } func runDemo(chainId string, nodeAddr string, validatorKeyName string) { ctx := context.Background() client, err := sdk.NewClient() if err != nil { log.Fatal(err) } txBuilder, err := sdk.NewTxBuilder( sdk.WithSDKClient(client), sdk.WithChainID(chainId), ) if err != nil { log.Fatal(err) } txSigner := getSigner(validatorKeyName) log.Printf("Creating Policy: %v", policy) policy := createPolicy(ctx, client, &txBuilder, txSigner) log.Printf("Registering object: file:readme") record := registerObject(ctx, client, &txBuilder, txSigner, policy.Id) log.Printf("Evaluating Access Request to read file:readme") decision := checkAccess(ctx, client, &txBuilder, txSigner, policy.Id, record.Metadata.OwnerDid, []*coretypes.Operation{ { Object: coretypes.NewObject("file", "readme"), Permission: "read", }, }) log.Printf("Issueing ticket for Access Decision %v", decision.Id) abciService, err := access_ticket.NewABCIService(nodeAddr) if err != nil { log.Fatalf("could not create abci service: %v", err) } issuer := access_ticket.NewTicketIssuer(&abciService) ticket, err := issuer.Issue(ctx, decision.Id, txSigner.GetPrivateKey()) if err != nil { log.Fatalf("could not issue ticket: %v", err) } log.Printf("Access Ticket issued: %v", ticket) log.Printf("Waiting for next block") time.Sleep(time.Second * 5) log.Printf("Verifying Access Ticket") recoveredTicket, err := access_ticket.UnmarshalAndVerify(ctx, nodeAddr, ticket) if err != nil { log.Fatalf("could not verify ticket: %v", err) } // remove some fields for cleaner print recoveredTicket.Signature = nil recoveredTicket.DecisionProof = nil log.Printf("Acces Ticket verified: %v", spew.Sdump(recoveredTicket)) } func getSigner(accAddr string) sdk.TxSigner { reg := cdctypes.NewInterfaceRegistry() cryptocdc.RegisterInterfaces(reg) cdc := codec.NewProtoCodec(reg) keyring, err := keyring.New("sourcehub", keyring.BackendTest, "~/.sourcehub", nil, cdc) if err != nil { log.Fatalf("could not load keyring: %v", err) } txSigner, err := sdk.NewTxSignerFromKeyringKey(keyring, accAddr) if err != nil { log.Fatalf("could not load keyring: %v", err) } return txSigner } func createPolicy(ctx context.Context, client *sdk.Client, txBuilder *sdk.TxBuilder, txSigner sdk.TxSigner) *coretypes.Policy { msgSet := sdk.MsgSet{} policyMapper := msgSet.WithCreatePolicy(acptypes.NewMsgCreatePolicy(txSigner.GetAccAddress(), policy, coretypes.PolicyMarshalingType_YAML)) tx, err := txBuilder.Build(ctx, txSigner, &msgSet) if err != nil { log.Fatal(err) } resp, err := client.BroadcastTx(ctx, tx) if err != nil { log.Fatal(err) } result, err := client.AwaitTx(ctx, resp.TxHash) if err != nil { log.Fatal(err) } if result.Error() != nil { log.Fatalf("Tx failed: %v", result.Error()) } policyResponse, err := policyMapper.Map(result.TxPayload()) if err != nil { log.Fatal(err) } log.Printf("policy created: %v", policyResponse.Record.Policy.Id) return policyResponse.Record.Policy } func registerObject(ctx context.Context, client *sdk.Client, txBuilder *sdk.TxBuilder, txSigner sdk.TxSigner, policyId string) *acptypes.RelationshipRecord { msgSet := sdk.MsgSet{} mapper := msgSet.WithDirectPolicyCmd( acptypes.NewMsgDirectPolicyCmd( txSigner.GetAccAddress(), policyId, acptypes.NewRegisterObjectCmd(coretypes.NewObject("file", "readme")), ), ) tx, err := txBuilder.Build(ctx, txSigner, &msgSet) if err != nil { log.Fatal(err) } resp, err := client.BroadcastTx(ctx, tx) if err != nil { log.Fatal(err) } result, err := client.AwaitTx(ctx, resp.TxHash) if err != nil { log.Fatal(err) } if result.Error() != nil { log.Fatalf("Tx failed: %v", result.Error()) } response, err := mapper.Map(result.TxPayload()) if err != nil { log.Fatal(err) } log.Printf("object registered: %v", response.Result.GetRegisterObjectResult()) return response.Result.GetRegisterObjectResult().Record } func checkAccess(ctx context.Context, client *sdk.Client, txBuilder *sdk.TxBuilder, txSigner sdk.TxSigner, policyId string, actorId string, operations []*coretypes.Operation) *acptypes.AccessDecision { msgSet := sdk.MsgSet{} mapper := msgSet.WithCheckAccess( acptypes.NewMsgCheckAccess(txSigner.GetAccAddress(), policyId, &coretypes.AccessRequest{ Operations: operations, Actor: &coretypes.Actor{Id: actorId}, }), ) tx, err := txBuilder.Build(ctx, txSigner, &msgSet) if err != nil { log.Fatal(err) } resp, err := client.BroadcastTx(ctx, tx) if err != nil { log.Fatal(err) } result, err := client.AwaitTx(ctx, resp.TxHash) if err != nil { log.Fatal(err) } if result.Error() != nil { log.Fatalf("Tx failed: %v", result.Error()) } response, err := mapper.Map(result.TxPayload()) if err != nil { log.Fatal(err) } log.Printf("acces request evaluated: %v", response.Decision) return response.Decision } ================================================ FILE: example/bearer_auth/main.go ================================================ package main import ( "context" "log" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocdc "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/sdk" "github.com/sourcenetwork/sourcehub/x/acp/bearer_token" "github.com/sourcenetwork/sourcehub/x/acp/did" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func main() { ctx := context.Background() client, err := sdk.NewClient() if err != nil { log.Fatal(err) } txBuilder, err := sdk.NewTxBuilder( sdk.WithSDKClient(client), sdk.WithChainID("sourcehub-dev"), ) if err != nil { log.Fatal(err) } reg := cdctypes.NewInterfaceRegistry() cryptocdc.RegisterInterfaces(reg) cdc := codec.NewProtoCodec(reg) keyring, err := keyring.New("sourcehub", keyring.BackendTest, "~/.sourcehub", nil, cdc) if err != nil { log.Fatalf("could not load keyring: %v", err) } txSigner, err := sdk.NewTxSignerFromKeyringKey(keyring, "validator") if err != nil { log.Fatalf("could not load keyring: %v", err) } policy := ` name: test resources: - name: resource ` msgSet := sdk.MsgSet{} policyMapper := msgSet.WithCreatePolicy(acptypes.NewMsgCreatePolicy(txSigner.GetAccAddress(), policy, coretypes.PolicyMarshalingType_YAML)) tx, err := txBuilder.Build(ctx, txSigner, &msgSet) if err != nil { log.Fatal(err) } resp, err := client.BroadcastTx(ctx, tx) if err != nil { log.Fatal(err) } result, err := client.AwaitTx(ctx, resp.TxHash) if err != nil { log.Fatal(err) } if result.Error() != nil { log.Fatalf("Tx failed: %v", result.Error()) } policyResponse, err := policyMapper.Map(result.TxPayload()) if err != nil { log.Fatal(err) } log.Printf("policy created: %v", policyResponse.Record.Policy.Id) alice, signer, err := did.ProduceDID() if err != nil { log.Fatalf("could not generate alice: %v", err) } log.Printf("alice's DID: %v", alice) token := bearer_token.NewBearerTokenNow(alice, txSigner.GetAccAddress()) jws, err := token.ToJWS(signer) if err != nil { log.Fatalf("could not produce Bearer for alice: %v", err) } log.Printf("alice's raw token: %v", token) log.Printf("alice's JWS: %v", jws) bearerCmd := acptypes.MsgBearerPolicyCmd{ Creator: txSigner.GetAccAddress(), BearerToken: jws, PolicyId: policyResponse.Record.Policy.Id, Cmd: acptypes.NewRegisterObjectCmd(coretypes.NewObject("resource", "foo")), } log.Printf("Bearer Cmd: %v", bearerCmd) msgSet = sdk.MsgSet{} msgSet.WithBearerPolicyCmd(&bearerCmd) tx, err = txBuilder.Build(ctx, txSigner, &msgSet) if err != nil { log.Fatal(err) } resp, err = client.BroadcastTx(ctx, tx) if err != nil { log.Fatal(err) } result, err = client.AwaitTx(ctx, resp.TxHash) if err != nil { log.Fatal(err) } if result.Error() != nil { log.Fatalf("Tx failed: %v", result.Error()) } log.Printf("object registered") } ================================================ FILE: example/bearer_token_gen/main.go ================================================ package main import ( "crypto/ed25519" "fmt" "log" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/x/acp/bearer_token" ) func main() { cmd.Execute() } var cmd = cobra.Command{ Use: "bearer-token authorized_account", Short: "bearer-token generates a oneshot did / bearer token for the given account address", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { addr := args[0] pub, priv, err := ed25519.GenerateKey(nil) if err != nil { log.Fatalf("failed to generate key pair: %v", err) } did, err := key.CreateDIDKey(crypto.Ed25519, pub) if err != nil { log.Fatalf("failed to generate did: %v", err) } token := bearer_token.NewBearerTokenNow(did.String(), addr) jws, err := token.ToJWS(priv) if err != nil { log.Fatalf("failed to issue token: %v", err) } log.Printf("token raw: %v", token) fmt.Printf("Bearer Token: %v\n", jws) fmt.Printf("DID: %v\n", did.String()) }, } ================================================ FILE: example/sdk/main.go ================================================ package main import ( "context" "log" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocdc "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/sdk" "github.com/sourcenetwork/sourcehub/x/acp/did" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func main() { ctx := context.Background() client, err := sdk.NewClient() if err != nil { log.Fatal(err) } txBuilder, err := sdk.NewTxBuilder( sdk.WithSDKClient(client), sdk.WithChainID("sourcehub-dev"), ) if err != nil { log.Fatal(err) } cmdBuilder, err := sdk.NewCmdBuilder(ctx, client) if err != nil { log.Fatal(err) } reg := cdctypes.NewInterfaceRegistry() cryptocdc.RegisterInterfaces(reg) cdc := codec.NewProtoCodec(reg) keyring, err := keyring.New("sourcehub", keyring.BackendTest, "~/.sourcehub", nil, cdc) if err != nil { log.Fatalf("could not load keyring: %v", err) } signer, err := sdk.NewTxSignerFromKeyringKey(keyring, "validator") if err != nil { log.Fatalf("could not load keyring: %v", err) } policy := ` name: test resources: - name: resource ` msgSet := sdk.MsgSet{} policyMapper := msgSet.WithCreatePolicy(acptypes.NewMsgCreatePolicy(signer.GetAccAddress(), policy, coretypes.PolicyMarshalingType_YAML)) tx, err := txBuilder.Build(ctx, signer, &msgSet) if err != nil { log.Fatal(err) } resp, err := client.BroadcastTx(ctx, tx) if err != nil { log.Fatal(err) } result, err := client.AwaitTx(ctx, resp.TxHash) if err != nil { log.Fatal(err) } if result.Error() != nil { log.Fatalf("Tx failed: %v", result.Error()) } policyResponse, err := policyMapper.Map(result.TxPayload()) if err != nil { log.Fatal(err) } log.Printf("policy created: %v", policyResponse) // create cmd which registers an object for the given did aliceDid, aliceSigner, err := did.ProduceDID() if err != nil { log.Fatal(err) } cmdBuilder.PolicyCmd(acptypes.NewRegisterObjectCmd(coretypes.NewObject("resource", "readme.txt"))) cmdBuilder.PolicyID(policyResponse.Record.Policy.Id) cmdBuilder.Actor(aliceDid) cmdBuilder.SetSigner(aliceSigner) jws, err := cmdBuilder.BuildJWS(ctx) if err != nil { log.Fatal(err) } // wraps cmd in a tx and broadcasts it msgSet = sdk.MsgSet{} msgSet.WithSignedPolicyCmd(acptypes.NewMsgSignedPolicyCmdFromJWS(signer.GetAccAddress(), jws)) tx, err = txBuilder.Build(ctx, signer, &msgSet) if err != nil { log.Fatal(err) } resp, err = client.BroadcastTx(ctx, tx) if err != nil { log.Fatal(err) } result, err = client.AwaitTx(ctx, resp.TxHash) if err != nil { log.Fatal(err) } if result.Error() != nil { log.Fatalf("Tx failed: %v", result.Error()) } log.Printf("object registered") } ================================================ FILE: go.mod ================================================ module github.com/sourcenetwork/sourcehub go 1.25.5 replace ( // fix upstream GHSA-h395-qcrw-5vmq vulnerability. github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 // replace broken goleveldb github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) require ( cosmossdk.io/api v0.7.6 cosmossdk.io/client/v2 v2.0.0-beta.3 cosmossdk.io/core v0.11.1 cosmossdk.io/depinject v1.1.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.5.0 cosmossdk.io/math v1.5.0 cosmossdk.io/store v1.1.1 cosmossdk.io/tools/confix v0.1.2 cosmossdk.io/x/circuit v0.1.1 cosmossdk.io/x/evidence v0.1.1 cosmossdk.io/x/tx v0.13.7 cosmossdk.io/x/upgrade v0.1.4 github.com/TBD54566975/ssi-sdk v0.0.4-alpha github.com/bufbuild/buf v1.57.1 github.com/cometbft/cometbft v0.38.21 github.com/cosmos/cosmos-db v1.1.3 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.50.14 github.com/cosmos/gogoproto v1.7.2 github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/v10 v10.1.1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 github.com/go-jose/go-jose/v3 v3.0.4 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 github.com/hashicorp/go-metrics v0.5.3 github.com/ignite/cli/v28 v28.6.1 github.com/lestrrat-go/jwx/v2 v2.1.6 github.com/skip-mev/block-sdk/v2 v2.1.5 github.com/sourcenetwork/acp_core v0.8.1 github.com/sourcenetwork/raccoondb v0.2.1-0.20240722161350-d4a78b691ec8 github.com/sourcenetwork/raccoondb/v2 v2.0.0 github.com/spf13/cobra v1.10.1 github.com/spf13/pflag v1.0.10 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.11.1 github.com/tendermint/tendermint v0.35.9 golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 golang.org/x/tools v0.38.0 google.golang.org/genproto/googleapis/api v0.0.0-20251103181224-f26f9409b101 google.golang.org/grpc v1.76.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 google.golang.org/protobuf v1.36.10 gotest.tools/v3 v3.5.1 ) require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.9-20250718181942-e35f9b667443.1 // indirect buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1 // indirect buf.build/gen/go/bufbuild/registry/connectrpc/go v1.18.1-20250903170917-c4be0f57e197.1 // indirect buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.9-20250903170917-c4be0f57e197.1 // indirect buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.8-20241007202033-cf42259fcbfc.1 // indirect buf.build/go/app v0.1.0 // indirect buf.build/go/bufplugin v0.9.0 // indirect buf.build/go/interrupt v1.1.0 // indirect buf.build/go/protovalidate v1.0.0 // indirect buf.build/go/protoyaml v0.6.0 // indirect buf.build/go/spdx v0.2.0 // indirect buf.build/go/standard v0.1.0 // indirect cel.dev/expr v0.24.0 // indirect cloud.google.com/go v0.115.0 // indirect cloud.google.com/go/auth v0.6.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect cloud.google.com/go/compute/metadata v0.7.0 // indirect cloud.google.com/go/iam v1.1.9 // indirect cloud.google.com/go/storage v1.41.0 // indirect connectrpc.com/connect v1.18.1 // indirect connectrpc.com/otelconnect v0.8.0 // indirect cosmossdk.io/collections v0.4.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/4meepo/tagalign v1.3.4 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/Abirdcfly/dupword v0.0.14 // indirect github.com/Antonboom/errname v0.1.13 // indirect github.com/Antonboom/nilnil v0.1.9 // indirect github.com/Antonboom/testifylint v1.3.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/BurntSushi/toml v1.4.0 // indirect github.com/Crocmagnon/fatcontext v0.2.2 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.7 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect github.com/Masterminds/semver/v3 v3.3.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/NathanBaulch/protoc-gen-cobra v1.2.1 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 // indirect github.com/alecthomas/go-check-sumtype v0.1.4 // indirect github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/ashanbrown/forbidigo v1.6.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.2.0 // indirect github.com/bits-and-blooms/bitset v1.20.0 // indirect github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bombsimon/wsl/v4 v4.2.1 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.6 // indirect github.com/bufbuild/protocompile v0.14.1 // indirect github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 // indirect github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.2.0 // indirect github.com/bytedance/gopkg v0.1.3 // indirect github.com/bytedance/sonic v1.14.1 // indirect github.com/bytedance/sonic/loader v0.3.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/ckaznocha/intrange v0.1.2 // indirect github.com/cloudflare/circl v1.4.0 // indirect github.com/cloudwego/base64x v0.1.6 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.12.0 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect github.com/cockroachdb/pebble v1.1.5 // indirect github.com/cockroachdb/redact v1.1.6 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.17.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.4 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect github.com/creachadair/atomicfile v0.3.3 // indirect github.com/creachadair/tomledit v0.0.26 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.13.4 // indirect github.com/danieljoos/wincred v1.2.2 // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/desertbit/timer v1.0.1 // indirect github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/cli v28.4.0+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v28.4.0+incompatible // indirect github.com/docker/docker-credential-helpers v0.9.3 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/emicklei/dot v1.6.2 // indirect github.com/ethereum/go-ethereum v1.16.8 // indirect github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.17.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/firefart/nonamedreturns v1.0.5 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.11 // indirect github.com/getsentry/sentry-go v0.36.2 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/ghostiam/protogetter v0.3.6 // indirect github.com/go-chi/chi/v5 v5.2.3 // indirect github.com/go-critic/go-critic v0.11.4 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.28.0 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect github.com/go-toolsmith/astequal v1.2.0 // indirect github.com/go-toolsmith/astfmt v1.1.0 // indirect github.com/go-toolsmith/astp v1.1.0 // indirect github.com/go-toolsmith/strparse v1.1.0 // indirect github.com/go-toolsmith/typep v1.1.0 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.5 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.5 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/golang/snappy v1.0.0 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect github.com/golangci/golangci-lint v1.59.1 // indirect github.com/golangci/misspell v0.6.0 // indirect github.com/golangci/modinfo v0.3.4 // indirect github.com/golangci/plugin-module-register v0.1.1 // indirect github.com/golangci/revgrep v0.5.3 // indirect github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.26.1 // indirect github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-containerregistry v0.20.6 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.5 // indirect github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.9 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-plugin v1.6.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.2.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/holiman/uint256 v1.3.2 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/hyperledger/aries-framework-go v0.3.2 // indirect github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230427134832-0c9969493bd3 // indirect github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230427134832-0c9969493bd3 // indirect github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230501135648-a9a7ad029347 // indirect github.com/hyperledger/aries-framework-go/spi v0.0.0-20230427134832-0c9969493bd3 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jdx/go-netrc v1.0.0 // indirect github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jjti/go-spancheck v0.6.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect github.com/kilic/bls12-381 v0.1.1-0.20210503002446-7b7597926c69 // indirect github.com/kisielk/errcheck v1.7.0 // indirect github.com/kkHAIKE/contextcheck v1.1.5 // indirect github.com/klauspost/compress v1.18.1 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect github.com/lasiar/canonicalheader v1.1.1 // indirect github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/leonklingele/grouper v1.1.2 // indirect github.com/lestrrat-go/blackmagic v1.0.4 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect github.com/lestrrat-go/httprc v1.0.6 // indirect github.com/lestrrat-go/iter v1.0.2 // indirect github.com/lestrrat-go/option v1.0.1 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.10.3 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/macabu/inamedparam v0.1.3 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/maratori/testableexamples v1.0.0 // indirect github.com/maratori/testpackage v1.1.1 // indirect github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mgechev/revive v1.3.7 // indirect github.com/minio/highwayhash v1.0.3 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.2 // indirect github.com/moricho/tparallel v0.3.1 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect github.com/multiformats/go-multibase v0.2.0 // indirect github.com/multiformats/go-multicodec v0.10.0 // indirect github.com/multiformats/go-varint v0.1.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect github.com/nunnatsa/ginkgolinter v0.16.2 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onsi/ginkgo/v2 v2.22.1 // indirect github.com/onsi/gomega v1.36.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/opencontainers/runc v1.2.8 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/piprate/json-gold v0.7.0 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.5.2 // indirect github.com/pquerna/cachecontrol v0.2.0 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.67.2 // indirect github.com/prometheus/procfs v0.19.2 // indirect github.com/quasilyte/go-ruleguard v0.4.2 // indirect github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/quic-go/qpack v0.6.0 // indirect github.com/quic-go/quic-go v0.57.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.11.1 // indirect github.com/rs/zerolog v1.33.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryancurrah/gomodguard v1.3.2 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.26.0 // indirect github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 // indirect github.com/segmentio/asm v1.2.1 // indirect github.com/segmentio/encoding v0.5.3 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect github.com/sivchari/tenv v1.7.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/sourcenetwork/zanzi v0.3.1-0.20251104182341-4b1bd0f7be5a // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tetafro/godot v1.4.16 // indirect github.com/tetratelabs/wazero v1.9.0 // indirect github.com/tidwall/btree v1.7.0 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/timonwong/loggercheck v0.9.4 // indirect github.com/tomarrell/wrapcheck/v2 v2.8.3 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ulikunitz/xz v0.5.15 // indirect github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.1.1 // indirect github.com/uudashr/gocognit v1.1.2 // indirect github.com/vbatts/tar-split v0.12.1 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.3.0 // indirect github.com/ykadowak/zerologlint v0.1.5 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect gitlab.com/bosi/decorder v0.4.2 // indirect go-simpler.org/musttag v0.12.2 // indirect go-simpler.org/sloglint v0.7.1 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.lsp.dev/jsonrpc2 v0.10.0 // indirect go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 // indirect go.lsp.dev/protocol v0.12.0 // indirect go.lsp.dev/uri v0.3.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/arch v0.21.0 // indirect golang.org/x/crypto v0.45.0 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect golang.org/x/mod v0.29.0 // indirect golang.org/x/net v0.47.0 // indirect golang.org/x/oauth2 v0.32.0 // indirect golang.org/x/sync v0.18.0 // indirect golang.org/x/sys v0.38.0 // indirect golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect golang.org/x/term v0.37.0 // indirect golang.org/x/text v0.31.0 // indirect golang.org/x/time v0.12.0 // indirect google.golang.org/api v0.186.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.4.7 // indirect k8s.io/apimachinery v0.34.1 // indirect mvdan.cc/gofumpt v0.6.0 // indirect mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect nhooyr.io/websocket v1.8.17 // indirect pgregory.net/rapid v1.1.0 // indirect pluginrpc.com/pluginrpc v0.5.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) tool ( github.com/bufbuild/buf/cmd/buf github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar github.com/cosmos/gogoproto/protoc-gen-gocosmos github.com/cosmos/gogoproto/protoc-gen-gogo github.com/golangci/golangci-lint/cmd/golangci-lint github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 golang.org/x/tools/cmd/goimports google.golang.org/grpc/cmd/protoc-gen-go-grpc google.golang.org/protobuf/cmd/protoc-gen-go ) ================================================ FILE: go.sum ================================================ 4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= 4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= 4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= 4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.9-20250718181942-e35f9b667443.1 h1:HiLfreYRsqycF5QDlsnvSQOnl4tvhBoROl8+DkbaphI= buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.9-20250718181942-e35f9b667443.1/go.mod h1:WSxC6zKCpqVRcGZCpOgVwkATp9XBIleoAdSAnkq7dhw= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1 h1:31on4W/yPcV4nZHL4+UCiCvLPsMqe/vJcNg8Rci0scc= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1/go.mod h1:fUl8CEN/6ZAMk6bP8ahBJPUJw7rbp+j4x+wCcYi2IG4= buf.build/gen/go/bufbuild/registry/connectrpc/go v1.18.1-20250903170917-c4be0f57e197.1 h1:isqFuFhL6JRd7+KF/vivWqZGJMCaTuAccZIWwneCcqE= buf.build/gen/go/bufbuild/registry/connectrpc/go v1.18.1-20250903170917-c4be0f57e197.1/go.mod h1:eGjb9P6sl1irS46NKyXnxkyozT2aWs3BF4tbYWQuCsw= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.9-20250903170917-c4be0f57e197.1 h1:q+tABqEH2Cpcp8fO9TBZlvKok7zorHGy+/UyywXaAKo= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.9-20250903170917-c4be0f57e197.1/go.mod h1:Y3m+VD8IH6JTgnFYggPHvFul/ry6dL3QDliy8xH7610= buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.8-20241007202033-cf42259fcbfc.1 h1:KuP+b+in6LGh2ukof5KgDCD8hPXotEq6EVOo13Wg1pE= buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.8-20241007202033-cf42259fcbfc.1/go.mod h1:dV1Kz6zdmyXt7QWm5OXby44OFpyLemllUDBUG5HMLio= buf.build/go/app v0.1.0 h1:nlqD/h0rhIN73ZoiDElprrPiO2N6JV+RmNK34K29Ihg= buf.build/go/app v0.1.0/go.mod h1:0XVOYemubVbxNXVY0DnsVgWeGkcbbAvjDa1fmhBC+Wo= buf.build/go/bufplugin v0.9.0 h1:ktZJNP3If7ldcWVqh46XKeiYJVPxHQxCfjzVQDzZ/lo= buf.build/go/bufplugin v0.9.0/go.mod h1:Z0CxA3sKQ6EPz/Os4kJJneeRO6CjPeidtP1ABh5jPPY= buf.build/go/interrupt v1.1.0 h1:olBuhgv9Sav4/9pkSLoxgiOsZDgM5VhRhvRpn3DL0lE= buf.build/go/interrupt v1.1.0/go.mod h1:ql56nXPG1oHlvZa6efNC7SKAQ/tUjS6z0mhJl0gyeRM= buf.build/go/protovalidate v1.0.0 h1:IAG1etULddAy93fiBsFVhpj7es5zL53AfB/79CVGtyY= buf.build/go/protovalidate v1.0.0/go.mod h1:KQmEUrcQuC99hAw+juzOEAmILScQiKBP1Oc36vvCLW8= buf.build/go/protoyaml v0.6.0 h1:Nzz1lvcXF8YgNZXk+voPPwdU8FjDPTUV4ndNTXN0n2w= buf.build/go/protoyaml v0.6.0/go.mod h1:RgUOsBu/GYKLDSIRgQXniXbNgFlGEZnQpRAUdLAFV2Q= buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= buf.build/go/standard v0.1.0 h1:g98T9IyvAl0vS3Pq8iVk6Cvj2ZiFvoUJRtfyGa0120U= buf.build/go/standard v0.1.0/go.mod h1:PiqpHz/7ZFq+kqvYhc/SK3lxFIB9N/aiH2CFC2JHIQg= cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= cloud.google.com/go/storage v1.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0= cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= connectrpc.com/otelconnect v0.8.0 h1:a4qrN4H8aEE2jAoCxheZYYfEjXMgVPyL9OzPQLBEFXU= connectrpc.com/otelconnect v0.8.0/go.mod h1:AEkVLjCPXra+ObGFCOClcJkNjS7zPaQSqvO0lCyjfZc= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.3 h1:+TTuH0DwQYsUq2JFAl3fDZzKq5gQG7nt3dAattkjFDU= cosmossdk.io/client/v2 v2.0.0-beta.3/go.mod h1:CZcL41HpJPOOayTCO28j8weNBQprG+SRiKX39votypo= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc= cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw= cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= cosmossdk.io/tools/confix v0.1.2 h1:2hoM1oFCNisd0ltSAAZw2i4ponARPmlhuNu3yy0VwI4= cosmossdk.io/tools/confix v0.1.2/go.mod h1:7XfcbK9sC/KNgVGxgLM0BrFbVcR/+6Dg7MFfpx7duYo= cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= cosmossdk.io/x/upgrade v0.1.4/go.mod h1:9v0Aj+fs97O+Ztw+tG3/tp5JSlrmT7IcFhAebQHmOPo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM= github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns= github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ= github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ= github.com/Antonboom/testifylint v1.3.1 h1:Uam4q1Q+2b6H7gvk9RQFw6jyVDdpzIirFOOrbs14eG4= github.com/Antonboom/testifylint v1.3.1/go.mod h1:NV0hTlteCkViPW9mSR4wEMfwp+Hs1T3dY60bkvSfhpM= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Crocmagnon/fatcontext v0.2.2 h1:OrFlsDdOj9hW/oBEJBNSuH7QWf+E9WPVHw+x52bXVbk= github.com/Crocmagnon/fatcontext v0.2.2/go.mod h1:WSn/c/+MMNiD8Pri0ahRj0o9jVpeowzavOQplBJw6u0= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0/go.mod h1:n/vLeA7V+QY84iYAGwMkkUUp9ooeuftMEvaDrSVch+Q= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0/go.mod h1:Nl76DrGNJTA1KJ0LePKBw/vznBX1EHbAZX8mwjR82nI= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NathanBaulch/protoc-gen-cobra v1.2.1 h1:BOqX9glwicbqDJDGndMnhHhx8psGTSjGdZzRDY1a7A8= github.com/NathanBaulch/protoc-gen-cobra v1.2.1/go.mod h1:ZLPLEPQgV3jP3a7IEp+xxYPk8tF4lhY9ViV0hn6K3iA= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 h1:1zYrtlhrZ6/b6SAjLSfKzWtdgqK0U+HtH/VcBWh1BaU= github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6/go.mod h1:ioLG6R+5bUSO1oeGSDxOV3FADARuMoytZCSX6MEMQkI= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/TBD54566975/ssi-sdk v0.0.4-alpha h1:GbZG0S3xeaWQi2suWw2VjGRhM/S2RrIsfiubxSHlViE= github.com/TBD54566975/ssi-sdk v0.0.4-alpha/go.mod h1:O4iANflxGCX0NbjHOhthq0X0il2ZYNMYlUnjEa0rsC0= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= github.com/adlio/schema v1.3.6/go.mod h1:qkxwLgPBd1FgLRHYVCmQT/rrBr3JH38J9LjmVzWNudg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.10/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bombsimon/wsl/v4 v4.2.1 h1:Cxg6u+XDWff75SIFFmNsqnIOgob+Q9hG6y/ioKbRFiM= github.com/bombsimon/wsl/v4 v4.2.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= github.com/btcsuite/btcd/btcec/v2 v2.3.6 h1:IzlsEr9olcSRKB/n7c4351F3xHKxS2lma+1UFGCYd4E= github.com/btcsuite/btcd/btcec/v2 v2.3.6/go.mod h1:m22FrOAiuxl/tht9wIqAoGHcbnCCaPWyauO8y2LGGtQ= github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/buf v1.3.1/go.mod h1:CTRUb23N+zlm1U8ZIBKz0Sqluk++qQloB2i/MZNZHIs= github.com/bufbuild/buf v1.57.1 h1:ti/wP7PXZb5vT32gwRnFZ/WX/WJ/Do5qNHV0PifazKE= github.com/bufbuild/buf v1.57.1/go.mod h1:8cygE3L/J84dtgQAaquZKpXLo9MjAn+dSdFuXvbUNYg= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 h1:V1xulAoqLqVg44rY97xOR+mQpD2N+GzhMHVwJ030WEU= github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= github.com/butuzov/mirror v1.2.0/go.mod h1:DqZZDtzm42wIAIyHXeN8W/qb1EPlb9Qn/if9icBOpdQ= github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= github.com/bytedance/sonic v1.14.1 h1:FBMC0zVz5XUmE4z9wF4Jey0An5FueFvOsTKKKtwIl7w= github.com/bytedance/sonic v1.14.1/go.mod h1:gi6uhQLMbTdeP0muCnrjHLeCUPyb70ujhnNlhOylAFc= github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8Nv4fUjc/v1/8tHFqhuOJXnRub0dTfuAQktU= github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9MTI= github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.4.0 h1:BV7h5MgrktNzytKmWjpOtdYrf0lkkbF8YMlBGPhJQrY= github.com/cloudflare/circl v1.4.0/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.12.0 h1:d7oCs6vuIMUQRVbi6jWWWEJZahLCfJpnJSVobd1/sUo= github.com/cockroachdb/errors v1.12.0/go.mod h1:SvzfYNNBshAVbZ8wzNc/UPK3w1vf0dKDUP41ucAIf7g= github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 h1:pU88SPhIFid6/k0egdR5V6eALQYq2qbSmukrkgIh/0A= github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 h1:ASDL+UJcILMqgNeV5jiqR4j+sTuvQNHdf2chuKj1M5k= github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506/go.mod h1:Mw7HqKr2kdtu6aYGn3tPmAftiP3QPX63LdK/zcariIo= github.com/cockroachdb/pebble v1.1.5 h1:5AAWCBWbat0uE0blr8qzufZP5tBjkRyy/jWe1QWLnvw= github.com/cockroachdb/pebble v1.1.5/go.mod h1:17wO9el1YEigxkP/YtV8NtCivQDgoCyBg5c4VR/eOWo= github.com/cockroachdb/redact v1.1.6 h1:zXJBwDZ84xJNlHl1rMyCojqyIxv+7YUpQiJLQ7n4314= github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb h1:3bCgBvB8PbJVMX1ouCcSIxvsqKPYM7gs72o0zC76n9g= github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/cometbft/cometbft v0.38.21 h1:qcIJSH9LiwU5s6ZgKR5eRbsLNucbubfraDs5bzgjtOI= github.com/cometbft/cometbft v0.38.21/go.mod h1:UCu8dlHqvkAsmAFmWDRWNZJPlu6ya2fTWZlDrWsivwo= github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/stargz-snapshotter/estargz v0.17.0 h1:+TyQIsR/zSFI1Rm31EQBwpAA1ovYgIKHy7kctL3sLcE= github.com/containerd/stargz-snapshotter/estargz v0.17.0/go.mod h1:s06tWAiJcXQo9/8AReBCIo/QxcXFZ2n4qfsRnpl71SM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOPY= github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/cosmos-sdk v0.50.14 h1:G8CtGHFWbExa+ZpVOVAb4kFmko/R30igsYOwyzRMtgY= github.com/cosmos/cosmos-sdk v0.50.14/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67FS1nnMrQIjO2daw= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.7.2 h1:5G25McIraOC0mRFv9TVO139Uh3OklV2hczr13KKVHCA= github.com/cosmos/gogoproto v1.7.2/go.mod h1:8S7w53P1Y1cHwND64o0BnArT6RmdgIvsBuco6uTllsk= github.com/cosmos/iavl v1.2.4 h1:IHUrG8dkyueKEY72y92jajrizbkZKPZbMmG14QzsEkw= github.com/cosmos/iavl v1.2.4/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= github.com/cosmos/ibc-go/v10 v10.1.1 h1:Mtl0Ydr9dVdOrPqmxCAG49RmX2/VDYeKYdwv3G2y0g8= github.com/cosmos/ibc-go/v10 v10.1.1/go.mod h1:0pJCkgEYRMygqkvUcwy6Kuf5wPfIsObRoxFU2DJEil4= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/ledger-cosmos-go v0.14.0 h1:WfCHricT3rPbkPSVKRH+L4fQGKYHuGOK9Edpel8TYpE= github.com/cosmos/ledger-cosmos-go v0.14.0/go.mod h1:E07xCWSBl3mTGofZ2QnL4cIUzMbbGVyik84QYKbX3RA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creachadair/atomicfile v0.2.6/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= github.com/creachadair/atomicfile v0.3.3 h1:yJlDq8qk9QmD/6ol+jq1X4bcoLNVdYq95+owOnauziE= github.com/creachadair/atomicfile v0.3.3/go.mod h1:X1r9P4wigJlGkYJO1HXZREdkVn+b1yHrsBBMLSj7tak= github.com/creachadair/command v0.0.0-20220426235536-a748effdf6a1/go.mod h1:bAM+qFQb/KwWyCc9MLC4U1jvn3XyakqP5QRkds5T6cY= github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce h1:BFjvg2Oq88/2DOcUFu1ScIwKUn7KJYYvLr6AeuCJD54= github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce/go.mod h1:okn1ft6DY+qjPmnvYynyq7ufIQKJ2x2qwOCJZecei1k= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= github.com/creachadair/tomledit v0.0.22/go.mod h1:cIu/4x5L855oSRejIqr+WRFh+mv9g4fWLiUFaApYn/Y= github.com/creachadair/tomledit v0.0.26 h1:MoDdgHIHZ5PctBVsAZDjxdxreWUEa9ObPKTRkk5PPwA= github.com/creachadair/tomledit v0.0.26/go.mod h1:SJi1OxKpMyR141tq1lzsbPtIg3j8TeVPM/ZftfieD7o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/daixiang0/gci v0.4.2/go.mod h1:d0f+IJhr9loBtIq+ebwhRoTt1LGbPH96ih8bKlsRT9E= github.com/daixiang0/gci v0.13.4 h1:61UGkmpoAcxHM2hhNkZEf5SzwQtWJXTSws7jaPyqwlw= github.com/daixiang0/gci v0.13.4/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo= github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/cli v20.10.14+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v28.4.0+incompatible h1:RBcf3Kjw2pMtwui5V0DIMdyeab8glEw5QY0UUU4C9kY= github.com/docker/cli v28.4.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v28.4.0+incompatible h1:KVC7bz5zJY/4AZe/78BIvCnPsLaC9T/zh72xnlrTTOk= github.com/docker/docker v28.4.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8= github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= github.com/ethereum/go-ethereum v1.16.8 h1:LLLfkZWijhR5m6yrAXbdlTeXoqontH+Ga2f9igY7law= github.com/ethereum/go-ethereum v1.16.8/go.mod h1:Fs6QebQbavneQTYcA39PEKv2+zIjX7rPUZ14DER46wk= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA= github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7QKH5R5BhnO6xJhw= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/gabriel-vasile/mimetype v1.4.11 h1:AQvxbp830wPhHTqc1u7nzoLT+ZFxGY7emj5DR5DYFik= github.com/gabriel-vasile/mimetype v1.4.11/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/getsentry/sentry-go v0.36.2 h1:uhuxRPTrUy0dnSzTd0LrYXlBYygLkKY0hhlG5LXarzM= github.com/getsentry/sentry-go v0.36.2/go.mod h1:p5Im24mJBeruET8Q4bbcMfCQ+F+Iadc4L48tB1apo2c= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/go-chi/chi/v5 v5.2.3 h1:WQIt9uxdsAbgIYgid+BpYc+liqQZGMHRaUwp0JUcvdE= github.com/go-chi/chi/v5 v5.2.3/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-jose/go-jose/v3 v3.0.4 h1:Wp5HA7bLQcKnf6YYao/4kpRpVMp/yf6+pJKV8WFSaNY= github.com/go-jose/go-jose/v3 v3.0.4/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688= github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= github.com/golangci/golangci-lint v1.47.0/go.mod h1:3TZhfF5KolbIkXYjUFvER6G9CoxzLEaafr/u/QI1S5A= github.com/golangci/golangci-lint v1.59.1 h1:CRRLu1JbhK5avLABFJ/OHVSQ0Ie5c4ulsOId1h3TTks= github.com/golangci/golangci-lint v1.59.1/go.mod h1:jX5Oif4C7P0j9++YB2MMJmoNrb01NJ8ITqKWNLewThg= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA= github.com/golangci/modinfo v0.3.4/go.mod h1:wytF1M5xl9u0ij8YSvhkEVPP3M5Mc7XLl1pxH3B2aUM= github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= github.com/golangci/revgrep v0.5.3 h1:3tL7c1XBMtWHHqVpS5ChmiAAoe4PF/d5+ULzV9sLAzs= github.com/golangci/revgrep v0.5.3/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs= github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-containerregistry v0.20.6 h1:cvWX87UxxLgaH76b4hIvya6Dzz9qHB31qAwjAohdSTU= github.com/google/go-containerregistry v0.20.6/go.mod h1:T0x8MuoAoKX/873bkeSfLD2FAkwCDf9/HZgsFJ02E2Y= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.9 h1:G9gcjrDixz7glqJ+ll5IWvggSBR+R0B54DSRt4qfdC4= github.com/hashicorp/go-getter v1.7.9/go.mod h1:dyFCmT1AQkDfOIt9NH8pw9XBDqNrIKJT5ylbpi7zPNE= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/hyperledger/aries-framework-go v0.3.2 h1:GsSUaSEW82cr5X8b3Qf90GAi37kmTKHqpPJLhar13X8= github.com/hyperledger/aries-framework-go v0.3.2/go.mod h1:SorUysWEBw+uyXhY5RAtg2iyNkWTIIPM8+Slkt1Spno= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230427134832-0c9969493bd3 h1:PCbDSujjQ6oTEnAHgtThNmbS7SPAYEDBlKOnZFE+Ujw= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230427134832-0c9969493bd3/go.mod h1:aEk0vHBmZsAdDfXaI12Kg5ipZGiB3qNqgbPt/e/Hm2s= github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230427134832-0c9969493bd3 h1:x5qFQraTX86z9GCwF28IxfnPm6QH5YgHaX+4x97Jwvw= github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230427134832-0c9969493bd3/go.mod h1:CvYs4l8X2NrrF93weLOu5RTOIJeVdoZITtjEflyuTyM= github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230501135648-a9a7ad029347 h1:oPGUCpmnm7yxsVllcMQnHF3uc3hy4jfrSCh7nvzXA00= github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230501135648-a9a7ad029347/go.mod h1:nF8fHsYY+GZl74AFAQaKAhYWOOSaLVzW/TZ0Sq/6axI= github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20230427134832-0c9969493bd3 h1:JGYA9l5zTlvsvfnXT9hYPpCokAjmVKX0/r7njba7OX4= github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20230427134832-0c9969493bd3/go.mod h1:aSG2dWjYVzu2PVBtOqsYghaChA5+UUXnBbL+MfVceYQ= github.com/hyperledger/aries-framework-go/spi v0.0.0-20230427134832-0c9969493bd3 h1:ytWmOQZIYQfVJ4msFvrqlp6d+ZLhT43wS8rgE2m+J1A= github.com/hyperledger/aries-framework-go/spi v0.0.0-20230427134832-0c9969493bd3/go.mod h1:oryUyWb23l/a3tAP9KW+GBbfcfqp9tZD4y5hSkFrkqI= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ignite/cli/v28 v28.6.1 h1:PmlZ7ulD/Y9yw3QZ2EN0joMBEyGIrJbEyVSxNywEeMI= github.com/ignite/cli/v28 v28.6.1/go.mod h1:HzT0fYcTX1q8rbgm/OTxTwHl0rsJSOxJ9O3urSNu/6Y= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.11.1-0.20220213155251-0c2aedc66cf4/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jhump/protoreflect/v2 v2.0.0-beta.2 h1:qZU+rEZUOYTz1Bnhi3xbwn+VxdXkLVeEpAeZzVXLY88= github.com/jhump/protoreflect/v2 v2.0.0-beta.2/go.mod h1:4tnOYkB/mq7QTyS3YKtVtNrJv4Psqout8HA1U+hZtgM= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jjti/go-spancheck v0.6.1 h1:ZK/wE5Kyi1VX3PJpUO2oEgeoI4FWOUm7Shb2Gbv5obI= github.com/jjti/go-spancheck v0.6.1/go.mod h1:vF1QkOO159prdo6mHRxak2CpzDpHAfKiPUDP/NeRnX8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym7fCjIP8RPos= github.com/karamaru-alpha/copyloopvar v1.1.0/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kilic/bls12-381 v0.1.1-0.20210503002446-7b7597926c69 h1:kMJlf8z8wUcpyI+FQJIdGjAhfTww1y0AbQEv86bpVQI= github.com/kilic/bls12-381 v0.1.1-0.20210503002446-7b7597926c69/go.mod h1:tlkavyke+Ac7h8R3gZIjI5LKBcvMlSWnXNMgT3vZXo8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.6.1/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co= github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/lasiar/canonicalheader v1.1.1 h1:wC+dY9ZfiqiPwAexUApFush/csSPXeIi4QqyxXmng8I= github.com/lasiar/canonicalheader v1.1.1/go.mod h1:cXkb3Dlk6XXy+8MVQnF23CYKWlyA7kfQhSw2CcZtZb0= github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= github.com/lestrrat-go/blackmagic v1.0.4 h1:IwQibdnf8l2KoO+qC3uT4OaTWsW7tuRQXy9TRN9QanA= github.com/lestrrat-go/blackmagic v1.0.4/go.mod h1:6AWFyKNNj0zEXQYfTMPfZrAXUWUfTIZ5ECEUEJaijtw= github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= github.com/lestrrat-go/httprc v1.0.6 h1:qgmgIRhpvBqexMJjA/PmwSvhNk679oqD1RbovdCGW8k= github.com/lestrrat-go/httprc v1.0.6/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo= github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= github.com/lestrrat-go/jwx/v2 v2.1.6 h1:hxM1gfDILk/l5ylers6BX/Eq1m/pnxe9NBwW6lVfecA= github.com/lestrrat-go/jwx/v2 v2.1.6/go.mod h1:Y722kU5r/8mV7fYDifjug0r8FK8mZdw0K0GpJw/l8pU= github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.10.3 h1:0laII9AQ6kFxo5SjhdTfSh9EgF20piD6TMHK6YuDm+4= github.com/linxGnu/grocksdb v1.10.3/go.mod h1:OLQKZwiKwaJiAVCsOzWKvwiLwfZ5Vz8Md5TYR7t7pM8= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= github.com/maratori/testpackage v1.1.0/go.mod h1:PeAhzU8qkCwdGEMTEupsHJNlQu2gZopMC6RjbhmHeDc= github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mroth/weightedrand v0.4.1/go.mod h1:3p2SIcC8al1YMzGhAIoXD+r9olo/g/cdJgAD905gyNE= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multicodec v0.10.0 h1:UpP223cig/Cx8J76jWt91njpK3GTAO1w02sdcjZDSuc= github.com/multiformats/go-multicodec v0.10.0/go.mod h1:wg88pM+s2kZJEQfRCKBNU+g32F5aWBEjyFHXvZLTcLI= github.com/multiformats/go-varint v0.1.0 h1:i2wqFp4sdl3IcIxfAonHQV9qU5OsZ4Ts9IOoETFs5dI= github.com/multiformats/go-varint v0.1.0/go.mod h1:5KVAVXegtfmNQQm/lCY+ATvDzvJJhSkUlGQV9wgObdI= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b/go.mod h1:TLJifjWF6eotcfzDjKZsDqWJ+73Uvj/N85MvVyrvynM= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM= github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runc v1.2.8 h1:RnEICeDReapbZ5lZEgHvj7E9Q3Eex9toYmaGBsbvU5Q= github.com/opencontainers/runc v1.2.8/go.mod h1:cC0YkmZcuvr+rtBZ6T7NBoVbMGNAdLa/21vIElJDOzI= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/piprate/json-gold v0.7.0 h1:bEMirgA5y8Z2loTQfxyIFfY+EflxH1CTP6r/KIlcJNw= github.com/piprate/json-gold v0.7.0/go.mod h1:RVhE35veDX19r5gfUAR+IYHkAUuPwJO8Ie/qVeFaIzw= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= github.com/polyfloyd/go-errorlint v1.5.2 h1:SJhVik3Umsjh7mte1vE0fVZ5T1gznasQG3PV7U5xFdA= github.com/polyfloyd/go-errorlint v1.5.2/go.mod h1:sH1QC1pxxi0fFecsVIzBmxtrgd9IF/SkJpA6wqyKAJs= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pquerna/cachecontrol v0.2.0 h1:vBXSNuE5MYP9IJ5kjsdo8uq+w41jSPgvba2DEnkRx9k= github.com/pquerna/cachecontrol v0.2.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.67.2 h1:PcBAckGFTIHt2+L3I33uNRTlKTplNzFctXcWhPyAEN8= github.com/prometheus/common v0.67.2/go.mod h1:63W3KZb1JOKgcjlIr64WW/LvFGAqKPj0atm+knVGEko= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.21/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= github.com/quic-go/quic-go v0.57.0 h1:AsSSrrMs4qI/hLrKlTH/TGQeTMY0ib1pAOX7vA3AdqE= github.com/quic-go/quic-go v0.57.0/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= github.com/ryancurrah/gomodguard v1.3.2 h1:CuG27ulzEB1Gu5Dk5gP8PFxSOZ3ptSdP5iI/3IXxM18= github.com/ryancurrah/gomodguard v1.3.2/go.mod h1:LqdemiFomEjcxOqirbQCb3JFvSxH2JUYMerTFd3sF2o= github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk= github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.26.0 h1:LONR2hNVKxRmzIrZR0PhSF3mhCAzvnr+DcUiHgREfXE= github.com/sashamelentyev/usestdlibvars v1.26.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/securego/gosec/v2 v2.12.0/go.mod h1:iTpT+eKTw59bSgklBHlSnH5O2tNygHMDxfvMubA4i7I= github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 h1:rnO6Zp1YMQwv8AyxzuwsVohljJgp4L0ZqiCgtACsPsc= github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9/go.mod h1:dg7lPlu/xK/Ut9SedURCoZbVCR4yC7fM65DtH9/CDHs= github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/segmentio/encoding v0.5.3 h1:OjMgICtcSFuNvQCdwqMCv9Tg7lEOXGwm1J5RPQccx6w= github.com/segmentio/encoding v0.5.3/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= github.com/sivchari/nosnakecase v1.5.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.6.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/skip-mev/block-sdk/v2 v2.1.5 h1:3uoYG2ayP253wiohBPKdD3LrkJGd1Kgw914mmI1ZyOI= github.com/skip-mev/block-sdk/v2 v2.1.5/go.mod h1:E8SvITZUdxkes3gI3+kgESZL+NLffkcLKnowUgYTOf4= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/sourcenetwork/acp_core v0.8.1 h1:xCbFGs9HqQTG/LjfNa7aoD8dc6XhIYLgRdZCQrRcML0= github.com/sourcenetwork/acp_core v0.8.1/go.mod h1:vmxU/mBphMaU2NjKYEFJLSpk5lbRdWDqgsJZNd+WfZ0= github.com/sourcenetwork/corekv v0.0.0-20250122161438-c4cec0f30dbe h1:xML1pxD5zf14MAqjCkW584ri6yjp6go+ud83wpMzWtM= github.com/sourcenetwork/corekv v0.0.0-20250122161438-c4cec0f30dbe/go.mod h1:hap4+bqs9JcHPcAMALLj2Vu+QDxmHwYBlRyv8mlwsw4= github.com/sourcenetwork/raccoondb v0.2.1-0.20240722161350-d4a78b691ec8 h1:d0jNogSYqMt+dC05tnd+x7lmzEcBHpKoIU5woZSSHFM= github.com/sourcenetwork/raccoondb v0.2.1-0.20240722161350-d4a78b691ec8/go.mod h1:/WJdZWouiY199DypsN0xaP5PF0zy3rka3FxH5Y8o9Bc= github.com/sourcenetwork/raccoondb/v2 v2.0.0 h1:Gb0SjsZUbrbkHCEg7PyyNs0+2IzPxjE/BkEQnlu1nfA= github.com/sourcenetwork/raccoondb/v2 v2.0.0/go.mod h1:tPKAWHUgYcSoXNMt01iWJ+Y51AQYc2knY93IjmmbejY= github.com/sourcenetwork/zanzi v0.3.1-0.20251104182341-4b1bd0f7be5a h1:TlnRmk1v4+nIKGUdzMht4qnrf8AxCUAvpxSIqJ2CX94= github.com/sourcenetwork/zanzi v0.3.1-0.20251104182341-4b1bd0f7be5a/go.mod h1:j7QmuHK+zfA0JO6FliJzQHijVNSXDuQy8hUzFC5pucA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tendermint v0.35.9 h1:yUEgfkcNHWSidsU8wHjRDbYPVijV4cHxCclKVITGRAQ= github.com/tendermint/tendermint v0.35.9/go.mod h1:FYvzUDkmVv1awfFl9V85yl5NKyjxz6XLZGX132+ftAY= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0= github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I= github.com/tetratelabs/wazero v1.9.0/go.mod h1:TSbcXCfFP0L2FGkRPxHphadXPjo1T6W+CseNNY7EkjM= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3bRDFASUs= github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo= github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= github.com/vektra/mockery/v2 v2.14.0/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= gitlab.com/bosi/decorder v0.2.2/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= go-simpler.org/sloglint v0.7.1 h1:qlGLiqHbN5islOxjeLXoPtUdZXb669RW+BDQ+xOSNoU= go-simpler.org/sloglint v0.7.1/go.mod h1:OlaVDRh/FKKd4X4sIMbsz8st97vomydceL146Fthh/c= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.lsp.dev/jsonrpc2 v0.10.0 h1:Pr/YcXJoEOTMc/b6OTmcR1DPJ3mSWl/SWiU1Cct6VmI= go.lsp.dev/jsonrpc2 v0.10.0/go.mod h1:fmEzIdXPi/rf6d4uFcayi8HpFP1nBF99ERP1htC72Ac= go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 h1:hCzQgh6UcwbKgNSRurYWSqh8MufqRRPODRBblutn4TE= go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2/go.mod h1:gtSHRuYfbCT0qnbLnovpie/WEmqyJ7T4n6VXiFMBtcw= go.lsp.dev/protocol v0.12.0 h1:tNprUI9klQW5FAFVM4Sa+AbPFuVQByWhP1ttNUAjIWg= go.lsp.dev/protocol v0.12.0/go.mod h1:Qb11/HgZQ72qQbeyPfJbu3hZBH23s1sr4st8czGeDMQ= go.lsp.dev/uri v0.3.0 h1:KcZJmh6nFIBeJzTugn5JTU6OOyG0lDOo3R9KwTxTYbo= go.lsp.dev/uri v0.3.0/go.mod h1:P5sbO1IQR+qySTWOCnhnK7phBx+W3zbLqSMDJNTw88I= go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0 h1:wpMfgF8E1rkrT1Z6meFh1NDtownE9Ii3n3X2GJYjsaU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0/go.mod h1:wAy0T/dUbs468uOlkT31xjvqQgEVXv58BRFWEgn5v/0= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.8.0 h1:fRAZQDcAFHySxpJ1TwlA1cJ4tvcrw7nXl9xWWC8N5CE= go.opentelemetry.io/proto/otlp v1.8.0/go.mod h1:tIeYOeNBU4cvmPqpaji1P+KbB4Oloai8wN4rWzRrFF0= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/arch v0.21.0 h1:iTC9o7+wP6cPWpDWkivCvQFGAHDQ59SrSxsLPcnkArw= golang.org/x/arch v0.21.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 h1:mgKeJMpvi0yx/sU5GsxQ7p6s2wtOnGAHZWCHUM4KGzY= golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70= golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 h1:LvzTn0GQhWuvKH/kVRS3R3bVAsdQWI7hvfLHGgh9+lU= golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190228203856-589c23e65e65/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.11-0.20220513221640-090b14e8501f/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= google.golang.org/genproto/googleapis/api v0.0.0-20251103181224-f26f9409b101 h1:vk5TfqZHNn0obhPIYeS+cxIFKFQgser/M2jnI+9c6MM= google.golang.org/genproto/googleapis/api v0.0.0-20251103181224-f26f9409b101/go.mod h1:E17fc4PDhkr22dE3RgnH2hEubUaky6ZwW4VhANxyspg= google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 h1:tRPGkdGHuewF4UisLzzHHr1spKw92qLM98nIzxbC0wY= google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= honnef.co/go/tools v0.3.2/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nhooyr.io/websocket v1.8.17 h1:KEVeLJkUywCKVsnLIDlD/5gtayKp8VoCkksHCGGfT9Y= nhooyr.io/websocket v1.8.17/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= pgregory.net/rapid v0.4.8/go.mod h1:Z5PbWqjvWR1I3UGjvboUuan4fe4ZYEYNLNQLExzCoUs= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= pluginrpc.com/pluginrpc v0.5.0 h1:tOQj2D35hOmvHyPu8e7ohW2/QvAnEtKscy2IJYWQ2yo= pluginrpc.com/pluginrpc v0.5.0/go.mod h1:UNWZ941hcVAoOZUn8YZsMmOZBzbUjQa3XMns8RQLp9o= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= ================================================ FILE: manual/acp/cmd_auth.md ================================================ # Policy Command Authentication In SourceHub, a Policy is defined alongside a set of relationships, which are used to derive authorization decisions for the Policy. Relationships in a Policy are mutate (created, deleted or updated) through a Policy Command. The command is created and sent by the Policy end users (actors) directly (as opposed to an administrator as is often the case in Access Control systems). In order to execute these commands, it's necessary to authenticate the entity sending them. As it is the end user crafting said commands, actor authentication may be completely isolated from SourceHub and Tx authentcation. Currently, there are 3 supported authentication schemes for Policy Commands: direct, signed command and Bearer. ## Direct TODO ## Signed TODO ## Bearer Bearer Authentication is done through a JWS. A JWS is a signed JSON object containing "claims", which contain data identifying the user. ACP Bearer JWSs are different from commonly used JWS in that they are self signed (as opposed to generated by party A and used by party B). The JWS MUST contain the following claims: `iss`, `exp`, `iat` and `authorized_account`, each claim will be detailed further on. All the aforementioned claims MUST be present in the JWS. ### Claims The `exp` (expires) and `isa` (issued at) claims are used as defined in the JWT RFC, a Unix time stamp (ie seconds since the epoch). The `iss` claim is as defined by the JWT RFC, it identifies the entity that issued the JWS through a string. This string MUST be the DID of the Actor issuing the JWS. The DID MUST resolve to a DID Document containing a Verification Method which is a Public Key. This public key is used to validate the JWS signature. The `authorized_account` claim MUST contain a valid SourceHub address (ie a bech32 encoded Cosmos Account with the `source` prefix). The address specified in this claim is used to limit which account can use the Bearer JWS. A Policy Cmd is only accepted and processed if it is submitted in a Tx signed by the SAME account as the one set in the claim. This is done to prevent malicious actors from extracting Bearer JWSs from the public ledger and impersonating an Actor. The following is an example of a acceptable Bearer JWS payload: ```json { "iss": "did:key:z6MkkHsQbp3tXECqmUJoCJwyuxSKn1BDF1RHzwDGg9tHbXKw", "authorized_account": "source12frvft2an4sjrdlvjhjunq9m7j0ygaev05crmh", "iat": 1718814750, "exp": 1718815650 } ``` ### JWS Signature and Serialization and Headers The JWS MUST be signed by a private key whose public key is resolvable through the did specified in the `iss` claim. The signed JWS MUST be serialized using the compact serialization format. Bearer JWSs serialized following the JSON Serialization format will be rejected. All JOSE Header specified in the Bearer JWS are ignored (eg `jku`, `jwk`, `kid`, `x5u`). The key used during validation is the one resolved from the issuer did. The following is an example of a valid Bearer JWS: ``` eyJhbGciOiJFZERTQSJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWtrSHNRYnAzdFhFQ3FtVUpvQ0p3eXV4U0tuMUJERjFSSHp3REdnOXRIYlhLdyIsImF1dGhvcml6ZWRfYWNjb3VudCI6InNvdXJjZTEyZnJ2ZnQyYW40c2pyZGx2amhqdW5xOW03ajB5Z2FldjA1Y3JtaCIsImlhdCI6MTcxODgxNDc1MCwiZXhwIjoxNzE4ODE1NjUwfQ.ZW0CLlDU2431FQrqNXxX-lI8aNnjTYPclj-QJVCc8Pqqs3vwqVxKPDSss9dTEcqLCrLxhlGr5kuIFblrhy8NDg ``` ### Usage Recommendation A Bearer JWS allows the holder with the `authorized_account` to issue *any* Policy Commands on behalf of the issuer for the lifespan of the token. As such, we recommend that SourceHub users use this method ONLY if they truly 100% trust the Account owner to act on their behalf. Furthermore, a short JWS validity (~15 mins) is still RECOMMENDED to minimize the risk if the `authorized_account` gets compromised. ### Notes for SourceHub developers The Bearer JWS uses the standard timestamping mechanisms defined in JWT (`iat` and `exp`) to ease user adoption. Note however that under no circumstance the validation must rely under the local time of the machine running sourcehub. The `Block Time` (available through the sdk ctx) MUST be used as the reference time in the system. Due to clock skew, this is necessary to maintain the deterministic execution of the blockchain. ================================================ FILE: manual/acp/readme.md ================================================ # ACP Module Manual ================================================ FILE: manual/faucet.md ================================================ # Faucet The SourceHub chain includes a faucet for requesting test funds. ## Setup Faucet account is initialized as part of the main setup script: ```bash ./scripts/genesis-setup.sh ``` The faucet account is created with 100m $OPEN using a mnemonic from `scripts/faucet-key.json`. ## API Endpoints ### Get Faucet Info ```bash curl http://localhost:1317/faucet/info ``` Returns faucet address, balance, and request count. ### Request Funds ```bash curl -X POST http://localhost:1317/faucet/request \ -H "Content-Type: application/json" \ -d '{ "address": "source1..." }' ``` Sends 1000000000uopen (i.e. 1,000 $OPEN) from the faucet to the specified address. ### Initialize Account ```bash curl -X POST http://localhost:1317/faucet/init-account \ -H "Content-Type: application/json" \ -d '{ "address": "source1..." }' ``` Initializes an account in the auth module by sending 1 uopen. This ensures the account exists on-chain. ### Grant Fee Allowance ```bash curl -X POST http://localhost:1317/faucet/grant-allowance \ -H "Content-Type: application/json" \ -d '{ "address": "source1...", "amount_limit": { "denom": "uopen", "amount": "10000000000000" }, "expiration": "2025-12-31T23:59:59Z" }' ``` Grants a fee allowance from the faucet account to the specified address. This allows the grantee to pay transaction fees using the granter's (e.g. faucet) account balance. **Notes:** - `amount_limit` is optional. If not provided, defaults to 10,000 OPEN (10000000000 uopen) - `expiration` is optional. If not provided, defaults to 30 days from now ### Grant DID Fee Allowance ```bash curl -X POST http://localhost:1317/faucet/grant-did-allowance \ -H "Content-Type: application/json" \ -d '{ "did": "did:key:alice", "amount_limit": { "denom": "uopen", "amount": "10000000000" }, "expiration": "2025-12-31T23:59:59Z" }' ``` Grants a fee allowance from the faucet account to the specified DID. This allows transactions with JWS extensions containing the DID to pay transaction fees using the faucet's account balance. **Notes:** - `amount_limit` is optional. If not provided, defaults to 10,000 OPEN (10000000000 uopen) - `expiration` is optional. If not provided, defaults to 30 days from now **Response:** ```json { "message": "DID fee allowance granted successfully", "txhash": "A1B2C3...", "granter": "source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt", "grantee_did": "did:key:alice", "amount_limit": { "denom": "uopen", "amount": "10000000000" }, "expiration": "2025-12-31T23:59:59Z" } ``` **Query DID allowance via CLI:** ```bash # Query specific DID allowance build/sourcehubd q feegrant did-grant $(curl -s http://localhost:1317/faucet/info | jq -r '.address') did:key:alice # List all DID allowances by granter build/sourcehubd q feegrant did-grants-by-granter $(curl -s http://localhost:1317/faucet/info | jq -r '.address') ``` ## Configuration The faucet can be enabled/disabled in `app.toml`: ```toml [faucet] # Defines if the faucet service should be enabled. enable_faucet = true ``` When disabled (`enable_faucet = false`), the faucet routes are not registered and endpoints return `Not Implemented`. The faucet is disabled by default and must be explicitly enabled in configuration (or via `./scripts/genesis-setup.sh`) . ## CLI Usage The CLI faucet script (`./scripts/faucet.sh`) operates independently of the `enable_faucet` setting in `app.toml` and uses the `./scripts/faucet-key.json` directly. ```bash # Send 1,000 $OPEN to an address ./scripts/faucet.sh source1... # Send custom amount ./scripts/faucet.sh source1... 5000000000uopen ``` ## Security - For development and testing purposes only. - Uses mnemonic from `scripts/faucet-key.json` that is copied into node config directory (e.g. `$HOME/.sourcehub/config`). - `/faucet/request` is limited to one request of 1,000 $OPEN per address. - `./scripts/faucet.sh` is not limited and can be used to request arbitrary token amounts. ================================================ FILE: manual/readme.md ================================================ # SourceHub Manual ================================================ FILE: proto/buf.gen.gogo.yaml ================================================ # This file is auto-generated from Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.gogo.yaml # version: v1 plugins: - name: gocosmos out: . opt: - plugins=grpc - Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types - Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm - Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types - Mgoogle/protobuf/duration.proto=github.com/cosmos/gogoproto/types - name: grpc-gateway out: . opt: - logtostderr=true ================================================ FILE: proto/buf.gen.pulsar.yaml ================================================ # This file is auto-generated from Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.pulsar.yaml # version: v1 managed: enabled: true go_package_prefix: default: cosmossdk.io/api except: - buf.build/googleapis/googleapis - buf.build/cosmos/gogo-proto - buf.build/cosmos/cosmos-proto - buf.build/sourcenetwork/acp-core plugins: - name: go-pulsar out: ./api opt: - paths=source_relative - Msourcenetwork/acp_core/relationship.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - Msourcenetwork/acp_core/policy_short.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - Msourcenetwork/acp_core/policy.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - Msourcenetwork/acp_core/relationship_selector.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - Msourcenetwork/acp_core/request.proto=github.com/sourcenetwork/acp_core/pkg/pulsar/types - name: go-grpc out: ./api opt: paths=source_relative ================================================ FILE: proto/buf.gen.sta.yaml ================================================ # This file is auto-generated from Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.sta.yaml # version: v1 plugins: - name: openapiv2 out: . opt: - logtostderr=true - openapi_naming_strategy=simple - ignore_comments=true - simple_operation_ids=false - json_names_for_fields=false ================================================ FILE: proto/buf.gen.swagger.yaml ================================================ # This file is auto-generated from Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.swagger.yaml # version: v1 plugins: - name: openapiv2 out: . opt: - logtostderr=true - openapi_naming_strategy=fqn - json_names_for_fields=false - generate_unbound_methods=true ================================================ FILE: proto/buf.gen.ts.yaml ================================================ # This file is auto-generated from Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.ts.yaml # version: v1 managed: enabled: true plugins: - plugin: buf.build/community/stephenh-ts-proto out: . opt: - logtostderr=true - allow_merge=true - json_names_for_fields=false - ts_proto_opt=snakeToCamel=true - ts_proto_opt=esModuleInterop=true - ts_proto_out=. ================================================ FILE: proto/buf.yaml ================================================ breaking: use: - FILE deps: - buf.build/protocolbuffers/wellknowntypes - buf.build/cosmos/cosmos-sdk - buf.build/cosmos/cosmos-proto - buf.build/cosmos/gogo-proto - buf.build/googleapis/googleapis - buf.build/cosmos/ics23 - buf.build/cosmos/ibc - buf.build/sourcenetwork/acp-core lint: except: - UNARY_RPC - COMMENT_FIELD - SERVICE_SUFFIX - PACKAGE_VERSION_SUFFIX - RPC_REQUEST_STANDARD_NAME ignore: - tendermint use: - DEFAULT - COMMENTS - FILE_LOWER_SNAKE_CASE version: v1 ================================================ FILE: proto/osmosis/epochs/module/v1beta1/module.proto ================================================ syntax = "proto3"; package osmosis.epochs.module.v1beta1; import "cosmos/app/v1alpha1/module.proto"; // Module is the config object for the module. message Module { option (cosmos.app.v1alpha1.module) = {go_import: "github.com/sourcenetwork/sourcehub/x/epochs"}; // hooks_order specifies the order of epochs hooks and should be a list // of module names which provide a epochs hooks instance. If no order is // provided, then hooks will be applied in alphabetical order of module names. repeated string hooks_order = 1; } ================================================ FILE: proto/osmosis/epochs/v1beta1/genesis.proto ================================================ syntax = "proto3"; package osmosis.epochs.v1beta1; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/epochs/types"; // EpochInfo is a struct that describes the data going into // a timer defined by the x/epochs module. message EpochInfo { // identifier is a unique reference to this particular timer. string identifier = 1; // start_time is the time at which the timer first ever ticks. // If start_time is in the future, the epoch will not begin until the start // time. google.protobuf.Timestamp start_time = 2 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"start_time\"" ]; // duration is the time in between epoch ticks. // In order for intended behavior to be met, duration should // be greater than the chains expected block time. // Duration must be non-zero. google.protobuf.Duration duration = 3 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.jsontag) = "duration,omitempty", (gogoproto.moretags) = "yaml:\"duration\"" ]; // current_epoch is the current epoch number, or in other words, // how many times has the timer 'ticked'. // The first tick (current_epoch=1) is defined as // the first block whose blocktime is greater than the EpochInfo start_time. int64 current_epoch = 4; // current_epoch_start_time describes the start time of the current timer // interval. The interval is (current_epoch_start_time, // current_epoch_start_time + duration] When the timer ticks, this is set to // current_epoch_start_time = last_epoch_start_time + duration only one timer // tick for a given identifier can occur per block. // // NOTE! The current_epoch_start_time may diverge significantly from the // wall-clock time the epoch began at. Wall-clock time of epoch start may be // >> current_epoch_start_time. Suppose current_epoch_start_time = 10, // duration = 5. Suppose the chain goes offline at t=14, and comes back online // at t=30, and produces blocks at every successive time. (t=31, 32, etc.) // * The t=30 block will start the epoch for (10, 15] // * The t=31 block will start the epoch for (15, 20] // * The t=32 block will start the epoch for (20, 25] // * The t=33 block will start the epoch for (25, 30] // * The t=34 block will start the epoch for (30, 35] // * The **t=36** block will start the epoch for (35, 40] google.protobuf.Timestamp current_epoch_start_time = 5 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"current_epoch_start_time\"" ]; // epoch_counting_started is a boolean, that indicates whether this // epoch timer has began yet. bool epoch_counting_started = 6; reserved 7; // current_epoch_start_height is the block height at which the current epoch // started. (The block height at which the timer last ticked) int64 current_epoch_start_height = 8; } // GenesisState defines the epochs module's genesis state. message GenesisState { repeated EpochInfo epochs = 1 [(gogoproto.nullable) = false]; } ================================================ FILE: proto/osmosis/epochs/v1beta1/query.proto ================================================ syntax = "proto3"; package osmosis.epochs.v1beta1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "osmosis/epochs/v1beta1/genesis.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/epochs/types"; // Query defines the gRPC querier service. service Query { // EpochInfos provide running epochInfos rpc EpochInfos(QueryEpochsInfoRequest) returns (QueryEpochsInfoResponse) { option (google.api.http).get = "/osmosis/epochs/v1beta1/epochs"; } // CurrentEpoch provide current epoch of specified identifier rpc CurrentEpoch(QueryCurrentEpochRequest) returns (QueryCurrentEpochResponse) { option (google.api.http).get = "/osmosis/epochs/v1beta1/current_epoch"; } } message QueryEpochsInfoRequest {} message QueryEpochsInfoResponse { repeated EpochInfo epochs = 1 [(gogoproto.nullable) = false]; } message QueryCurrentEpochRequest { string identifier = 1; } message QueryCurrentEpochResponse { int64 current_epoch = 1; } ================================================ FILE: proto/sourcehub/acp/access_decision.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "sourcehub/acp/time.proto"; import "sourcenetwork/acp_core/relationship.proto"; import "sourcenetwork/acp_core/request.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // AccessDecision models the result of evaluating a set of AccessRequests for an Actor message AccessDecision { string id = 1; string policy_id = 2; // used as part of id generation string creator = 3; // used as part of id generation uint64 creator_acc_sequence = 4; // used as part of id generation repeated sourcenetwork.acp_core.Operation operations = 5; // used as part of id generation string actor = 6; // used as part of id generation DecisionParams params = 7; // used as part of id generation Timestamp creation_time = 8; // issued_height stores the block height when the Decision was evaluated uint64 issued_height = 9; } // DecisionParams stores auxiliary information regarding the validity of a decision message DecisionParams { // number of blocks a Decision is valid for uint64 decision_expiration_delta = 1; // number of blocks a DecisionProof is valid for uint64 proof_expiration_delta = 2; // number of blocks an AccessTicket is valid for uint64 ticket_expiration_delta = 3; } ================================================ FILE: proto/sourcehub/acp/access_ticket.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "sourcehub/acp/access_decision.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // Represents a Capability token containing an opaque proof and a set of Operations // the Actor is allowed to perform. // Tickets should be verified by a Reference Monitor before granting access to the requested operations. message AccessTicket { // identified the ticket version string version_denominator = 1; string decision_id = 2; AccessDecision decision = 3; // proof of existance that the given decision exists in the chain // validation strategy is dependent on ticket version bytes decision_proof = 4; // application to which this ticket was issue to //string audience = 4; // timestamp // signature of ticket which must match actor pkey in the access decision bytes signature = 5; // TODO could add metadata such as issued time stamp and so on } ================================================ FILE: proto/sourcehub/acp/commitment.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "sourcehub/acp/record.proto"; import "sourcehub/acp/time.proto"; import "sourcenetwork/acp_core/relationship.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // RegistrationProof models an opening proof for a RegistrationCommitment message RegistrationProof { sourcenetwork.acp_core.Object object = 1; // Hash of neighbors required to validate proof. // // Hashes must be ordered as a RFC6962 "merkle audit path" // https://www.rfc-editor.org/rfc/rfc6962#section-2.1.1 repeated bytes merkle_proof = 2; uint64 leaf_count = 3; uint64 leaf_index = 4; } // RegistrationsCommitment models a batched cryptographic commitment // of a set of Object registrations issued by an Actor message RegistrationsCommitment { uint64 id = 1; string policy_id = 2; // commitment is a merkle root of registrations bytes commitment = 3; bool expired = 4; // validity models the duration for which the commitment is valid for Duration validity = 5; RecordMetadata metadata = 6; } ================================================ FILE: proto/sourcehub/acp/genesis.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "sourcehub/acp/params.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // GenesisState defines the acp module's genesis state. message GenesisState { // params defines all the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } ================================================ FILE: proto/sourcehub/acp/module/module.proto ================================================ syntax = "proto3"; package sourcehub.acp.module; import "cosmos/app/v1alpha1/module.proto"; // Module is the config object for the module. message Module { option (cosmos.app.v1alpha1.module) = {go_import: "github.com/sourcenetwork/sourcehub/x/acp"}; // authority defines the custom module authority. If not set, defaults to the governance module. string authority = 1; } ================================================ FILE: proto/sourcehub/acp/params.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "sourcehub/acp/time.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // Params defines the parameters for the module. message Params { option (amino.name) = "sourcehub/x/acp/Params"; // policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. uint64 policy_command_max_expiration_delta = 1; // registrations_commitment_validity specifies a duration for the lifetime of a commitment. // Performing a RevealRegistration against an expired commitment causes a protocol error. Duration registrations_commitment_validity = 2; } ================================================ FILE: proto/sourcehub/acp/policy_cmd.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "google/protobuf/timestamp.proto"; import "sourcehub/acp/commitment.proto"; import "sourcehub/acp/record.proto"; import "sourcehub/acp/registration.proto"; import "sourcenetwork/acp_core/relationship.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // PolicyCmd models an operation to be performed against the context of a Policy message PolicyCmd { oneof cmd { SetRelationshipCmd set_relationship_cmd = 1; DeleteRelationshipCmd delete_relationship_cmd = 2; RegisterObjectCmd register_object_cmd = 3; ArchiveObjectCmd archive_object_cmd = 4; CommitRegistrationsCmd commit_registrations_cmd = 5; RevealRegistrationCmd reveal_registration_cmd = 6; FlagHijackAttemptCmd flag_hijack_attempt_cmd = 7; UnarchiveObjectCmd unarchive_object_cmd = 8; } } // SetRelationship creates or updates a Relationship within a Policy // A Relationship is a statement which ties together an object and a subjecto with a "relation", // which means the set of high level rules defined in the Policy will apply to these entities. message SetRelationshipCmd { sourcenetwork.acp_core.Relationship relationship = 1; } // DelereRelationship removes a Relationship from a Policy. // If the Relationship was not found in a Policy, this Cmd is a no-op. message DeleteRelationshipCmd { sourcenetwork.acp_core.Relationship relationship = 1; } // RegisterObject creates a special kind of Relationship within a Policy which ties // the msg's Actor as the owner of the msg's Object. // The Owner has complete control over the set of subjects that are related to their Object, // giving them autonomy to share the object and revoke acces to the object, // much like owners in a Discretionary Access Control model. // // Attempting to register a previously registered Object is an error, // Object IDs are therefore assumed to be unique within a Policy. message RegisterObjectCmd { sourcenetwork.acp_core.Object object = 1; } // CommitRegistrationsCmd creates a new batched commitment to a set of Object registrations message CommitRegistrationsCmd { bytes commitment = 1; } message CommitRegistrationsCmdResult { RegistrationsCommitment registrations_commitment = 1; } message RevealRegistrationCmd { uint64 registrations_commitment_id = 1; RegistrationProof proof = 2; } message RevealRegistrationCmdResult { RelationshipRecord record = 1; AmendmentEvent event = 2; } message FlagHijackAttemptCmd { uint64 event_id = 1; } message FlagHijackAttemptCmdResult { AmendmentEvent event = 1; } message UnarchiveObjectCmd { sourcenetwork.acp_core.Object object = 1; } message UnarchiveObjectCmdResult { RelationshipRecord record = 1; bool relationship_modified = 2; } // ArchiveObject let's an Object's Owner effectively "unshare" their Object. // This method wipes all Relationships referencing the given Object. // // A caveat is that after removing the Relationships, a record of the original Object owner // is maintained to prevent an "ownership hijack" attack. // // Suppose Bob owns object Foo, which is shared with Bob but not Eve. // Eve wants to access Foo but was not given permission to, they could "hijack" Bob's object by waiting for Bob to Archive Foo, // then submitting a RegisterObject Msg, effectively becoming Foo's new owner. // If Charlie has a copy of the object, Eve could convince Charlie to share his copy, granting Eve access to Foo. // The previous scenario where an unauthorized user is able to claim ownership to data previously unaccessible to them // is an "ownership hijack". message ArchiveObjectCmd { sourcenetwork.acp_core.Object object = 1; } // SetRelationshipCmd sets a Relationship in a Policy message SetRelationshipCmdResult { // Indicates whether the given Relationship previously existed, ie the Tx was a no op bool record_existed = 1; RelationshipRecord record = 2; } // DeleteRelationshipCmdResult removes a Relationship in a Policy message DeleteRelationshipCmdResult { bool record_found = 1; } // RegisterObjectCmdResult registers an Object in a Policy message RegisterObjectCmdResult { RelationshipRecord record = 1; } // ArchiveObjectCmdResult unregisters an Object in a Policy message ArchiveObjectCmdResult { bool found = 1; uint64 relationships_removed = 2; } message PolicyCmdResult { oneof result { SetRelationshipCmdResult set_relationship_result = 1; DeleteRelationshipCmdResult delete_relationship_result = 2; RegisterObjectCmdResult register_object_result = 3; ArchiveObjectCmdResult archive_object_result = 4; CommitRegistrationsCmdResult commit_registrations_result = 5; RevealRegistrationCmdResult reveal_registration_result = 6; FlagHijackAttemptCmdResult flag_hijack_attempt_result = 7; UnarchiveObjectCmdResult unarchive_object_result = 8; } } ================================================ FILE: proto/sourcehub/acp/query.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "amino/amino.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "sourcehub/acp/access_decision.proto"; import "sourcehub/acp/commitment.proto"; import "sourcehub/acp/params.proto"; import "sourcehub/acp/record.proto"; import "sourcehub/acp/registration.proto"; import "sourcenetwork/acp_core/policy.proto"; import "sourcenetwork/acp_core/policy_short.proto"; import "sourcenetwork/acp_core/relationship.proto"; import "sourcenetwork/acp_core/relationship_selector.proto"; import "sourcenetwork/acp_core/request.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/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 = "/sourcenetwork/sourcehub/acp/params"; } // Policy returns a Policy with the given ID. rpc Policy(QueryPolicyRequest) returns (QueryPolicyResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/policy/{id}"; } // PolicyIds returns list of Ids for Policies registered in the system. rpc PolicyIds(QueryPolicyIdsRequest) returns (QueryPolicyIdsResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/policy_ids"; } // FilterRelationships returns filtered set of Relationships in a Policy. rpc FilterRelationships(QueryFilterRelationshipsRequest) returns (QueryFilterRelationshipsResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/filter_relationships/{policy_id}"; } // VerifyAccessRequest verifies whether an Access Request is accepted with respect to the given Policy's Relation Graph. rpc VerifyAccessRequest(QueryVerifyAccessRequestRequest) returns (QueryVerifyAccessRequestResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/verify_access_request/{policy_id}"; } // ValidatePolicy verifies whether the given Policy definition is properly formatted rpc ValidatePolicy(QueryValidatePolicyRequest) returns (QueryValidatePolicyResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/validate_policy/{policy}"; } // AccessDecision queries the system for an AccessDecision with the given ID. rpc AccessDecision(QueryAccessDecisionRequest) returns (QueryAccessDecisionResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/access_decision/{id}"; } // ObjectOwner returns the Actor ID of the the given Object's owner rpc ObjectOwner(QueryObjectOwnerRequest) returns (QueryObjectOwnerResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/object_owner/{policy_id}/{object.resource}/{object.id}"; } // RegistrationsCommitment returns a specific RegistrationsCommitment record rpc RegistrationsCommitment(QueryRegistrationsCommitmentRequest) returns (QueryRegistrationsCommitmentResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/registrations_commitment"; } // RegistrationsCommitmentByCommitment returns all RegistrationCommitment records with a given commitment rpc RegistrationsCommitmentByCommitment(QueryRegistrationsCommitmentByCommitmentRequest) returns (QueryRegistrationsCommitmentByCommitmentResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/registrations_commitment_by_commitment"; } // GenerateCommitment generates a Object registration commitment for the given objects // // Note: this operation assures the commitment is valid (no object is registered and the policy exists) // but exposes the Object Ids to the RPC node. // ONLY use this method if the node is trusted rpc GenerateCommitment(QueryGenerateCommitmentRequest) returns (QueryGenerateCommitmentResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/generate_commitment"; } // HijackAttemptsByPolicy returns, for a given policy, all AmendmentEvent whose hijack flag is true rpc HijackAttemptsByPolicy(QueryHijackAttemptsByPolicyRequest) returns (QueryHijackAttemptsByPolicyResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/acp/hijack_attempts_by_policy"; } } // 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 ]; } message QueryPolicyRequest { string id = 1; } message QueryPolicyResponse { PolicyRecord record = 1; } message QueryPolicyIdsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryPolicyIdsResponse { repeated string ids = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryFilterRelationshipsRequest { string policy_id = 1; sourcenetwork.acp_core.RelationshipSelector selector = 2; } message QueryFilterRelationshipsResponse { repeated RelationshipRecord records = 1; } message QueryVerifyAccessRequestRequest { string policy_id = 1; sourcenetwork.acp_core.AccessRequest access_request = 2; } message QueryVerifyAccessRequestResponse { bool valid = 1; } message QueryValidatePolicyRequest { string policy = 1; sourcenetwork.acp_core.PolicyMarshalingType marshal_type = 3; } message QueryValidatePolicyResponse { bool valid = 1; string error_msg = 2; sourcenetwork.acp_core.Policy policy = 3; } message QueryAccessDecisionRequest { string id = 1; } message QueryAccessDecisionResponse { AccessDecision decision = 1; } message QueryObjectOwnerRequest { string policy_id = 1; sourcenetwork.acp_core.Object object = 2; } message QueryObjectOwnerResponse { bool is_registered = 1; RelationshipRecord record = 2; } message QueryRegistrationsCommitmentRequest { uint64 id = 1; } message QueryRegistrationsCommitmentResponse { RegistrationsCommitment registrations_commitment = 1; } message QueryRegistrationsCommitmentByCommitmentRequest { bytes commitment = 1; } message QueryRegistrationsCommitmentByCommitmentResponse { repeated RegistrationsCommitment registrations_commitments = 1; } message QueryGenerateCommitmentRequest { string policy_id = 1; repeated sourcenetwork.acp_core.Object objects = 2; sourcenetwork.acp_core.Actor actor = 3; } message QueryGenerateCommitmentResponse { bytes commitment = 1; string hex_commitment = 2; repeated RegistrationProof proofs = 3; repeated string proofs_json = 4; } message QueryHijackAttemptsByPolicyRequest { string policy_id = 1; } message QueryHijackAttemptsByPolicyResponse { repeated AmendmentEvent events = 1; } ================================================ FILE: proto/sourcehub/acp/record.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "sourcehub/acp/access_decision.proto"; import "sourcehub/acp/time.proto"; import "sourcenetwork/acp_core/policy.proto"; import "sourcenetwork/acp_core/policy_short.proto"; import "sourcenetwork/acp_core/relationship.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // RecordMetadata models metadata which is stored alongside acp records message RecordMetadata { // creation_ts is the timestamp of record creation Timestamp creation_ts = 1; // tx_hash is the hash256 of the tx bytes which produced the record bytes tx_hash = 2; // tx_signer is the SourceHub bech32 address of the account that signed the Tx string tx_signer = 3; // owner_did is the DID of the PolicyCmd actor string owner_did = 4; } message PolicyRecord { sourcenetwork.acp_core.Policy policy = 1; RecordMetadata metadata = 2; string raw_policy = 3; // marshal_type flags the format of policy_raw sourcenetwork.acp_core.PolicyMarshalingType marshal_type = 4; } message RelationshipRecord { string policy_id = 1; sourcenetwork.acp_core.Relationship relationship = 2; bool archived = 3; RecordMetadata metadata = 4; } ================================================ FILE: proto/sourcehub/acp/registration.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "google/protobuf/timestamp.proto"; import "sourcehub/acp/record.proto"; import "sourcehub/acp/time.proto"; import "sourcenetwork/acp_core/relationship.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // AmendmentEvent is a record which tracks executions of the Registration Amendment rule in SourceHub ACP message AmendmentEvent { // event id uint64 id = 1; // id of affected policy string policy_id = 2; // object whose registration was amended sourcenetwork.acp_core.Object object = 3; // new_owner is the new object owner sourcenetwork.acp_core.Actor new_owner = 4; // previous_owner is the previous object owner sourcenetwork.acp_core.Actor previous_owner = 5; // commitment_id is the id of the commitment which generated the amendment uint64 commitment_id = 6; // hijack_flag is true if the amendment rule was executed and the new_owner chose to flag // the previous_owner as a potential object hijacker bool hijack_flag = 7; RecordMetadata metadata = 8; } ================================================ FILE: proto/sourcehub/acp/signed_policy_cmd.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "google/protobuf/timestamp.proto"; import "sourcehub/acp/commitment.proto"; import "sourcehub/acp/policy_cmd.proto"; import "sourcehub/acp/record.proto"; import "sourcehub/acp/registration.proto"; import "sourcenetwork/acp_core/relationship.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // SignedPolicyCmd represents a Command issued by an Actor in the context of a Policy // The command represents an instruction to be executed // The message type contains a signature which is used to authenticate the Command's Actor message SignedPolicyCmd { // payload contains the command context SignedPolicyCmdPayload payload = 1; // signature is a signature of the payload. // The signature is generated using the VerificationMethod / Authorization fields // specificied by the DID document of the Actor. bytes signature = 2; } // SignedPolicyCmdPayload represents the payload containing the context of the issued command message SignedPolicyCmdPayload { // actor is a did string representing the actor which issued the command string actor = 1; // issued_height is the SourceHub block height of when the Payload was created uint64 issued_height = 2; // issued_at contains a client generated timestamp for the creation of the command. // This is used only as metadata and isn't trusted google.protobuf.Timestamp issued_at = 3; // expiration_delta specifies the maximum number of blocks from the issued height during which the Command Payload will be accepted. // This field is mandatory and is used to prevent replay attacks uint64 expiration_delta = 4; // policy_id is the ID of the policy under which the Command will be executed string policy_id = 5; PolicyCmd cmd = 6; } ================================================ FILE: proto/sourcehub/acp/time.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "amino/amino.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; // Duration models a time interval expressed either as a wallclock // Duration interval or a number of blocks message Duration { oneof duration { google.protobuf.Duration proto_duration = 1 [(amino.oneof_name) = "proto_duration"]; uint64 block_count = 2 [(amino.oneof_name) = "block_count"]; } } // Timestamp models an instant in time expressed as a wallclock // Timestamp and a block height message Timestamp { google.protobuf.Timestamp proto_ts = 1; uint64 block_height = 2; } ================================================ FILE: proto/sourcehub/acp/tx.proto ================================================ syntax = "proto3"; package sourcehub.acp; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "sourcehub/acp/access_decision.proto"; import "sourcehub/acp/params.proto"; import "sourcehub/acp/policy_cmd.proto"; import "sourcehub/acp/record.proto"; import "sourcenetwork/acp_core/policy.proto"; import "sourcenetwork/acp_core/policy_short.proto"; import "sourcenetwork/acp_core/request.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/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); // CreatePolicy adds a new Policy to SourceHub. // The Policy models an aplication's high level access control rules. rpc CreatePolicy(MsgCreatePolicy) returns (MsgCreatePolicyResponse); // EditPolicy mutates the rules defined by a Policy. // // Relations may be added and removed to resources (if they are not required), // new resources may be added, but resources may not be removed. // // Removing a relation removes all relationships that reference the removed relation // // A few other invariants are enforced such as: // - the name of the actor resource may not be mutated // - resources cannot be removed // - the specification of a policy cannot be mutated // Violations of these constraints will return an error. rpc EditPolicy(MsgEditPolicy) returns (MsgEditPolicyResponse); // CheckAccess executes an Access Request for an User and stores the result of the evaluation in SourceHub. // The resulting evaluation is used to generate a cryptographic proof that the given Access Request // was valid at a particular block height. rpc CheckAccess(MsgCheckAccess) returns (MsgCheckAccessResponse); // SignedPolicyCmd is a wrapper for a Command which is executed within the Context of a Policy. // The Command is signed by the Actor issuing it. rpc SignedPolicyCmd(MsgSignedPolicyCmd) returns (MsgSignedPolicyCmdResponse); // BearerPolicyCmd is a Msg containing an instruction which changes the authorization // rules in a Policy. // This Msg authenticates the actor through the the Bearer authentication protocol. // The Msg authenticates the actor initiating the command through a Bearer token. // This token MUST be issued and signed by some DID Actor, the verification of the signature // is used as authentication proof. // Lastly, the Bearer token MUST be bound to some SourceHub account. rpc BearerPolicyCmd(MsgBearerPolicyCmd) returns (MsgBearerPolicyCmdResponse); rpc DirectPolicyCmd(MsgDirectPolicyCmd) returns (MsgDirectPolicyCmdResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "sourcehub/x/acp/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 {} message MsgCreatePolicy { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string policy = 2; sourcenetwork.acp_core.PolicyMarshalingType marshal_type = 3; } message MsgCreatePolicyResponse { PolicyRecord record = 1; } message MsgEditPolicy { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string policy_id = 2; string policy = 3; sourcenetwork.acp_core.PolicyMarshalingType marshal_type = 4; } message MsgEditPolicyResponse { uint64 relationships_removed = 1; PolicyRecord record = 2; } message MsgCheckAccess { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string policy_id = 2; sourcenetwork.acp_core.AccessRequest access_request = 3; } message MsgCheckAccessResponse { AccessDecision decision = 1; } message MsgSignedPolicyCmd { enum ContentType { UNKNOWN = 0; JWS = 1; } option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string payload = 2; ContentType type = 3; } message MsgSignedPolicyCmdResponse { PolicyCmdResult result = 1; } message MsgBearerPolicyCmd { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string bearer_token = 2; string policy_id = 3; PolicyCmd cmd = 4; } message MsgBearerPolicyCmdResponse { PolicyCmdResult result = 1; } message MsgDirectPolicyCmd { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string policy_id = 2; PolicyCmd cmd = 3; } message MsgDirectPolicyCmdResponse { PolicyCmdResult result = 1; } ================================================ FILE: proto/sourcehub/ante/jws_extension.proto ================================================ syntax = "proto3"; package sourcehub.ante; import "gogoproto/gogo.proto"; option go_package = "github.com/sourcenetwork/sourcehub/app/ante/types"; // JWSExtensionOption represents a transaction extension option with a bearer token. // The bearer token is a JWS containing issuer DID, authorized account, issued at, and expiration time claims. message JWSExtensionOption { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; string bearer_token = 1 [(gogoproto.moretags) = "yaml:\"bearer_token\""]; } ================================================ FILE: proto/sourcehub/bulletin/collaborator.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/types"; // Collaborator represents an actor with collaborator permissions in a namespace. message Collaborator { string address = 1; string did = 2; string namespace = 3; } ================================================ FILE: proto/sourcehub/bulletin/events.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/types"; // EventNamespaceRegistered is emitted when a namespace is registered. message EventNamespaceRegistered { // namespace_id is the unique identifier of the namespace. string namespace_id = 1; // owner_did is the DID of the namespace owner. string owner_did = 2; // created_at is the timestamp when the namespace was created. google.protobuf.Timestamp created_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } // EventPostCreated is emitted when a post is created. message EventPostCreated { // namespace_id is the namespace the post belongs to. string namespace_id = 1; // post_id is the unique identifier of the post. string post_id = 2; // creator_did is the DID of the post creator. string creator_did = 3; // payload is the base64-encoded content of the post. string payload = 4; // artifact is sent with a post call for tracking purposes string artifact = 5; } // EventCollaboratorAdded is emitted when a collaborator is added to a namespace. message EventCollaboratorAdded { // namespace_id is the namespace the collaborator was added to. string namespace_id = 1; // collaborator_did is the DID of the collaborator. string collaborator_did = 2; // added_by is the DID of the user who added the collaborator. string added_by = 3; } // EventCollaboratorRemoved is emitted when a collaborator is removed from a namespace. message EventCollaboratorRemoved { // namespace_id is the namespace the collaborator was removed from. string namespace_id = 1; // collaborator_did is the DID of the collaborator. string collaborator_did = 2; } ================================================ FILE: proto/sourcehub/bulletin/genesis.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "sourcehub/bulletin/params.proto"; import "sourcehub/bulletin/namespace.proto"; import "sourcehub/bulletin/collaborator.proto"; import "sourcehub/bulletin/post.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/types"; // GenesisState defines the bulletin module's genesis state. message GenesisState { // params defines all the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; string policy_id = 2; repeated Namespace namespaces = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated Collaborator collaborators = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated Post posts = 5 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } ================================================ FILE: proto/sourcehub/bulletin/module/module.proto ================================================ syntax = "proto3"; package sourcehub.bulletin.module; import "cosmos/app/v1alpha1/module.proto"; // Module is the config object for the module. message Module { option (cosmos.app.v1alpha1.module) = {go_import: "github.com/sourcenetwork/sourcehub/x/bulletin"}; // authority defines the custom module authority. If not set, defaults to the governance module. string authority = 1; } ================================================ FILE: proto/sourcehub/bulletin/namespace.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "sourcehub/bulletin/post.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/types"; // Namespace represents a logical bulletin space used to group posts. message Namespace { string id = 1; string creator = 2; string owner_did = 3; google.protobuf.Timestamp created_at = 4 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; } ================================================ FILE: proto/sourcehub/bulletin/params.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; import "amino/amino.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/types"; // Params defines the parameters for the module. message Params { option (amino.name) = "sourcehub/x/bulletin/Params"; option (gogoproto.equal) = true; } ================================================ FILE: proto/sourcehub/bulletin/post.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/types"; // Post represents a bulletin entry created within a specific namespace. message Post { string id = 1; string namespace = 2; string creator_did = 3; bytes payload = 4; } ================================================ FILE: proto/sourcehub/bulletin/query.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; import "amino/amino.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "sourcehub/bulletin/params.proto"; import "sourcehub/bulletin/namespace.proto"; import "sourcehub/bulletin/collaborator.proto"; import "sourcehub/bulletin/post.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/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 = "/sourcenetwork/sourcehub/bulletin/params"; } // Queries a namespace based on the specified namespace id. rpc Namespace(QueryNamespaceRequest) returns (QueryNamespaceResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/namespace/{namespace}"; } // Queries all namespaces. rpc Namespaces(QueryNamespacesRequest) returns (QueryNamespacesResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/namespaces"; } // Queries all namespace collaborators. rpc NamespaceCollaborators(QueryNamespaceCollaboratorsRequest) returns (QueryNamespaceCollaboratorsResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/collaborators/{namespace}"; } // Queries all namespace posts. rpc NamespacePosts(QueryNamespacePostsRequest) returns (QueryNamespacePostsResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/posts/{namespace}"; } // Queries a post based on the specified namespace and post id. rpc Post(QueryPostRequest) returns (QueryPostResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/post/{namespace}/{id}"; } // Queries all posts. rpc Posts(QueryPostsRequest) returns (QueryPostsResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/posts"; } // Glob iteration over a namespace rpc IterateGlob(QueryIterateGlobRequest) returns (QueryIterateGlobResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/iterate_glob"; } // Queries the bulletin module policy id. rpc BulletinPolicyId(QueryBulletinPolicyIdRequest) returns (QueryBulletinPolicyIdResponse) { option (google.api.http).get = "/sourcenetwork/sourcehub/bulletin/policy_id"; } } // 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 ]; } message QueryNamespaceRequest { string namespace = 1; } message QueryNamespaceResponse { Namespace namespace = 1; } message QueryNamespacesRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryNamespacesResponse { repeated Namespace namespaces = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryNamespaceCollaboratorsRequest { string namespace = 1; cosmos.base.query.v1beta1.PageRequest pagination = 2; } message QueryNamespaceCollaboratorsResponse { repeated Collaborator collaborators = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryNamespacePostsRequest { string namespace = 1; cosmos.base.query.v1beta1.PageRequest pagination = 2; } message QueryNamespacePostsResponse { repeated Post posts = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryPostRequest { string namespace = 1; string id = 2; } message QueryPostResponse { Post post = 1; } message QueryPostsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryPostsResponse { repeated Post posts = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryBulletinPolicyIdRequest is request type for the Query/BulletinPolicyId RPC method. message QueryBulletinPolicyIdRequest {} // QueryBulletinPolicyIdResponse is response type for the Query/BulletinPolicyId RPC method. message QueryBulletinPolicyIdResponse { string policy_id = 1; } // QueryIterateGlobRequest message QueryIterateGlobRequest { string namespace = 1; string glob = 2; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryIterateGlobResponse message QueryIterateGlobResponse { repeated Post posts = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } ================================================ FILE: proto/sourcehub/bulletin/tx.proto ================================================ syntax = "proto3"; package sourcehub.bulletin; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "sourcehub/bulletin/params.proto"; import "sourcehub/bulletin/namespace.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/bulletin/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); rpc CreatePost(MsgCreatePost) returns (MsgCreatePostResponse); rpc RegisterNamespace(MsgRegisterNamespace) returns (MsgRegisterNamespaceResponse); rpc AddCollaborator(MsgAddCollaborator) returns (MsgAddCollaboratorResponse); rpc RemoveCollaborator(MsgRemoveCollaborator) returns (MsgRemoveCollaboratorResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "sourcehub/x/bulletin/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 {} message MsgCreatePost { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string namespace = 2; bytes payload = 3; string artifact = 5; } message MsgCreatePostResponse {} message MsgRegisterNamespace { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string namespace = 2; } message MsgRegisterNamespaceResponse { Namespace namespace = 1; } message MsgAddCollaborator { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string namespace = 2; string collaborator = 3; } message MsgAddCollaboratorResponse { string collaborator_did = 1; } message MsgRemoveCollaborator { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string namespace = 2; string collaborator = 3; } message MsgRemoveCollaboratorResponse { string collaborator_did = 1; } ================================================ FILE: proto/sourcehub/faucet/faucet.proto ================================================ syntax = "proto3"; package sourcehub.faucet; import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/sourcenetwork/sourcehub/app/faucet/types"; // FaucetRequestRecord represents a faucet request record stored internally. message FaucetRequestRecord { string address = 1; cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; string tx_hash = 3; } // FaucetRequest represents a request to get funds from the faucet. message FaucetRequest { string address = 1; } // FaucetResponse represents the response from a faucet request. message FaucetResponse { string txhash = 1; uint32 code = 2; string raw_log = 3; string address = 4; cosmos.base.v1beta1.Coin amount = 5 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // InitAccountRequest represents a request to initialize an account. message InitAccountRequest { string address = 1; } // InitAccountResponse represents the response from an account initialization request. message InitAccountResponse { string message = 1; string txhash = 2; uint32 code = 3; string raw_log = 4; string address = 5; cosmos.base.v1beta1.Coin amount = 6 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; bool exists = 7; } // FaucetInfoResponse represents the faucet information response. message FaucetInfoResponse { string address = 1; cosmos.base.v1beta1.Coin balance = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; int32 request_count = 3; } // GrantAllowanceRequest represents a request to grant fee allowance from the faucet. message GrantAllowanceRequest { string address = 1; // Optional amount limit for the allowance (in uopen). If not provided, defaults to 10000000000 (10,000 OPEN) cosmos.base.v1beta1.Coin amount_limit = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // Optional expiration time. If not provided, defaults to 30 days from now google.protobuf.Timestamp expiration = 3 [(gogoproto.stdtime) = true]; } // GrantAllowanceResponse represents the response from a grant allowance request. message GrantAllowanceResponse { string message = 1; string txhash = 2; uint32 code = 3; string raw_log = 4; string granter = 5; string grantee = 6; cosmos.base.v1beta1.Coin amount_limit = 7 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; google.protobuf.Timestamp expiration = 8 [(gogoproto.stdtime) = true]; } // GrantDIDAllowanceRequest represents a request to grant fee allowance to a DID from the faucet. message GrantDIDAllowanceRequest { string did = 1; // Optional amount limit for the allowance (in uopen). If not provided, defaults to 10000000000 (10,000 OPEN) cosmos.base.v1beta1.Coin amount_limit = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // Optional expiration time. If not provided, defaults to 30 days from now google.protobuf.Timestamp expiration = 3 [(gogoproto.stdtime) = true]; } // GrantDIDAllowanceResponse represents the response from a DID grant allowance request. message GrantDIDAllowanceResponse { string message = 1; string txhash = 2; uint32 code = 3; string raw_log = 4; string granter = 5; string grantee_did = 6; cosmos.base.v1beta1.Coin amount_limit = 7 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; google.protobuf.Timestamp expiration = 8 [(gogoproto.stdtime) = true]; } ================================================ FILE: proto/sourcehub/feegrant/module/v1/module.proto ================================================ syntax = "proto3"; package sourcehub.feegrant.module.v1; import "cosmos/app/v1alpha1/module.proto"; // Module is the config object of the feegrant module. message Module { option (cosmos.app.v1alpha1.module) = { go_import: "github.com/sourcenetwork/sourcehub/x/feegrant" }; } ================================================ FILE: proto/sourcehub/feegrant/v1beta1/feegrant.proto ================================================ syntax = "proto3"; package sourcehub.feegrant.v1beta1; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; import "amino/amino.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/feegrant"; // BasicAllowance implements Allowance with a one-time grant of coins // that optionally expires. The grantee can use up to SpendLimit to cover fees. message BasicAllowance { option (cosmos_proto.implements_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"; option (amino.name) = "cosmos-sdk/BasicAllowance"; // spend_limit specifies the maximum amount of coins that can be spent // by this allowance and will be updated as coins are spent. If it is // empty, there is no spend limit and any amount of coins can be spent. repeated cosmos.base.v1beta1.Coin spend_limit = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (amino.encoding) = "legacy_coins", (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // expiration specifies an optional time when this allowance expires google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; } // PeriodicAllowance extends Allowance to allow for both a maximum cap, // as well as a limit per time period. message PeriodicAllowance { option (cosmos_proto.implements_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"; option (amino.name) = "cosmos-sdk/PeriodicAllowance"; // basic specifies a struct of `BasicAllowance` BasicAllowance basic = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // period specifies the time duration in which period_spend_limit coins can // be spent before that allowance is reset google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // period_spend_limit specifies the maximum number of coins that can be spent // in the period repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (amino.encoding) = "legacy_coins", (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // period_can_spend is the number of coins left to be spent before the period_reset time repeated cosmos.base.v1beta1.Coin period_can_spend = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (amino.encoding) = "legacy_coins", (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // period_reset is the time at which this period resets and a new one begins, // it is calculated from the start time of the first transaction after the // last period ended google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } // AllowedMsgAllowance creates allowance only for specified message types. message AllowedMsgAllowance { option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"; option (amino.name) = "cosmos-sdk/AllowedMsgAllowance"; // allowance can be any of basic and periodic fee allowance. google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"]; // allowed_messages are the messages for which the grantee has the access. repeated string allowed_messages = 2; } // Grant is stored in the KVStore to record a grant with full context message Grant { // granter is the address of the user granting an allowance of their funds. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"]; } // DIDGrant is stored in the KVStore to record a grant with DID as grantee message DIDGrant { // granter is the address of the user granting an allowance of their funds. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee_did is the DID of the user being granted an allowance of another user's funds. string grantee_did = 2; // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"]; } ================================================ FILE: proto/sourcehub/feegrant/v1beta1/genesis.proto ================================================ syntax = "proto3"; package sourcehub.feegrant.v1beta1; import "gogoproto/gogo.proto"; import "sourcehub/feegrant/v1beta1/feegrant.proto"; import "amino/amino.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/feegrant"; // GenesisState contains a set of fee allowances, persisted from the store. message GenesisState { repeated Grant allowances = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; repeated DIDGrant did_allowances = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } ================================================ FILE: proto/sourcehub/feegrant/v1beta1/query.proto ================================================ syntax = "proto3"; package sourcehub.feegrant.v1beta1; import "sourcehub/feegrant/v1beta1/feegrant.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; import "cosmos_proto/cosmos.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/feegrant"; // Query defines the gRPC querier service. service Query { // Allowance returns granted allowance to the grantee by the granter. rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { option (google.api.http).get = "/sourcehub/feegrant/v1beta1/allowance/{granter}/{grantee}"; } // Allowances returns all the grants for the given grantee address. rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { option (google.api.http).get = "/sourcehub/feegrant/v1beta1/allowances/{grantee}"; } // AllowancesByGranter returns all the grants given by an address. rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { option (google.api.http).get = "/sourcehub/feegrant/v1beta1/issued/{granter}"; option (cosmos_proto.method_added_in) = "cosmos-sdk 0.46"; } // DIDAllowance returns granted allowance to the DID by the granter. rpc DIDAllowance(QueryDIDAllowanceRequest) returns (QueryDIDAllowanceResponse) { option (google.api.http).get = "/sourcehub/feegrant/v1beta1/did_allowance/{granter}/{grantee_did}"; } // DIDAllowances returns all the DID grants for the given grantee DID. rpc DIDAllowances(QueryDIDAllowancesRequest) returns (QueryDIDAllowancesResponse) { option (google.api.http).get = "/sourcehub/feegrant/v1beta1/did_allowances/{grantee_did}"; } // DIDAllowancesByGranter returns all the DID grants given by an address. rpc DIDAllowancesByGranter(QueryDIDAllowancesByGranterRequest) returns (QueryDIDAllowancesByGranterResponse) { option (google.api.http).get = "/sourcehub/feegrant/v1beta1/did_issued/{granter}"; } } // QueryAllowanceRequest is the request type for the Query/Allowance RPC method. message QueryAllowanceRequest { // granter is the address of the user granting an allowance of their funds. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryAllowanceResponse is the response type for the Query/Allowance RPC method. message QueryAllowanceResponse { // allowance is an allowance granted for grantee by granter. sourcehub.feegrant.v1beta1.Grant allowance = 1; } // QueryAllowancesRequest is the request type for the Query/Allowances RPC method. message QueryAllowancesRequest { string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines a pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryAllowancesResponse is the response type for the Query/Allowances RPC method. message QueryAllowancesResponse { // allowances are allowance's granted for grantee by granter. repeated sourcehub.feegrant.v1beta1.Grant allowances = 1; // pagination defines a pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. message QueryAllowancesByGranterRequest { option (cosmos_proto.message_added_in) = "cosmos-sdk 0.46"; string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines a pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. message QueryAllowancesByGranterResponse { option (cosmos_proto.message_added_in) = "cosmos-sdk 0.46"; // allowances that have been issued by the granter. repeated sourcehub.feegrant.v1beta1.Grant allowances = 1; // pagination defines a pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryDIDAllowanceRequest is the request type for the Query/DIDAllowance RPC method. message QueryDIDAllowanceRequest { // granter is the address of the user granting an allowance of their funds. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee_did is the DID being granted an allowance of another user's funds. string grantee_did = 2; } // QueryDIDAllowanceResponse is the response type for the Query/DIDAllowance RPC method. message QueryDIDAllowanceResponse { // allowance is an allowance granted for DID by granter. sourcehub.feegrant.v1beta1.Grant allowance = 1; } // QueryDIDAllowancesRequest is the request type for the Query/DIDAllowances RPC method. message QueryDIDAllowancesRequest { // grantee_did is the DID being granted allowances. string grantee_did = 1; // pagination defines a pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryDIDAllowancesResponse is the response type for the Query/DIDAllowances RPC method. message QueryDIDAllowancesResponse { // allowances are DID allowances granted for the grantee DID. repeated sourcehub.feegrant.v1beta1.Grant allowances = 1; // pagination defines a pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryDIDAllowancesByGranterRequest is the request type for the Query/DIDAllowancesByGranter RPC method. message QueryDIDAllowancesByGranterRequest { string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines a pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryDIDAllowancesByGranterResponse is the response type for the Query/DIDAllowancesByGranter RPC method. message QueryDIDAllowancesByGranterResponse { // allowances that have been issued by the granter to DIDs. repeated sourcehub.feegrant.v1beta1.Grant allowances = 1; // pagination defines a pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } ================================================ FILE: proto/sourcehub/feegrant/v1beta1/tx.proto ================================================ syntax = "proto3"; package sourcehub.feegrant.v1beta1; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/feegrant"; // Msg defines the feegrant msg service. service Msg { option (cosmos.msg.v1.service) = true; // GrantAllowance grants fee allowance to the grantee on the granter's // account with the provided expiration time. rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. rpc PruneAllowances(MsgPruneAllowances) returns (MsgPruneAllowancesResponse) { option (cosmos_proto.method_added_in) = "cosmos-sdk v0.50.0"; }; // GrantDIDAllowance grants fee allowance to a DID on the granter's account. rpc GrantDIDAllowance(MsgGrantDIDAllowance) returns (MsgGrantDIDAllowanceResponse); // ExpireDIDAllowance expires a fee allowance by setting the expiration to current PeriodReset. // This allows the allowance to be automatically pruned when the current period expires. rpc ExpireDIDAllowance(MsgExpireDIDAllowance) returns (MsgExpireDIDAllowanceResponse); // PruneDIDAllowances prunes expired DID fee allowances, currently up to 75 at a time. rpc PruneDIDAllowances(MsgPruneDIDAllowances) returns (MsgPruneDIDAllowancesResponse); } // MsgGrantAllowance adds permission for Grantee to spend up to Allowance // of fees from the account of Granter. message MsgGrantAllowance { option (cosmos.msg.v1.signer) = "granter"; option (amino.name) = "cosmos-sdk/MsgGrantAllowance"; // granter is the address of the user granting an allowance of their funds. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"]; } // MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. message MsgGrantAllowanceResponse {} // MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. message MsgRevokeAllowance { option (cosmos.msg.v1.signer) = "granter"; option (amino.name) = "cosmos-sdk/MsgRevokeAllowance"; // granter is the address of the user granting an allowance of their funds. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. message MsgRevokeAllowanceResponse {} // MsgPruneAllowances prunes expired fee allowances. message MsgPruneAllowances { option (cosmos.msg.v1.signer) = "pruner"; option (cosmos_proto.message_added_in) = "cosmos-sdk v0.50"; // pruner is the address of the user pruning expired allowances. string pruner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. message MsgPruneAllowancesResponse { option (cosmos_proto.message_added_in) = "cosmos-sdk v0.50"; } // MsgGrantDIDAllowance adds permission for a DID to spend up to Allowance // of fees from the account of Granter. message MsgGrantDIDAllowance { option (cosmos.msg.v1.signer) = "granter"; option (amino.name) = "sourcehub/MsgGrantDIDAllowance"; // granter is the address of the user granting an allowance of their funds. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee_did is the DID being granted an allowance of another user's funds. string grantee_did = 2; // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "sourcehub.feegrant.v1beta1.FeeAllowanceI"]; } // MsgGrantDIDAllowanceResponse defines the Msg/GrantDIDAllowanceResponse response type. message MsgGrantDIDAllowanceResponse {} // MsgExpireDIDAllowance expires an existing DID allowance by setting the expiration to current PeriodReset. message MsgExpireDIDAllowance { option (cosmos.msg.v1.signer) = "granter"; option (amino.name) = "sourcehub/MsgExpireDIDAllowance"; // granter is the address of the user who granted the allowance. string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee_did is the DID whose allowance should be expired. string grantee_did = 2; } // MsgExpireDIDAllowanceResponse defines the Msg/ExpireDIDAllowanceResponse response type. message MsgExpireDIDAllowanceResponse {} // EventGrantDIDAllowance is emitted when a DID allowance is granted. message EventGrantDIDAllowance { // granter is the address of the user granting an allowance of their funds. string granter = 1; // grantee_did is the DID being granted an allowance of another user's funds. string grantee_did = 2; } // EventExpireDIDAllowance is emitted when a DID allowance is expired. message EventExpireDIDAllowance { // granter is the address of the user expiring an allowance of their funds. string granter = 1; // grantee_did is the DID whose allowance is being expired. string grantee_did = 2; } // MsgPruneDIDAllowances prunes expired DID fee allowances. message MsgPruneDIDAllowances { option (cosmos.msg.v1.signer) = "pruner"; // pruner is the address of the user pruning expired DID allowances. string pruner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgPruneDIDAllowancesResponse defines the Msg/PruneDIDAllowancesResponse response type. message MsgPruneDIDAllowancesResponse {} ================================================ FILE: proto/sourcehub/hub/chain_config.proto ================================================ syntax = "proto3"; package sourcehub.hub; import "amino/amino.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/hub/types"; // ChainConfig specifies flags and parameters which // tune the chain behavior during genesis creation message ChainConfig { option (gogoproto.equal) = true; // allow_zero_fee_txs if true configures the ante handler // to not reject txs with 0 fees bool allow_zero_fee_txs = 1 [ (amino.dont_omitempty) = true ]; // ignore_bearer_auth if true ignores the `authorized_account` // field in the Bearer JWS from Extension Options bool ignore_bearer_auth = 2 [ (amino.dont_omitempty) = true ]; } ================================================ FILE: proto/sourcehub/hub/genesis.proto ================================================ syntax = "proto3"; package sourcehub.hub; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "sourcehub/hub/params.proto"; import "sourcehub/hub/ica_connection.proto"; import "sourcehub/hub/jws_token.proto"; import "sourcehub/hub/chain_config.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/hub/types"; // GenesisState defines the hub module's genesis state. message GenesisState { // params defines all the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // ica_connections defines the list of ICA connections. repeated ICAConnection ica_connections = 2 [(gogoproto.nullable) = false]; // jws_tokens defines the list of JWS token records. repeated JWSTokenRecord jws_tokens = 3 [(gogoproto.nullable) = false]; ChainConfig chain_config = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } ================================================ FILE: proto/sourcehub/hub/ica_connection.proto ================================================ syntax = "proto3"; package sourcehub.hub; option go_package = "github.com/sourcenetwork/sourcehub/x/hub/types"; // ICAConnection represents an interchain account connection between a controller and host chain. message ICAConnection { // ica_address is the interchain account address generated on the host chain. string ica_address = 1; // controller_address is the address of the controlling account on the controller chain. string controller_address = 2; // controller_chain_id is the chain ID of the controller chain. string controller_chain_id = 3; // connection_id is the IBC connection ID used for this interchain account. string connection_id = 4; } ================================================ FILE: proto/sourcehub/hub/jws_token.proto ================================================ syntax = "proto3"; package sourcehub.hub; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/hub/types"; // JWSTokenStatus represents the validity status of a JWS token. enum JWSTokenStatus { // STATUS_UNSPECIFIED is the default/invalid status. STATUS_UNSPECIFIED = 0; // STATUS_VALID indicates the token is valid and can be used. STATUS_VALID = 1; // STATUS_INVALID indicates the token has been invalidated. STATUS_INVALID = 2; } // JWSTokenRecord represents a stored JWS token with its metadata. // The bearer_token field contains sensitive credentials and should not be exposed via public endpoints. message JWSTokenRecord { // token_hash is the unique identifier of the JWS token string token_hash = 1; // bearer_token is the full JWS token string. string bearer_token = 2; // issuer_did is the DID that issued/signed the token. string issuer_did = 3; // authorized_account is the account authorized to use this token. string authorized_account = 4; // issued_at is when the token was created. google.protobuf.Timestamp issued_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // expires_at is when the token expires. google.protobuf.Timestamp expires_at = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // status is the current validity status of the token. JWSTokenStatus status = 7; // first_used_at is when the token was first used in a transaction. google.protobuf.Timestamp first_used_at = 8 [(gogoproto.stdtime) = true]; // last_used_at is when the token was last used in a transaction. google.protobuf.Timestamp last_used_at = 9 [(gogoproto.stdtime) = true]; // invalidated_at is when the token was manually invalidated (if applicable). google.protobuf.Timestamp invalidated_at = 10 [(gogoproto.stdtime) = true]; // invalidated_by is the account that invalidated the token (if applicable). string invalidated_by = 11; } // EventJWSTokenInvalidated is emitted when a JWS token is invalidated. message EventJWSTokenInvalidated { // token_hash is the unique identifier of the invalidated token. string token_hash = 1; // issuer_did is the DID that issued the token. string issuer_did = 2; // authorized_account is the account that was authorized to use this token. string authorized_account = 3; // invalidated_by is the account that invalidated the token. string invalidated_by = 4; } ================================================ FILE: proto/sourcehub/hub/module/module.proto ================================================ syntax = "proto3"; package sourcehub.hub.module; import "cosmos/app/v1alpha1/module.proto"; // Module is the config object for the module. message Module { option (cosmos.app.v1alpha1.module) = { go_import: "github.com/sourcenetwork/sourcehub/x/hub" }; // authority defines the custom module authority. If not set, defaults to the governance module. string authority = 1; } ================================================ FILE: proto/sourcehub/hub/params.proto ================================================ syntax = "proto3"; package sourcehub.hub; import "amino/amino.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/hub/types"; // Params defines the parameters for the module. message Params { option (amino.name) = "sourcehub/x/hub/Params"; option (gogoproto.equal) = true; } ================================================ FILE: proto/sourcehub/hub/query.proto ================================================ syntax = "proto3"; package sourcehub.hub; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "sourcehub/hub/params.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/hub/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 = "/sourcenetwork/sourcehub/hub/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 ]; } ================================================ FILE: proto/sourcehub/hub/tx.proto ================================================ syntax = "proto3"; package sourcehub.hub; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "sourcehub/hub/params.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/hub/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); // InvalidateJWS allows a user to manually invalidate a JWS token // that they own (same DID) or are authorized to use (same creator account). rpc InvalidateJWS(MsgInvalidateJWS) returns (MsgInvalidateJWSResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "sourcehub/x/hub/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 {} // MsgInvalidateJWS is the Msg/InvalidateJWS request type. // This message allows a user to invalidate a JWS token: // - By providing a JWS extension option with matching DID. // - By being the creator/signer of the message with matching authorized account. message MsgInvalidateJWS { option (cosmos.msg.v1.signer) = "creator"; option (amino.name) = "sourcehub/x/hub/MsgInvalidateJWS"; // creator is the address of the message signer. string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // token_hash is the hash/identifier of the JWS token to invalidate. string token_hash = 2; } // MsgInvalidateJWSResponse defines the response structure for executing a MsgInvalidateJWS message. message MsgInvalidateJWSResponse { // success indicates whether the invalidation was successful. bool success = 1; } ================================================ FILE: proto/sourcehub/tier/module/v1beta1/module.proto ================================================ syntax = "proto3"; package sourcehub.tier.module.v1beta1; import "cosmos/app/v1alpha1/module.proto"; // Module is the config object for the module. message Module { option (cosmos.app.v1alpha1.module) = {go_import: "github.com/sourcenetwork/sourcehub/x/tier"}; // authority defines the custom module authority. If not set, defaults to the governance module. string authority = 1; } ================================================ FILE: proto/sourcehub/tier/v1beta1/genesis.proto ================================================ syntax = "proto3"; package sourcehub.tier.v1beta1; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "sourcehub/tier/v1beta1/lockup.proto"; import "sourcehub/tier/v1beta1/params.proto"; import "sourcehub/tier/v1beta1/subscription.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/tier/types"; // GenesisState defines the tier module's genesis state. message GenesisState { // params defines all the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated Lockup lockups = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated UnlockingLockup unlockingLockups = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated Lockup insuranceLockups = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated Developer developers = 5 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; repeated UserSubscription userSubscriptions = 6 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } ================================================ FILE: proto/sourcehub/tier/v1beta1/lockup.proto ================================================ syntax = "proto3"; package sourcehub.tier.v1beta1; import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/tier/types"; // Lockup tracks the locked stake of a delegator. message Lockup { string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; string amount = 3 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; } // UnlockingLockup tracks the unlocking stake of a delegator. message UnlockingLockup { string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; int64 creation_height = 3; string amount = 4 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; // The time at which the stake undelegation will be completed. google.protobuf.Timestamp completion_time = 5 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true ]; // The time after which the unlocking lockup can be completed. google.protobuf.Timestamp unlock_time = 6 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true ]; } ================================================ FILE: proto/sourcehub/tier/v1beta1/params.proto ================================================ syntax = "proto3"; package sourcehub.tier.v1beta1; import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/tier/types"; // Params defines the parameters for the module. message Params { option (amino.name) = "sourcehub/x/tier/Params"; google.protobuf.Duration epoch_duration = 1 [(gogoproto.stdduration) = true]; int64 unlocking_epochs = 2; int64 developer_pool_fee = 3; int64 insurance_pool_fee = 4; int64 insurance_pool_threshold = 5; int64 process_rewards_interval = 6; repeated Rate reward_rates = 7 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // Rate defines the rate for a specific locked stake. message Rate { // amount of locked stake required for earning rewards at this rate. string amount = 1 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; int64 rate = 2; } ================================================ FILE: proto/sourcehub/tier/v1beta1/query.proto ================================================ syntax = "proto3"; package sourcehub.tier.v1beta1; import "amino/amino.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "sourcehub/tier/v1beta1/lockup.proto"; import "sourcehub/tier/v1beta1/params.proto"; import "sourcehub/tier/v1beta1/subscription.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/tier/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 = "/sourcehub/tier/v1beta1/params"; } // Lockup queries a lockup by delegator and validator address. rpc Lockup(LockupRequest) returns (LockupResponse) { option (google.api.http).get = "/sourcehub/tier/v1beta1/locked/{delegator_address}/{validator_address}"; } // Lockups queries all the lockups of a delegator. rpc Lockups(LockupsRequest) returns (LockupsResponse) { option (google.api.http).get = "/sourcehub/tier/v1beta1/locked/{delegator_address}"; } // UnlockingLockup queries an unlocking lockup by delegator and validator address. rpc UnlockingLockup(UnlockingLockupRequest) returns (UnlockingLockupResponse) { option (google.api.http).get = "/sourcehub/tier/v1beta1/unlocking/{delegator_address}/{validator_address}/{creation_height}"; } // UnlockingLockups queries all the unlocking lockups of a delegator. rpc UnlockingLockups(UnlockingLockupsRequest) returns (UnlockingLockupsResponse) { option (google.api.http).get = "/sourcehub/tier/v1beta1/unlocking/{delegator_address}"; } // Developers queries all registered developers. rpc Developers(DevelopersRequest) returns (DevelopersResponse) { option (google.api.http).get = "/sourcehub/tier/v1beta1/developers"; } // UserSubscriptions queries all user subscriptions for a specific developer. rpc UserSubscriptions(UserSubscriptionsRequest) returns (UserSubscriptionsResponse) { option (google.api.http).get = "/sourcehub/tier/v1beta1/subscriptions/{developer}"; } } // 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 ]; } // LockupRequest is the request type for the Query/Lockup RPC method. message LockupRequest { string delegator_address = 1; string validator_address = 2; } // LockupResponse is the response type for the Query/Lockup RPC method. message LockupResponse { Lockup lockup = 1 [(gogoproto.nullable) = false]; } // LockupsRequest is the request type for the Query/Lockups RPC method. message LockupsRequest { string delegator_address = 1; cosmos.base.query.v1beta1.PageRequest pagination = 2; } // LockupsResponse is the response type for the Query/Lockups RPC method. message LockupsResponse { repeated Lockup lockups = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } // UnlockingLockupRequest is the request type for the Query/UnlockingLockup RPC method. message UnlockingLockupRequest { string delegator_address = 1; string validator_address = 2; int64 creation_height = 3; } // UnlockingLockupResponse is the response type for the Query/UnlockingLockup RPC method. message UnlockingLockupResponse { UnlockingLockup unlockingLockup = 1 [(gogoproto.nullable) = false]; } // UnlockingLockupsRequest is the request type for the Query/UnlockingLockups RPC method. message UnlockingLockupsRequest { string delegator_address = 1; cosmos.base.query.v1beta1.PageRequest pagination = 2; } // UnlockingLockupsResponse is the response type for the Query/UnlockingLockups RPC method. message UnlockingLockupsResponse { repeated UnlockingLockup unlockingLockups = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } // DevelopersRequest is the request type for the Query/Developers RPC method. message DevelopersRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; } // DevelopersResponse is the response type for the Query/Developers RPC method. message DevelopersResponse { repeated Developer developers = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } // UserSubscriptionsRequest is the request type for the Query/UserSubscriptions RPC method. message UserSubscriptionsRequest { string developer = 1; cosmos.base.query.v1beta1.PageRequest pagination = 2; } // UserSubscriptionsResponse is the response type for the Query/UserSubscriptions RPC method. message UserSubscriptionsResponse { repeated UserSubscription user_subscriptions = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } ================================================ FILE: proto/sourcehub/tier/v1beta1/subscription.proto ================================================ syntax = "proto3"; package sourcehub.tier.v1beta1; import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/tier/types"; // Developer represents a developer configuration. message Developer { // address is the address of the developer. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. bool auto_lock_enabled = 2; } // UserSubscription represents a user subscribed to a developer. message UserSubscription { // developer is the address of the developer who registered this user. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // user_did is the DID of the registered user. string user_did = 2; // credit_amount is the credit amount allocated to this user. uint64 credit_amount = 3; // period is the subscription period duration in seconds. uint64 period = 4; // start_date is when the subscription started. google.protobuf.Timestamp start_date = 5 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true ]; // last_renewed is when the subscription was last renewed. google.protobuf.Timestamp last_renewed = 6 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true ]; } // TotalDevGranted represents the total credit amount granted by a developer to all users. message TotalDevGranted { // developer is the address of the developer. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_granted is the total credit amount granted to all users. uint64 total_granted = 2; } ================================================ FILE: proto/sourcehub/tier/v1beta1/tx.proto ================================================ syntax = "proto3"; package sourcehub.tier.v1beta1; import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "sourcehub/tier/v1beta1/params.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/tier/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); // Lock defines a (developer) operation for locking a stake. rpc Lock(MsgLock) returns (MsgLockResponse); // LockAuto defines a (developer) operation for locking a stake with automatic validator selection. rpc LockAuto(MsgLockAuto) returns (MsgLockAutoResponse); // Unlock defines a (developer) operation for unlocking a stake. rpc Unlock(MsgUnlock) returns (MsgUnlockResponse); // Redelegate defines a (developer) operation for re-delegating a stake. rpc Redelegate(MsgRedelegate) returns (MsgRedelegateResponse); // CancelUnlocking defines a (developer) operation for canceling an unlocking stake. rpc CancelUnlocking(MsgCancelUnlocking) returns (MsgCancelUnlockingResponse); // CreateDeveloper defines a (developer) operation for creating a new developer record. rpc CreateDeveloper(MsgCreateDeveloper) returns (MsgCreateDeveloperResponse); // UpdateDeveloper defines a (developer) operation for updating an existing developer record. rpc UpdateDeveloper(MsgUpdateDeveloper) returns (MsgUpdateDeveloperResponse); // RemoveDeveloper defines a (developer) operation for removing a developer record. rpc RemoveDeveloper(MsgRemoveDeveloper) returns (MsgRemoveDeveloperResponse); // AddUserSubscription defines a (developer) operation for adding a user subscription. rpc AddUserSubscription(MsgAddUserSubscription) returns (MsgAddUserSubscriptionResponse); // UpdateUserSubscription defines a (developer) operation for updating a user subscription. rpc UpdateUserSubscription(MsgUpdateUserSubscription) returns (MsgUpdateUserSubscriptionResponse); // RemoveUserSubscription defines a (developer) operation for removing a user subscription. // This expires the allowance at the end of the current period rather than immediately revoking it. rpc RemoveUserSubscription(MsgRemoveUserSubscription) returns (MsgRemoveUserSubscriptionResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "sourcehub/x/tier/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 {} // MsgLock is the Msg/Lock request type. message MsgLock { option (cosmos.msg.v1.signer) = "delegator_address"; string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; cosmos.base.v1beta1.Coin stake = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // MsgLockResponse defines the response structure for executing a MsgLock message. message MsgLockResponse {} // MsgLockAuto is the Msg/LockAuto request type. message MsgLockAuto { option (cosmos.msg.v1.signer) = "delegator_address"; string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.base.v1beta1.Coin stake = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // MsgLockAutoResponse defines the response structure for executing a MsgLockAuto message. message MsgLockAutoResponse { string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // MsgUnlock is the Msg/Unlock request type. message MsgUnlock { option (cosmos.msg.v1.signer) = "delegator_address"; string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; cosmos.base.v1beta1.Coin stake = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // MsgUnlockResponse defines the response structure for executing a MsgUnlock message. message MsgUnlockResponse { int64 creation_height = 1; google.protobuf.Timestamp completion_time = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true ]; google.protobuf.Timestamp unlock_time = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true ]; } // MsgRedelegate is the Msg/Redelegate request type. message MsgRedelegate { option (cosmos.msg.v1.signer) = "delegator_address"; string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string src_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; string dst_validator_address = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; cosmos.base.v1beta1.Coin stake = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // MsgRedelegateResponse defines the response structure for executing a MsgRedelegate message. message MsgRedelegateResponse { google.protobuf.Timestamp completion_time = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true ]; } // MsgCancelUnlocking is the Msg/CancelUnlocking request type. message MsgCancelUnlocking { option (cosmos.msg.v1.signer) = "delegator_address"; string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // amount is always less than or equal to unlocking delegation entry balance. cosmos.base.v1beta1.Coin stake = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // creation_height is the height which the unlocking took place. int64 creation_height = 4; } // MsgCancelUnlockingResponse defines the response structure for executing a MsgCancelUnlocking message. message MsgCancelUnlockingResponse {} // MsgCreateDeveloper is the Msg/CreateDeveloper request type. message MsgCreateDeveloper { option (cosmos.msg.v1.signer) = "developer"; // developer is the address of the developer being created. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. bool auto_lock_enabled = 2; } // MsgCreateDeveloperResponse defines the response structure for executing a MsgCreateDeveloper message. message MsgCreateDeveloperResponse {} // MsgUpdateDeveloper is the Msg/UpdateDeveloper request type. message MsgUpdateDeveloper { option (cosmos.msg.v1.signer) = "developer"; // developer is the address of the developer being updated. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. bool auto_lock_enabled = 2; } // MsgUpdateDeveloperResponse defines the response structure for executing a MsgUpdateDeveloper message. message MsgUpdateDeveloperResponse {} // MsgRemoveDeveloper is the Msg/RemoveDeveloper request type. message MsgRemoveDeveloper { option (cosmos.msg.v1.signer) = "developer"; // developer is the address of the developer being removed. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgRemoveDeveloperResponse defines the response structure for executing a MsgRemoveDeveloper message. message MsgRemoveDeveloperResponse {} // MsgAddUserSubscription is the Msg/AddUserSubscription request type. message MsgAddUserSubscription { option (cosmos.msg.v1.signer) = "developer"; // developer is the address of the developer adding the subscription. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // user_did is the DID of the user being added to the subscription. string user_did = 2; // amount is the credit amount to be allocated to the user per period. uint64 amount = 3; // period is the subscription period duration in seconds. uint64 period = 4; } // MsgAddUserSubscriptionResponse defines the response structure for executing a MsgAddUserSubscription message. message MsgAddUserSubscriptionResponse {} // MsgUpdateUserSubscription is the Msg/UpdateUserSubscription request type. message MsgUpdateUserSubscription { option (cosmos.msg.v1.signer) = "developer"; // developer is the address of the developer updating the subscription. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // user_did is the DID of the user whose subscription is being updated. string user_did = 2; // amount is the new credit amount to be allocated to the user per period. uint64 amount = 3; // period is the new subscription period duration in seconds. uint64 period = 4; } // MsgUpdateUserSubscriptionResponse defines the response structure for executing a MsgUpdateUserSubscription message. message MsgUpdateUserSubscriptionResponse {} // MsgRemoveUserSubscription is the Msg/RemoveUserSubscription request type. // This message removes the user subscription and expires the associated allowance at the end of the current period. message MsgRemoveUserSubscription { option (cosmos.msg.v1.signer) = "developer"; // developer is the address of the developer removing the subscription. string developer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // user_did is the DID of the user whose subscription is being removed. string user_did = 2; } // MsgRemoveUserSubscriptionResponse defines the response structure for executing a MsgRemoveUserSubscription message. message MsgRemoveUserSubscriptionResponse {} ================================================ FILE: readme.md ================================================ # SourceHub Source's Trust Layer ## Getting Started To quickly spin up a standalone SourceHub network, we recommend using Docker. This repository contains a Dockerfile which if run with the environment variable `STANDALONE=1`, spins up a new single node SourceHub network. To get started build the docker image with, ``` docker image build -t sourcehub:latest . ``` and start it with: ``` docker run -p 9090:9090 -p 26657:26657 -p 26656:26656 -p 1317:1317 -e STANDALONE=1 sourcehub:latest ``` The container will start a new network with no fees and a funded faucet account which can be used. The funded account is static for all new instances of the standalone deployment and can be imported by a keyring outside docker or a wallet (eg keplr) to broadcast transactions. The account mnemonic is: ``` comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold ``` For a complete list of params regarding the Dockerfile, see [docker readme](./docker/README.md) ## Development ### Prerequisites - Go 1.23 or later - Ignite CLI (for proto generation) - Docker (optional) ### Building the Project ```bash # Generate protos make proto # Build the binary make build # or "make build-mac" for macOS # Install globally make install ``` ### Running the Chain Locally ```bash # Run build/sourcehubd directly ./scripts/dev-entrypoint.sh start # or using Docker docker-compose up ``` The `./scripts/dev-entrypoint.sh` script runs `./scripts/genesis-setup.sh` internally and automatically initializes a new node with chain ID `sourcehub-dev`, creates validator and faucet keys, and configures dev settings. ### Configuration The `./scripts/genesis-setup.sh` script configures: - **Zero-fee transactions**: `allow_zero_fee_txs = true` for easier testing - **Gas**: Minimum gas prices set to `0.001uopen,0.001ucredit` - **IBC**: IBC transfers enabled - **API & Swagger**: API and Swagger enabled - **CORS**: CORS enabled to interact with API locally - **Metrics**: Prometheus metrics enabled - **Faucet**: Built-in faucet with test funds ### Testing ```bash # Run all tests make test # Run test matrix make test:all ``` ## Documentation - [Ignite CLI](https://ignite.com/cli) - [Tutorials](https://docs.ignite.com/guide) - [Ignite CLI docs](https://docs.ignite.com) - [Cosmos SDK docs](https://docs.cosmos.network) ================================================ FILE: scripts/faucet-key.json ================================================ { "mnemonic": "comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold", "name": "faucet", "address": "source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt" } ================================================ FILE: scripts/faucet.sh ================================================ #!/usr/bin/env sh # FAUCET_KEY_FILE="$HOME/.sourcehub/config/faucet-key.json" if [ ! -f "$FAUCET_KEY_FILE" ]; then echo "Error: Faucet key file not found at $FAUCET_KEY_FILE" exit 1 fi FAUCET_ADDRESS=$(jq -r '.address' "$FAUCET_KEY_FILE") if [ -z "$FAUCET_ADDRESS" ] || [ "$FAUCET_ADDRESS" = "null" ]; then echo "Error: Could not extract faucet address from $FAUCET_KEY_FILE" exit 1 fi if [ -z $1 ]; then echo 'faucet.sh target-account [amount]' exit 1 fi TARGET_ADDRESS=$1 AMOUNT=${2:-"1000000000uopen"} echo "Sending $AMOUNT from faucet ($FAUCET_ADDRESS) to $TARGET_ADDRESS" build/sourcehubd tx bank send "$FAUCET_ADDRESS" "$TARGET_ADDRESS" "$AMOUNT" --from "$FAUCET_ADDRESS" --chain-id sourcehub-dev --keyring-backend test --gas auto --fees 200uopen -y ================================================ FILE: scripts/full-node.sh ================================================ #!/bin/bash set -e rm -rf ~/.sourcehub-full || true BIN="build/sourcehubd" CHAIN_ID="sourcehub-dev" HOME_DIR="$HOME/.sourcehub-full" SNAPSHOT_INTERVAL=50 P2P=tcp://0.0.0.0:27684 ADDR=tcp://0.0.0.0:27685 RPC=tcp://127.0.0.1:27686 GRPC=localhost:9095 PPROF=localhost:6065 sedi() { if [[ "$OSTYPE" == "darwin"* ]]; then sed -i '' "$@" else sed -i "$@" fi } echo "Initializing full node..." $BIN init full-node --chain-id $CHAIN_ID --home $HOME_DIR rsync -a --exclude priv_validator_state.json ~/.sourcehub/data/ $HOME_DIR/data/ sedi 's/^minimum-gas-prices = .*/minimum-gas-prices = "0.001uopen,0.001ucredit"/' $HOME_DIR/config/app.toml sedi 's/^enable = .*/enable = true/' $HOME_DIR/config/app.toml # Enable storing snapshots sedi "s/^snapshot-interval = .*/snapshot-interval = $SNAPSHOT_INTERVAL/" $HOME_DIR/config/app.toml NODE_ID=$($BIN tendermint show-node-id --home ~/.sourcehub) # NODE_ID=$(curl -s http://localhost:26657/status | jq -r '.result.node_info.id') sedi "s|^#* *persistent_peers *=.*|persistent_peers = \"$NODE_ID@0.0.0.0:26656\"|" $HOME_DIR/config/config.toml # For local setups sedi "s/^allow_duplicate_ip *=.*/allow_duplicate_ip = true/" $HOME_DIR/config/config.toml sedi "s/^addr_book_strict *=.*/addr_book_strict = false/" $HOME_DIR/config/config.toml echo "Starting full node with snapshot serving..." $BIN start \ --home $HOME_DIR \ --p2p.laddr $P2P \ --address $ADDR \ --rpc.laddr $RPC \ --grpc.address $GRPC \ --rpc.pprof_laddr $PPROF ================================================ FILE: scripts/genesis-setup.sh ================================================ #!/bin/sh set -e rm -rf "$HOME/.sourcehub" || true sedi() { if [[ "$OSTYPE" == "darwin"* ]]; then sed -i '' "$@" else sed -i "$@" fi } CHAIN_ID="sourcehub-dev" VALIDATOR="validator" FAUCET="faucet" NODE_NAME="node" BIN="build/sourcehubd" GENESIS="$HOME/.sourcehub/config/genesis.json" FAUCET_KEY="$HOME/.sourcehub/config/faucet-key.json" APP_TOML="$HOME/.sourcehub/config/app.toml" CONFIG_TOML="$HOME/.sourcehub/config/config.toml" $BIN init $NODE_NAME --chain-id $CHAIN_ID --default-denom="uopen" # Copy faucet key to config and add it to the keyring mkdir -p "$HOME/.sourcehub/config" && cp scripts/faucet-key.json "$FAUCET_KEY" FAUCET_MNEMONIC=$(jq -r '.mnemonic' "$FAUCET_KEY") echo "$FAUCET_MNEMONIC" | $BIN keys add $FAUCET --recover --keyring-backend test FAUCET_ADDR=$($BIN keys show $FAUCET -a --keyring-backend test) $BIN keys add $VALIDATOR --keyring-backend test VALIDATOR_ADDR=$($BIN keys show $VALIDATOR -a --keyring-backend test) $BIN genesis add-genesis-account $VALIDATOR_ADDR 1000000000000000uopen # 1b open $BIN genesis add-genesis-account $FAUCET_ADDR 100000000000000uopen,1000000000000000ucredit # 100m open and 1b ucredit $BIN genesis gentx $VALIDATOR 100000000000000uopen --chain-id $CHAIN_ID --keyring-backend test # 100m open $BIN genesis collect-gentxs # Enable IBC jq '.app_state.transfer.port_id = "transfer"' "$GENESIS" > tmp.json && mv tmp.json "$GENESIS" jq '.app_state.transfer += {"params": {"send_enabled": true, "receive_enabled": true}}' "$GENESIS" > tmp.json && mv tmp.json "$GENESIS" # Enable/disable zero-fee transactions jq '.app_state.hub.chain_config.allow_zero_fee_txs = true' "$GENESIS" > tmp.json && mv tmp.json "$GENESIS" jq '.app_state.hub.chain_config.ignore_bearer_auth = true' "$GENESIS" > tmp.json && mv tmp.json "$GENESIS" # app.toml sedi 's/minimum-gas-prices = .*/minimum-gas-prices = "0.001uopen,0.001ucredit"/' "$APP_TOML" sedi 's/^enabled = .*/enabled = true/' "$APP_TOML" sedi 's/^prometheus-retention-time = .*/prometheus-retention-time = 60/' "$APP_TOML" sedi 's/^enabled-unsafe-cors = .*/enabled-unsafe-cors = true/' "$APP_TOML" sedi 's/^enable = .*/enable = true/' "$APP_TOML" sedi 's/^swagger = .*/swagger = true/' "$APP_TOML" sedi 's/^enable_faucet = .*/enable_faucet = true/' "$APP_TOML" # config.toml sedi 's/^timeout_propose = .*/timeout_propose = "500ms"/' "$CONFIG_TOML" sedi 's/^timeout_prevote = .*/timeout_prevote = "500ms"/' "$CONFIG_TOML" sedi 's/^timeout_precommit = .*/timeout_precommit = "500ms"/' "$CONFIG_TOML" sedi 's/^timeout_commit = .*/timeout_commit = "1s"/' "$CONFIG_TOML" sedi 's/^prometheus = .*/prometheus = true/' "$CONFIG_TOML" sedi 's/^cors_allowed_origins = .*/cors_allowed_origins = ["*"]/' "$CONFIG_TOML" echo "Validator Address $VALIDATOR_ADDR" ================================================ FILE: scripts/hermes_config.toml ================================================ [global] log_level = 'info' [mode] [mode.clients] enabled = true refresh = true misbehaviour = true [mode.connections] enabled = true [mode.channels] enabled = true [mode.packets] enabled = true clear_interval = 100 clear_on_start = true [[chains]] id = 'sourcehub-1' type = 'CosmosSdk' rpc_addr = 'http://127.0.0.1:26667' grpc_addr = 'http://127.0.0.1:9091' event_source = { mode = 'push', url = 'ws://127.0.0.1:26667/websocket', batch_delay = '500ms' } rpc_timeout = '10s' trusted_node = false account_prefix = 'source' key_name = 'source' store_prefix = 'ibc' default_gas = 100000 max_gas = 4000000 gas_price = { price = 0.025, denom = 'uopen' } gas_multiplier = 1.2 clock_drift = '10s' trusting_period = '14days' trust_threshold = '2/3' address_type = { derivation = 'cosmos' } [[chains]] id = 'sourcehub-2' type = 'CosmosSdk' rpc_addr = 'http://127.0.0.1:26670' grpc_addr = 'http://127.0.0.1:9092' event_source = { mode = 'push', url = 'ws://127.0.0.1:26670/websocket', batch_delay = '500ms' } rpc_timeout = '10s' trusted_node = false account_prefix = 'source' key_name = 'source' store_prefix = 'ibc' default_gas = 100000 max_gas = 4000000 gas_price = { price = 0.025, denom = 'uopen' } gas_multiplier = 1.2 clock_drift = '10s' trusting_period = '14days' trust_threshold = '2/3' address_type = { derivation = 'cosmos' } ================================================ FILE: scripts/ignite/config-tier.yml ================================================ version: 1 validation: sovereign accounts: - name: alice mnemonic: 'near smoke great nasty alley food crush nurse rubber say danger search employ under gaze today alien eager risk letter drum relief sponsor current' # address: source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9 coins: - 100000000000000uopen # 100m open - name: bob mnemonic: 'kingdom race grab ask size settle gesture vendor certain purpose clump gauge firm kiwi muffin term hello addict laugh tornado copper all sheriff reflect' # address: source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et coins: - 100000000000000uopen # 100m open - name: charlie mnemonic: 'vast brand cannon priority equip comfort mixed connect belt holiday either bleak employ sauce wrong memory cover appear symptom assume faint fire bargain guide' # address: source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4 coins: - 100000000000000uopen # 100m open - name: frank mnemonic: 'trophy space shove poverty armor trap foil siege poem keen cancel device garage item desert mention school multiply viable practice silent push flip blame' # address: source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy coins: - 100000000000000uopen # 100m open - name: victor mnemonic: 'divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight' # address: source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme coins: - 200000000000000uopen # 200m open faucet: name: frank coins: - 100000000000000uopen # 100m open validators: - name: victor # address: sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm bonded: 100000000000000uopen # 100m open build: main: cmd/sourcehubd genesis: app_state: crisis: constant_fee: amount: '1000' denom: 'uopen' gov: params: min_deposit: - amount: '1000000000' denom: 'uopen' expedited_min_deposit: - amount: '5000000000' denom: 'uopen' mint: params: blocks_per_year: '31557600' goal_bonded: '0.67' inflation_min: '0.02' inflation_max: '0.15' inflation_rate_change: '0.13' mint_denom: 'uopen' staking: params: bond_denom: 'uopen' unbonding_time: '60s' epochs: epochs: - 'identifier': 'tier' 'duration': '60s' tier: params: epoch_duration: '60s' unlocking_epochs: 2 developer_pool_fee: 2 # 2% insurance_pool_fee: 1 # 1% insurance_pool_threshold: 100000000000 # 100k open process_rewards_interval: 1000 # 1000 blocks reward_rates: - amount: '300' rate: 150 - amount: '200' rate: 120 - amount: '100' rate: 110 - amount: '0' rate: 100 ================================================ FILE: scripts/rpc-node.sh ================================================ #!/bin/bash set -e rm -rf ~/.sourcehub-rpc || true sedi() { if [[ "$OSTYPE" == "darwin"* ]]; then sed -i '' "$@" else sed -i "$@" fi } BIN="build/sourcehubd" CHAIN_ID="sourcehub-dev" HOME_DIR="$HOME/.sourcehub-rpc" RPC_SERVERS="http://localhost:27686,http://localhost:27686" TRUST_HEIGHT=50 TRUST_HASH=$(curl -s http://localhost:27686/block?height=$TRUST_HEIGHT | jq -r '.result.block_id.hash') P2P=tcp://0.0.0.0:27674 ADDR=tcp://0.0.0.0:27675 RPC=tcp://0.0.0.0:26676 GRPC=0.0.0.0:9094 PPROF=localhost:6064 echo "Initializing new node..." $BIN init rpc-node --chain-id $CHAIN_ID --home $HOME_DIR cp ~/.sourcehub/config/genesis.json $HOME_DIR/config/genesis.json sedi 's/^minimum-gas-prices = .*/minimum-gas-prices = "0.001uopen,0.001ucredit"/' ~/.sourcehub/config/app.toml # Enable API / GRPC sedi 's/^enable = .*/enable = true/' ~/.sourcehub/config/app.toml # Enable state sync from snapshots sedi "s/^enable *=.*/enable = true/" $HOME_DIR/config/config.toml sedi "s|^rpc_servers *=.*|rpc_servers = \"$RPC_SERVERS\"|" $HOME_DIR/config/config.toml sedi "s|^trust_height *=.*|trust_height = $TRUST_HEIGHT|" $HOME_DIR/config/config.toml sedi "s|^trust_hash *=.*|trust_hash = \"$TRUST_HASH\"|" $HOME_DIR/config/config.toml # For local setups sedi "s/^allow_duplicate_ip *=.*/allow_duplicate_ip = true/" $HOME_DIR/config/config.toml sedi "s/^addr_book_strict *=.*/addr_book_strict = false/" $HOME_DIR/config/config.toml NODE_ID=$(curl -s http://localhost:27686/status | jq -r '.result.node_info.id') # NODE_ID=$($BIN tendermint show-node-id --home ~/.sourcehub-full) sedi "s|^#* *persistent_peers *=.*|persistent_peers = \"$NODE_ID@0.0.0.0:27684\"|" $HOME_DIR/config/config.toml echo "Starting new node (state sync)..." $BIN start \ --home $HOME_DIR \ --p2p.laddr $P2P \ --address $ADDR \ --rpc.laddr $RPC \ --grpc.address $GRPC \ --rpc.pprof_laddr $PPROF ================================================ FILE: scripts/run-test-matrix ================================================ #!/usr/bin/env bash set -e; IFS=$'\n' for env in $(build/test_env_generator all); do echo "Executing with $env" eval $env go test ./tests/integration/... -count=1 -v done ================================================ FILE: scripts/start-multichain-ica.sh ================================================ #!/bin/sh set -e BIN="build/sourcehubd" CHAIN1_ID="sourcehub-1" CHAIN2_ID="sourcehub-2" C1V1_HOME="$HOME/.sourcehub-1-1" C2V1_HOME="$HOME/.sourcehub-2-1" HERMES_HOME="$HOME/.hermes" C1V1_GRPC=localhost:9091 C1V1_P2P=localhost:27665 C1V1_ADDR=tcp://0.0.0.0:27666 C1V1_RPC=tcp://127.0.0.1:26667 C1V1_PPROF=localhost:6061 C2V1_GRPC=localhost:9092 C2V1_P2P=localhost:27668 C2V1_ADDR=tcp://0.0.0.0:27669 C2V1_RPC=tcp://127.0.0.1:26670 C2V1_PPROF=localhost:6062 C2V1_PPROF=localhost:6062 C1V1_NAME="validator1-1-node" C2V1_NAME="validator2-1-node" C1V1="validator1-1" C2V1="validator2-1" ICA_PACKET_JSON="scripts/ica_packet.json" POLICY_CONTENT="name: ica test policy" # Exit if no hermes binary found if ! type "hermes" > /dev/null; then echo "Hermes binary not found" exit 0 fi # Kill running processes killall sourcehubd 2>/dev/null || true killall hermes 2>/dev/null || true # Cleanup directories rm -rf $C1V1_HOME rm -rf $C2V1_HOME rm -rf $HERMES_HOME rm -rf chain_*.log rm -rf hermes.log rm -rf $ICA_PACKET_JSON # Make hermes dir and copy the config mkdir $HERMES_HOME cp scripts/hermes_config.toml "$HERMES_HOME/config.toml" # Build the binary make build # make build-mac echo "==> Initializing sourcehub-1..." $BIN init $C1V1_NAME --chain-id $CHAIN1_ID --default-denom="uopen" --home="$C1V1_HOME" $BIN keys add $C1V1 --keyring-backend=test --home="$C1V1_HOME" VALIDATOR1_ADDR=$($BIN keys show $C1V1 -a --keyring-backend=test --home="$C1V1_HOME") $BIN genesis add-genesis-account $VALIDATOR1_ADDR 1000000000000uopen --home="$C1V1_HOME" echo "divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight" | $BIN keys add source --recover --keyring-backend=test --home="$C1V1_HOME" SOURCE_ADDR=$($BIN keys show source -a --keyring-backend=test --home="$C1V1_HOME") $BIN genesis add-genesis-account $SOURCE_ADDR 1000000000000uopen --home="$C1V1_HOME" $BIN genesis gentx $C1V1 100000000uopen --chain-id $CHAIN1_ID --keyring-backend=test --home="$C1V1_HOME" $BIN genesis collect-gentxs --home "$C1V1_HOME" $BIN genesis validate-genesis --home "$C1V1_HOME" jq '.app_state.transfer.port_id = "transfer"' "$C1V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C1V1_HOME/config/genesis.json" jq '.app_state.transfer += {"params": {"send_enabled": true, "receive_enabled": true}}' "$C1V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C1V1_HOME/config/genesis.json" sed -i '' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uopen,0.001ucredit"/' "$C1V1_HOME/config/app.toml" sed -i '' 's/^timeout_propose = .*/timeout_propose = "500ms"/' "$C1V1_HOME/config/config.toml" sed -i '' 's/^timeout_prevote = .*/timeout_prevote = "500ms"/' "$C1V1_HOME/config/config.toml" sed -i '' 's/^timeout_precommit = .*/timeout_precommit = "500ms"/' "$C1V1_HOME/config/config.toml" sed -i '' 's/^timeout_commit = .*/timeout_commit = "1s"/' "$C1V1_HOME/config/config.toml" sleep 1 echo "==> Initializing sourcehub-2..." $BIN init $C2V1_NAME --chain-id $CHAIN2_ID --default-denom="uopen" --home="$C2V1_HOME" $BIN keys add $C2V1 --keyring-backend=test --home="$C2V1_HOME" VALIDATOR2_ADDR=$($BIN keys show $C2V1 -a --keyring-backend=test --home="$C2V1_HOME") $BIN genesis add-genesis-account $VALIDATOR2_ADDR 1000000000000uopen --home="$C2V1_HOME" echo "divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight" | $BIN keys add source --recover --keyring-backend=test --home="$C2V1_HOME" SOURCE2_ADDR=$($BIN keys show source -a --keyring-backend=test --home="$C2V1_HOME") $BIN genesis add-genesis-account $SOURCE2_ADDR 1000000000000uopen --home="$C2V1_HOME" $BIN genesis gentx $C2V1 100000000uopen --chain-id $CHAIN2_ID --keyring-backend=test --home="$C2V1_HOME" $BIN genesis collect-gentxs --home "$C2V1_HOME" $BIN genesis validate-genesis --home "$C2V1_HOME" jq '.app_state.transfer.port_id = "transfer"' "$C2V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C2V1_HOME/config/genesis.json" jq '.app_state.transfer += {"params": {"send_enabled": true, "receive_enabled": true}}' "$C2V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C2V1_HOME/config/genesis.json" sed -i '' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uopen,0.001ucredit"/' "$C2V1_HOME/config/app.toml" sed -i '' 's/^timeout_propose = .*/timeout_propose = "500ms"/' "$C2V1_HOME/config/config.toml" sed -i '' 's/^timeout_prevote = .*/timeout_prevote = "500ms"/' "$C2V1_HOME/config/config.toml" sed -i '' 's/^timeout_precommit = .*/timeout_precommit = "500ms"/' "$C2V1_HOME/config/config.toml" sed -i '' 's/^timeout_commit = .*/timeout_commit = "1s"/' "$C2V1_HOME/config/config.toml" sleep 1 echo "==> Starting sourcehub-1..." $BIN start \ --home $C1V1_HOME \ --rpc.laddr $C1V1_RPC \ --rpc.pprof_laddr $C1V1_PPROF \ --p2p.laddr $C1V1_P2P \ --grpc.address $C1V1_GRPC \ --address $C1V1_ADDR \ > chain_1_1.log 2>&1 & echo "sourcehub-1 running" sleep 1 echo "==> Starting sourcehub-2..." $BIN start \ --home $C2V1_HOME \ --rpc.laddr $C2V1_RPC \ --rpc.pprof_laddr $C2V1_PPROF \ --p2p.laddr $C2V1_P2P \ --grpc.address $C2V1_GRPC \ --address $C2V1_ADDR \ > chain_2_1.log 2>&1 & echo "sourcehub-2 running" sleep 10 # Add hermes key (same for both chains) echo "divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight" > /tmp/mnemonic.txt hermes keys add --chain $CHAIN1_ID --mnemonic-file /tmp/mnemonic.txt hermes keys add --chain $CHAIN2_ID --mnemonic-file /tmp/mnemonic.txt rm /tmp/mnemonic.txt echo "==> Creating IBC connection..." hermes create connection \ --a-chain $CHAIN1_ID \ --b-chain $CHAIN2_ID sleep 1 echo "==> Starting Hermes..." hermes start > hermes.log 2>&1 & sleep 1 # Detect the actual connection IDs assigned by the chains CONNECTION_ID=$($BIN q ibc connection connections --node "$C1V1_RPC" -o json | jq -r '.connections | last | .id') HOST_CONNECTION_ID=$($BIN q ibc connection connections --node "$C2V1_RPC" -o json | jq -r '.connections | last | .id') echo "==> Detected connection IDs:" echo "Controller connection: $CONNECTION_ID" echo "Host connection: $HOST_CONNECTION_ID" CTRL_HOME=$C1V1_HOME CTRL_RPC=$C1V1_RPC CTRL_CHAIN_ID=$CHAIN1_ID ICA_VERSION=$(cat < Registering interchain account on $CTRL_CHAIN_ID (controller) via $CONNECTION_ID" echo "Using version metadata: $ICA_VERSION" $BIN tx interchain-accounts controller register "$CONNECTION_ID" \ --from $SOURCE_ADDR \ --keyring-backend test \ --chain-id $CTRL_CHAIN_ID \ --home "$CTRL_HOME" \ --node "$CTRL_RPC" \ --ordering ORDER_ORDERED \ --version "$ICA_VERSION" \ --gas auto \ --fees 500uopen \ --yes echo "==> Waiting for ICA handshake to complete..." sleep 10 echo "==> Querying host ICA address..." ICA_ADDR=$($BIN q interchain-accounts controller interchain-account $SOURCE_ADDR "$CONNECTION_ID" \ --node "$CTRL_RPC" -o json | jq -r '.address') echo "Host ICA address: $ICA_ADDR" if [ -z "$ICA_ADDR" ] || [ "$ICA_ADDR" = "null" ]; then echo "Failed to resolve ICA address. Check Hermes and connection IDs." exit 1 fi echo "==> Preparing ICA packet with ACP MsgCreatePolicy..." go run ./cmd/ica_packet_gen --creator "$ICA_ADDR" --policy "$POLICY_CONTENT" > $ICA_PACKET_JSON echo "Packet: $(cat $ICA_PACKET_JSON)" echo "==> Sending ICA tx packet from controller..." $BIN tx interchain-accounts controller send-tx $CONNECTION_ID $ICA_PACKET_JSON \ --from $SOURCE_ADDR \ --keyring-backend test \ --chain-id $CTRL_CHAIN_ID \ --home "$CTRL_HOME" \ --node "$CTRL_RPC" \ --gas auto --gas-adjustment 1.3 \ --fees 500uopen \ --yes echo "Waiting for host execution..." sleep 5 echo "==> Querying ACP policy IDs on host..." $BIN q acp policy-ids --node "$C2V1_RPC" -o json || true echo "DONE" ================================================ FILE: scripts/start-multichain.sh ================================================ #!/bin/sh set -e BIN="build/sourcehubd" CHAIN1_ID="sourcehub-1" CHAIN2_ID="sourcehub-2" C1V1_HOME="$HOME/.sourcehub-1-1" C2V1_HOME="$HOME/.sourcehub-2-1" C1V2_HOME="$HOME/.sourcehub-1-2" C2V2_HOME="$HOME/.sourcehub-2-2" HERMES_HOME="$HOME/.hermes" C1V1_GRPC=localhost:9091 C1V1_P2P=localhost:27665 C1V1_ADDR=tcp://0.0.0.0:27666 C1V1_RPC=tcp://127.0.0.1:26667 C1V1_PPROF=localhost:6061 C2V1_GRPC=localhost:9092 C2V1_P2P=localhost:27668 C2V1_ADDR=tcp://0.0.0.0:27669 C2V1_RPC=tcp://127.0.0.1:26670 C2V1_PPROF=localhost:6062 C1V2_GRPC=localhost:9093 C1V2_P2P=localhost:27671 C1V2_ADDR=tcp://0.0.0.0:27672 C1V2_RPC=tcp://127.0.0.1:26673 C1V2_PPROF=localhost:6063 C2V2_GRPC=localhost:9094 C2V2_P2P=localhost:27674 C2V2_ADDR=tcp://0.0.0.0:27675 C2V2_RPC=tcp://127.0.0.1:26676 C2V2_PPROF=localhost:6064 C1V1_NAME="validator1-1-node" C2V1_NAME="validator2-1-node" C1V2_NAME="validator1-2-node" C2V2_NAME="validator2-2-node" C1V1="validator1-1" C2V1="validator2-1" C1V2="validator1-2" C2V2="validator2-2" C1V2_JSON="scripts/validator1-2.json" C2V2_JSON="scripts/validator2-2.json" # Exit if no hermes binary found if ! type "hermes" > /dev/null; then echo "Hermes binary not found" exit 0 fi # Kill running processes killall sourcehubd 2>/dev/null || true killall hermes 2>/dev/null || true # Cleanup directories rm -rf $C1V1_HOME rm -rf $C2V1_HOME rm -rf $HERMES_HOME rm -rf $C1V2_HOME rm -rf $C2V2_HOME rm -rf chain_*.log rm -rf hermes.log rm $C1V2_JSON 2>/dev/null || true rm $C2V2_JSON 2>/dev/null || true # Make hermes dir and copy the config mkdir $HERMES_HOME cp scripts/hermes_config.toml "$HERMES_HOME/config.toml" # Build the binary make build # make build-mac echo "==> Initializing sourcehub-1..." $BIN init $C1V1_NAME --chain-id $CHAIN1_ID --default-denom="uopen" --home="$C1V1_HOME" $BIN keys add $C1V1 --keyring-backend=test --home="$C1V1_HOME" VALIDATOR1_ADDR=$($BIN keys show $C1V1 -a --keyring-backend=test --home="$C1V1_HOME") $BIN genesis add-genesis-account $VALIDATOR1_ADDR 1000000000000uopen --home="$C1V1_HOME" echo "divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight" | $BIN keys add source --recover --keyring-backend=test --home="$C1V1_HOME" SOURCE_ADDR=$($BIN keys show source -a --keyring-backend=test --home="$C1V1_HOME") $BIN genesis add-genesis-account $SOURCE_ADDR 1000000000000uopen --home="$C1V1_HOME" $BIN genesis gentx $C1V1 100000000uopen --chain-id $CHAIN1_ID --keyring-backend=test --home="$C1V1_HOME" $BIN genesis collect-gentxs --home "$C1V1_HOME" $BIN genesis validate-genesis --home "$C1V1_HOME" jq '.app_state.transfer.port_id = "transfer"' "$C1V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C1V1_HOME/config/genesis.json" jq '.app_state.transfer += {"params": {"send_enabled": true, "receive_enabled": true}}' "$C1V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C1V1_HOME/config/genesis.json" sed -i '' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uopen,0.001ucredit"/' "$C1V1_HOME/config/app.toml" sed -i '' 's/^timeout_propose = .*/timeout_propose = "500ms"/' "$C1V1_HOME/config/config.toml" sed -i '' 's/^timeout_prevote = .*/timeout_prevote = "500ms"/' "$C1V1_HOME/config/config.toml" sed -i '' 's/^timeout_precommit = .*/timeout_precommit = "500ms"/' "$C1V1_HOME/config/config.toml" sed -i '' 's/^timeout_commit = .*/timeout_commit = "1s"/' "$C1V1_HOME/config/config.toml" sleep 1 echo "==> Initializing sourcehub-2..." $BIN init $C2V1_NAME --chain-id $CHAIN2_ID --default-denom="uopen" --home="$C2V1_HOME" $BIN keys add $C2V1 --keyring-backend=test --home="$C2V1_HOME" VALIDATOR2_ADDR=$($BIN keys show $C2V1 -a --keyring-backend=test --home="$C2V1_HOME") $BIN genesis add-genesis-account $VALIDATOR2_ADDR 1000000000000uopen --home="$C2V1_HOME" echo "divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight" | $BIN keys add source --recover --keyring-backend=test --home="$C2V1_HOME" SOURCE_ADDR=$($BIN keys show source -a --keyring-backend=test --home="$C2V1_HOME") $BIN genesis add-genesis-account $SOURCE_ADDR 1000000000000uopen --home="$C2V1_HOME" $BIN genesis gentx $C2V1 100000000uopen --chain-id $CHAIN2_ID --keyring-backend=test --home="$C2V1_HOME" $BIN genesis collect-gentxs --home "$C2V1_HOME" $BIN genesis validate-genesis --home "$C2V1_HOME" jq '.app_state.transfer.port_id = "transfer"' "$C2V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C2V1_HOME/config/genesis.json" jq '.app_state.transfer += {"params": {"send_enabled": true, "receive_enabled": true}}' "$C2V1_HOME/config/genesis.json" > tmp.json && mv tmp.json "$C2V1_HOME/config/genesis.json" sed -i '' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uopen,0.001ucredit"/' "$C2V1_HOME/config/app.toml" sed -i '' 's/^timeout_propose = .*/timeout_propose = "500ms"/' "$C2V1_HOME/config/config.toml" sed -i '' 's/^timeout_prevote = .*/timeout_prevote = "500ms"/' "$C2V1_HOME/config/config.toml" sed -i '' 's/^timeout_precommit = .*/timeout_precommit = "500ms"/' "$C2V1_HOME/config/config.toml" sed -i '' 's/^timeout_commit = .*/timeout_commit = "1s"/' "$C2V1_HOME/config/config.toml" sleep 1 echo "==> Starting sourcehub-1..." $BIN start \ --home $C1V1_HOME \ --rpc.laddr $C1V1_RPC \ --rpc.pprof_laddr $C1V1_PPROF \ --p2p.laddr $C1V1_P2P \ --grpc.address $C1V1_GRPC \ --address $C1V1_ADDR \ > chain_1_1.log 2>&1 & echo "sourcehub-1 running" sleep 1 echo "==> Starting sourcehub-2..." $BIN start \ --home $C2V1_HOME \ --rpc.laddr $C2V1_RPC \ --rpc.pprof_laddr $C2V1_PPROF \ --p2p.laddr $C2V1_P2P \ --grpc.address $C2V1_GRPC \ --address $C2V1_ADDR \ > chain_2_1.log 2>&1 & echo "sourcehub-2 running" # Let chains start before adding more validators sleep 5 echo "==> Initializing second validator on sourcehub-1..." $BIN init $C1V2_NAME --chain-id $CHAIN1_ID --home="$C1V2_HOME" $BIN keys add $C1V2 --keyring-backend=test --home="$C1V2_HOME" VAL11_ADDR=$($BIN keys show validator1-2 -a --keyring-backend=test --home="$C1V2_HOME") rsync -a --exclude priv_validator_state.json ~/.sourcehub-1-1/data/ ~/.sourcehub-1-2/data/ VAL1_ID=$($BIN tendermint show-node-id --home="$C1V1_HOME") sed -i '' "s|^persistent_peers = .*|persistent_peers = \"$VAL1_ID@$C1V1_P2P\"|" "$C1V2_HOME/config/config.toml" sed -i '' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uopen,0.001ucredit"/' "$C1V2_HOME/config/app.toml" sed -i '' 's/^timeout_propose = .*/timeout_propose = "500ms"/' "$C1V2_HOME/config/config.toml" sed -i '' 's/^timeout_prevote = .*/timeout_prevote = "500ms"/' "$C1V2_HOME/config/config.toml" sed -i '' 's/^timeout_precommit = .*/timeout_precommit = "500ms"/' "$C1V2_HOME/config/config.toml" sed -i '' 's/^timeout_commit = .*/timeout_commit = "1s"/' "$C1V2_HOME/config/config.toml" echo "==> Funding validator 2 account on sourcehub-1..." $BIN tx bank send source $VAL11_ADDR 10000000000uopen \ --from source \ --keyring-backend test \ --home $C1V1_HOME \ --chain-id $CHAIN1_ID \ --node $C1V1_RPC \ --gas auto \ --fees 500uopen \ --yes sleep 1 echo "==> Creating validator 2 on sourcehub-1..." PUBKEY_JSON1=$($BIN tendermint show-validator --home="$C1V2_HOME") echo "{ \"pubkey\": $PUBKEY_JSON1, \"amount\": \"1000000000uopen\", \"moniker\": \"$C1V2_NAME\", \"identity\": \"\", \"website\": \"\", \"security\": \"\", \"details\": \"\", \"commission-rate\": \"0.1\", \"commission-max-rate\": \"0.2\", \"commission-max-change-rate\": \"0.01\", \"min-self-delegation\": \"1\" }" > $C1V2_JSON $BIN tx staking create-validator "$C1V2_JSON" \ --from $C1V2 \ --chain-id $CHAIN1_ID \ --home $C1V2_HOME \ --keyring-backend=test \ --node $C1V1_RPC \ --gas auto \ --fees 500uopen \ --yes sleep 1 echo "==> Starting validator 2 on sourcehub-1..." $BIN start \ --home $C1V2_HOME \ --rpc.laddr $C1V2_RPC \ --rpc.pprof_laddr $C1V2_PPROF \ --p2p.laddr $C1V2_P2P \ --grpc.address $C1V2_GRPC \ --address $C1V2_ADDR \ > chain_1_2.log 2>&1 & sleep 1 echo "==> Initializing validator 2 on sourcehub-2..." $BIN init $C2V2_NAME --chain-id $CHAIN2_ID --home="$C2V2_HOME" $BIN keys add $C2V2 --keyring-backend=test --home="$C2V2_HOME" VAL22_ADDR=$($BIN keys show validator2-2 -a --keyring-backend=test --home="$C2V2_HOME") rsync -a --exclude priv_validator_state.json ~/.sourcehub-2-1/data/ ~/.sourcehub-2-2/data/ VAL2_ID=$($BIN tendermint show-node-id --home="$C2V1_HOME") sed -i '' "s|^persistent_peers = .*|persistent_peers = \"$VAL2_ID@$C2V1_P2P\"|" "$C2V2_HOME/config/config.toml" sed -i '' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uopen,0.001ucredit"/' "$C2V2_HOME/config/app.toml" sed -i '' 's/^timeout_propose = .*/timeout_propose = "500ms"/' "$C2V2_HOME/config/config.toml" sed -i '' 's/^timeout_prevote = .*/timeout_prevote = "500ms"/' "$C2V2_HOME/config/config.toml" sed -i '' 's/^timeout_precommit = .*/timeout_precommit = "500ms"/' "$C2V2_HOME/config/config.toml" sed -i '' 's/^timeout_commit = .*/timeout_commit = "1s"/' "$C2V2_HOME/config/config.toml" echo "==> Funding validator 2 account on sourcehub-2..." $BIN tx bank send source $VAL22_ADDR 10000000000uopen \ --from source \ --keyring-backend test \ --home $C2V1_HOME \ --chain-id $CHAIN2_ID \ --node $C2V1_RPC \ --gas auto \ --fees 500uopen \ --yes sleep 1 echo "==> Creating validator 2 on sourcehub-2..." PUBKEY_JSON2=$($BIN tendermint show-validator --home="$C2V2_HOME") echo "{ \"pubkey\": $PUBKEY_JSON2, \"amount\": \"1000000000uopen\", \"moniker\": \"$C2V2_NAME\", \"identity\": \"\", \"website\": \"\", \"security\": \"\", \"details\": \"\", \"commission-rate\": \"0.1\", \"commission-max-rate\": \"0.2\", \"commission-max-change-rate\": \"0.01\", \"min-self-delegation\": \"1\" }" > $C2V2_JSON $BIN tx staking create-validator "$C2V2_JSON" \ --from $C2V2 \ --chain-id $CHAIN2_ID \ --home $C2V2_HOME \ --keyring-backend=test \ --node $C2V1_RPC \ --gas auto \ --fees 500uopen \ --yes sleep 1 echo "==> Starting validator 2 on sourcehub-2..." $BIN start \ --home $C2V2_HOME \ --rpc.laddr $C2V2_RPC \ --rpc.pprof_laddr $C2V2_PPROF \ --p2p.laddr $C2V2_P2P \ --grpc.address $C2V2_GRPC \ --address $C2V2_ADDR \ > chain_2_2.log 2>&1 & # Let chains run for a few seconds to make sure all validators are in sync sleep 10 # Add hermes key (same for both chains) echo "divert tenant reveal hire thing jar carry lonely magic oak audit fiber earth catalog cheap merry print clown portion speak daring giant weird slight" > /tmp/mnemonic.txt hermes keys add --chain $CHAIN1_ID --mnemonic-file /tmp/mnemonic.txt hermes keys add --chain $CHAIN2_ID --mnemonic-file /tmp/mnemonic.txt rm /tmp/mnemonic.txt echo "==> Creating channel..." hermes create channel \ --a-chain $CHAIN1_ID \ --b-chain $CHAIN2_ID \ --a-port transfer \ --b-port transfer \ --new-client-connection \ --yes sleep 1 echo "==> Starting Hermes..." hermes start > hermes.log 2>&1 & sleep 5 $BIN tx ibc-transfer transfer transfer channel-0 \ $SOURCE_ADDR 1000uopen \ --from source \ --keyring-backend test \ --chain-id sourcehub-1 \ --home "$C1V1_HOME" \ --node "$C1V1_RPC" \ --gas auto --gas-adjustment 1.3 \ --fees 500uopen \ --yes sleep 5 $BIN q bank balances $SOURCE_ADDR --node "$C2V1_RPC" echo "DONE" ================================================ FILE: scripts/stop-multichain.sh ================================================ #!/bin/sh set -e C1V1_HOME="$HOME/.sourcehub-1-1" C2V1_HOME="$HOME/.sourcehub-2-1" C1V2_HOME="$HOME/.sourcehub-1-2" C2V2_HOME="$HOME/.sourcehub-2-2" HERMES_HOME="$HOME/.hermes" C1V2_JSON="scripts/validator1-2.json" C2V2_JSON="scripts/validator2-2.json" ICA_PACKET_JSON="scripts/ica_packet.json" ps aux | grep sourcehubd killall sourcehubd 2>/dev/null || true killall hermes 2>/dev/null || true sleep 1 rm -rf $C1V1_HOME rm -rf $C2V1_HOME rm -rf $HERMES_HOME rm -rf $C1V2_HOME rm -rf $C2V2_HOME rm -rf chain_*.log rm -rf hermes.log rm $C1V2_JSON 2>/dev/null || true rm $C2V2_JSON 2>/dev/null || true rm $ICA_PACKET_JSON 2>/dev/null || true echo "DONE" ================================================ FILE: scripts/test-policy.yaml ================================================ name: Bulletin Policy description: Base policy that defines permissions for bulletin namespaces resources: - name: namespace relations: - owner: types: - actor - name: collaborator types: - actor permissions: - name: create_post expr: owner + collaborator ================================================ FILE: scripts/tier-dev.sh ================================================ #!/bin/bash CHAINID=sourcehub CMD=sourcehubd # Get account address from account name. sh-acc-addr() { local account_name=$1 local address=$($CMD keys show "$account_name" --output json | jq -r '.address') if [ -z "$address" ]; then echo "Error: Could not find address for account name '$account_name'" return 1 else echo "$address" return 0 fi } sh-val-addr() { validator_name=$1 if [ -z "$validator_name" ]; then $CMD q staking validators --output json | jq -r '.validators[0].operator_address' else $CMD q staking validator $validator_name --output json | jq -r '.validator.operator_address' fi } sh-mod-addr() { mod_name=$1 $CMD q auth module-account $mod_name -o json | jq -r .account.value.address } sh-balances() { account_list=$* if [ -z "$account_list" ]; then account_list=`$CMD keys list --output json | jq -r '.[].name'` fi for account_name in $account_list; do echo $account_name; if [[ $account_name == mod_* ]]; then mod_name=${account_name:4} account_name=`sh-mod-addr $mod_name` fi $CMD q bank balances $account_name --output json | jq '.balances'; done } sh-send() { from=$1 to=$2 amount=$3 $CMD tx bank send `sh-acc-addr $from` `sh-acc-addr $to` $amount -y --chain-id $CHAINID --gas auto } sh-stake() { validator_name=$1 from=$2 amount=$3 $CMD tx staking delegate `sh-val-addr $validator_name` $amount --from $from -y --chain-id $CHAINID --gas auto } sh-lock() { validator_name=$1 from=$2 amount=$3 $CMD tx tier lock `sh-val-addr $validator_name` $amount --from $from -y --chain-id $CHAINID --gas auto } sh-unlock() { validator_name=$1 from=$2 amount=$3 $CMD tx tier unlock `sh-val-addr $validator_name` $amount --from $from -y --chain-id $CHAINID --gas auto } sh-cancel-unlocking() { validator_name=$1 from=$2 amount=$3 creation_height=$4 $CMD tx tier cancel-unlocking `sh-val-addr $validator_name` $amount $creation_height --from $from -y --chain-id $CHAINID --gas auto } ================================================ FILE: scripts/tx-listener.sh ================================================ #!/usr/bin/env sh echo '{ "jsonrpc": "2.0","method": "subscribe","id": 0,"params": {"query": "tm.event='"'Tx'"'"} }' | websocat -n -t ws://127.0.0.1:26657/websocket | jq ================================================ FILE: sdk/acp.go ================================================ package sdk import ( "context" "fmt" "github.com/sourcenetwork/sourcehub/x/acp/signed_policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // NewCmdBuilder returns a builder for PolicyCmd objects from a client. // // The client is used to fetch the latest ACP module params from SourceHub // and as a block height fetcher. func NewCmdBuilder(ctx context.Context, client *Client) (*signed_policy_cmd.CmdBuilder, error) { acpClient := client.ACPQueryClient() paramsResp, err := acpClient.Params(ctx, &types.QueryParamsRequest{}) if err != nil { return nil, fmt.Errorf("failed to fetch params for cmd builder: %v", err) } params := paramsResp.Params clock := signed_policy_cmd.LogicalClockFromCometClient(client.cometClient) return signed_policy_cmd.NewCmdBuilder(clock, params), nil } ================================================ FILE: sdk/constants.go ================================================ package sdk const ( Testnet1 = "sourcehub-testnet-1" TestnetLatest = Testnet1 DefaultChainID = TestnetLatest DefaultGRPCAddr = "localhost:9090" DefaultCometRPCAddr = "tcp://localhost:26657" // abciSocketPath specifies the endpoint which the cometrpc http client connects to abciSocketPath string = "/websocket" ) ================================================ FILE: sdk/doc.go ================================================ // package sdk provides functionality to interact with SourceHub // // package sdk provides custom helpers and utility types to interact with SourceHub and // reexport useful and common types used to interact with SourceHub. // These types are used to query state across SourceHub modules (GRPC Query Clients), // build and broadcast Txs, listen and await for Txs and interacts with general cosmos-sdk chains. // package sdk ================================================ FILE: sdk/errors.go ================================================ package sdk import "errors" var ErrTxFailed = errors.New("tx failed") ================================================ FILE: sdk/listener.go ================================================ package sdk import ( "context" "encoding/json" "fmt" "log" abcitypes "github.com/cometbft/cometbft/abci/types" cometclient "github.com/cometbft/cometbft/rpc/client" rpctypes "github.com/cometbft/cometbft/rpc/core/types" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) const mapperBuffSize int = 100 // TxListener is a client which subscribes to Tx events in SourceHub's cometbft socket // and parses the received events into version with unmarshaled Msg Responses. type TxListener struct { rpc cometclient.Client cleanupFn func() } // NewTxListener creates a new listener from a comet client func NewTxListener(client cometclient.Client) TxListener { return TxListener{ rpc: client, } } // Event models a Cometbft Tx event with unmarshaled Msg responses type Event struct { Height int64 `json:"height"` Index uint32 `json:"index"` Tx []byte `json:"tx"` Code uint32 `json:"code"` Log string `json:"log"` Info string `json:"info"` GasWanted int64 `json:"gas_wanted"` GasUsed int64 `json:"gas_used"` Codespace string `json:"codespace"` Responses []sdk.Msg `json:"responses"` } // ListenTxs spawns a go routine which continously listens for Tx events from a cometbft connection. // The received events are returned into the Events channel, all errors are sent to the errors channel. // // If ListenTxs fails to connect to the comet client, returns an error and nil channels. func (l *TxListener) ListenTxs(ctx context.Context) (<-chan Event, <-chan error, error) { ch, err := l.rpc.Subscribe(ctx, "", "tm.event='Tx'") if err != nil { return nil, nil, fmt.Errorf("TxListener: subscribing to Tx event: %w", err) } registry := cdctypes.NewInterfaceRegistry() acptypes.RegisterInterfaces(registry) bulletintypes.RegisterInterfaces(registry) tiertypes.RegisterInterfaces(registry) mapper := func(in rpctypes.ResultEvent) (Event, error) { resultBytes, err := json.Marshal(in.Data) if err != nil { return Event{}, fmt.Errorf("marshaling result data to json: %v", err) } txResult := &abcitypes.TxResult{} err = json.Unmarshal(resultBytes, txResult) if err != nil { return Event{}, fmt.Errorf("unmarshaling into TxResult: %w", err) } msgData := sdk.TxMsgData{} err = msgData.Unmarshal(txResult.Result.Data) if err != nil { return Event{}, fmt.Errorf("unmarshaling TxResult.ExecResultTx.Data into TxMsgData: %v", err) } //unmarshals the msg results into their // actual response values using the registered sourcehub types responses := make([]sdk.Msg, 0, len(msgData.MsgResponses)) for i, resp := range msgData.MsgResponses { var msg sdk.Msg err := registry.UnpackAny(resp, &msg) if err != nil { return Event{}, fmt.Errorf("unmarshaling response %v: %w", i, err) } responses = append(responses, msg) } return Event{ Height: txResult.Height, Index: txResult.Index, Tx: txResult.Tx, Code: txResult.Result.Code, Log: txResult.Result.Log, Info: txResult.Result.Info, GasWanted: txResult.Result.GasWanted, GasUsed: txResult.Result.GasUsed, Codespace: txResult.Result.Codespace, Responses: responses, }, nil } resultCh, errChn, closeFn := channelMapper(ch, mapper) l.cleanupFn = closeFn return resultCh, errChn, err } // ListenAsync spawns a go routine and listens for txs asynchronously, // until the comet client closes the connection, the context is cancelled. // or the listener is closed. // Callback is called each time an event or an error is received // Returns an error if connection to comet fails func (l *TxListener) ListenAsync(ctx context.Context, cb func(*Event, error)) error { evs, errs, err := l.ListenTxs(ctx) if err != nil { return err } go func() { for { select { case result := <-evs: cb(&result, nil) case err := <-errs: cb(nil, err) case <-l.Done(): log.Printf("Listener closed: canceling loop") break case <-ctx.Done(): break } } }() return nil } // Done returns a channel which will be closed when the connection fails func (l *TxListener) Done() <-chan struct{} { return l.rpc.Quit() } // Close stops listening for events and cleans up func (l *TxListener) Close() { l.rpc.Stop() l.cleanupFn() } // channelMapper wraps a channel and applies a failable mapper to all incoming items. // Returns a value channel, an error channel and a callback to terminate the channel func channelMapper[T, U any](ch <-chan T, mapper func(T) (U, error)) (values <-chan U, errors <-chan error, closeFn func()) { errCh := make(chan error, mapperBuffSize) valCh := make(chan U, mapperBuffSize) closeFn = func() { close(errCh) close(valCh) } go func() { for { select { case result, ok := <-ch: if !ok { close(errCh) close(valCh) return } u, err := mapper(result) if err != nil { errCh <- err } else { valCh <- u } } } }() return valCh, errCh, closeFn } ================================================ FILE: sdk/listener_test.go ================================================ package sdk import ( "errors" "fmt" "testing" "github.com/stretchr/testify/require" ) func Test_channelMapper_Success(t *testing.T) { ch := make(chan int, 10) mapper := func(i int) (string, error) { return fmt.Sprintf("%v", i), nil } vals, errs, _ := channelMapper(ch, mapper) ch <- 1 got := <-vals require.Equal(t, "1", got) select { case <-errs: t.Fatalf("unnexpected error in errors channel") default: } } func Test_channelMapper_Err(t *testing.T) { ch := make(chan int, 10) err := errors.New("err") mapper := func(_ int) (string, error) { return "", err } vals, errs, _ := channelMapper(ch, mapper) ch <- 1 gotErr := <-errs require.Equal(t, err, gotErr) select { case <-vals: t.Fatalf("unnexpected value in values channel") default: } } ================================================ FILE: sdk/mapper.go ================================================ package sdk import ( "fmt" comettypes "github.com/cometbft/cometbft/rpc/core/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" ) // Mapper processes a CometBFT Tx Event from a specific Tx and maps into a payload. // Mapper is bound to a msgIdx within the Tx type Mapper[T sdk.Msg] struct { msgIdx int container T } func newMapper[T sdk.Msg](idx int, container T) Mapper[T] { return Mapper[T]{ msgIdx: idx, container: container, } } // Map receives a CometBFT Tx Event Result and maps it into a T or errors if invalid func (e *Mapper[T]) Map(msg *comettypes.ResultTx) (T, error) { var zero T // pretty sure this is an sdk response data := msg.TxResult.Data msgData := sdk.TxMsgData{} err := msgData.Unmarshal(data) if err != nil { return zero, err } if len(msgData.MsgResponses) < e.msgIdx+1 { return zero, fmt.Errorf("invalid mapper: tx does not contain %v msgs", e.msgIdx+1) } any := msgData.MsgResponses[e.msgIdx] err = proto.Unmarshal(any.Value, e.container) if err != nil { return zero, err } return e.container, nil } ================================================ FILE: sdk/msgset.go ================================================ package sdk import ( acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" sdk "github.com/cosmos/cosmos-sdk/types" ) // MsgSet acts as set of Msgs to be added to a Tx // Each added Msg returns a Mapper which can be used to extract associated data from // the events emitted after Tx execution type MsgSet struct { msgs []sdk.Msg } func (b *MsgSet) GetMsgs() []sdk.Msg { return b.msgs } func (b *MsgSet) addMsg(msg sdk.Msg) (idx int) { b.msgs = append(b.msgs, msg) idx = len(b.msgs) - 1 return } // WithCreatePolicy includes a MsgCreatePolicy to the Tx func (b *MsgSet) WithCreatePolicy(msg *acptypes.MsgCreatePolicy) Mapper[*acptypes.MsgCreatePolicyResponse] { idx := b.addMsg(msg) return newMapper(idx, &acptypes.MsgCreatePolicyResponse{}) } // WithEditPolicy includes a MsgEditPolicy to the Tx func (b *MsgSet) WithEditPolicy(msg *acptypes.MsgEditPolicy) Mapper[*acptypes.MsgEditPolicyResponse] { idx := b.addMsg(msg) return newMapper(idx, &acptypes.MsgEditPolicyResponse{}) } // WithCheckAccess includes a MsgCheckAccess to the Tx func (b *MsgSet) WithCheckAccess(msg *acptypes.MsgCheckAccess) Mapper[*acptypes.MsgCheckAccessResponse] { idx := b.addMsg(msg) return newMapper(idx, &acptypes.MsgCheckAccessResponse{}) } // WithSignedPolicyCmd includes a MsgSignedPolicyCmd to the Tx func (b *MsgSet) WithSignedPolicyCmd(msg *acptypes.MsgSignedPolicyCmd) Mapper[*acptypes.MsgSignedPolicyCmdResponse] { idx := b.addMsg(msg) return newMapper(idx, &acptypes.MsgSignedPolicyCmdResponse{}) } // WithCreatePost includes a MsgCreatePost to the Tx func (b *MsgSet) WithCreatePost(msg *bulletintypes.MsgCreatePost) Mapper[*bulletintypes.MsgCreatePostResponse] { idx := b.addMsg(msg) return newMapper(idx, &bulletintypes.MsgCreatePostResponse{}) } func (b *MsgSet) WithBearerPolicyCmd(msg *acptypes.MsgBearerPolicyCmd) Mapper[*acptypes.MsgBearerPolicyCmdResponse] { idx := b.addMsg(msg) return newMapper(idx, &acptypes.MsgBearerPolicyCmdResponse{}) } func (b *MsgSet) WithDirectPolicyCmd(msg *acptypes.MsgDirectPolicyCmd) Mapper[*acptypes.MsgDirectPolicyCmdResponse] { idx := b.addMsg(msg) return newMapper(idx, &acptypes.MsgDirectPolicyCmdResponse{}) } ================================================ FILE: sdk/sdk.go ================================================ package sdk import ( "context" "encoding/hex" "fmt" "log" "os" cmtlog "github.com/cometbft/cometbft/libs/log" cometclient "github.com/cometbft/cometbft/rpc/client" "github.com/cometbft/cometbft/rpc/client/http" sdk "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" xauthsigning "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" "github.com/ignite/cli/v28/ignite/pkg/cosmosclient" "github.com/sourcenetwork/sourcehub/x/feegrant" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" bulletintypes "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) // Opt configures the construction of a Client type Opt func(*Client) error // WithGRPCAddr sets the GRPC Address of a SourceHub node which the Client will connect to. // If not specified defaults to DefaultGRPCAddr // Note: Cosmos queries are not verifiable therefore only trusted RPC nodes should be used. func WithGRPCAddr(addr string) Opt { return func(c *Client) error { c.grpcAddr = addr return nil } } // WithCometRPCAddr sets the CometBFT RPC Address of a SourceHub node which the Client will connect to. // If not set defaults to DefaultCometHTTPAddr func WithCometRPCAddr(addr string) Opt { return func(c *Client) error { c.cometRPCAddr = addr return nil } } // WithGRPCOpts specifies the dial options which will be used to dial SourceHub's GRPC (queries) service func WithGRPCOpts(opts ...grpc.DialOption) Opt { return func(c *Client) error { c.grpcOpts = opts return nil } } // NewClient returns a new SourceHub SDK client func NewClient(opts ...Opt) (*Client, error) { client := &Client{ grpcAddr: DefaultGRPCAddr, cometRPCAddr: DefaultCometRPCAddr, logger: cmtlog.NewTMLogger(os.Stderr), } for _, opt := range opts { if err := opt(client); err != nil { return nil, fmt.Errorf("applying client option: %w", err) } } dialOpts := make([]grpc.DialOption, 0, len(client.grpcOpts)+1) dialOpts = append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials())) dialOpts = append(dialOpts, client.grpcOpts...) conn, err := grpc.Dial(client.grpcAddr, dialOpts...) if err != nil { return nil, fmt.Errorf("sourcehub grpc dial: %w", err) } cometClient, err := http.New(client.cometRPCAddr, abciSocketPath) if err != nil { return nil, fmt.Errorf("comet rpc client: %w", err) } err = cometClient.Start() if err != nil { return nil, fmt.Errorf("starting comet rpc client: %w", err) } client.txClient = txtypes.NewServiceClient(conn) client.listener = NewTxListener(cometClient) client.conn = conn client.cometClient = cometClient return client, nil } // Client abstracts a set of connections to a SourceHub node. // The Client type provides access to module specific clients and functionalities to // interact with SourceHub such as performing module Queries (GRPC), Broadcast Txs // and interact with CometBFT type Client struct { grpcAddr string cometRPCAddr string grpcOpts []grpc.DialOption logger cmtlog.Logger cometClient cometclient.Client conn *grpc.ClientConn txClient txtypes.ServiceClient listener TxListener } // BroadcastTx broadcasts a signed Tx to a SourceHub node and returns the node's response. // Callers can use TxResponse.TxHash to await or listen until the Tx is accepted and executed. func (b *Client) BroadcastTx(ctx context.Context, tx xauthsigning.Tx) (*sdk.TxResponse, error) { encoder := authtx.DefaultTxEncoder() txBytes, err := encoder(tx) if err != nil { return nil, fmt.Errorf("marshaling tx: %w", err) } grpcRes, err := b.txClient.BroadcastTx( ctx, &txtypes.BroadcastTxRequest{ Mode: txtypes.BroadcastMode_BROADCAST_MODE_SYNC, TxBytes: txBytes, }, ) if err != nil { log.Printf("broadcasting err: %v", grpcRes) return nil, err } response := grpcRes.TxResponse if response.Code != 0 { return response, fmt.Errorf("tx rejected: codespace %v: code %v: %v", response.Codespace, response.Code, response.RawLog) } return response, nil } // Close terminates the Client, freeing up resources and connections func (b *Client) Close() { b.cometClient.Stop() b.conn.Close() } // ACPQueryClient returns a Query Client for the ACP module func (c *Client) ACPQueryClient() acptypes.QueryClient { return acptypes.NewQueryClient(c.conn) } // BulletinQueryClient returns a Query Client for the Bulletin module func (c *Client) BulletinQueryClient() bulletintypes.QueryClient { return bulletintypes.NewQueryClient(c.conn) } // BankQueryClient returns a Query Client for the Bank module func (c *Client) BankQueryClient() banktypes.QueryClient { return banktypes.NewQueryClient(c.conn) } // FeegrantQueryClient returns a Query Client for the Feegrant module func (c *Client) FeeGrantQueryClient() feegrant.QueryClient { return feegrant.NewQueryClient(c.conn) } // AuthQueryClient returns a Query Client for the Auth module func (c *Client) AuthQueryClient() authtypes.QueryClient { return authtypes.NewQueryClient(c.conn) } // CometBFTRPCClient returns a Comet RPC Client func (c *Client) CometBFTRPCClient() cometclient.Client { return c.cometClient } // TxListener returns a TxListener func (c *Client) TxListener() TxListener { return c.listener } func (c *Client) ListenForTx(ctx context.Context, txHash string) <-chan *ListenResult { ch := make(chan *ListenResult) go func() { result, err := c.AwaitTx(ctx, txHash) ch <- newListenResult(result, err) }() return ch } func (c *Client) AwaitTx(ctx context.Context, txHash string) (*TxExecResult, error) { igniteClient, err := cosmosclient.New(ctx, cosmosclient.WithRPCClient(c.cometClient)) if err != nil { return nil, err } result, err := igniteClient.WaitForTx(ctx, txHash) if err != nil { return nil, err } return newTxExecResult(result), nil } func (c *Client) GetTx(ctx context.Context, txHash string) (*TxExecResult, error) { bytes, err := hex.DecodeString(txHash) if err != nil { return nil, fmt.Errorf("invalid tx hash: %v", err) } txRPC, err := c.CometBFTRPCClient().Tx(ctx, bytes, false) if err != nil { return nil, fmt.Errorf("failed to get tx: %v", err) } return newTxExecResult(txRPC), nil } ================================================ FILE: sdk/tx.go ================================================ package sdk import ( "context" "fmt" "math" sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" xauthsigning "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" "github.com/sourcenetwork/sourcehub/app" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" "github.com/sourcenetwork/sourcehub/app/params" appparams "github.com/sourcenetwork/sourcehub/app/params" ) type TxBuilder struct { chainID string gasLimit uint64 feeGranter sdk.AccAddress authClient authtypes.QueryClient txClient txtypes.ServiceClient txCfg client.TxConfig feeTokenDenom string feeAmt int64 account authtypes.BaseAccount gasAdjustment float64 bearerToken string // JWS bearer token for DID-based authorization } func NewTxBuilder(opts ...TxBuilderOpt) (TxBuilder, error) { registry := cdctypes.NewInterfaceRegistry() cfg := authtx.NewTxConfig( codec.NewProtoCodec(registry), []signing.SignMode{ signing.SignMode_SIGN_MODE_DIRECT, }, ) builder := TxBuilder{ txCfg: cfg, chainID: DefaultChainID, feeTokenDenom: appparams.DefaultBondDenom, feeAmt: 200, gasLimit: 200000, gasAdjustment: 1.5, } for _, opt := range opts { err := opt(&builder) if err != nil { return TxBuilder{}, err } } if builder.authClient == nil { return TxBuilder{}, fmt.Errorf("TxBuilder: Auth GRPC Client is required: use either WithAuthQueryClient or WithSDKClient to set it") } return builder, nil } // Build builds a SourceHub Tx containing msgs in MsgSet. // The returned Tx can then be broadcast. func (b *TxBuilder) Build(ctx context.Context, signer TxSigner, set *MsgSet) (xauthsigning.Tx, error) { return b.BuildFromMsgs(ctx, signer, set.GetMsgs()...) } // BuildFromMsgs builds a SourceHub Tx containing msgs. // The returned Tx can then be broadcast. func (b *TxBuilder) BuildFromMsgs(ctx context.Context, signer TxSigner, msgs ...sdk.Msg) (xauthsigning.Tx, error) { builder, err := b.initTx(ctx, signer, msgs...) if err != nil { return nil, err } if err := b.evaluateTx(ctx, builder); err != nil { return nil, err } tx, err := b.finalizeTx(ctx, signer, builder) if err != nil { return nil, err } return tx, nil } func (b *TxBuilder) initTx(ctx context.Context, signer TxSigner, msgs ...sdk.Msg) (client.TxBuilder, error) { txBuilder := b.txCfg.NewTxBuilder() err := txBuilder.SetMsgs(msgs...) if err != nil { return nil, fmt.Errorf("failed to set msgs: %v", err) } // Set JWS bearer token extension option if provided if b.bearerToken != "" { jwsOpt := &antetypes.JWSExtensionOption{ BearerToken: b.bearerToken, } any, err := cdctypes.NewAnyWithValue(jwsOpt) if err != nil { return nil, fmt.Errorf("failed to pack JWS extension option: %v", err) } if extBuilder, ok := txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(any) } else { return nil, fmt.Errorf("txBuilder does not support extension options") } } txBuilder.SetGasLimit(b.gasLimit) feeAmt := sdk.NewCoins(sdk.NewInt64Coin(b.feeTokenDenom, b.feeAmt)) txBuilder.SetFeeAmount(feeAmt) if b.feeGranter != nil { txBuilder.SetFeeGranter(b.feeGranter) } acc, err := b.getAccount(ctx, signer.GetAccAddress()) if err != nil { return nil, err } b.account = acc // NOTE: The following snippet was based on the Cosmos-SDK documentation and codebase // See: // https://docs.cosmos.network/v0.50/user/run-node/txs#signing-a-transaction-1 // https://github.com/cosmos/cosmos-sdk/blob/v0.50.6/client/tx/tx.go#L284 sigV2 := signing.SignatureV2{ PubKey: signer.GetPrivateKey().PubKey(), Data: &signing.SingleSignatureData{ SignMode: signing.SignMode_SIGN_MODE_DIRECT, Signature: nil, }, Sequence: acc.GetSequence(), } err = txBuilder.SetSignatures(sigV2) if err != nil { return nil, fmt.Errorf("set signatures: %v", err) } return txBuilder, nil } // evaluateTx simulates the tx and adjusts gas and fee amounts accordingly. func (b *TxBuilder) evaluateTx(ctx context.Context, txBuilder client.TxBuilder) error { if b.txClient == nil { return nil } encoder := b.txCfg.TxEncoder() txBytes, err := encoder(txBuilder.GetTx()) if err != nil { return fmt.Errorf("encode tx for simulation: %w", err) } simRes, err := b.txClient.Simulate(ctx, &txtypes.SimulateRequest{TxBytes: txBytes}) if err != nil { return fmt.Errorf("simulate tx: %w", err) } gasUsed := simRes.GetGasInfo().GetGasUsed() if gasUsed == 0 { return nil } adjusted := uint64(math.Ceil(float64(gasUsed) * b.gasAdjustment)) txBuilder.SetGasLimit(adjusted) b.gasLimit = adjusted minGasPrice := sdkmath.LegacyMustNewDecFromStr(appparams.DefaultMinGasPrice) denomMultiplier := sdkmath.LegacyNewDec(1) if b.feeTokenDenom == params.MicroCreditDenom { denomMultiplier = sdkmath.LegacyNewDec(appparams.CreditFeeMultiplier) } gasInt := sdkmath.NewIntFromUint64(adjusted) requiredAmount := minGasPrice.Mul(sdkmath.LegacyNewDecFromInt(gasInt)).Mul(denomMultiplier).Ceil().RoundInt() txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(b.feeTokenDenom, requiredAmount))) if requiredAmount.IsInt64() { b.feeAmt = requiredAmount.Int64() } if b.feeGranter != nil { txBuilder.SetFeeGranter(b.feeGranter) } return nil } func (b *TxBuilder) finalizeTx(ctx context.Context, signer TxSigner, txBuilder client.TxBuilder) (xauthsigning.Tx, error) { signerData := xauthsigning.SignerData{ ChainID: b.chainID, AccountNumber: b.account.GetAccountNumber(), Sequence: b.account.GetSequence(), PubKey: signer.GetPrivateKey().PubKey(), } sigV2, err := tx.SignWithPrivKey( ctx, signing.SignMode_SIGN_MODE_DIRECT, signerData, txBuilder, signer.GetPrivateKey(), b.txCfg, b.account.GetSequence()) if err != nil { return nil, fmt.Errorf("sign tx: %v", err) } err = txBuilder.SetSignatures(sigV2) if err != nil { return nil, fmt.Errorf("set signatures: %v", err) } return txBuilder.GetTx(), nil } func (c *TxBuilder) getAccount(ctx context.Context, addr string) (authtypes.BaseAccount, error) { msg := authtypes.QueryAccountRequest{ Address: addr, } resp, err := c.authClient.Account(ctx, &msg) if err != nil { return authtypes.BaseAccount{}, fmt.Errorf("fetching account: %v", err) } acc := authtypes.BaseAccount{} err = acc.Unmarshal(resp.Account.Value) if err != nil { return acc, fmt.Errorf("unmarshaling account: %v", err) } return acc, nil } // TxBuilderOpt is a constructor option to initialize a TxBuilder type TxBuilderOpt func(*TxBuilder) error // WithChainID specifies the ChainID to which the Tx will be signed to. // Defaults to the most recent SourceHub chain deployment func WithChainID(id string) TxBuilderOpt { return func(b *TxBuilder) error { b.chainID = id return nil } } // WithMicroOpen configures TxBuilder to build Txs paid using open tokens func WithMicroOpen() TxBuilderOpt { return func(b *TxBuilder) error { b.feeTokenDenom = params.MicroOpenDenom return nil } } // WithMicroCredit configures TxBuilder to build Txs paid using credits func WithMicroCredit() TxBuilderOpt { return func(b *TxBuilder) error { b.feeTokenDenom = params.MicroCreditDenom return nil } } // WithTestnetChainID specifies the ChainID to be SourceHub's latest test net func WithTestnetChainID() TxBuilderOpt { return func(b *TxBuilder) error { b.chainID = TestnetLatest return nil } } // WithFeeToken specifies the fee value func WithFeeAmount(fee int64) TxBuilderOpt { return func(b *TxBuilder) error { b.feeAmt = fee return nil } } // WithFeeToken specifies the token denominator to use for the fee func WithFeeToken(denom string) TxBuilderOpt { return func(b *TxBuilder) error { b.feeTokenDenom = denom return nil } } // WithGasLimit configures the maximum func WithGasLimit(limit uint64) TxBuilderOpt { return func(b *TxBuilder) error { b.gasLimit = limit return nil } } // WithFeeGranter sets the fee granter for the Tx. // The fee granter pays for the executed Tx. // Fee grants are configured by cosmos x/feegrant module. // See: https://pkg.go.dev/github.com/cosmos/cosmos-sdk/x/feegrant#section-readme func WithFeeGranter(acc string) TxBuilderOpt { return func(b *TxBuilder) error { addr, err := sdk.AccAddressFromBech32(acc) if err != nil { return fmt.Errorf("invalid feegrant account: %w", err) } b.feeGranter = addr return nil } } // WithGRPCConnection sets the GRPC Connection to be used in the Builder. // The connection should point to a trusted SourceHub node which will be used to perform // Cosmos Query client queries. // Note: Cosmos queries are not verifiable therefore only trusted RPC nodes should be used. func WithAuthQueryClient(client authtypes.QueryClient) TxBuilderOpt { return func(b *TxBuilder) error { b.authClient = client return nil } } // WithClient uses an SDK Client to retrieve the required connections. func WithSDKClient(client *Client) TxBuilderOpt { return func(b *TxBuilder) error { b.authClient = client.AuthQueryClient() b.txClient = client.txClient return nil } } // WithBearerToken sets a JWS bearer token for DID-based authorization. // The bearer token will be added as an extension option to the transaction. func WithBearerToken(token string) TxBuilderOpt { return func(b *TxBuilder) error { b.bearerToken = token return nil } } // init calls app.SetConfig to configure the Cosmos SDK global config (e.g., Bech32 prefixes) // with sealing disabled (false). This is required for Tx signing and address encoding to work // correctly. The side effect is that importing the sdk package mutates global Cosmos SDK state. // This is a known limitation: Cosmos SDK relies on global config, and libraries that depend // on address encoding must initialize it early. Sealing is disabled to allow tests and // downstream consumers to override the config if needed. func init() { app.SetConfig(false) } ================================================ FILE: sdk/tx_signer.go ================================================ package sdk import ( "fmt" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/sourcenetwork/sourcehub/types" ) var secp256k1MsgTypeUrl = cdctypes.MsgTypeURL(&secp256k1.PubKey{}) // TxSigner models an entity capable of providing signatures for a Tx. // // Effectively, it can be either a secp256k1 cosmos-sdk key or a pointer to a // secp256k1 key in a cosmos-sdk like keyring. type TxSigner interface { GetAccAddress() string GetPrivateKey() cryptotypes.PrivKey } // NewTxSignerFromKeyringKey receives a cosmos keyring and a named key in the keyring // and returns a TxSigner capable of signing Txs. // In order to sign Txs, the key must be of type secp256k1, as it's the only supported // Tx signing key in CosmosSDK. // See https://docs.cosmos.network/main/learn/beginner/accounts#keys-accounts-addresses-and-signatures // // Note: The adapter does not access the private key bytes directly, instead delegating // the signing to the keyring itself. As such, any attempt to dump the bytes of the priv key // will cause a panic func NewTxSignerFromKeyringKey(keyring keyring.Keyring, name string) (TxSigner, error) { record, err := keyring.Key(name) if err != nil { return nil, err } if record == nil { return nil, fmt.Errorf("key %v not found for keyring", name) } if record.PubKey.TypeUrl != secp256k1MsgTypeUrl { return nil, fmt.Errorf("cannot create signer from key %v: key must be of type secp256k1", name) } pubKey := &secp256k1.PubKey{} err = pubKey.Unmarshal(record.PubKey.Value) if err != nil { return nil, fmt.Errorf("could not unmarshal key %v: %v", name, err) } return &keyringTxSigner{ keyring: keyring, keyname: name, pubkey: pubKey, }, nil } // NewTxSignerFromAccountAddress takes a cosmos keyring and an account address // and returns a TxSigner capable of signing Txs. // If there are no keys matching the given address, returns an error. // // In order to sign Txs, the key must be of type secp256k1, as it's the only supported // Tx signing key in CosmosSDK. // See https://docs.cosmos.network/main/learn/beginner/accounts#keys-accounts-addresses-and-signatures // // Note: The adapter does not access the private key bytes directly, instead delegating // the signing to the keyring itself. As such, any attempt to dump the bytes of the priv key // will cause a panic func NewTxSignerFromAccountAddress(keyring keyring.Keyring, address string) (TxSigner, error) { accAddr, err := types.AccAddressFromBech32(address) if err != nil { return nil, err } record, err := keyring.KeyByAddress(accAddr) if err != nil { return nil, err } if record == nil { return nil, fmt.Errorf("key %v not found for keyring", address) } if record.PubKey.TypeUrl != secp256k1MsgTypeUrl { return nil, fmt.Errorf("cannot create signer from key %v: key must be of type secp256k1", address) } pubKey := &secp256k1.PubKey{} err = pubKey.Unmarshal(record.PubKey.Value) if err != nil { return nil, fmt.Errorf("could not unmarshal key %v: %v", address, err) } return &keyringTxSigner{ keyring: keyring, keyname: address, pubkey: pubKey, }, nil } // keyringTxSigner wraps a keyring as a TxSigner type keyringTxSigner struct { keyring keyring.Keyring keyname string pubkey cryptotypes.PubKey } func (s *keyringTxSigner) GetAccAddress() string { addr := s.pubkey.Address().Bytes() return sdk.AccAddress(addr).String() } func (s *keyringTxSigner) GetPrivateKey() cryptotypes.PrivKey { return &keyringPKAdapter{ keyring: s.keyring, keyname: s.keyname, pubkey: s.pubkey, } } // keyringPKAdapter adapts a keyring + pubkey into a Cosmos PrivKey // This type does not support the Bytes() method because it's not made to // represent a handle to a Private Key. // Calling Bytes() will cause a panic. type keyringPKAdapter struct { keyring keyring.Keyring keyname string pubkey cryptotypes.PubKey } func (a *keyringPKAdapter) Bytes() []byte { panic("dumping bytes from PrivKey in Keyring isn't supported") } func (a *keyringPKAdapter) Sign(msg []byte) ([]byte, error) { bytes, _, err := a.keyring.Sign(a.keyname, msg, signing.SignMode_SIGN_MODE_DIRECT) return bytes, err } func (a *keyringPKAdapter) PubKey() cryptotypes.PubKey { return a.pubkey } func (a *keyringPKAdapter) Equals(cryptotypes.LedgerPrivKey) bool { return false } func (a *keyringPKAdapter) Type() string { return secp256k1.PrivKeyName } func (a *keyringPKAdapter) Reset() {} func (a *keyringPKAdapter) ProtoMessage() {} func (a *keyringPKAdapter) String() string { return a.Type() } // privKeySigner implements TxSigner for a Cosmos PrivKey type privKeySigner struct { key cryptotypes.PrivKey } // TxSignerFromCosmosKey returns a TxSigner from a cosmos PrivKey func TxSignerFromCosmosKey(priv cryptotypes.PrivKey) TxSigner { return &privKeySigner{ key: priv, } } func (s *privKeySigner) GetPrivateKey() cryptotypes.PrivKey { return s.key } func (s *privKeySigner) GetAccAddress() string { addr := s.key.PubKey().Address().Bytes() return sdk.AccAddress(addr).String() } ================================================ FILE: sdk/types.go ================================================ package sdk import ( "fmt" rpctypes "github.com/cometbft/cometbft/rpc/core/types" ) func newTxExecResult(result *rpctypes.ResultTx) *TxExecResult { var err error if result.TxResult.Code != 0 { err = fmt.Errorf("%v: %v", ErrTxFailed, result.TxResult.Log) result = nil } return &TxExecResult{ result: result, err: err, } } // TxExecResult models the outcome of a Tx evaluated by SourceHub. // The Tx was either successfully included or an error happened while handling one of its Msgs. type TxExecResult struct { result *rpctypes.ResultTx err error } // Error returns whether the error message if the Tx execution failed func (r *TxExecResult) Error() error { return r.err } // TxPayload returns the payload of the executed Tx func (r *TxExecResult) TxPayload() *rpctypes.ResultTx { return r.result } func newListenResult(result *TxExecResult, err error) *ListenResult { return &ListenResult{ result: result, err: err, } } // ListenResult represents the result of waiting for a Tx to be executed by SourceHub // Can either error, meaning timeout or network error, or return the Tx object queried from the chain state type ListenResult struct { result *TxExecResult err error } // Error return the error of the ListenResult, returns nil if successful func (r *ListenResult) Error() error { return r.err } // GetTxResult returns the outcome of the executed Tx by SourceHub func (r *ListenResult) GetTxResult() *TxExecResult { return r.result } ================================================ FILE: tests/e2e/sdk/sdk_test.go ================================================ package sdk import ( "context" "testing" codectypes "github.com/cosmos/cosmos-sdk/codec/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/sdk" testutil "github.com/sourcenetwork/sourcehub/testutil" "github.com/sourcenetwork/sourcehub/testutil/e2e" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) func TestSDKBasic(t *testing.T) { network := e2e.TestNetwork{} network.Setup(t) t.Cleanup(network.TearDown) client := network.GetSDKClient() builder, err := sdk.NewTxBuilder( sdk.WithSDKClient(client), sdk.WithChainID(network.GetChainID()), ) require.NoError(t, err) policy := ` name: test policy ` msgSet := sdk.MsgSet{} mapper := msgSet.WithCreatePolicy( types.NewMsgCreatePolicy( network.GetValidatorAddr(), policy, coretypes.PolicyMarshalingType_YAML, ), ) signer := sdk.TxSignerFromCosmosKey(network.GetValidatorKey()) ctx := context.TODO() tx, err := builder.Build(ctx, signer, &msgSet) require.NoError(t, err) response, err := client.BroadcastTx(ctx, tx) require.NoError(t, err) network.Network.WaitForNextBlock() result, err := network.Client.GetTx(ctx, response.TxHash) require.NoError(t, err) require.NoError(t, result.Error()) _, err = mapper.Map(result.TxPayload()) require.NoError(t, err) } func TestSDKWithBearerToken(t *testing.T) { network := e2e.TestNetwork{} network.Setup(t) t.Cleanup(network.TearDown) client := network.GetSDKClient() validatorAddr := network.GetValidatorAddr() bearerToken, _ := testutil.GenerateSignedJWSWithMatchingDID(t, validatorAddr) builder, err := sdk.NewTxBuilder( sdk.WithSDKClient(client), sdk.WithChainID(network.GetChainID()), sdk.WithBearerToken(bearerToken), ) require.NoError(t, err) policy := ` name: test policy ` msgSet := sdk.MsgSet{} mapper := msgSet.WithCreatePolicy( types.NewMsgCreatePolicy( validatorAddr, policy, coretypes.PolicyMarshalingType_YAML, ), ) signer := sdk.TxSignerFromCosmosKey(network.GetValidatorKey()) ctx := context.TODO() tx, err := builder.Build(ctx, signer, &msgSet) require.NoError(t, err) extOptsTx, ok := tx.(interface { GetExtensionOptions() []*codectypes.Any }) require.True(t, ok, "transaction should support extension options") extOpts := extOptsTx.GetExtensionOptions() require.Len(t, extOpts, 1, "should have exactly one extension option") response, err := client.BroadcastTx(ctx, tx) require.NoError(t, err) network.Network.WaitForNextBlock() result, err := network.Client.GetTx(ctx, response.TxHash) require.NoError(t, err) require.NoError(t, result.Error()) _, err = mapper.Map(result.TxPayload()) require.NoError(t, err) } ================================================ FILE: tests/integration/acp/README.md ================================================ ================================================ FILE: tests/integration/acp/actions.go ================================================ package test import ( coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type CreatePolicyAction struct { Policy string Expected *coretypes.Policy Creator *TestActor ExpectedErr error } func (a *CreatePolicyAction) Run(ctx *TestCtx) *coretypes.Policy { msg := &types.MsgCreatePolicy{ Policy: a.Policy, Creator: a.Creator.SourceHubAddr, MarshalType: coretypes.PolicyMarshalingType_YAML, } response, err := ctx.Executor.CreatePolicy(ctx, msg) AssertError(ctx, err, a.ExpectedErr) if a.Expected != nil { require.NotNil(ctx.T, response) AssertValue(ctx, response.Record.Policy, a.Expected) } if response != nil { ctx.State.PolicyCreator = a.Creator.SourceHubAddr ctx.State.PolicyId = response.Record.Policy.Id return response.Record.Policy } return nil } type EditPolicyAction struct { Id string Policy string Creator *TestActor Expected *coretypes.Policy ExpectedErr error Response *types.MsgEditPolicyResponse } func (a *EditPolicyAction) Run(ctx *TestCtx) *coretypes.Policy { msg := &types.MsgEditPolicy{ PolicyId: a.Id, Policy: a.Policy, Creator: a.Creator.SourceHubAddr, MarshalType: coretypes.PolicyMarshalingType_YAML, } response, err := ctx.Executor.EditPolicy(ctx, msg) a.Response = response AssertError(ctx, err, a.ExpectedErr) if a.Expected != nil { require.NotNil(ctx.T, response) getResponse, getErr := ctx.Executor.Policy(ctx, &types.QueryPolicyRequest{ Id: a.Id, }) require.NoError(ctx.T, getErr) require.Equal(ctx.T, a.Expected, getResponse.Record.Policy) } if response != nil { ctx.State.PolicyCreator = a.Creator.SourceHubAddr ctx.State.PolicyId = response.Record.Policy.Id return response.Record.Policy } return nil } type SetRelationshipAction struct { PolicyId string Relationship *coretypes.Relationship Actor *TestActor Expected *types.SetRelationshipCmdResult ExpectedErr error } func (a *SetRelationshipAction) Run(ctx *TestCtx) *types.RelationshipRecord { cmd := types.NewSetRelationshipCmd(a.Relationship) result, err := dispatchPolicyCmd(ctx, a.PolicyId, a.Actor, cmd) if a.Expected != nil { a.Expected.Record.Metadata = ctx.GetRecordMetadataForActor(a.Actor.Name) want := &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_SetRelationshipResult{ SetRelationshipResult: a.Expected, }, } require.Equal(ctx.T, want, result) } AssertError(ctx, err, a.ExpectedErr) if err != nil { return nil } return result.GetSetRelationshipResult().Record } type RegisterObjectAction struct { PolicyId string Object *coretypes.Object Actor *TestActor Expected *types.RelationshipRecord ExpectedErr error } func (a *RegisterObjectAction) Run(ctx *TestCtx) *types.RelationshipRecord { cmd := types.NewRegisterObjectCmd(a.Object) result, err := dispatchPolicyCmd(ctx, a.PolicyId, a.Actor, cmd) if a.Expected != nil { a.Expected.Metadata = ctx.GetRecordMetadataForActor(a.Actor.Name) want := &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_RegisterObjectResult{ RegisterObjectResult: &types.RegisterObjectCmdResult{ Record: a.Expected, }, }, } ctx.T.Logf("want: %v", want) require.Equal(ctx.T, want, result) } AssertError(ctx, err, a.ExpectedErr) if err != nil { return nil } return result.GetRegisterObjectResult().Record } type RegisterObjectsAction struct { PolicyId string Objects []*coretypes.Object Actor *TestActor } func (a *RegisterObjectsAction) Run(ctx *TestCtx) { for _, obj := range a.Objects { action := RegisterObjectAction{ PolicyId: a.PolicyId, Object: obj, Actor: a.Actor, } action.Run(ctx) } } type SetRelationshipsAction struct { PolicyId string Relationships []*coretypes.Relationship Actor *TestActor } func (a *SetRelationshipsAction) Run(ctx *TestCtx) { for _, rel := range a.Relationships { action := SetRelationshipAction{ PolicyId: a.PolicyId, Relationship: rel, Actor: a.Actor, } action.Run(ctx) } } type DeleteRelationshipsAction struct { PolicyId string Relationships []*coretypes.Relationship Actor *TestActor } func (a *DeleteRelationshipsAction) Run(ctx *TestCtx) { for _, rel := range a.Relationships { action := DeleteRelationshipAction{ Relationship: rel, PolicyId: a.PolicyId, Actor: a.Actor, } action.Run(ctx) } } type DeleteRelationshipAction struct { PolicyId string Relationship *coretypes.Relationship Actor *TestActor Expected *types.DeleteRelationshipCmdResult ExpectedErr error } func (a *DeleteRelationshipAction) Run(ctx *TestCtx) *types.DeleteRelationshipCmdResult { cmd := types.NewDeleteRelationshipCmd(a.Relationship) result, err := dispatchPolicyCmd(ctx, a.PolicyId, a.Actor, cmd) got := (*types.DeleteRelationshipCmdResult)(nil) if result != nil { got = result.GetDeleteRelationshipResult() } AssertResults(ctx, got, a.Expected, err, a.ExpectedErr) return got } type ArchiveObjectAction struct { PolicyId string Object *coretypes.Object Actor *TestActor Expected *types.ArchiveObjectCmdResult ExpectedErr error } func (a *ArchiveObjectAction) Run(ctx *TestCtx) *types.ArchiveObjectCmdResult { cmd := types.NewArchiveObjectCmd(a.Object) result, err := dispatchPolicyCmd(ctx, a.PolicyId, a.Actor, cmd) got := (*types.ArchiveObjectCmdResult)(nil) if result != nil { got = result.GetArchiveObjectResult() } AssertResults(ctx, got, a.Expected, err, a.ExpectedErr) return got } type UnarchiveObjectAction struct { PolicyId string Object *coretypes.Object Actor *TestActor Expected *types.UnarchiveObjectCmdResult ExpectedErr error } func (a *UnarchiveObjectAction) Run(ctx *TestCtx) *types.UnarchiveObjectCmdResult { cmd := types.NewUnarchiveObjectCmd(a.Object) result, err := dispatchPolicyCmd(ctx, a.PolicyId, a.Actor, cmd) if a.Expected != nil { want := &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_UnarchiveObjectResult{ UnarchiveObjectResult: a.Expected, }, } require.Equal(ctx.T, want, result) } AssertError(ctx, err, a.ExpectedErr) if err != nil { return nil } return result.GetUnarchiveObjectResult() } type PolicySetupAction struct { Policy string PolicyCreator *TestActor ObjectsPerActor map[string][]*coretypes.Object RelationshipsPerActor map[string][]*coretypes.Relationship } func (a *PolicySetupAction) Run(ctx *TestCtx) { polAction := CreatePolicyAction{ Policy: a.Policy, Creator: a.PolicyCreator, } policy := polAction.Run(ctx) for actorName, objs := range a.ObjectsPerActor { action := RegisterObjectsAction{ PolicyId: policy.Id, Objects: objs, Actor: ctx.GetActor(actorName), } action.Run(ctx) } for actorName, rels := range a.RelationshipsPerActor { action := SetRelationshipsAction{ PolicyId: policy.Id, Relationships: rels, Actor: ctx.GetActor(actorName), } action.Run(ctx) } } type GetPolicyAction struct { Id string Expected *types.PolicyRecord ExpectedErr error } func (a *GetPolicyAction) Run(ctx *TestCtx) { msg := &types.QueryPolicyRequest{ Id: a.Id, } result, err := ctx.Executor.Policy(ctx, msg) AssertError(ctx, err, a.ExpectedErr) if result != nil { a.Expected.Metadata.CreationTs = result.Record.Metadata.CreationTs AssertValue(ctx, a.Expected, result.Record) } } type CommitRegistrationsAction struct { PolicyId string Objects []*coretypes.Object Actor *TestActor Expected *types.RegistrationsCommitment // Commitment is optional and is automatically generated if Objects is provided Commitment []byte ExpectedErr error } func (a *CommitRegistrationsAction) Run(ctx *TestCtx) *types.RegistrationsCommitment { if a.Objects != nil { actor := coretypes.NewActor(a.Actor.DID) commitment, err := commitment.GenerateCommitmentWithoutValidation(a.PolicyId, actor, a.Objects) require.NoError(ctx.T, err) a.Commitment = commitment } cmd := types.NewCommitRegistrationCmd(a.Commitment) result, err := dispatchPolicyCmd(ctx, a.PolicyId, a.Actor, cmd) AssertError(ctx, err, a.ExpectedErr) if a.ExpectedErr != nil { return nil } require.NotNil(ctx.T, result) comm := result.GetCommitRegistrationsResult().RegistrationsCommitment if a.Expected != nil { a.Expected.Metadata.CreationTs = comm.Metadata.CreationTs AssertValue(ctx, comm, a.Expected) } return comm } func (a *CommitRegistrationsAction) GetCommitment(ctx *TestCtx) []byte { actor := coretypes.NewActor(a.Actor.DID) commitment, err := commitment.GenerateCommitmentWithoutValidation(a.PolicyId, actor, a.Objects) require.NoError(ctx.T, err) return commitment } type RevealRegistrationAction struct { PolicyId string CommitmentId uint64 Objects []*coretypes.Object Index int Actor *TestActor Expected *types.RegisterObjectCmdResult ExpectedErr error } func (a *RevealRegistrationAction) Run(ctx *TestCtx) *types.RevealRegistrationCmdResult { actor := coretypes.NewActor(a.Actor.DID) proof, err := commitment.ProofForObject(a.PolicyId, actor, a.Index, a.Objects) require.NoError(ctx.T, err) cmd := types.NewRevealRegistrationCmd(a.CommitmentId, proof) result, err := dispatchPolicyCmd(ctx, a.PolicyId, a.Actor, cmd) got := (*types.RevealRegistrationCmdResult)(nil) if result != nil { got = result.GetRevealRegistrationResult() } AssertResults(ctx, got, a.Expected, err, a.ExpectedErr) return got } ================================================ FILE: tests/integration/acp/actors.go ================================================ package test import ( stdcrypto "crypto" "crypto/ed25519" sdked25519 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdksecp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdkcrypto "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/bech32" secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/sourcenetwork/sourcehub/app" "github.com/sourcenetwork/sourcehub/x/acp/did" ) // TestActor models a SourceHub actor in the test suite // Each actor has a keypair and a DID // The actor has a SourceHubAddr only if their keys are of type secp256k1 type TestActor struct { Name string DID string PubKey sdkcrypto.PubKey PrivKey sdkcrypto.PrivKey SourceHubAddr string Signer stdcrypto.Signer } // MustNewED25519ActorFromName deterministically generates a Test Actor from a string name as seed // The Actor carries a ed25519 key pair and has no SourceHub addr func MustNewED25519ActorFromName(name string) *TestActor { privKey := sdked25519.GenPrivKeyFromSecret([]byte(name)) didStr, err := did.DIDFromPubKey(privKey.PubKey()) if err != nil { panic(err) } stdPriv := ed25519.PrivateKey(privKey.Bytes()) return &TestActor{ Name: name, DID: didStr, PubKey: privKey.PubKey(), PrivKey: privKey, SourceHubAddr: "", Signer: stdPriv, } } // MustNewSourceHubActorFromName deterministically generates a Test Actor from a string name as seed // The Actor carries a secp256k1 key pair and a SourceHub addr func MustNewSourceHubActorFromName(name string) *TestActor { key := sdksecp256k1.GenPrivKeyFromSecret([]byte(name)) addr, err := bech32.ConvertAndEncode(app.AccountAddressPrefix, key.PubKey().Address()) if err != nil { panic(err) } didStr, err := did.DIDFromPubKey(key.PubKey()) if err != nil { panic(err) } s256Priv := secp256k1.PrivKeyFromBytes(key.Key) stdPrivKey := s256Priv.ToECDSA() return &TestActor{ Name: name, DID: didStr, PubKey: key.PubKey(), PrivKey: key, SourceHubAddr: addr, Signer: stdPrivKey, } } ================================================ FILE: tests/integration/acp/client.go ================================================ package test import ( "context" "crypto/rand" "fmt" "testing" "cosmossdk.io/log" "cosmossdk.io/math" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" prototypes "github.com/cosmos/gogoproto/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" appparams "github.com/sourcenetwork/sourcehub/app/params" hubsdk "github.com/sourcenetwork/sourcehub/sdk" "github.com/sourcenetwork/sourcehub/testutil/e2e" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/testutil" hubtestutil "github.com/sourcenetwork/sourcehub/x/hub/testutil" ) type KeeperACPClient struct { baseCtx sdk.Context k types.MsgServer querier types.QueryServer accountCreator *testutil.AccountKeeperStub ts types.Timestamp } func (c *KeeperACPClient) Cleanup() {} // WaitBlock bumps the current keeper Ts func (c *KeeperACPClient) WaitBlock() { c.nextBlockTs() } // nextBlockTs increments the internal block count func (c *KeeperACPClient) nextBlockTs() { c.ts.BlockHeight++ c.ts.ProtoTs.Seconds++ } // genTx generates a random byte slice to model the comet Tx bytes // // This is done because the keeper executor doesn't receive an actual // cometbft signed Tx but this data is used by the code paths func (c *KeeperACPClient) genTx(ctx *TestCtx) { tx := make([]byte, 50) _, err := rand.Read(tx) require.NoError(ctx.T, err) ctx.State.PushTx(tx) } // getSDKCtx returns the context which must be used before executing // calls to the keeper. // it increments the current timestamp, such that every function call happens with its own block time func (c *KeeperACPClient) getSDKCtx(ctx context.Context) sdk.Context { c.nextBlockTs() time, err := prototypes.TimestampFromProto(c.ts.ProtoTs) if err != nil { panic(err) } header := cmtproto.Header{ Time: time.UTC(), Height: int64(c.ts.BlockHeight), } sdkCtx := c.baseCtx.WithContext(ctx) sdkCtx = c.baseCtx.WithBlockHeader(header) return sdkCtx } func (c *KeeperACPClient) BearerPolicyCmd(ctx *TestCtx, msg *types.MsgBearerPolicyCmd) (*types.MsgBearerPolicyCmdResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.k.BearerPolicyCmd(sdkCtx, msg) } func (c *KeeperACPClient) SignedPolicyCmd(ctx *TestCtx, msg *types.MsgSignedPolicyCmd) (*types.MsgSignedPolicyCmdResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.k.SignedPolicyCmd(sdkCtx, msg) } func (c *KeeperACPClient) DirectPolicyCmd(ctx *TestCtx, msg *types.MsgDirectPolicyCmd) (*types.MsgDirectPolicyCmdResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.k.DirectPolicyCmd(sdkCtx, msg) } func (c *KeeperACPClient) CreatePolicy(ctx *TestCtx, msg *types.MsgCreatePolicy) (*types.MsgCreatePolicyResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.k.CreatePolicy(sdkCtx, msg) } func (c *KeeperACPClient) EditPolicy(ctx *TestCtx, msg *types.MsgEditPolicy) (*types.MsgEditPolicyResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.k.EditPolicy(sdkCtx, msg) } func (c *KeeperACPClient) GetOrCreateAccountFromActor(_ *TestCtx, actor *TestActor) (sdk.AccountI, error) { return c.accountCreator.NewAccount(actor.PubKey), nil } func (c *KeeperACPClient) Policy(ctx *TestCtx, msg *types.QueryPolicyRequest) (*types.QueryPolicyResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.querier.Policy(sdkCtx, msg) } func (c *KeeperACPClient) RegistrationsCommitment(ctx *TestCtx, msg *types.QueryRegistrationsCommitmentRequest) (*types.QueryRegistrationsCommitmentResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.querier.RegistrationsCommitment(sdkCtx, msg) } func (c *KeeperACPClient) RegistrationsCommitmentByCommitment(ctx *TestCtx, msg *types.QueryRegistrationsCommitmentByCommitmentRequest) (*types.QueryRegistrationsCommitmentByCommitmentResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.querier.RegistrationsCommitmentByCommitment(sdkCtx, msg) } func (c *KeeperACPClient) ObjectOwner(ctx *TestCtx, msg *types.QueryObjectOwnerRequest) (*types.QueryObjectOwnerResponse, error) { sdkCtx := c.getSDKCtx(ctx) return c.querier.ObjectOwner(sdkCtx, msg) } func (c *KeeperACPClient) GetLastBlockTs(ctx *TestCtx) (*types.Timestamp, error) { ts := c.ts return &ts, nil } func (c *KeeperACPClient) GetTimestampNow(context.Context) (uint64, error) { return c.ts.BlockHeight, nil } func NewACPClient(t *testing.T, strategy ExecutorStrategy, params types.Params) ACPClient { switch strategy { case Keeper: exec, err := newKeeperExecutor(params) require.NoError(t, err) return exec case SDK: network := &e2e.TestNetwork{} network.Setup(t) executor, err := newSDKExecutor(network) require.NoError(t, err) return executor case CLI: panic("sdk executor not implemented") default: panic(fmt.Sprintf("invalid executor strategy: %v", strategy)) } } func newKeeperExecutor(params types.Params) (ACPClient, error) { storeKey := storetypes.NewKVStoreKey(types.StoreKey) db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) err := stateStore.LoadLatestVersion() if err != nil { return nil, fmt.Errorf("failed to create keeper executor: %v", err) } registry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) accKeeper := &testutil.AccountKeeperStub{} accKeeper.GenAccount() kv := runtime.NewKVStoreService(storeKey) k := keeper.NewKeeper( cdc, kv, log.NewNopLogger(), authority.String(), accKeeper, &capabilitykeeper.ScopedKeeper{}, hubtestutil.NewHubKeeperStub(), ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) ctx = ctx.WithEventManager(sdk.NewEventManager()) ctx = ctx.WithMultiStore(stateStore) // Initialize params k.SetParams(ctx, params) executor := &KeeperACPClient{ baseCtx: ctx, k: &k, querier: &k, accountCreator: accKeeper, ts: types.Timestamp{ BlockHeight: 1, ProtoTs: prototypes.TimestampNow(), }, } return executor, nil } func newSDKExecutor(network *e2e.TestNetwork) (*SDKClientExecutor, error) { txBuilder, err := hubsdk.NewTxBuilder( hubsdk.WithSDKClient(network.Client), hubsdk.WithChainID(network.GetChainID()), ) if err != nil { return nil, err } return &SDKClientExecutor{ Network: network, txBuilder: &txBuilder, }, nil } type SDKClientExecutor struct { Network *e2e.TestNetwork txBuilder *hubsdk.TxBuilder } func (e *SDKClientExecutor) BearerPolicyCmd(ctx *TestCtx, msg *types.MsgBearerPolicyCmd) (*types.MsgBearerPolicyCmdResponse, error) { set := hubsdk.MsgSet{} mapper := set.WithBearerPolicyCmd(msg) result := e.broadcastTx(ctx, &set) if result.Error() != nil { return nil, result.Error() } response, err := mapper.Map(result.TxPayload()) require.NoError(ctx.T, err) return response, nil } func (e *SDKClientExecutor) SignedPolicyCmd(ctx *TestCtx, msg *types.MsgSignedPolicyCmd) (*types.MsgSignedPolicyCmdResponse, error) { set := hubsdk.MsgSet{} mapper := set.WithSignedPolicyCmd(msg) result := e.broadcastTx(ctx, &set) if result.Error() != nil { return nil, result.Error() } response, err := mapper.Map(result.TxPayload()) require.NoError(ctx.T, err) return response, nil } func (e *SDKClientExecutor) DirectPolicyCmd(ctx *TestCtx, msg *types.MsgDirectPolicyCmd) (*types.MsgDirectPolicyCmdResponse, error) { set := hubsdk.MsgSet{} mapper := set.WithDirectPolicyCmd(msg) result := e.broadcastTx(ctx, &set) if result.Error() != nil { return nil, result.Error() } response, err := mapper.Map(result.TxPayload()) require.NoError(ctx.T, err) return response, nil } func (e *SDKClientExecutor) CreatePolicy(ctx *TestCtx, msg *types.MsgCreatePolicy) (*types.MsgCreatePolicyResponse, error) { set := hubsdk.MsgSet{} mapper := set.WithCreatePolicy(msg) result := e.broadcastTx(ctx, &set) if result.Error() != nil { return nil, result.Error() } response, err := mapper.Map(result.TxPayload()) require.NoError(ctx.T, err) return response, nil } func (e *SDKClientExecutor) EditPolicy(ctx *TestCtx, msg *types.MsgEditPolicy) (*types.MsgEditPolicyResponse, error) { set := hubsdk.MsgSet{} mapper := set.WithEditPolicy(msg) result := e.broadcastTx(ctx, &set) if result.Error() != nil { return nil, result.Error() } response, err := mapper.Map(result.TxPayload()) require.NoError(ctx.T, err) return response, nil } func (e *SDKClientExecutor) GetOrCreateAccountFromActor(ctx *TestCtx, actor *TestActor) (sdk.AccountI, error) { client := e.Network.Client resp, err := client.AuthQueryClient().AccountInfo(ctx, &authtypes.QueryAccountInfoRequest{ Address: actor.SourceHubAddr, }) if resp != nil { return resp.Info, nil } // if error was not found, means account doesnt exist // and we can create one if err != nil && status.Code(err) != codes.NotFound { require.NoError(ctx.T, err) return nil, err } var defaultSendAmt sdk.Coins = []sdk.Coin{ { Denom: appparams.DefaultBondDenom, Amount: math.NewInt(10000), }, } msg := banktypes.MsgSend{ FromAddress: e.Network.GetValidatorAddr(), ToAddress: actor.SourceHubAddr, Amount: defaultSendAmt, } tx, err := e.txBuilder.BuildFromMsgs(ctx, hubsdk.TxSignerFromCosmosKey(e.Network.GetValidatorKey()), &msg, ) require.NoError(ctx.T, err) _, err = client.BroadcastTx(ctx, tx) require.NoError(ctx.T, err) e.Network.Network.WaitForNextBlock() resp, err = client.AuthQueryClient().AccountInfo(ctx, &authtypes.QueryAccountInfoRequest{ Address: actor.SourceHubAddr, }) require.NoError(ctx.T, err) return resp.Info, nil } func (e *SDKClientExecutor) broadcastTx(ctx *TestCtx, msgSet *hubsdk.MsgSet) *hubsdk.TxExecResult { _, err := e.GetOrCreateAccountFromActor(ctx, ctx.TxSigner) require.NoError(ctx.T, err) signer := hubsdk.TxSignerFromCosmosKey(ctx.TxSigner.PrivKey) tx, err := e.txBuilder.Build(ctx, signer, msgSet) require.NoError(ctx.T, err) response, err := e.Network.Client.BroadcastTx(ctx, tx) require.NoError(ctx.T, err) e.Network.Network.WaitForNextBlock() result, err := e.Network.Client.GetTx(ctx, response.TxHash) require.NoError(ctx.T, err) return result } func (e *SDKClientExecutor) Policy(ctx *TestCtx, msg *types.QueryPolicyRequest) (*types.QueryPolicyResponse, error) { return e.Network.Client.ACPQueryClient().Policy(ctx, msg) } func (e *SDKClientExecutor) RegistrationsCommitment(ctx *TestCtx, msg *types.QueryRegistrationsCommitmentRequest) (*types.QueryRegistrationsCommitmentResponse, error) { return e.Network.Client.ACPQueryClient().RegistrationsCommitment(ctx, msg) } func (e *SDKClientExecutor) RegistrationsCommitmentByCommitment(ctx *TestCtx, msg *types.QueryRegistrationsCommitmentByCommitmentRequest) (*types.QueryRegistrationsCommitmentByCommitmentResponse, error) { return e.Network.Client.ACPQueryClient().RegistrationsCommitmentByCommitment(ctx, msg) } func (e *SDKClientExecutor) Cleanup() { e.Network.TearDown() } func (e *SDKClientExecutor) WaitBlock() { panic("not implemented") } func (e *SDKClientExecutor) GetLastBlockTs(ctx *TestCtx) (*types.Timestamp, error) { panic("not implemented") } func (c *SDKClientExecutor) GetTimestampNow(context.Context) (uint64, error) { panic("not implemented") } func (c *SDKClientExecutor) ObjectOwner(ctx *TestCtx, req *types.QueryObjectOwnerRequest) (*types.QueryObjectOwnerResponse, error) { return c.Network.Client.ACPQueryClient().ObjectOwner(ctx, req) } ================================================ FILE: tests/integration/acp/ctx.go ================================================ package test import ( "context" "fmt" "testing" "time" prototypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/testutil" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/acp/utils" ) var DefaultTs = MustDateTimeToProto("2024-01-01 00:00:00") var _ context.Context = (*TestCtx)(nil) type TestState struct { PolicyId string PolicyCreator string // Txs is a list of bytes which contains the Txs that have been broadcast during a test Txs [][]byte TokenIssueTs time.Time TokenIssueProtoTs *prototypes.Timestamp } func (s *TestState) PushTx(tx []byte) { s.Txs = append(s.Txs, tx) } func (s *TestState) GetLastTx() []byte { if len(s.Txs) == 0 { return nil } return s.Txs[len(s.Txs)-1] } func NewTestCtxFromConfig(t *testing.T, config TestConfig) *TestCtx { params := types.Params{ PolicyCommandMaxExpirationDelta: 1, RegistrationsCommitmentValidity: types.NewBlockCountDuration(7), } executor := NewACPClient(t, config.ExecutorStrategy, params) root := MustNewSourceHubActorFromName("root") ctx := &TestCtx{ Ctx: context.TODO(), T: t, TxSigner: root, Executor: executor, Strategy: config.AuthStrategy, ActorType: config.ActorType, Params: params, } _, err := executor.GetOrCreateAccountFromActor(ctx, root) require.NoError(t, err) return ctx } type TestCtx struct { Ctx context.Context T *testing.T State TestState // Signer for Txs while running tests under Bearer or Signed Auth modes TxSigner *TestActor Executor ACPClient Strategy AuthenticationStrategy AccountKeeper *testutil.AccountKeeperStub ActorType ActorKeyType Params types.Params } func NewTestCtx(t *testing.T) *TestCtx { initTest() config := MustNewTestConfigFromEnv() ctx := NewTestCtxFromConfig(t, config) return ctx } func (c *TestCtx) Deadline() (deadline time.Time, ok bool) { return c.Ctx.Deadline() } func (c *TestCtx) Done() <-chan struct{} { return c.Ctx.Done() } func (c *TestCtx) Err() error { return c.Ctx.Err() } func (c *TestCtx) Value(key any) any { return c.Ctx.Value(key) } // GetActor gets or create an account with the given alias func (c *TestCtx) GetActor(alias string) *TestActor { switch c.ActorType { case Actor_ED25519: return MustNewED25519ActorFromName(alias) case Actor_SECP256K1: acc := MustNewSourceHubActorFromName(alias) _, err := c.Executor.GetOrCreateAccountFromActor(c, acc) require.NoError(c.T, err) return acc default: panic(fmt.Sprintf("invalid actor type: %v", c.ActorType)) } } func (c *TestCtx) GetSourceHubAccount(alias string) *TestActor { acc := MustNewSourceHubActorFromName(alias) c.AccountKeeper.NewAccount(acc.PubKey) return acc } // GetRecordMetadataForActor, fetches actor from the actor registry // and builds a RecordMetadata object for the recovered DID func (c *TestCtx) GetRecordMetadataForActor(actor string) *types.RecordMetadata { return &types.RecordMetadata{ CreationTs: c.GetBlockTs(), TxHash: utils.HashTx(c.State.GetLastTx()), TxSigner: c.TxSigner.SourceHubAddr, OwnerDid: c.GetActor(actor).DID, } } // GetSignerRecordMetadata builds RecordMetadata for the current // Tx Signer func (c *TestCtx) GetSignerRecordMetadata() *types.RecordMetadata { return &types.RecordMetadata{ CreationTs: c.GetBlockTs(), TxHash: utils.HashTx(c.State.GetLastTx()), TxSigner: c.TxSigner.SourceHubAddr, OwnerDid: c.TxSigner.DID, } } func (c *TestCtx) GetParams() types.Params { return c.Params } func (c *TestCtx) Cleanup() { c.Executor.Cleanup() } // WaitBlock waits until the underlying SourceHub node advances to the next block func (c *TestCtx) WaitBlock() { c.Executor.WaitBlock() } // WaitBlock waits until the underlying SourceHub node advances to the next block func (c *TestCtx) WaitBlocks(n uint64) { for i := uint64(0); i < n; i += 1 { c.Executor.WaitBlock() } } // GetBlockTs returns the timestamp of the last processed block func (c *TestCtx) GetBlockTs() *types.Timestamp { ts, err := c.Executor.GetLastBlockTs(c) require.NoError(c.T, err) return ts } ================================================ FILE: tests/integration/acp/dispatchers.go ================================================ package test import ( "time" prototypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/bearer_token" "github.com/sourcenetwork/sourcehub/x/acp/signed_policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func dispatchPolicyCmd(ctx *TestCtx, policyId string, actor *TestActor, policyCmd *types.PolicyCmd) (result *types.PolicyCmdResult, err error) { ctx.State.TokenIssueTs = time.Now() ctx.State.TokenIssueProtoTs = prototypes.TimestampNow() switch ctx.Strategy { case BearerToken: ts := ctx.State.TokenIssueTs token := bearer_token.BearerToken{ IssuerID: actor.DID, AuthorizedAccount: ctx.TxSigner.SourceHubAddr, IssuedTime: ts.Unix(), ExpirationTime: ts.Add(bearer_token.DefaultExpirationTime).Unix(), } jws, jwsErr := token.ToJWS(actor.Signer) require.NoError(ctx.T, jwsErr) msg := &types.MsgBearerPolicyCmd{ Creator: ctx.TxSigner.SourceHubAddr, BearerToken: jws, PolicyId: policyId, Cmd: policyCmd, } resp, respErr := ctx.Executor.BearerPolicyCmd(ctx, msg) if resp != nil { result = resp.Result } err = respErr case SignedPayload: var jws string builder := signed_policy_cmd.NewCmdBuilder(ctx.Executor, ctx.GetParams()) builder.PolicyCmd(policyCmd) builder.Actor(actor.DID) builder.IssuedAt(ctx.State.TokenIssueProtoTs) builder.PolicyID(policyId) builder.SetSigner(actor.Signer) jws, err = builder.BuildJWS(ctx) require.NoError(ctx.T, err) msg := &types.MsgSignedPolicyCmd{ Creator: ctx.TxSigner.SourceHubAddr, Payload: jws, Type: types.MsgSignedPolicyCmd_JWS, } resp, respErr := ctx.Executor.SignedPolicyCmd(ctx, msg) if resp != nil { result = resp.Result } err = respErr case Direct: // For Direct Authentication we use the action Actor as the signer ctx.TxSigner = actor msg := &types.MsgDirectPolicyCmd{ Creator: actor.SourceHubAddr, PolicyId: policyId, Cmd: policyCmd, } resp, respErr := ctx.Executor.DirectPolicyCmd(ctx, msg) if resp != nil { result = resp.Result } err = respErr } return result, err } ================================================ FILE: tests/integration/acp/init.go ================================================ package test import ( "github.com/sourcenetwork/sourcehub/app" ) var initialized bool = false func initTest() { if !initialized { app.SetConfig(false) initialized = true } } ================================================ FILE: tests/integration/acp/suite/object/archive_test.go ================================================ package object import ( "testing" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var unregisterTestPol = ` name: policy resources: - name: file relations: - name: reader types: - actor ` func setupArchive(t *testing.T) *test.TestCtx { ctx := test.NewTestCtx(t) a1 := test.CreatePolicyAction{ Creator: ctx.TxSigner, Policy: unregisterTestPol, } a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "foo"), Actor: ctx.GetActor("alice"), } a2.Run(ctx) a3 := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", ctx.GetActor("alice").DID), Actor: ctx.GetActor("alice"), } a3.Run(ctx) return ctx } func TestArchiveObject_RegisteredObjectCanBeUnregisteredByAuthor(t *testing.T) { ctx := setupArchive(t) defer ctx.Cleanup() action := test.ArchiveObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "foo"), Actor: ctx.GetActor("alice"), Expected: &types.ArchiveObjectCmdResult{ Found: true, RelationshipsRemoved: 2, }, } action.Run(ctx) } func TestArchiveObject_ActorCannotUnregisterObjectTheyDoNotOwn(t *testing.T) { ctx := setupArchive(t) defer ctx.Cleanup() action := test.ArchiveObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "foo"), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_UNAUTHORIZED, } action.Run(ctx) } func TestArchiveObject_UnregisteringAnObjectThatDoesNotExistReturnsFoundFalse(t *testing.T) { ctx := setupArchive(t) defer ctx.Cleanup() action := test.ArchiveObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "file-isnt-registerd"), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_BAD_INPUT, } action.Run(ctx) } func TestArchiveObject_UnregisteringAnAlreadyArchivedObjectIsANoop(t *testing.T) { ctx := setupArchive(t) defer ctx.Cleanup() action := test.ArchiveObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "foo"), Actor: ctx.GetActor("alice"), } action.Run(ctx) action = test.ArchiveObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "foo"), Actor: ctx.GetActor("alice"), Expected: &types.ArchiveObjectCmdResult{ Found: true, }, } action.Run(ctx) } func TestArchiveObject_SendingInvalidPolicyIdErrors(t *testing.T) { ctx := setupArchive(t) defer ctx.Cleanup() action := test.ArchiveObjectAction{ PolicyId: "abc1234", Object: coretypes.NewObject("file", "foo"), Actor: ctx.GetActor("alice"), ExpectedErr: errors.ErrorType_NOT_FOUND, } action.Run(ctx) } func TestArchiveThenUnarchive_NoError(t *testing.T) { ctx := setupArchive(t) defer ctx.Cleanup() a0 := test.RegisterObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "bar"), Actor: ctx.GetActor("alice"), } result := a0.Run(ctx) a1 := test.ArchiveObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "bar"), Actor: ctx.GetActor("alice"), } a1.Run(ctx) a2 := test.UnarchiveObjectAction{ PolicyId: ctx.State.PolicyId, Object: coretypes.NewObject("file", "bar"), Actor: ctx.GetActor("alice"), Expected: &types.UnarchiveObjectCmdResult{ RelationshipModified: true, Record: &types.RelationshipRecord{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "bar", "owner", ctx.GetActor("alice").DID), Archived: false, Metadata: result.Metadata, }, }, } a2.Run(ctx) } ================================================ FILE: tests/integration/acp/suite/object/commitment_register_test.go ================================================ package object import ( "testing" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) var commitPolicy string = ` name: policy resources: - name: resource ` func TestCommitRegistration_CreatingCommitmentReturnsID(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: commitPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) // When bob commits to foo.txt a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } commitment := a2.GetCommitment(ctx) metadata := ctx.GetRecordMetadataForActor("bob") metadata.CreationTs.BlockHeight++ a2.Expected = &types.RegistrationsCommitment{ Id: 1, PolicyId: ctx.State.PolicyId, Commitment: commitment, Expired: false, Validity: ctx.Params.RegistrationsCommitmentValidity, Metadata: metadata, } a2.Run(ctx) } func TestCommitRegistration_CreateAndGetCommitment(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: commitPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } commitment := a2.Run(ctx) got, err := ctx.Executor.RegistrationsCommitment(ctx, &types.QueryRegistrationsCommitmentRequest{ Id: commitment.Id, }) require.NoError(t, err) require.Equal(t, commitment, got.RegistrationsCommitment) } func TestCommitRegistration_CommitmentsGenerateDifferentIds(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: commitPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } c1 := a2.Run(ctx) a3 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } c2 := a3.Run(ctx) require.NotEqual(ctx.T, c1.Id, c2.Id) } func TestCommitRegistration_CommitmentWithInvalidId_Errors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: commitPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Commitment: []byte{0x0, 0x1, 0x2}, ExpectedErr: errors.ErrorType_BAD_INPUT, } a2.Run(ctx) } ================================================ FILE: tests/integration/acp/suite/object/query_owner_test.go ================================================ package object /* import ( "testing" "github.com/stretchr/testify/require" "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/acp_core/test" ) func setupQueryObjectOwner(t *testing.T) *test.TestCtx { ctx := test.NewTestCtx(t) ctx.SetPrincipal("admin") pol := ` name: policy description: ok resources: file: relations: owner: doc: owner owns types: - actor-resource reader: admin: manages: - reader permissions: own: expr: owner doc: own doc read: expr: owner + reader actor: name: actor-resource doc: my actor ` action := test.CreatePolicyAction{ Policy: pol, } policy := action.Run(ctx) ctx.SetPrincipal("alice") objAction := test.RegisterObjectsAction{ PolicyId: policy.Id, Objects: []*types.Object{ types.NewObject("file", "1"), }, } objAction.Run(ctx) return ctx } func TestGetObjectRegistration_ReturnsObjectOwner(t *testing.T) { ctx := setupQueryObjectOwner(t) resp, err := ctx.Engine.GetObjectRegistration(ctx, &types.GetObjectRegistrationRequest{ PolicyId: ctx.State.PolicyId, Object: types.NewObject("file", "1"), }) want := &types.GetObjectRegistrationResponse{ IsRegistered: true, OwnerId: ctx.Actors.DID("alice"), } require.Equal(t, want, resp) require.NoError(t, err) } func TestGetObjectRegistration_QueryingForObjectInNonExistingResourceReturnsError(t *testing.T) { ctx := setupQueryObjectOwner(t) resp, err := ctx.Engine.GetObjectRegistration(ctx, &types.GetObjectRegistrationRequest{ PolicyId: ctx.State.PolicyId, Object: types.NewObject("missing-resource", "1"), }) require.Nil(t, resp) require.NotNil(t, err) } func TestGetObjectOwner_QueryingPolicyThatDoesNotExistReturnError(t *testing.T) { ctx := setupQueryObjectOwner(t) resp, err := ctx.Engine.GetObjectRegistration(ctx, &types.GetObjectRegistrationRequest{ PolicyId: "asbcf12345", Object: types.NewObject("file", "1"), }) require.Nil(t, resp) require.ErrorIs(t, err, types.ErrPolicyNotFound) } func TestGetObjectOwner_QueryingForUnregisteredObjectReturnsEmptyOwner(t *testing.T) { ctx := setupQueryObjectOwner(t) resp, err := ctx.Engine.GetObjectRegistration(ctx, &types.GetObjectRegistrationRequest{ PolicyId: ctx.State.PolicyId, Object: types.NewObject("file", "404"), }) require.NoError(t, err) want := &types.GetObjectRegistrationResponse{ IsRegistered: false, OwnerId: "", } require.Equal(t, resp, want) } */ ================================================ FILE: tests/integration/acp/suite/object/register_test.go ================================================ package object import ( "testing" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var policyDef string = ` name: policy resources: - name: resource ` func TestRegisterObject_RegisteringNewObjectIsSucessful(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) bob := ctx.GetActor("bob") a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: bob, Expected: &types.RelationshipRecord{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("resource", "foo", "owner", bob.DID), Archived: false, }, } a2.Run(ctx) /* event := &types.EventObjectRegistered{ Actor: did, PolicyId: pol.Id, ObjectId: "foo", ObjectResource: "resource", } testutil.AssertEventEmmited(t, ctx, event) */ } func TestRegisterObject_RegisteringObjectRegisteredToAnotherUserErrors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Bob as owner of foo a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("bob"), } a2.Run(ctx) // when Alice tries to register foo // then she is denied a2 = test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("alice"), ExpectedErr: errors.ErrorType_OPERATION_FORBIDDEN, } a2.Run(ctx) } func TestRegisterObject_ReregisteringObjectOwnedByUser_Errors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Bob as owner of foo a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("bob"), } a2.Run(ctx) // when Bob tries to reregister foo // then forbidden op a2 = test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_OPERATION_FORBIDDEN, } a2.Run(ctx) } func TestRegisterObject_RegisteringAnotherUsersArchivedObject_Errors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Bob as previous owner of foo a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("bob"), } a2.Run(ctx) a3 := test.ArchiveObjectAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Object: coretypes.NewObject("resource", "foo"), } a3.Run(ctx) // when Alice tries to register foo op forbidden action := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("alice"), ExpectedErr: errors.ErrorType_OPERATION_FORBIDDEN, } action.Run(ctx) } func TestRegisterObject_RegisteringArchivedUserObject_ReturnsOperationForbidden(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Bob as previous owner of foo a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("bob"), } a2.Run(ctx) a3 := test.ArchiveObjectAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Object: coretypes.NewObject("resource", "foo"), } a3.Run(ctx) // when Bob tries to register the archived foo action := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_OPERATION_FORBIDDEN, } action.Run(ctx) /* event := &types.EventObjectRegistered{ Actor: bobDID, PolicyId: pol.Id, ObjectId: "foo", ObjectResource: "resource", } testutil.AssertEventEmmited(t, ctx, event) */ } func TestRegisterObject_RegisteringObjectInAnUndefinedResourceErrors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Bob as previous owner of foo a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("abc", "foo"), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_BAD_INPUT, } a2.Run(ctx) } func TestRegisterObject_RegisteringToUnknownPolicyReturnsError(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() a2 := test.RegisterObjectAction{ PolicyId: "abc1234", Object: coretypes.NewObject("resource", "foo"), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_NOT_FOUND, } a2.Run(ctx) } func TestRegisterObject_BlankResourceErrors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("abc", "foo"), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_BAD_INPUT, } a2.Run(ctx) } func TestRegisterObject_BlankObjectIdErrors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() a1 := test.CreatePolicyAction{ Policy: policyDef, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("resource", ""), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_BAD_INPUT, } a2.Run(ctx) } ================================================ FILE: tests/integration/acp/suite/object/reveal_registration_test.go ================================================ package object import ( "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" ) const revealPolicy string = ` name: pol resources: - name: file ` func TestRevealRegistration_UnregisteredObjectGetsRegistered_ReturnsNewRecord(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, } commitment := a2.Run(ctx) t.Logf("commitment generated: %v", commitment.Commitment) t.Logf("registrations commitment id: %v", commitment.Id) ctx.WaitBlock() t.Logf("reveal registration for file:foo.txt") a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, Index: 0, } result := a.Run(ctx) t.Logf("created relationship: %v", result.Record) } // This tests documents deals with the edge case where the object owner // commits to the object, performs explicit registration and then reveals the same object. // We assert that the record timestamp invariant holds, even for this odd scenario func TestRevealRegistration_ObjectRegisteredToActor_ReturnRecordWithCommitmentTimestamp(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) // Given commitment and object registered after commitment a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, } commitment := a2.Run(ctx) ctx.WaitBlock() a3 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("file", "foo.txt"), Actor: ctx.GetActor("bob"), } a3.Run(ctx) ctx.WaitBlock() // When Bob opens commitment for foo.txt a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, Index: 0, } result := a.Run(ctx) // Then result contains relationship registered // at commit creation time require.Equal(ctx.T, commitment.Metadata.CreationTs, result.Record.Metadata.CreationTs) } func TestRevealRegistration_ObjectRegisteredAfterCommitment_RegistrationAmended(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given a commitment by bob to foo.txt // followed by Alice's registration of foo.txt a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, } commitment := a2.Run(ctx) ctx.WaitBlock() a3 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("file", "foo.txt"), Actor: ctx.GetActor("alice"), } a3.Run(ctx) ctx.WaitBlock() // When Bob reveals the commitment to foo.txt a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, Index: 0, } result := a.Run(ctx) // Then foo.txt is transfered to bob require.Equal(ctx.T, uint64(1), result.Event.Id) require.Equal(ctx.T, result.Record.Metadata.OwnerDid, ctx.GetActor("bob").DID) require.Equal(ctx.T, result.Record.Relationship, coretypes.NewActorRelationship("file", "foo.txt", "owner", ctx.GetActor("bob").DID)) } func TestRevealRegistration_ObjectRegisteredThroughNewerCommitment_RegistrationIsAmended(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) // Given a commitment made by bob to foo.txt a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } commitment := a2.Run(ctx) ctx.WaitBlock() // Given alice registers foo.txt through a commitment made after bob's a3 := test.CommitRegistrationsAction{ Actor: ctx.GetActor("alice"), PolicyId: pol.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } aliceComm := a3.Run(ctx) ctx.WaitBlock() a4 := test.RevealRegistrationAction{ Actor: ctx.GetActor("alice"), PolicyId: pol.Id, CommitmentId: aliceComm.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, Index: 0, } a4.Run(ctx) ctx.WaitBlock() // When Bob reveals foo.txt a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, Index: 0, } result := a.Run(ctx) // Then Bob is the owner of foo.txt require.Equal(ctx.T, uint64(1), result.Event.Id) require.Equal(ctx.T, result.Record.Metadata.OwnerDid, ctx.GetActor("bob").DID) require.Equal(ctx.T, result.Record.Relationship, coretypes.NewActorRelationship("file", "foo.txt", "owner", ctx.GetActor("bob").DID)) } func TestRevealRegistration_ObjectRegisteredToSomeoneElseAfterCommitment_ErrorsUnauthorized(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) // Given alice as owner of foo.txt a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("file", "foo.txt"), Actor: ctx.GetActor("alice"), } a2.Run(ctx) ctx.WaitBlock() // Given a commitment made by bob to foo.txt a3 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } commitment := a3.Run(ctx) ctx.WaitBlock() // When Bob reveals foo.txt then bob is forbidden from doing so a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, Index: 0, ExpectedErr: types.ErrorType_OPERATION_FORBIDDEN, } a.Run(ctx) } func TestRevealRegistration_InvalidProof_ReturnsError(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) // Given alice as owner of foo.txt a2 := test.RegisterObjectAction{ PolicyId: pol.Id, Object: coretypes.NewObject("file", "foo.txt"), Actor: ctx.GetActor("alice"), } a2.Run(ctx) ctx.WaitBlock() // Given a commitment made by bob to foo.txt a3 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } commitment := a3.Run(ctx) ctx.WaitBlock() // When Bob reveals foo.txt then bob is forbidden from doing so a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, Index: 0, ExpectedErr: types.ErrorType_OPERATION_FORBIDDEN, } a.Run(ctx) } func TestRevealRegistration_ValidProofToExpiredCommitment_ReturnsProtocolError(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() // Given Policy a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) // Given a commitment made by bob to foo.txt a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, } commitment := a2.Run(ctx) ctx.WaitBlocks(ctx.Params.RegistrationsCommitmentValidity.GetBlockCount() + 1) // When Bob reveals foo.txt Bob is forbidden from doing so a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), }, Index: 0, ExpectedErr: types.ErrorType_OPERATION_FORBIDDEN, } a.Run(ctx) } func TestRevealRegistration_RevealingRegistrationTwice_Errors(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() a1 := test.CreatePolicyAction{ Policy: revealPolicy, Creator: ctx.TxSigner, } pol := a1.Run(ctx) a2 := test.CommitRegistrationsAction{ PolicyId: pol.Id, Actor: ctx.GetActor("bob"), Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, } commitment := a2.Run(ctx) ctx.WaitBlock() a := test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, Index: 0, } a.Run(ctx) ctx.WaitBlock() // When bob reveals the same registartion twice a = test.RevealRegistrationAction{ Actor: ctx.GetActor("bob"), PolicyId: pol.Id, CommitmentId: commitment.Id, Objects: []*coretypes.Object{ coretypes.NewObject("file", "foo.txt"), coretypes.NewObject("file", "bar.txt"), }, Index: 0, ExpectedErr: types.ErrorType_OPERATION_FORBIDDEN, } } ================================================ FILE: tests/integration/acp/suite/policy/edit_test.go ================================================ package policy import ( "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" ) func TestEditPolicy_CanEditPolicy(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() action := test.CreatePolicyAction{ Policy: ` description: ok name: policy resources: - name: file permissions: - expr: (reader + writer) name: read - expr: writer name: write relations: - name: reader - name: writer `, Creator: ctx.TxSigner, } action.Run(ctx) want := &coretypes.Policy{ Id: ctx.State.PolicyId, Name: "new policy", Description: "new ok", SpecificationType: coretypes.PolicySpecificationType_NO_SPEC, Resources: []*coretypes.Resource{ { Name: "file", Owner: &coretypes.Relation{ Name: "owner", Doc: "owner relations represents the object owner", VrTypes: []*coretypes.Restriction{ { ResourceName: "actor", RelationName: "", }, }, Manages: []string{ "collaborator", "writer", "owner", }, }, Relations: []*coretypes.Relation{ { Name: "collaborator", }, { Name: "writer", }, }, Permissions: []*coretypes.Permission{ { Name: "read", Expression: "collaborator", EffectiveExpression: "(owner + collaborator)", }, { Name: "write", Expression: "(collaborator + writer)", EffectiveExpression: "(owner + (collaborator + writer))", }, }, ManagementRules: []*coretypes.ManagementRule{ { Relation: "collaborator", Expression: "owner", Managers: []string{"owner"}, }, { Relation: "owner", Expression: "owner", Managers: []string{"owner"}, }, { Relation: "writer", Expression: "owner", Managers: []string{"owner"}, }, }, }, }, ActorResource: &coretypes.ActorResource{ Name: "actor", Doc: "actor resource models the set of actors defined within a policy", }, } a := test.EditPolicyAction{ Id: ctx.State.PolicyId, Creator: ctx.TxSigner, Policy: ` description: new ok name: new policy resources: - name: file permissions: - expr: collaborator name: read - expr: (collaborator + writer) name: write relations: - name: collaborator - name: writer `, Expected: want, } a.Run(ctx) } ================================================ FILE: tests/integration/acp/suite/policy/query_test.go ================================================ package policy import ( "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestQuery_Policy_ReturnsPolicyAndRaw(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() policyStr := ` name: policy ` a1 := test.CreatePolicyAction{ Policy: policyStr, Creator: ctx.TxSigner, } pol := a1.Run(ctx) pol.Resources = nil metadata := ctx.GetSignerRecordMetadata() metadata.CreationTs.BlockHeight++ action := test.GetPolicyAction{ Id: pol.Id, Expected: &acptypes.PolicyRecord{ Policy: pol, MarshalType: coretypes.PolicyMarshalingType_YAML, RawPolicy: policyStr, Metadata: metadata, }, } action.Run(ctx) } func TestQuery_Policy_UnknownPolicyReturnsPolicyNotFoundErr(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() action := test.GetPolicyAction{ Id: "blahblahblah", ExpectedErr: acptypes.ErrorType_NOT_FOUND, } action.Run(ctx) } ================================================ FILE: tests/integration/acp/suite/policy/tx_test.go ================================================ package policy import ( "testing" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" ) func TestCreatePolicy_ValidPolicyIsCreated(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() policyStr := ` description: ok name: policy resources: - name: file permissions: - doc: own doc name: own - expr: reader name: read relations: - manages: - reader name: admin - name: reader ` want := &coretypes.Policy{ Id: "199091661bdd06221eb0a8070673c76f25ca8c8dcc04d47934f0abb123daf78b", Name: "policy", Description: "ok", SpecificationType: coretypes.PolicySpecificationType_NO_SPEC, Resources: []*coretypes.Resource{ { Name: "file", Owner: &coretypes.Relation{ Name: "owner", Doc: "owner relations represents the object owner", VrTypes: []*coretypes.Restriction{ { ResourceName: "actor", }, }, Manages: []string{ "admin", "reader", "owner", }, }, Relations: []*coretypes.Relation{ { Name: "admin", Manages: []string{ "reader", }, VrTypes: []*coretypes.Restriction{}, }, { Name: "reader", VrTypes: []*coretypes.Restriction{}, }, }, Permissions: []*coretypes.Permission{ { Name: "own", Expression: "", Doc: "own doc", EffectiveExpression: "owner", }, { Name: "read", Expression: "reader", EffectiveExpression: "(owner + reader)", }, }, ManagementRules: []*coretypes.ManagementRule{ { Relation: "admin", Expression: "owner", Managers: []string{ "owner", }, }, { Relation: "owner", Expression: "owner", Managers: []string{ "owner", }, }, { Relation: "reader", Expression: "(admin + owner)", Managers: []string{ "admin", "owner", }, }, }, }, }, ActorResource: &coretypes.ActorResource{ Name: "actor", Doc: "actor resource models the set of actors defined within a policy", Relations: nil, }, } action := test.CreatePolicyAction{ Policy: policyStr, Expected: want, Creator: ctx.TxSigner, } action.Run(ctx) event := &coretypes.EventPolicyCreated{ PolicyId: "4419a8abb886c641bc794b9b3289bc2118ab177542129627b6b05d540de03e46", PolicyName: "policy", } _ = event //.AssertEventEmmited(t, ctx, event) } func TestCreatePolicy_PolicyResources_OwnerRelationImplicitlyAdded(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() action := test.CreatePolicyAction{ Policy: ` description: ok name: policy resources: - name: file relations: - name: reader - name: foo `, Creator: ctx.TxSigner, } pol := action.Run(ctx) require.Equal(t, "owner", pol.GetResourceByName("file").GetRelationByName("owner").Name) } func TestCreatePolicy_ManagementReferencingUndefinedRelationReturnsError(t *testing.T) { ctx := test.NewTestCtx(t) defer ctx.Cleanup() action := test.CreatePolicyAction{ Policy: ` description: ok name: policy resources: - name: file relations: - manages: - deleter name: admin `, Creator: ctx.TxSigner, //ExpectedErr: coretypes.ErrInvalidManagementRule, // FIXME ExpectedErr: errors.ErrorType_BAD_INPUT, } action.Run(ctx) } ================================================ FILE: tests/integration/acp/suite/relationship/delete_test.go ================================================ package relationship import ( "testing" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var deletePolicy = ` name: policy resources: - name: file relations: - manages: - reader name: admin types: - actor - name: reader types: - actor - name: writer types: - actor ` func setupDelete(t *testing.T) *test.TestCtx { ctx := test.NewTestCtx(t) reader := ctx.GetActor("reader") writer := ctx.GetActor("writer") admin := ctx.GetActor("admin") action := test.PolicySetupAction{ Policy: deletePolicy, PolicyCreator: ctx.TxSigner, ObjectsPerActor: map[string][]*coretypes.Object{ "alice": []*coretypes.Object{ coretypes.NewObject("file", "foo"), }, }, RelationshipsPerActor: map[string][]*coretypes.Relationship{ "alice": []*coretypes.Relationship{ coretypes.NewActorRelationship("file", "foo", "reader", reader.DID), coretypes.NewActorRelationship("file", "foo", "writer", writer.DID), coretypes.NewActorRelationship("file", "foo", "admin", admin.DID), }, }, } action.Run(ctx) return ctx } func TestDeleteRelationship_ObjectOwnerCanRemoveRelationship(t *testing.T) { ctx := setupDelete(t) defer ctx.Cleanup() action := test.DeleteRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", ctx.GetActor("reader").DID), Actor: ctx.GetActor("alice"), Expected: &types.DeleteRelationshipCmdResult{ RecordFound: true, }, } action.Run(ctx) } func TestDeleteRelationship_ObjectManagerCanRemoveRelationshipsForRelationTheyManage(t *testing.T) { ctx := setupDelete(t) defer ctx.Cleanup() action := test.DeleteRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", ctx.GetActor("reader").DID), Actor: ctx.GetActor("admin"), Expected: &types.DeleteRelationshipCmdResult{ RecordFound: true, }, } action.Run(ctx) } func TestDeleteRelationship_ObjectManagerCannotRemoveRelationshipForRelationTheyDontManage(t *testing.T) { ctx := setupDelete(t) defer ctx.Cleanup() action := test.DeleteRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "writer", ctx.GetActor("writer").DID), Actor: ctx.GetActor("admin"), ExpectedErr: errors.ErrorType_UNAUTHORIZED, } action.Run(ctx) } ================================================ FILE: tests/integration/acp/suite/relationship/filter_test.go ================================================ package relationship ================================================ FILE: tests/integration/acp/suite/relationship/set_test.go ================================================ package relationship import ( "testing" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var setPolicy string = ` name: policy resources: - name: file relations: - manages: - reader name: admin types: - actor - name: reader types: - actor ` func setupSetRel(t *testing.T) *test.TestCtx { ctx := test.NewTestCtx(t) action := test.PolicySetupAction{ Policy: setPolicy, PolicyCreator: ctx.TxSigner, ObjectsPerActor: map[string][]*coretypes.Object{ "alice": { coretypes.NewObject("file", "foo"), }, }, } action.Run(ctx) return ctx } func TestSetRelationship_OwnerCanShareObjectTheyOwn(t *testing.T) { ctx := setupSetRel(t) defer ctx.Cleanup() bob := ctx.GetActor("bob").DID a1 := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", bob), Actor: ctx.GetActor("alice"), } a1.Run(ctx) } func TestSetRelationship_ActorCannotSetRelationshipForUnregisteredObject(t *testing.T) { ctx := setupSetRel(t) defer ctx.Cleanup() bob := ctx.GetActor("bob").DID a1 := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "404-file-not-registered", "reader", bob), Actor: ctx.GetActor("alice"), ExpectedErr: errors.ErrorType_NOT_FOUND, } a1.Run(ctx) } func TestSetRelationship_ActorCannotSetRelationshipForObjectTheyDoNotOwn(t *testing.T) { // Given Alice as the Owner of File Foo ctx := setupSetRel(t) defer ctx.Cleanup() bob := ctx.GetActor("bob") a1 := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", bob.DID), Actor: bob, ExpectedErr: errors.ErrorType_UNAUTHORIZED, } a1.Run(ctx) } func TestSetRelationship_ManagerActorCanDelegateAccessToAnotherActor(t *testing.T) { ctx := setupSetRel(t) defer ctx.Cleanup() // Given object foo and Bob as a manager bob := ctx.GetActor("bob").DID a1 := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "admin", bob), Actor: ctx.GetActor("alice"), } a1.Run(ctx) // when bob shares foo with charlie charlie := ctx.GetActor("charlie").DID action := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", charlie), Actor: ctx.GetActor("bob"), Expected: &types.SetRelationshipCmdResult{ RecordExisted: false, Record: &types.RelationshipRecord{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", charlie), Archived: false, }, }, } action.Run(ctx) } func TestSetRelationship_ManagerActorCannotSetRelationshipToRelationshipsTheyDoNotManage(t *testing.T) { ctx := setupSetRel(t) defer ctx.Cleanup() // Given object foo and Bob as a admin bob := ctx.GetActor("bob") a1 := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "admin", bob.DID), Actor: ctx.GetActor("alice"), } a1.Run(ctx) // when bob attemps to make charlie an admin // then operation is not authorized charlie := ctx.GetActor("charlie").DID action := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "admin", charlie), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_UNAUTHORIZED, } action.Run(ctx) } func TestSetRelationship_AdminIsNotAllowedToSetAnOwnerRelationship(t *testing.T) { ctx := setupSetRel(t) defer ctx.Cleanup() // Given object foo and Bob as a admin bob := ctx.GetActor("bob").DID a1 := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "admin", bob), Actor: ctx.GetActor("alice"), } a1.Run(ctx) // when bob attemps to make himself an owner // then operation is not authorized action := test.SetRelationshipAction{ PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "owner", bob), Actor: ctx.GetActor("bob"), ExpectedErr: errors.ErrorType_OPERATION_FORBIDDEN, } action.Run(ctx) } ================================================ FILE: tests/integration/acp/types.go ================================================ package test import ( "fmt" "os" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/signed_policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" ) const ( SourceHubAuthStratEnvVar string = "SOURCEHUB_ACP_TEST_AUTH" SourceHubExecutorEnvVar string = "SOURCEHUB_ACP_TEST_EXECUTOR" SourceHubActorEnvVar string = "SOURCEHUB_ACP_TEST_ACTOR" ) type AccountCreator interface { // GetOrCreateActor retrieves an account from a TestActor's address // if the account does not exist in the chain, it must be created // and given credits (if required) GetOrCreateAccountFromActor(*TestCtx, *TestActor) (sdk.AccountI, error) } // ACPClient represents a component which can execute an ACP Msg and produce a result type ACPClient interface { AccountCreator signed_policy_cmd.LogicalClock CreatePolicy(ctx *TestCtx, msg *types.MsgCreatePolicy) (*types.MsgCreatePolicyResponse, error) EditPolicy(ctx *TestCtx, msg *types.MsgEditPolicy) (*types.MsgEditPolicyResponse, error) BearerPolicyCmd(ctx *TestCtx, msg *types.MsgBearerPolicyCmd) (*types.MsgBearerPolicyCmdResponse, error) SignedPolicyCmd(ctx *TestCtx, msg *types.MsgSignedPolicyCmd) (*types.MsgSignedPolicyCmdResponse, error) DirectPolicyCmd(ctx *TestCtx, msg *types.MsgDirectPolicyCmd) (*types.MsgDirectPolicyCmdResponse, error) Policy(ctx *TestCtx, msg *types.QueryPolicyRequest) (*types.QueryPolicyResponse, error) RegistrationsCommitmentByCommitment(ctx *TestCtx, msg *types.QueryRegistrationsCommitmentByCommitmentRequest) (*types.QueryRegistrationsCommitmentByCommitmentResponse, error) RegistrationsCommitment(ctx *TestCtx, msg *types.QueryRegistrationsCommitmentRequest) (*types.QueryRegistrationsCommitmentResponse, error) ObjectOwner(ctx *TestCtx, msg *types.QueryObjectOwnerRequest) (*types.QueryObjectOwnerResponse, error) // GetLastBlockTs returns an ACP Timestamp for the last accepted block in SourceHub GetLastBlockTs(ctx *TestCtx) (*types.Timestamp, error) Cleanup() // WaitBlock waits until the Executor has advanced to the next block WaitBlock() } // AuthenticationStrategy is an enum representing the Authentication format // which should be used in the tests type AuthenticationStrategy int const ( // Direct represents authentication done directly thought a Tx/Msg Signer Direct AuthenticationStrategy = iota // BearerToken auth uses a Bearer Token to authenticate the actor BearerToken // SignedPayload auth uses a SignedPolicyCmd as source of authentication SignedPayload ) var AuthenticationStrategyMap map[string]AuthenticationStrategy = map[string]AuthenticationStrategy{ "DIRECT": Direct, "BEARER": BearerToken, "SIGNED": SignedPayload, } // ActorKeyType represents the key pair to be used by the system Actors during the test type ActorKeyType int const ( Actor_ED25519 ActorKeyType = iota Actor_SECP256K1 ) var ActorKeyMap map[string]ActorKeyType = map[string]ActorKeyType{ "ED25519": Actor_ED25519, "SECP256K1": Actor_SECP256K1, } // ExecutorStrategy represents the available executors for the test suite type ExecutorStrategy int const ( // Keeper calls the ACP Keeper directly without going through a consensus engine Keeper ExecutorStrategy = iota // CLI invokes SourceHub through the CLI client and broadcasts the Msgs // to a running instance of SourceHub CLI // SDK broadcasts Msgs to a running instance of SourceHub through the SourceHub SDK Client SDK ) var ExecutorStrategyMap map[string]ExecutorStrategy = map[string]ExecutorStrategy{ "KEEPER": Keeper, //"CLI": CLI, //"SDK": SDK, } // TestConfig models how the tests suite will be run type TestConfig struct { AuthStrategy AuthenticationStrategy ExecutorStrategy ExecutorStrategy ActorType ActorKeyType //TODO InitialState } func NewDefaultTestConfig() TestConfig { return TestConfig{ AuthStrategy: BearerToken, ExecutorStrategy: Keeper, ActorType: Actor_ED25519, } } func MustNewTestConfigFromEnv() TestConfig { config := NewDefaultTestConfig() actor, wasSet := os.LookupEnv(SourceHubActorEnvVar) if wasSet { key, found := ActorKeyMap[actor] if !found { panic(fmt.Errorf("ActorKey string value not defined: %v", actor)) } config.ActorType = key } authStratStr, wasSet := os.LookupEnv(SourceHubAuthStratEnvVar) if wasSet { authStrat, found := AuthenticationStrategyMap[authStratStr] if !found { panic(fmt.Errorf("AuthenticationStrategy string value not defined: %v", authStratStr)) } config.AuthStrategy = authStrat } executorStr, wasSet := os.LookupEnv(SourceHubExecutorEnvVar) if wasSet { executor, found := ExecutorStrategyMap[executorStr] if !found { panic(fmt.Errorf("ExecutorStrategy string value not defined: %v", executorStr)) } config.ExecutorStrategy = executor } return config } ================================================ FILE: tests/integration/acp/utils.go ================================================ package test import ( "errors" "reflect" "time" gogotypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // MustDateTimeToProto parses a time.DateTime (YYYY-MM-DD HH:MM:SS) timestamp // and converts into a proto Timestamp. // Panics if input is invalid func MustDateTimeToProto(timestamp string) *gogotypes.Timestamp { t, err := time.Parse(time.DateTime, timestamp) if err != nil { panic(err) } ts, err := gogotypes.TimestampProto(t) if err != nil { panic(err) } return ts } // AssertError asserts that got and want match // if want is not nil. // If ant is nil, it asserts that got has no error func AssertError(ctx *TestCtx, got, want error) bool { if want != nil { require.NotNil(ctx.T, got, "expected an error but got none") if errors.Is(got, want) { return assert.ErrorIs(ctx.T, got, want) } else { // Errors returned from SDK operations (RPC communication to a SourceHub node) // no longer have the original errors wrapped, therefore we compare a string as fallback strat. gotErrStr := got.Error() wantErrStr := want.Error() return assert.Contains(ctx.T, gotErrStr, wantErrStr) } } else { return assert.NoError(ctx.T, got) } } // AssertValue asserts got matches want, if want is not nil func AssertValue(ctx *TestCtx, got, want any) { if !isNil(want) { assert.Equal(ctx.T, want, got) } } func AssertResults(ctx *TestCtx, got, want any, gotErr, wantErr error) { AssertError(ctx, gotErr, wantErr) AssertValue(ctx, got, want) } func isNil(object interface{}) bool { if object == nil { return true } value := reflect.ValueOf(object) kind := value.Kind() isNilableKind := containsKind( []reflect.Kind{ reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer}, kind) if isNilableKind && value.IsNil() { return true } return false } // containsKind checks if a specified kind in the slice of kinds. func containsKind(kinds []reflect.Kind, kind reflect.Kind) bool { for i := 0; i < len(kinds); i++ { if kind == kinds[i] { return true } } return false } ================================================ FILE: tests/integration/ante/jws_test.go ================================================ package ante import ( "context" "crypto/ed25519" "encoding/base64" "encoding/json" "testing" "cosmossdk.io/math" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" "github.com/cosmos/cosmos-sdk/client" clienttx "github.com/cosmos/cosmos-sdk/client/tx" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" sdk "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" coretypes "github.com/sourcenetwork/acp_core/pkg/types" jwstypes "github.com/sourcenetwork/sourcehub/app/ante/types" testutil "github.com/sourcenetwork/sourcehub/testutil" "github.com/sourcenetwork/sourcehub/testutil/network" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/feegrant" ) // TestJWSExtensionOptionWithDIDBasedFeegrant ensures that tx with JWS extension succeeds using the DID-based feegrant. func TestJWSExtensionOptionWithDIDBasedFeegrant(t *testing.T) { net := network.NewWithOptions(t, network.NetworkOptions{EnableFaucet: true}) val := net.Validators[0] clientCtx := val.ClientCtx _, err := net.WaitForHeight(1) require.NoError(t, err) // Import faucet key into validator keyring faucetMnemonic := "comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold" _, err = clientCtx.Keyring.NewAccount("faucet", faucetMnemonic, "", "m/44'/118'/0'/0/0", hd.Secp256k1) require.NoError(t, err) // Generate DID keypair mnemonic := "near smoke great nasty alley food crush nurse rubber say danger search employ under gaze today alien eager risk letter drum relief sponsor current" seed, err := hd.Secp256k1.Derive()(mnemonic, "", "m/44'/118'/0'/0/0") require.NoError(t, err) if len(seed) > 32 { seed = seed[:32] } privKey := ed25519.NewKeyFromSeed(seed) pubKey := privKey.Public().(ed25519.PublicKey) didKey, err := key.CreateDIDKey(crypto.Ed25519, pubKey) require.NoError(t, err) did := didKey.String() // Add DID-based allowance from validator to DID valAddr := sdk.AccAddress(val.Address) faucetAddr := sdk.MustAccAddressFromBech32("source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt") // Create basic allowance for the DID basicAllowance := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewCoin("uopen", math.NewInt(1000000))), } msgGrantAllowance := &feegrant.MsgGrantDIDAllowance{ Granter: valAddr.String(), GranteeDid: did, Allowance: &codectypes.Any{}, } // Pack the allowance allowanceAny, err := codectypes.NewAnyWithValue(basicAllowance) require.NoError(t, err) msgGrantAllowance.Allowance = allowanceAny // Build and send grant transaction txBuilder := clientCtx.TxConfig.NewTxBuilder() err = txBuilder.SetMsgs(msgGrantAllowance) require.NoError(t, err) txBuilder.SetGasLimit(200000) txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("uopen", math.NewInt(5000)))) // Create gRPC connection grpcAddr := net.Validators[0].AppConfig.GRPC.Address conn, err := grpc.NewClient(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) defer conn.Close() // Query validator account to get proper account number and sequence authClient := authtypes.NewQueryClient(conn) accountResp, err := authClient.Account(context.Background(), &authtypes.QueryAccountRequest{ Address: valAddr.String(), }) require.NoError(t, err) var account sdk.AccountI err = clientCtx.InterfaceRegistry.UnpackAny(accountResp.Account, &account) require.NoError(t, err) accNum := account.GetAccountNumber() seq := account.GetSequence() // Create transaction factory with proper account info txf := clienttx.Factory{}. WithTxConfig(clientCtx.TxConfig). WithChainID(clientCtx.ChainID). WithKeybase(clientCtx.Keyring). WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). WithAccountRetriever(clientCtx.AccountRetriever). WithAccountNumber(accNum). WithSequence(seq) err = clienttx.Sign(context.Background(), txf, val.Moniker, txBuilder, true) require.NoError(t, err) txBytes, err := clientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) require.NoError(t, err) res, err := clientCtx.BroadcastTxSync(txBytes) require.NoError(t, err) require.Equal(t, uint32(0), res.Code, "grant allowance check tx failed: %s", res.RawLog) // Wait for transaction to be processed _, err = net.WaitForHeight(3) require.NoError(t, err) // Query the transaction to verify it was actually executed successfully txClient := txtypes.NewServiceClient(conn) txResp, err := txClient.GetTx(context.Background(), &txtypes.GetTxRequest{ Hash: res.TxHash, }) require.NoError(t, err, "should be able to query grant transaction") require.NotNil(t, txResp.TxResponse, "tx response should not be nil") require.Equal(t, uint32(0), txResp.TxResponse.Code, "grant transaction should succeed in block: %s", txResp.TxResponse.RawLog) // Verify the DID allowance was created successfully via gRPC query feegrantClient := feegrant.NewQueryClient(conn) queryResp, err := feegrantClient.DIDAllowance(context.Background(), &feegrant.QueryDIDAllowanceRequest{ Granter: valAddr.String(), GranteeDid: did, }) require.NoError(t, err, "DID allowance should exist") require.NotNil(t, queryResp.Allowance, "DID allowance should not be nil") // Create policy message with JWS extension policyContent := ` description: Base policy that defines permissions for bulletin namespaces name: Bulletin Policy resources: - name: namespace permissions: - expr: collaborator name: create_post relations: - name: collaborator types: - actor ` msg := &acptypes.MsgCreatePolicy{ Creator: faucetAddr.String(), Policy: policyContent, MarshalType: coretypes.PolicyMarshalingType_YAML, } // Create bearer token payload bearerToken := testutil.NewBearerTokenNow(did, faucetAddr.String()) payloadBytes, err := json.Marshal(bearerToken) require.NoError(t, err) // Create and sign JWS header := testutil.CreateJWSHeader() headerBytes, err := json.Marshal(header) require.NoError(t, err) headerEncoded := base64.RawURLEncoding.EncodeToString(headerBytes) payloadEncoded := base64.RawURLEncoding.EncodeToString(payloadBytes) signingInput := headerEncoded + "." + payloadEncoded signature := ed25519.Sign(privKey, []byte(signingInput)) signatureEncoded := base64.RawURLEncoding.EncodeToString(signature) jwsString := signingInput + "." + signatureEncoded // Create extension option ext := &jwstypes.JWSExtensionOption{ BearerToken: jwsString, } extAny, err := codectypes.NewAnyWithValue(ext) require.NoError(t, err) // Build transaction with JWS extension txBuilder = clientCtx.TxConfig.NewTxBuilder() err = txBuilder.SetMsgs(msg) require.NoError(t, err) // Set extension options if extBuilder, ok := txBuilder.(client.ExtendedTxBuilder); ok { extBuilder.SetExtensionOptions(extAny) } else { t.Fatal("TxBuilder does not implement ExtendedTxBuilder") } txBuilder.SetGasLimit(200000) txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("uopen", math.NewInt(5000)))) txBuilder.SetFeeGranter(valAddr) faucetAccountResp, err := authClient.Account(context.Background(), &authtypes.QueryAccountRequest{ Address: faucetAddr.String(), }) require.NoError(t, err) err = clientCtx.InterfaceRegistry.UnpackAny(faucetAccountResp.Account, &account) require.NoError(t, err) faucetAccNum := account.GetAccountNumber() faucetSeq := account.GetSequence() // Sign the transaction txf2 := clienttx.Factory{}. WithTxConfig(clientCtx.TxConfig). WithChainID(clientCtx.ChainID). WithKeybase(clientCtx.Keyring). WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). WithAccountRetriever(clientCtx.AccountRetriever). WithAccountNumber(faucetAccNum). WithSequence(faucetSeq) err = clienttx.Sign(context.Background(), txf2, "faucet", txBuilder, true) require.NoError(t, err) // Encode and broadcast txBytes, err = clientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) require.NoError(t, err) res, err = clientCtx.BroadcastTxSync(txBytes) require.NoError(t, err) require.Equal(t, uint32(0), res.Code, "create policy transaction with JWS failed: %s", res.RawLog) } ================================================ FILE: tests/integration/faucet/faucet_test.go ================================================ package faucet import ( "bytes" "context" "encoding/json" "fmt" "io" "net/http" "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" faucettypes "github.com/sourcenetwork/sourcehub/app/faucet/types" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/testutil/network" "github.com/sourcenetwork/sourcehub/x/feegrant" ) func TestFaucetRequest(t *testing.T) { net := network.NewWithOptions(t, network.NetworkOptions{EnableFaucet: true}) _, err := net.WaitForHeight(1) require.NoError(t, err) t.Run("FaucetInfoBeforeRequest", func(t *testing.T) { httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Get(fmt.Sprintf("%s/faucet/info", httpAddr)) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var info faucettypes.FaucetInfoResponse err = json.NewDecoder(resp.Body).Decode(&info) require.NoError(t, err) assert.NotEmpty(t, info.Address) assert.NotEmpty(t, info.Balance.Amount) assert.NotEmpty(t, info.Balance.Denom) assert.Equal(t, int32(0), info.RequestCount, "Initial request count should be 0") assert.Equal(t, int64(100000000000000), info.Balance.Amount.Int64(), "Faucet balance should be 100000000000000") }) t.Run("FaucetRequest", func(t *testing.T) { testAddress := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" request := &faucettypes.FaucetRequest{ Address: testAddress, } body, _ := json.Marshal(request) httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Post( fmt.Sprintf("%s/faucet/request", httpAddr), "application/json", bytes.NewBuffer(body), ) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var response faucettypes.FaucetResponse bodyBytes, _ := io.ReadAll(resp.Body) err = json.NewDecoder(bytes.NewReader(bodyBytes)).Decode(&response) require.NoError(t, err) assert.NotEmpty(t, response.Txhash) assert.Equal(t, uint32(0), response.Code) assert.NotEmpty(t, response.Address) assert.NotEmpty(t, response.Amount.Amount) _, err = net.WaitForHeight(3) require.NoError(t, err) time.Sleep(3 * time.Second) balanceResp, err := http.Get(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", httpAddr, testAddress)) assert.Equal(t, http.StatusOK, balanceResp.StatusCode) require.NoError(t, err) defer balanceResp.Body.Close() var balanceResponse map[string]any err = json.NewDecoder(balanceResp.Body).Decode(&balanceResponse) require.NoError(t, err) assert.Contains(t, balanceResponse, "balances") balances := balanceResponse["balances"].([]any) var uopenBalance string for _, balance := range balances { balanceMap := balance.(map[string]any) if balanceMap["denom"] == appparams.MicroOpenDenom { uopenBalance = balanceMap["amount"].(string) break } } assert.Equal(t, "1000000000", uopenBalance, "Account should have received exactly 1000000000uopen") }) t.Run("FaucetInfoAfterRequest", func(t *testing.T) { httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Get(fmt.Sprintf("%s/faucet/info", httpAddr)) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var info faucettypes.FaucetInfoResponse err = json.NewDecoder(resp.Body).Decode(&info) require.NoError(t, err) assert.NotEmpty(t, info.Address) assert.NotEmpty(t, info.Balance.Amount) assert.NotEmpty(t, info.Balance.Denom) assert.Equal(t, int32(1), info.RequestCount, "Request count should be 1") assert.Equal(t, int64(99999000000000), info.Balance.Amount.Int64(), "Faucet balance should be 99999000000000") }) } func TestFaucetInitAccount(t *testing.T) { net := network.NewWithOptions(t, network.NetworkOptions{EnableFaucet: true}) _, err := net.WaitForHeight(1) require.NoError(t, err) t.Run("FaucetInfoBeforeInitAccount", func(t *testing.T) { httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Get(fmt.Sprintf("%s/faucet/info", httpAddr)) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var info faucettypes.FaucetInfoResponse err = json.NewDecoder(resp.Body).Decode(&info) require.NoError(t, err) assert.NotEmpty(t, info.Address) assert.NotEmpty(t, info.Balance.Amount) assert.NotEmpty(t, info.Balance.Denom) assert.Equal(t, int32(0), info.RequestCount, "Initial request count should be 0") assert.Equal(t, int64(100000000000000), info.Balance.Amount.Int64(), "Faucet balance should be 100000000000000") }) t.Run("FaucetInitAccount", func(t *testing.T) { testAddress := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" request := &faucettypes.InitAccountRequest{ Address: testAddress, } body, _ := json.Marshal(request) httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Post( fmt.Sprintf("%s/faucet/init-account", httpAddr), "application/json", bytes.NewBuffer(body), ) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var response faucettypes.InitAccountResponse bodyBytes, _ := io.ReadAll(resp.Body) err = json.NewDecoder(bytes.NewReader(bodyBytes)).Decode(&response) require.NoError(t, err) assert.NotEmpty(t, response.Message) assert.NotEmpty(t, response.Txhash) assert.Equal(t, uint32(0), response.Code) assert.NotEmpty(t, response.Address) assert.NotEmpty(t, response.Amount.Amount) assert.False(t, response.Exists) _, err = net.WaitForHeight(3) require.NoError(t, err) time.Sleep(3 * time.Second) balanceResp, err := http.Get(fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", httpAddr, testAddress)) assert.Equal(t, http.StatusOK, balanceResp.StatusCode) require.NoError(t, err) defer balanceResp.Body.Close() var balanceResponse map[string]any err = json.NewDecoder(balanceResp.Body).Decode(&balanceResponse) require.NoError(t, err) assert.Contains(t, balanceResponse, "balances") balances := balanceResponse["balances"].([]any) var uopenBalance string for _, balance := range balances { balanceMap := balance.(map[string]any) if balanceMap["denom"] == appparams.MicroOpenDenom { uopenBalance = balanceMap["amount"].(string) break } } assert.Equal(t, "1", uopenBalance, "Account should have received exactly 1uopen") }) t.Run("FaucetInfoAfterInitAccount", func(t *testing.T) { httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Get(fmt.Sprintf("%s/faucet/info", httpAddr)) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var info faucettypes.FaucetInfoResponse err = json.NewDecoder(resp.Body).Decode(&info) require.NoError(t, err) assert.NotEmpty(t, info.Address) assert.NotEmpty(t, info.Balance.Amount) assert.NotEmpty(t, info.Balance.Denom) assert.Equal(t, int32(0), info.RequestCount, "Request count should be 0") assert.Equal(t, int64(99999999999999), info.Balance.Amount.Int64(), "Faucet balance should be 99999999999999") }) } func TestFaucetGrantAllowance(t *testing.T) { net := network.NewWithOptions(t, network.NetworkOptions{EnableFaucet: true}) _, err := net.WaitForHeight(1) require.NoError(t, err) t.Run("FaucetInfoBeforeGrantAllowance", func(t *testing.T) { httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Get(fmt.Sprintf("%s/faucet/info", httpAddr)) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var info faucettypes.FaucetInfoResponse err = json.NewDecoder(resp.Body).Decode(&info) require.NoError(t, err) assert.NotEmpty(t, info.Address) assert.NotEmpty(t, info.Balance.Amount) assert.NotEmpty(t, info.Balance.Denom) assert.Equal(t, int64(100000000000000), info.Balance.Amount.Int64(), "Faucet balance should be 100000000000000") }) t.Run("FaucetGrantAllowance", func(t *testing.T) { testAddress := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" request := &faucettypes.GrantAllowanceRequest{ Address: testAddress, } body, _ := json.Marshal(request) httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Post( fmt.Sprintf("%s/faucet/grant-allowance", httpAddr), "application/json", bytes.NewBuffer(body), ) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var response faucettypes.GrantAllowanceResponse bodyBytes, _ := io.ReadAll(resp.Body) err = json.NewDecoder(bytes.NewReader(bodyBytes)).Decode(&response) require.NoError(t, err) assert.NotEmpty(t, response.Message) assert.NotEmpty(t, response.Txhash) assert.Equal(t, uint32(0), response.Code) assert.NotEmpty(t, response.Granter) assert.NotEmpty(t, response.Grantee) assert.NotEmpty(t, response.AmountLimit.Amount) assert.NotNil(t, response.Expiration, "Expiration should be set") assert.Equal(t, "10000000000", response.AmountLimit.Amount.String(), "Default amount should be 10,000 $OPEN") expectedExpiration := time.Now().AddDate(0, 0, 30) assert.WithinDuration(t, expectedExpiration, *response.Expiration, time.Minute, "Expiration should be 30 days from now") _, err = net.WaitForHeight(3) require.NoError(t, err) // Check feegrant allowances instead of balance allowanceResp, err := http.Get(fmt.Sprintf("%s/sourcehub/feegrant/v1beta1/allowances/%s", httpAddr, testAddress)) assert.Equal(t, http.StatusOK, allowanceResp.StatusCode) require.NoError(t, err) defer allowanceResp.Body.Close() var allowanceResponse map[string]any err = json.NewDecoder(allowanceResp.Body).Decode(&allowanceResponse) require.NoError(t, err) assert.Contains(t, allowanceResponse, "allowances") allowances := allowanceResponse["allowances"].([]any) assert.NotEmpty(t, allowances, "Should have at least one allowance") allowance := allowances[0].(map[string]any) assert.Contains(t, allowance, "granter") assert.Contains(t, allowance, "grantee") assert.Contains(t, allowance, "allowance") allowanceData := allowance["allowance"].(map[string]any) assert.Contains(t, allowanceData, "@type") assert.Contains(t, allowanceData, "spend_limit") assert.Contains(t, allowanceData, "expiration", "Allowance should have expiration") spendLimit := allowanceData["spend_limit"].([]any) assert.NotEmpty(t, spendLimit, "Should have spend limit") spendLimitCoin := spendLimit[0].(map[string]any) assert.Equal(t, appparams.MicroOpenDenom, spendLimitCoin["denom"]) assert.Equal(t, "10000000000", spendLimitCoin["amount"], "Allowance should have 10,000 OPEN spend limit") }) t.Run("FaucetInfoAfterGrantAllowance", func(t *testing.T) { httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) resp, err := http.Get(fmt.Sprintf("%s/faucet/info", httpAddr)) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var info faucettypes.FaucetInfoResponse err = json.NewDecoder(resp.Body).Decode(&info) require.NoError(t, err) assert.NotEmpty(t, info.Address) assert.NotEmpty(t, info.Balance.Amount) assert.NotEmpty(t, info.Balance.Denom) assert.Equal(t, int64(100000000000000), info.Balance.Amount.Int64(), "Faucet balance should still be 100000000000000") }) } func TestFaucetGrantDIDAllowance(t *testing.T) { net := network.NewWithOptions(t, network.NetworkOptions{EnableFaucet: true}) _, err := net.WaitForHeight(1) require.NoError(t, err) httpAddr := network.TCPToHTTP(net.Validators[0].AppConfig.API.Address) // Get faucet info to know the granter address infoResp, err := http.Get(fmt.Sprintf("%s/faucet/info", httpAddr)) assert.Equal(t, http.StatusOK, infoResp.StatusCode) require.NoError(t, err) defer infoResp.Body.Close() var info faucettypes.FaucetInfoResponse err = json.NewDecoder(infoResp.Body).Decode(&info) require.NoError(t, err) testDID := "did:key:alice" request := &faucettypes.GrantDIDAllowanceRequest{ Did: testDID, AmountLimit: sdk.Coin{ Denom: appparams.MicroOpenDenom, Amount: math.NewInt(1000), }, } body, _ := json.Marshal(request) resp, err := http.Post( fmt.Sprintf("%s/faucet/grant-did-allowance", httpAddr), "application/json", bytes.NewBuffer(body), ) assert.Equal(t, http.StatusOK, resp.StatusCode) require.NoError(t, err) defer resp.Body.Close() var response faucettypes.GrantDIDAllowanceResponse bodyBytes, _ := io.ReadAll(resp.Body) err = json.NewDecoder(bytes.NewReader(bodyBytes)).Decode(&response) require.NoError(t, err) assert.NotEmpty(t, response.Message) assert.NotEmpty(t, response.Txhash) assert.Equal(t, uint32(0), response.Code) assert.Equal(t, info.Address, response.Granter) assert.Equal(t, testDID, response.GranteeDid) assert.NotEmpty(t, response.AmountLimit.Amount) assert.NotNil(t, response.Expiration, "Expiration should be set") assert.Equal(t, "1000", response.AmountLimit.Amount.String(), "Amount should be 1000 uopen") expectedExpiration := time.Now().AddDate(0, 0, 30) assert.WithinDuration(t, expectedExpiration, *response.Expiration, time.Minute, "Expiration should be 30 days from now") _, err = net.WaitForHeight(3) require.NoError(t, err) // Verify the grant was successful by querying it via gRPC grpcAddr := net.Validators[0].AppConfig.GRPC.Address conn, err := grpc.NewClient(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) defer conn.Close() feegrantClient := feegrant.NewQueryClient(conn) queryResp, err := feegrantClient.DIDAllowance(context.Background(), &feegrant.QueryDIDAllowanceRequest{ Granter: info.Address, GranteeDid: testDID, }) require.NoError(t, err) require.NotNil(t, queryResp.Allowance) // Verify the allowance details assert.Equal(t, info.Address, queryResp.Allowance.Granter) assert.Equal(t, testDID, queryResp.Allowance.Grantee) assert.NotNil(t, queryResp.Allowance.Allowance) // Unpack the FeeAllowanceI from the Any type var allowanceI feegrant.FeeAllowanceI err = net.Config.InterfaceRegistry.UnpackAny(queryResp.Allowance.Allowance, &allowanceI) require.NoError(t, err) // Cast to BasicAllowance basicAllowance, ok := allowanceI.(*feegrant.BasicAllowance) require.True(t, ok, "allowance should be BasicAllowance") // Verify the spend limit expectedCoin := sdk.NewCoin(appparams.MicroOpenDenom, math.NewInt(1000)) assert.Equal(t, sdk.NewCoins(expectedCoin), basicAllowance.SpendLimit) require.NotNil(t, basicAllowance.Expiration, "Stored allowance should have expiration") expectedStoredExpiration := time.Now().AddDate(0, 0, 30) assert.WithinDuration(t, expectedStoredExpiration, *basicAllowance.Expiration, time.Minute, "Stored expiration should be 30 days from now") } ================================================ FILE: tests/integration/tier/autolock_test.go ================================================ package tier import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/sourcenetwork/sourcehub/app" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) type AutoLockIntegrationTestSuite struct { suite.Suite ctx sdk.Context keeper tierkeeper.Keeper msgServer tiertypes.MsgServer addrFactory *TestAddressFactory } func (suite *AutoLockIntegrationTestSuite) SetupTest() { app.SetConfig(false) k, ctx := keepertest.TierKeeper(suite.T()) suite.ctx = ctx suite.keeper = k suite.msgServer = tierkeeper.NewMsgServerImpl(&k) suite.addrFactory = NewTestAddressFactory() } func (suite *AutoLockIntegrationTestSuite) createTestAddresses() (developer, user, validator sdk.AccAddress) { developer, user = suite.addrFactory.NextPair(suite.T(), &suite.keeper, suite.ctx) validator = sdk.AccAddress(TestValidatorAddr) keepertest.CreateAccount(suite.T(), &suite.keeper, suite.ctx, validator) return developer, user, validator } func TestAutoLockIntegrationTestSuite(t *testing.T) { suite.Run(t, new(AutoLockIntegrationTestSuite)) } func (s *AutoLockIntegrationTestSuite) TestAutoLockDisabledInsufficientCredits() { developer, _, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(500)) valAddr := sdk.ValAddress("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1000000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: 1000, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "insufficient credits and auto-lock disabled") } func (s *AutoLockIntegrationTestSuite) TestAutoLockEnabledWithLockup() { developer, _, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: true, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(10000000)) valAddr := sdk.ValAddress("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1000000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } resp, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), amount, sub.CreditAmount) } func (s *AutoLockIntegrationTestSuite) TestAutoLockEnabledWithSufficientCredits() { developer, _, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2000)) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: true, } _, err = s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } resp, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), amount, sub.CreditAmount) } func (s *AutoLockIntegrationTestSuite) TestAutoLockToggling() { developer, _, _ := s.createTestAddresses() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) dev := s.keeper.GetDeveloper(s.ctx, developer) require.NotNil(s.T(), dev) require.False(s.T(), dev.AutoLockEnabled) updateMsg := &tiertypes.MsgUpdateDeveloper{ Developer: developer.String(), AutoLockEnabled: true, } _, err = s.msgServer.UpdateDeveloper(s.ctx, updateMsg) require.NoError(s.T(), err) dev = s.keeper.GetDeveloper(s.ctx, developer) require.NotNil(s.T(), dev) require.True(s.T(), dev.AutoLockEnabled) updateMsg.AutoLockEnabled = false _, err = s.msgServer.UpdateDeveloper(s.ctx, updateMsg) require.NoError(s.T(), err) dev = s.keeper.GetDeveloper(s.ctx, developer) require.NotNil(s.T(), dev) require.False(s.T(), dev.AutoLockEnabled) } ================================================ FILE: tests/integration/tier/edge_cases_test.go ================================================ package tier import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/sourcenetwork/sourcehub/app" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) type EdgeCasesTestSuite struct { suite.Suite ctx sdk.Context keeper tierkeeper.Keeper msgServer tiertypes.MsgServer addrFactory *TestAddressFactory } func (suite *EdgeCasesTestSuite) SetupTest() { app.SetConfig(false) k, ctx := keepertest.TierKeeper(suite.T()) suite.ctx = ctx suite.keeper = k suite.msgServer = tierkeeper.NewMsgServerImpl(&k) suite.addrFactory = NewTestAddressFactory() } func (suite *EdgeCasesTestSuite) createTestAddresses() (developer, user sdk.AccAddress) { return suite.addrFactory.NextPair(suite.T(), &suite.keeper, suite.ctx) } func TestEdgeCasesTestSuite(t *testing.T) { suite.Run(t, new(EdgeCasesTestSuite)) } func (s *EdgeCasesTestSuite) TestInvalidDeveloperAddressInCreateDeveloper() { msg := &tiertypes.MsgCreateDeveloper{ Developer: "source1invalidaddress123456789012345678901234567890", AutoLockEnabled: true, } err := msg.ValidateBasic() require.Error(s.T(), err) } func (s *EdgeCasesTestSuite) TestEmptyDeveloperAddress() { msg := &tiertypes.MsgCreateDeveloper{ Developer: "", AutoLockEnabled: true, } err := msg.ValidateBasic() require.Error(s.T(), err) } func (s *EdgeCasesTestSuite) TestEmptyUserDid() { developer, _ := s.createTestAddresses() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: "", Amount: amount, Period: 3600, } err = addMsg.ValidateBasic() require.Error(s.T(), err) } func (s *EdgeCasesTestSuite) TestMaximumAmountSubscription() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) maxBalance := math.NewInt(1000000000000000000) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, maxBalance) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, maxBalance) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, maxBalance)) amount := uint64(1000000000000000000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } resp, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), amount, sub.CreditAmount) } func (s *EdgeCasesTestSuite) TestMaximumPeriodValue() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(10_000))) amount := uint64(1000) maxPeriod := uint64(365 * 24 * 3600) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: maxPeriod, } resp, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), maxPeriod, sub.Period) } func (s *EdgeCasesTestSuite) TestMultipleSubscriptionsForSameUser() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(1_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(10_000))) amount1 := uint64(1000) addMsg1 := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount1, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg1) require.NoError(s.T(), err) amount2 := uint64(2000) addMsg2 := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount2, Period: 7200, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg2) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "already subscribed") } func (s *EdgeCasesTestSuite) TestUpdateThenRemoveSubscription() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(1_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(10_000))) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) newAmount := uint64(2000) updateMsg := &tiertypes.MsgUpdateUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: newAmount, Period: 7200, } _, err = s.msgServer.UpdateUserSubscription(s.ctx, updateMsg) require.NoError(s.T(), err) removeMsg := &tiertypes.MsgRemoveUserSubscription{ Developer: developer.String(), UserDid: userDid, } _, err = s.msgServer.RemoveUserSubscription(s.ctx, removeMsg) require.NoError(s.T(), err) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.Nil(s.T(), sub) } func (s *EdgeCasesTestSuite) TestDeveloperRemovalCleansUpAllState() { developer := s.addrFactory.NextDeveloper(s.T(), &s.keeper, s.ctx) createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(20_000))) amount := uint64(1000) users := []sdk.AccAddress{ s.addrFactory.NextUser(s.T(), &s.keeper, s.ctx), s.addrFactory.NextUser(s.T(), &s.keeper, s.ctx), } userDids := []string{ s.addrFactory.NextUserDid(), s.addrFactory.NextUserDid(), } for i := range users { addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDids[i], Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) } for _, did := range userDids { sub := s.keeper.GetUserSubscription(s.ctx, developer, did) require.NotNil(s.T(), sub) } removeMsg := &tiertypes.MsgRemoveDeveloper{ Developer: developer.String(), } _, err = s.msgServer.RemoveDeveloper(s.ctx, removeMsg) require.NoError(s.T(), err) dev := s.keeper.GetDeveloper(s.ctx, developer) require.Nil(s.T(), dev) for _, did := range userDids { sub := s.keeper.GetUserSubscription(s.ctx, developer, did) require.Nil(s.T(), sub) } } func (s *EdgeCasesTestSuite) TestSubscriptionAmountsAndTotalsAreConsistent() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(10_000))) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), amount, sub.CreditAmount) newAmount := uint64(3000) updateMsg := &tiertypes.MsgUpdateUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: newAmount, Period: 3600, } _, err = s.msgServer.UpdateUserSubscription(s.ctx, updateMsg) require.NoError(s.T(), err) sub = s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), newAmount, sub.CreditAmount) smallerAmount := uint64(3000) updateMsg2 := &tiertypes.MsgUpdateUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: smallerAmount, Period: 3600, } _, err = s.msgServer.UpdateUserSubscription(s.ctx, updateMsg2) require.NoError(s.T(), err) sub = s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), smallerAmount, sub.CreditAmount) } func (s *EdgeCasesTestSuite) TestDeveloperWithManySubscriptions() { developer, _ := s.createTestAddresses() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(50_000))) numUsers := 2 users := make([]sdk.AccAddress, numUsers) userDids := make([]string, numUsers) for i := 0; i < numUsers; i++ { userAddr := s.addrFactory.NextUser(s.T(), &s.keeper, s.ctx) users[i] = userAddr userDids[i] = s.addrFactory.NextUserDid() amount := uint64(100) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDids[i], Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) } for _, did := range userDids { sub := s.keeper.GetUserSubscription(s.ctx, developer, did) require.NotNil(s.T(), sub) } removeMsg := &tiertypes.MsgRemoveDeveloper{ Developer: developer.String(), } _, err = s.msgServer.RemoveDeveloper(s.ctx, removeMsg) require.NoError(s.T(), err) for _, did := range userDids { sub := s.keeper.GetUserSubscription(s.ctx, developer, did) require.Nil(s.T(), sub) } } ================================================ FILE: tests/integration/tier/feegrant_test.go ================================================ package tier import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/sourcenetwork/sourcehub/app" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/feegrant" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) type FeegrantIntegrationTestSuite struct { suite.Suite ctx sdk.Context keeper tierkeeper.Keeper msgServer tiertypes.MsgServer addrFactory *TestAddressFactory } func (suite *FeegrantIntegrationTestSuite) SetupTest() { app.SetConfig(false) k, ctx := keepertest.TierKeeper(suite.T()) suite.ctx = ctx suite.keeper = k suite.msgServer = tierkeeper.NewMsgServerImpl(&k) suite.addrFactory = NewTestAddressFactory() } func (suite *FeegrantIntegrationTestSuite) createTestAddresses() (developer, user sdk.AccAddress) { return suite.addrFactory.NextPair(suite.T(), &suite.keeper, suite.ctx) } func TestFeegrantIntegrationTestSuite(t *testing.T) { suite.Run(t, new(FeegrantIntegrationTestSuite)) } func (s *FeegrantIntegrationTestSuite) TestPeriodicAllowanceCreation() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(10_000))) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } resp, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) allowance, err := s.keeper.GetFeegrantKeeper().GetDIDAllowance(s.ctx, developer, userDid) require.NoError(s.T(), err) require.NotNil(s.T(), allowance) _, ok := allowance.(*feegrant.PeriodicAllowance) require.True(s.T(), ok, "Expected PeriodicAllowance type") } func (s *FeegrantIntegrationTestSuite) TestPeriodicAllowanceWithZeroPeriod() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(10_000))) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 0, } resp, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), uint64(0), sub.Period) allowance, err := s.keeper.GetFeegrantKeeper().GetDIDAllowance(s.ctx, developer, userDid) require.NoError(s.T(), err) periodicAllowance, ok := allowance.(*feegrant.PeriodicAllowance) require.True(s.T(), ok, "Expected PeriodicAllowance type") params := s.keeper.GetParams(s.ctx) expectedPeriod := *params.EpochDuration require.Equal(s.T(), expectedPeriod, periodicAllowance.Period) } func (s *FeegrantIntegrationTestSuite) TestAllowanceUpdateOnSubscriptionUpdate() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(5_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(5_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(20_000))) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) newAmount := uint64(2000) updateMsg := &tiertypes.MsgUpdateUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: newAmount, Period: 7200, } resp, err := s.msgServer.UpdateUserSubscription(s.ctx, updateMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), newAmount, sub.CreditAmount) require.Equal(s.T(), uint64(7200), sub.Period) allowance, err := s.keeper.GetFeegrantKeeper().GetDIDAllowance(s.ctx, developer, userDid) require.NoError(s.T(), err) periodicAllowance, ok := allowance.(*feegrant.PeriodicAllowance) require.True(s.T(), ok, "Expected PeriodicAllowance type") expectedPeriod := time.Duration(7200) * time.Second require.Equal(s.T(), expectedPeriod, periodicAllowance.Period) require.Equal(s.T(), math.NewIntFromUint64(newAmount), periodicAllowance.Basic.SpendLimit.AmountOf(appparams.MicroCreditDenom)) } func (s *FeegrantIntegrationTestSuite) TestAllowanceRemovalOnSubscriptionRemoval() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(2_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(10_000))) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) allowance, err := s.keeper.GetFeegrantKeeper().GetDIDAllowance(s.ctx, developer, userDid) require.NoError(s.T(), err) require.NotNil(s.T(), allowance) removeMsg := &tiertypes.MsgRemoveUserSubscription{ Developer: developer.String(), UserDid: userDid, } _, err = s.msgServer.RemoveUserSubscription(s.ctx, removeMsg) require.NoError(s.T(), err) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.Nil(s.T(), sub) } func (s *FeegrantIntegrationTestSuite) TestZeroAmountValidation() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) amount := uint64(0) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } err = addMsg.ValidateBasic() require.Error(s.T(), err) require.ErrorContains(s.T(), err, "invalid amount") } func (s *FeegrantIntegrationTestSuite) TestAllowanceCleanupOnDeveloperRemoval() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() user2Did := "did:key:bob" createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, math.NewInt(5_000_000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(5_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, math.NewInt(20_000))) amount := uint64(1000) addMsg1 := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg1) require.NoError(s.T(), err) addMsg2 := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: user2Did, Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg2) require.NoError(s.T(), err) removeMsg := &tiertypes.MsgRemoveDeveloper{ Developer: developer.String(), } _, err = s.msgServer.RemoveDeveloper(s.ctx, removeMsg) require.NoError(s.T(), err) sub1 := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.Nil(s.T(), sub1) sub2 := s.keeper.GetUserSubscription(s.ctx, developer, user2Did) require.Nil(s.T(), sub2) } ================================================ FILE: tests/integration/tier/test_helpers.go ================================================ package tier import ( "fmt" "testing" sdk "github.com/cosmos/cosmos-sdk/types" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" ) var TestDeveloperAddrs = []string{ "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", "source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme", "source1wxyxr8h3vag0z825hexskdnc7xe72evulxlplv", "source1l7gwya9xrgtf5q58q9aqnahh63v99e54vrxwdg", "source1jx8s2hy8g74mvhy09whswxcczh22jus9y5t6vd", "source1s266eutknzy6vzt7pmxfukch2x93xevq0xqtce", "source1dte8lmpu236zmephrc35v95mhsz7ap9zzrld8a", "source1fxt3xht88zmtsdvj7u7y537relhehvn2n3hg6q", "source1fheg4eh4l9kkq8gczfx5erkrmunm2dj37yxzpx", "source19puvx5eypaft0y2hefj6f6s70thm8tadpzq3fe", "source1cjuyh88peyu2jztgw6j5523lq9ex06cgt45jmn", "source1rr9p6sck6ejdt07pnn0u5zeamfu3g7tz832czj", } var TestUserAddrs = []string{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", "source1fa3jnszqhulqwu5amsel280une8t8r5tn92k0y", "source1x404mhhw9rl2vqk54eh8v2lu86qlllg5cldq0y", "source1577qwqy8enqhh7lqx87rpk46mnhawlceg4xzl6", "source1nqxutf4jvfm54j8jrhmafc62lp2pyzj5djxz8z", "source1g65up5twggwcv77cjfem3z2ac602qev9hshcj5", "source1vvt30uh7kxcdwcevstvzqkmqmzhvt4js0qv33q", "source1tnhv4sm4r42hacn9xqm72w0tqy4jm7k22vkcka", "source1l6c49y4z4vg6msuqkr37cvty4xs3gr850ypxju", "source1wrf55454lqpctztnt7gkm3k7sa3c06r06natzf", "source1kmvg2d4fv56k4jg9s76l0nzpg5psnv4l3qp5kv", } const TestValidatorAddr = "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" type TestAddressFactory struct { devIdx int userIdx int } func NewTestAddressFactory() *TestAddressFactory { return &TestAddressFactory{ devIdx: 0, userIdx: 0, } } func (f *TestAddressFactory) NextUserDid() string { did := fmt.Sprintf("did:key:user%d", f.userIdx) f.userIdx++ return did } func (f *TestAddressFactory) NextDeveloper(t *testing.T, k *tierkeeper.Keeper, ctx sdk.Context) sdk.AccAddress { addr := mustAccFromBech32(TestDeveloperAddrs[f.devIdx%len(TestDeveloperAddrs)]) f.devIdx++ keepertest.CreateAccount(t, k, ctx, addr) return addr } func (f *TestAddressFactory) NextUser(t *testing.T, k *tierkeeper.Keeper, ctx sdk.Context) sdk.AccAddress { addr := mustAccFromBech32(TestUserAddrs[f.userIdx%len(TestUserAddrs)]) f.userIdx++ keepertest.CreateAccount(t, k, ctx, addr) return addr } func (f *TestAddressFactory) NextPair(t *testing.T, k *tierkeeper.Keeper, ctx sdk.Context) (sdk.AccAddress, sdk.AccAddress) { return f.NextDeveloper(t, k, ctx), f.NextUser(t, k, ctx) } func mustAccFromBech32(s string) sdk.AccAddress { addr, err := sdk.AccAddressFromBech32(s) if err != nil { panic(err) } return addr } ================================================ FILE: tests/integration/tier/tier_test.go ================================================ package tier import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/sourcenetwork/sourcehub/app" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" tierkeeper "github.com/sourcenetwork/sourcehub/x/tier/keeper" tiertypes "github.com/sourcenetwork/sourcehub/x/tier/types" ) type BaseTierTestSuite struct { suite.Suite ctx sdk.Context keeper tierkeeper.Keeper msgServer tiertypes.MsgServer addrFactory *TestAddressFactory } func (s *BaseTierTestSuite) SetupTest() { app.SetConfig(false) k, ctx := keepertest.TierKeeper(s.T()) s.ctx = ctx s.keeper = k s.msgServer = tierkeeper.NewMsgServerImpl(&k) s.addrFactory = NewTestAddressFactory() } func (s *BaseTierTestSuite) createTestAddresses() (developer, user sdk.AccAddress) { return s.addrFactory.NextPair(s.T(), &s.keeper, s.ctx) } func (s *BaseTierTestSuite) setupDeveloperWithLockup(developer sdk.AccAddress, lockAmount math.Int) sdk.ValAddress { createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(s.T(), err) keepertest.InitializeDelegator(s.T(), &s.keeper, s.ctx, developer, lockAmount.MulRaw(1000)) keepertest.InitializeValidator(s.T(), s.keeper.GetStakingKeeper().(*stakingkeeper.Keeper), s.ctx, valAddr, math.NewInt(1_000_000)) s.ctx = s.ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(s.T(), s.keeper.Lock(s.ctx, developer, valAddr, lockAmount)) return valAddr } type DeveloperTestSuite struct { BaseTierTestSuite } func TestDeveloperTestSuite(t *testing.T) { suite.Run(t, new(DeveloperTestSuite)) } func (s *DeveloperTestSuite) TestCreate() { developer, _ := s.createTestAddresses() msg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: true, } resp, err := s.msgServer.CreateDeveloper(s.ctx, msg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) dev := s.keeper.GetDeveloper(s.ctx, developer) require.NotNil(s.T(), dev) require.Equal(s.T(), developer.String(), dev.Address) require.True(s.T(), dev.AutoLockEnabled) } func (s *DeveloperTestSuite) TestCreateDuplicate() { developer, _ := s.createTestAddresses() msg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, msg) require.NoError(s.T(), err) _, err = s.msgServer.CreateDeveloper(s.ctx, msg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "already exists") } func (s *DeveloperTestSuite) TestCreateInvalidAddress() { msg := &tiertypes.MsgCreateDeveloper{ Developer: "cosmos1invalidaddress123456789012345678901234567890", AutoLockEnabled: true, } err := msg.ValidateBasic() require.Error(s.T(), err) } func (s *DeveloperTestSuite) TestUpdate() { developer, _ := s.createTestAddresses() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) updateMsg := &tiertypes.MsgUpdateDeveloper{ Developer: developer.String(), AutoLockEnabled: true, } resp, err := s.msgServer.UpdateDeveloper(s.ctx, updateMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) dev := s.keeper.GetDeveloper(s.ctx, developer) require.NotNil(s.T(), dev) require.True(s.T(), dev.AutoLockEnabled) } func (s *DeveloperTestSuite) TestUpdateNonExistent() { developer, _ := s.createTestAddresses() updateMsg := &tiertypes.MsgUpdateDeveloper{ Developer: developer.String(), AutoLockEnabled: true, } _, err := s.msgServer.UpdateDeveloper(s.ctx, updateMsg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "does not exist") } func (s *DeveloperTestSuite) TestRemove() { developer, _ := s.createTestAddresses() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: true, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) removeMsg := &tiertypes.MsgRemoveDeveloper{ Developer: developer.String(), } resp, err := s.msgServer.RemoveDeveloper(s.ctx, removeMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) dev := s.keeper.GetDeveloper(s.ctx, developer) require.Nil(s.T(), dev) } func (s *DeveloperTestSuite) TestRemoveNonExistent() { developer, _ := s.createTestAddresses() removeMsg := &tiertypes.MsgRemoveDeveloper{ Developer: developer.String(), } _, err := s.msgServer.RemoveDeveloper(s.ctx, removeMsg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "does not exist") } func (s *DeveloperTestSuite) TestRemoveWithSubscriptions() { developer, _ := s.createTestAddresses() user1Did := "did:key:alice" user2Did := "did:key:bob" s.setupDeveloperWithLockup(developer, math.NewInt(2000)) amount := uint64(1000) addMsg1 := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: user1Did, Amount: amount, Period: 3600, } _, err := s.msgServer.AddUserSubscription(s.ctx, addMsg1) require.NoError(s.T(), err) addMsg2 := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: user2Did, Amount: amount, Period: 3600, } _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg2) require.NoError(s.T(), err) sub1 := s.keeper.GetUserSubscription(s.ctx, developer, user1Did) require.NotNil(s.T(), sub1) sub2 := s.keeper.GetUserSubscription(s.ctx, developer, user2Did) require.NotNil(s.T(), sub2) removeMsg := &tiertypes.MsgRemoveDeveloper{ Developer: developer.String(), } _, err = s.msgServer.RemoveDeveloper(s.ctx, removeMsg) require.NoError(s.T(), err) dev := s.keeper.GetDeveloper(s.ctx, developer) require.Nil(s.T(), dev) sub1 = s.keeper.GetUserSubscription(s.ctx, developer, user1Did) require.Nil(s.T(), sub1) sub2 = s.keeper.GetUserSubscription(s.ctx, developer, user2Did) require.Nil(s.T(), sub2) } // UserSubscriptionTestSuite tests user subscription operations. type UserSubscriptionTestSuite struct { BaseTierTestSuite } func TestUserSubscriptionTestSuite(t *testing.T) { suite.Run(t, new(UserSubscriptionTestSuite)) } func (s *UserSubscriptionTestSuite) TestAdd() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() s.setupDeveloperWithLockup(developer, math.NewInt(1000)) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } resp, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), developer.String(), sub.Developer) require.Equal(s.T(), userDid, sub.UserDid) require.Equal(s.T(), amount, sub.CreditAmount) require.Equal(s.T(), uint64(3600), sub.Period) } func (s *UserSubscriptionTestSuite) TestAddZeroAmount() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() createMsg := &tiertypes.MsgCreateDeveloper{ Developer: developer.String(), AutoLockEnabled: false, } _, err := s.msgServer.CreateDeveloper(s.ctx, createMsg) require.NoError(s.T(), err) amount := uint64(0) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } err = addMsg.ValidateBasic() require.Error(s.T(), err) require.ErrorContains(s.T(), err, "invalid amount") } func (s *UserSubscriptionTestSuite) TestAddDuplicate() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() s.setupDeveloperWithLockup(developer, math.NewInt(1000)) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) _, err = s.msgServer.AddUserSubscription(s.ctx, addMsg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "already subscribed") } func (s *UserSubscriptionTestSuite) TestAddNonExistentDeveloper() { developer := s.addrFactory.NextDeveloper(s.T(), &s.keeper, s.ctx) userDid := s.addrFactory.NextUserDid() amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "not found") } func (s *UserSubscriptionTestSuite) TestUpdate() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() s.setupDeveloperWithLockup(developer, math.NewInt(2000)) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) newAmount := uint64(2000) updateMsg := &tiertypes.MsgUpdateUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: newAmount, Period: 7200, } resp, err := s.msgServer.UpdateUserSubscription(s.ctx, updateMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.NotNil(s.T(), sub) require.Equal(s.T(), newAmount, sub.CreditAmount) require.Equal(s.T(), uint64(7200), sub.Period) } func (s *UserSubscriptionTestSuite) TestUpdateNonExistent() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() amount := uint64(1000) updateMsg := &tiertypes.MsgUpdateUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err := s.msgServer.UpdateUserSubscription(s.ctx, updateMsg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "not subscribed") } func (s *UserSubscriptionTestSuite) TestRemove() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() s.setupDeveloperWithLockup(developer, math.NewInt(1000)) amount := uint64(1000) addMsg := &tiertypes.MsgAddUserSubscription{ Developer: developer.String(), UserDid: userDid, Amount: amount, Period: 3600, } _, err := s.msgServer.AddUserSubscription(s.ctx, addMsg) require.NoError(s.T(), err) removeMsg := &tiertypes.MsgRemoveUserSubscription{ Developer: developer.String(), UserDid: userDid, } resp, err := s.msgServer.RemoveUserSubscription(s.ctx, removeMsg) require.NoError(s.T(), err) require.NotNil(s.T(), resp) sub := s.keeper.GetUserSubscription(s.ctx, developer, userDid) require.Nil(s.T(), sub) } func (s *UserSubscriptionTestSuite) TestRemoveNonExistent() { developer, _ := s.createTestAddresses() userDid := s.addrFactory.NextUserDid() removeMsg := &tiertypes.MsgRemoveUserSubscription{ Developer: developer.String(), UserDid: userDid, } _, err := s.msgServer.RemoveUserSubscription(s.ctx, removeMsg) require.Error(s.T(), err) require.ErrorContains(s.T(), err, "not subscribed") } ================================================ FILE: tests/property/acp/object_registration/constants.go ================================================ package object_registration const ResourceName = "file" const ObjectId = "readme.txt" const Policy string = ` name: test resources: - name: file ` ================================================ FILE: tests/property/acp/object_registration/model.go ================================================ package object_registration import ( "fmt" "reflect" "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/tests/property" "github.com/sourcenetwork/sourcehub/utils" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) // preconditions validate whether op should be run given the current state func Precoditions(state State, kind OperationKind) bool { switch kind { case Reveal: // don't reveal unless there's at least one commitment registered return len(state.Commitments) > 0 case Unarchive, Archive: return state.Registered default: // remaining ops can happen, doesn't matter if they error return true } } // GenerateOperation generates the request payload for some operation and state func GenerateOperation(t *testing.T, state State, kind OperationKind) Operation { actor := property.PickAny(state.Actors) op := Operation{ Kind: kind, Actor: actor, } switch kind { case Reveal: id := property.PickAny(utils.MapSlice(state.Commitments, func(commitment *types.RegistrationsCommitment) uint64 { return commitment.Id })) proof, err := commitment.ProofForObject(state.PolicyId, coretypes.NewActor(actor.DID), 0, []*coretypes.Object{&state.Object}) require.NoError(t, err) op.Request = types.PolicyCmd{ Cmd: &types.PolicyCmd_RevealRegistrationCmd{ RevealRegistrationCmd: &types.RevealRegistrationCmd{ RegistrationsCommitmentId: id, Proof: proof, }, }, } case Register: op.Request = types.PolicyCmd{ Cmd: &types.PolicyCmd_RegisterObjectCmd{ RegisterObjectCmd: &types.RegisterObjectCmd{ Object: &state.Object, }, }, } case Archive: op.Request = types.PolicyCmd{ Cmd: &types.PolicyCmd_ArchiveObjectCmd{ ArchiveObjectCmd: &types.ArchiveObjectCmd{ Object: &state.Object, }, }, } case Commit: c, err := commitment.GenerateCommitmentWithoutValidation(state.PolicyId, coretypes.NewActor(actor.DID), []*coretypes.Object{&state.Object}) require.NoError(t, err) op.Request = types.PolicyCmd{ Cmd: &types.PolicyCmd_CommitRegistrationsCmd{ CommitRegistrationsCmd: &types.CommitRegistrationsCmd{ Commitment: c, }, }, } case Unarchive: op.Request = types.PolicyCmd{ Cmd: &types.PolicyCmd_UnarchiveObjectCmd{ UnarchiveObjectCmd: &types.UnarchiveObjectCmd{ Object: &state.Object, }, }, } } return op } // NextState updates the state object based on the operation result func NextState(t *testing.T, state State, op Operation) State { t.Logf("Operation: kind=%v; actor=%v...; payload=%v", op.Kind, op.Actor.DID[0:20], op.Request.Cmd) if op.ResultErr != nil { t.Logf("\tfailed: err=%v", op.ResultErr) return state } switch op.Kind { case Register: if !state.Registered { state.Model.RegistrationTs = *op.Result.GetRegisterObjectResult().Record.Metadata.CreationTs state.Model.Owner = op.Actor.DID state.Registered = true } case Archive: if op.Actor.DID == state.Model.Owner { state.Model.Archived = true } case Commit: result := op.Result.Result.(*types.PolicyCmdResult_CommitRegistrationsResult).CommitRegistrationsResult state.Commitments = append(state.Commitments, result.RegistrationsCommitment) case Unarchive: if op.Actor.DID == state.Model.Owner { state.Model.Archived = false } case Reveal: commitId := op.Request.GetRevealRegistrationCmd().RegistrationsCommitmentId c := state.MustCommitmentById(commitId) expirationHeight := c.Metadata.CreationTs.BlockHeight + c.Validity.GetBlockCount() blockHeight := state.LastTs.BlockHeight isValid := blockHeight < expirationHeight isCommitmentOwner := c.Metadata.OwnerDid == op.Actor.DID isCommitmentOlder := c.Metadata.CreationTs.BlockHeight < state.Model.RegistrationTs.BlockHeight if isCommitmentOwner && isCommitmentOlder && isValid { state.Model.Owner = op.Actor.DID state.Model.RegistrationTs = *c.Metadata.CreationTs } } return state } // Post validate whether the system invariants held after the execution of op func Post(state State, op Operation) error { if !state.Registered { return nil } // compare model data with result record if state.Model.Owner != op.ResultRecord.Metadata.OwnerDid { return fmt.Errorf("model missmatch: owner: expected %v, got %v", state.Model.Owner, op.ResultRecord.Metadata.OwnerDid, ) } if state.Model.Archived != op.ResultRecord.Archived { return fmt.Errorf("model missmatch: archived: expected %v, got %v", state.Model.Archived, op.ResultRecord.Archived, ) } if reflect.DeepEqual(state.Model.RegistrationTs, op.ResultRecord.Metadata.CreationTs) { return fmt.Errorf("model missmatch: ts: expected %v, got %v", state.Model.RegistrationTs, op.ResultRecord.Metadata.CreationTs, ) } return nil } ================================================ FILE: tests/property/acp/object_registration/params.go ================================================ package object_registration import "github.com/sourcenetwork/sourcehub/x/acp/types" // CommitmentExpirationDuration sets the default expiration time for commitments in the test setup var CommitmentExpirationDuration = types.Duration{ Duration: &types.Duration_BlockCount{ BlockCount: 5, }, } // OperationsPerTest models the amount of operations which should be executed every test var OperationsPerTest = 20 var TestCount = 10 var ActorCount = 3 var MaxTriesPerTest = 40 ================================================ FILE: tests/property/acp/object_registration/property_test.go ================================================ package object_registration import ( "fmt" "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/tests/property" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) func TestObjectRegistrationProperties(t *testing.T) { for i := 0; i < TestCount; i++ { t.Run(fmt.Sprintf("%v", i), func(t *testing.T) { runPropTest(t) }) } } func runPropTest(t *testing.T) { ctx := test.NewTestCtx(t) ctx.Strategy = test.Direct ctx.ActorType = test.Actor_SECP256K1 resp, err := ctx.Executor.CreatePolicy(ctx, &types.MsgCreatePolicy{ Policy: Policy, MarshalType: coretypes.PolicyMarshalingType_YAML, Creator: ctx.TxSigner.SourceHubAddr, }) require.NoError(t, err) state := InitialState(ctx, resp.Record.Policy.Id) ops := make([]Operation, 0, OperationsPerTest) for count, max := 0, 0; count < OperationsPerTest || max < MaxTriesPerTest; max++ { kind := property.PickAny(ListOperationKinds()) ok := Precoditions(state, kind) if !ok { continue } op := GenerateOperation(t, state, kind) ops = append(ops, op) count++ result, err := ctx.Executor.DirectPolicyCmd(ctx, &types.MsgDirectPolicyCmd{ Creator: op.Actor.SourceHubAddr, PolicyId: state.PolicyId, Cmd: &op.Request, }) op.ResultErr = err if result != nil { op.Result = *result.Result } state = NextState(t, state, op) if state.Registered { ownerRecord, err := ctx.Executor.ObjectOwner(ctx, &types.QueryObjectOwnerRequest{ PolicyId: state.PolicyId, Object: &state.Object, }) require.NoError(t, err, "ObjectOwner call failed") op.ResultRecord = *ownerRecord.Record } err = Post(state, op) if err != nil { t.Logf("Post condition failed: %v", err) t.Logf("State: %v", state) t.FailNow() } ts, err := ctx.Executor.GetLastBlockTs(ctx) require.NoError(t, err) state.LastTs = *ts } t.Logf("test concluded") t.Logf("model: %v", state.Model) } ================================================ FILE: tests/property/acp/object_registration/types.go ================================================ package object_registration import ( "github.com/google/uuid" coretypes "github.com/sourcenetwork/acp_core/pkg/types" test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) // ObjectModel models the status of the object under test type ObjectModel struct { RegistrationTs types.Timestamp Owner string Archived bool } // State models the test state which mutates between operations type State struct { Model ObjectModel Registered bool PolicyId string Object coretypes.Object Commitments []*types.RegistrationsCommitment Actors []*test.TestActor LastTs types.Timestamp } // MustCommitmentById returns one of the commitments created during the test // with the given id func (s *State) MustCommitmentById(id uint64) *types.RegistrationsCommitment { for _, commitment := range s.Commitments { if commitment.Id == id { return commitment } } panic("commitment not found") } // InitialState returns the initial state for the model state machine func InitialState(ctx *test.TestCtx, policyId string) State { actors := make([]*test.TestActor, 0, ActorCount) for i := 0; i < ActorCount; i++ { id, err := uuid.NewUUID() require.NoError(ctx.T, err) actor := ctx.GetActor(id.String()) actors = append(actors, actor) } return State{ Model: ObjectModel{}, Registered: false, PolicyId: policyId, Object: *coretypes.NewObject(ResourceName, ObjectId), Commitments: nil, Actors: actors, } } // OperationKind models the set of supported operations which transition the model // to a new state type OperationKind int const ( Register OperationKind = iota Archive Commit Reveal Unarchive ) func (k OperationKind) String() string { switch k { case Register: return "Register" case Archive: return "Archive" case Commit: return "Commit" case Reveal: return "Reveal" case Unarchive: return "Unarchive" default: return "UNKNOWN" } } // GetOperations returns all available OperationKinds func ListOperationKinds() []OperationKind { return []OperationKind{ Register, Archive, Commit, Reveal, Unarchive, } } // Operation models an operation that has been or will be executed against the // reference implementation type Operation struct { Kind OperationKind Actor *test.TestActor Request types.PolicyCmd Result types.PolicyCmdResult ResultErr error ResultRecord types.RelationshipRecord } ================================================ FILE: tests/property/gen.go ================================================ package property import "math/rand" // PickAny returns a random element from ts // ts must be non empty func PickAny[T any](ts []T) T { i := rand.Int() % len(ts) return ts[i] } ================================================ FILE: testutil/e2e/e2e.go ================================================ package e2e import ( "fmt" "testing" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/app" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/sdk" ) type TestNetwork struct { Network *network.Network Config network.Config Client *sdk.Client ValidatorKey cryptotypes.PrivKey } func (n *TestNetwork) Setup(t *testing.T) { injectConfig := app.AppConfig() cfg, err := network.DefaultConfigWithAppConfig(injectConfig) require.NoError(t, err) cfg.NumValidators = 1 cfg.BondDenom = appparams.DefaultBondDenom cfg.MinGasPrices = fmt.Sprintf( "%s%s,%s%s", appparams.DefaultMinGasPrice, appparams.MicroOpenDenom, appparams.DefaultMinGasPrice, appparams.MicroCreditDenom, ) cfg.AppConstructor = func(val network.ValidatorI) servertypes.Application { appInstance, err := app.New( val.GetCtx().Logger, dbm.NewMemDB(), nil, true, sims.EmptyAppOptions{}, baseapp.SetChainID(cfg.ChainID), ) require.NoError(t, err) return appInstance } network, err := network.New(t, t.TempDir(), cfg) require.NoError(t, err) n.Config = cfg n.Network = network client, err := sdk.NewClient( sdk.WithCometRPCAddr(n.GetCometRPCAddr()), sdk.WithGRPCAddr(n.GetGRPCAddr()), ) require.NoError(t, err) n.Client = client keyring := n.Network.Validators[0].ClientCtx.Keyring record, err := keyring.Key("node0") require.NoError(t, err) any := record.GetLocal().PrivKey pkey := &secp256k1.PrivKey{} err = pkey.Unmarshal(any.Value) require.NoError(t, err) n.ValidatorKey = pkey } func (n *TestNetwork) TearDown() { n.Network.Cleanup() } func (n *TestNetwork) GetValidatorAddr() string { return n.Network.Validators[0].Address.String() } func (n *TestNetwork) GetGRPCAddr() string { return n.Network.Validators[0].AppConfig.GRPC.Address } func (n *TestNetwork) GetCometRPCAddr() string { return n.Network.Validators[0].RPCAddress } func (n *TestNetwork) GetSDKClient() *sdk.Client { return n.Client } func (n *TestNetwork) GetValidatorKey() cryptotypes.PrivKey { return n.ValidatorKey } func (n *TestNetwork) GetChainID() string { return n.Network.Config.ChainID } ================================================ FILE: testutil/jws.go ================================================ package test import ( "crypto/ed25519" "encoding/base64" "encoding/json" "testing" "time" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/stretchr/testify/require" antetypes "github.com/sourcenetwork/sourcehub/app/ante/types" ) // NewBearerTokenNow creates a new BearerToken with current time and default expiration func NewBearerTokenNow(actorID string, authorizedAccount string) antetypes.BearerToken { now := time.Now() expires := now.Add(antetypes.DefaultExpirationTime) return antetypes.BearerToken{ IssuerID: actorID, AuthorizedAccount: authorizedAccount, IssuedTime: now.Unix(), ExpirationTime: expires.Unix(), } } // CreateJWSHeader creates the standard JWS header for EdDSA JWT tokens func CreateJWSHeader() map[string]any { return map[string]any{ "alg": "EdDSA", "typ": "JWT", } } // GenerateSignedJWSWithMatchingDID creates a JWS bearer token with specified authorized account. // Returns the JWS string and the DID. func GenerateSignedJWSWithMatchingDID(t *testing.T, authorizedAccount string) (string, string) { // Derive seed from mnemonic mnemonic := "near smoke great nasty alley food crush nurse rubber say danger search employ under gaze today alien eager risk letter drum relief sponsor current" seed, err := hd.Secp256k1.Derive()(mnemonic, "", "m/44'/118'/0'/0/0") require.NoError(t, err) // Generate Ed25519 key pair from the derived seed if len(seed) > 32 { seed = seed[:32] } privKey := ed25519.NewKeyFromSeed(seed) pubKey := privKey.Public().(ed25519.PublicKey) // Create DID from public key didKey, err := key.CreateDIDKey(crypto.Ed25519, pubKey) require.NoError(t, err) userDID := didKey.String() // Create bearer token with the matching DID bearerToken := NewBearerTokenNow(userDID, authorizedAccount) payloadBytes, err := json.Marshal(bearerToken) require.NoError(t, err) // Create and sign the JWS header := CreateJWSHeader() headerBytes, err := json.Marshal(header) require.NoError(t, err) headerEncoded := base64.RawURLEncoding.EncodeToString(headerBytes) payloadEncoded := base64.RawURLEncoding.EncodeToString(payloadBytes) signingInput := headerEncoded + "." + payloadEncoded signature := ed25519.Sign(privKey, []byte(signingInput)) signatureEncoded := base64.RawURLEncoding.EncodeToString(signature) jws := signingInput + "." + signatureEncoded return jws, userDID } ================================================ FILE: testutil/keeper/account_keeper.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ types.AccountKeeper = (*AccountKeeperStub)(nil) type AccountKeeperStub struct{} func (s *AccountKeeperStub) GetAccount(ctx context.Context, address sdk.AccAddress) sdk.AccountI { return &authtypes.BaseAccount{ Address: string(address), Sequence: 1, } } ================================================ FILE: testutil/keeper/acp.go ================================================ package keeper import ( "testing" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" hubtestutil "github.com/sourcenetwork/sourcehub/x/hub/testutil" ) func AcpKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { acpStoreKey := storetypes.NewKVStoreKey(types.StoreKey) capabilityStoreKey := storetypes.NewKVStoreKey("capkeeper") capabilityMemStoreKey := storetypes.NewKVStoreKey("capkeepermem") db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) // mount stores stateStore.MountStoreWithDB(acpStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityMemStoreKey, storetypes.StoreTypeDB, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) capKeeper := capabilitykeeper.NewKeeper(cdc, capabilityStoreKey, capabilityMemStoreKey) acpCapKeeper := capKeeper.ScopeToModule(types.ModuleName) k := keeper.NewKeeper( cdc, runtime.NewKVStoreService(acpStoreKey), log.NewNopLogger(), authority.String(), &AccountKeeperStub{}, &acpCapKeeper, hubtestutil.NewHubKeeperStub(), ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) // Initialize params k.SetParams(ctx, types.DefaultParams()) return k, ctx } ================================================ FILE: testutil/keeper/bulletin.go ================================================ package keeper import ( "testing" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" "github.com/stretchr/testify/require" acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/bulletin/keeper" "github.com/sourcenetwork/sourcehub/x/bulletin/types" hubtestutil "github.com/sourcenetwork/sourcehub/x/hub/testutil" ) func BulletinKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { storeKey := storetypes.NewKVStoreKey(types.StoreKey) authStoreKey := storetypes.NewKVStoreKey(authtypes.StoreKey) capabilityStoreKey := storetypes.NewKVStoreKey("capkeeper") capabilityMemStoreKey := storetypes.NewKVStoreKey("capkeepermem") db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(authStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityMemStoreKey, storetypes.StoreTypeDB, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() authtypes.RegisterInterfaces(registry) cryptocodec.RegisterInterfaces(registry) cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) bech32Prefix := "source" addressCodec := authcodec.NewBech32Codec(bech32Prefix) maccPerms := map[string][]string{ authtypes.FeeCollectorName: nil, types.ModuleName: nil, } accountKeeper := authkeeper.NewAccountKeeper( cdc, runtime.NewKVStoreService(authStoreKey), authtypes.ProtoBaseAccount, maccPerms, addressCodec, bech32Prefix, authority.String(), ) capKeeper := capabilitykeeper.NewKeeper(cdc, capabilityStoreKey, capabilityMemStoreKey) acpCapKeeper := capKeeper.ScopeToModule(acptypes.ModuleName) bulletinCapKeeper := capKeeper.ScopeToModule(types.ModuleName) acpKeeper := acpkeeper.NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), accountKeeper, &acpCapKeeper, hubtestutil.NewHubKeeperStub(), ) k := keeper.NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), accountKeeper, &acpKeeper, &bulletinCapKeeper, ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) // Initialize params k.SetParams(ctx, types.DefaultParams()) return k, ctx } ================================================ FILE: testutil/keeper/hub.go ================================================ package keeper import ( "testing" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/hub/keeper" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func HubKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { storeKey := storetypes.NewKVStoreKey(types.StoreKey) db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForAccount("source", "sourcepub") k := keeper.NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) // Initialize params if err := k.SetParams(ctx, types.DefaultParams()); err != nil { panic(err) } return k, ctx } ================================================ FILE: testutil/keeper/tier.go ================================================ package keeper import ( "testing" "time" cryptocdc "github.com/cosmos/cosmos-sdk/crypto/codec" cosmosed25519 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "cosmossdk.io/log" "cosmossdk.io/math" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" appparams "github.com/sourcenetwork/sourcehub/app/params" testutil "github.com/sourcenetwork/sourcehub/testutil" epochskeeper "github.com/sourcenetwork/sourcehub/x/epochs/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/feegrant" feegrantkeeper "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) // initializeValidator creates a validator and verifies that it was set correctly. func InitializeValidator(t *testing.T, k *stakingkeeper.Keeper, ctx sdk.Context, valAddr sdk.ValAddress, initialTokens math.Int) { validator := testutil.CreateTestValidator(t, ctx, k, valAddr, cosmosed25519.GenPrivKey().PubKey(), initialTokens) gotValidator, err := k.GetValidator(ctx, valAddr) require.NoError(t, err) require.Equal(t, validator.OperatorAddress, gotValidator.OperatorAddress) } // initializeDelegator initializes a delegator with balance. func InitializeDelegator(t *testing.T, k *keeper.Keeper, ctx sdk.Context, delAddr sdk.AccAddress, initialBalance math.Int) { initialDelegatorBalance := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, initialBalance)) err := k.GetBankKeeper().MintCoins(ctx, types.ModuleName, initialDelegatorBalance) require.NoError(t, err) err = k.GetBankKeeper().SendCoinsFromModuleToAccount(ctx, types.ModuleName, delAddr, initialDelegatorBalance) require.NoError(t, err) } // CreateAccount creates an account with no balance. func CreateAccount(t *testing.T, k *keeper.Keeper, ctx sdk.Context, addr sdk.AccAddress) { tempCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(1)) tempCoins := sdk.NewCoins(tempCoin) err := k.GetBankKeeper().MintCoins(ctx, types.ModuleName, tempCoins) require.NoError(t, err) err = k.GetBankKeeper().SendCoinsFromModuleToAccount(ctx, types.ModuleName, addr, tempCoins) require.NoError(t, err) err = k.GetBankKeeper().SendCoinsFromAccountToModule(ctx, addr, types.ModuleName, tempCoins) require.NoError(t, err) err = k.GetBankKeeper().BurnCoins(ctx, types.ModuleName, tempCoins) require.NoError(t, err) } func TierKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { storeKey := storetypes.NewKVStoreKey(types.StoreKey) authStoreKey := storetypes.NewKVStoreKey(authtypes.StoreKey) bankStoreKey := storetypes.NewKVStoreKey(banktypes.StoreKey) stakingStoreKey := storetypes.NewKVStoreKey(stakingtypes.StoreKey) distrStoreKey := storetypes.NewKVStoreKey(distrtypes.StoreKey) epochsStoreKey := storetypes.NewKVStoreKey(epochstypes.StoreKey) mintStoreKey := storetypes.NewKVStoreKey(minttypes.StoreKey) feegrantStoreKey := storetypes.NewKVStoreKey(feegrant.StoreKey) db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(authStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(bankStoreKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(stakingStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(distrStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(epochsStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(mintStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(feegrantStoreKey, storetypes.StoreTypeDB, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() cryptocdc.RegisterInterfaces(registry) authtypes.RegisterInterfaces(registry) banktypes.RegisterInterfaces(registry) stakingtypes.RegisterInterfaces(registry) distrtypes.RegisterInterfaces(registry) minttypes.RegisterInterfaces(registry) feegrant.RegisterInterfaces(registry) cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) bech32Prefix := "source" addressCodec := authcodec.NewBech32Codec(bech32Prefix) valOperCodec := authcodec.NewBech32Codec(bech32Prefix + "valoper") valConsCodec := authcodec.NewBech32Codec(bech32Prefix + "valcons") maccPerms := map[string][]string{ authtypes.FeeCollectorName: nil, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, distrtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, minttypes.ModuleName: {authtypes.Minter, authtypes.Burner}, types.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking}, types.InsurancePoolName: nil, types.DeveloperPoolName: nil, } authKeeper := authkeeper.NewAccountKeeper( cdc, runtime.NewKVStoreService(authStoreKey), authtypes.ProtoBaseAccount, maccPerms, addressCodec, bech32Prefix, authority.String(), ) blockedAddrs := make(map[string]bool) for acc := range maccPerms { blockedAddrs[authtypes.NewModuleAddress(acc).String()] = true } bankKeeper := bankkeeper.NewBaseKeeper( cdc, runtime.NewKVStoreService(bankStoreKey), authKeeper, blockedAddrs, authority.String(), log.NewNopLogger(), ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) ctx = ctx.WithBlockHeight(1).WithChainID("sourcehub").WithBlockTime(time.Unix(1000000000, 0)) bondedPool := authtypes.NewEmptyModuleAccount(stakingtypes.BondedPoolName, authtypes.Burner, authtypes.Staking) notBondedPool := authtypes.NewEmptyModuleAccount(stakingtypes.NotBondedPoolName, authtypes.Burner, authtypes.Staking) distrPool := authtypes.NewEmptyModuleAccount(distrtypes.ModuleName) mintAcc := authtypes.NewEmptyModuleAccount(minttypes.ModuleName) tierPool := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter, authtypes.Burner, authtypes.Staking) insurancePool := authtypes.NewEmptyModuleAccount(types.InsurancePoolName) developerPool := authtypes.NewEmptyModuleAccount(types.DeveloperPoolName) if authKeeper.GetModuleAccount(ctx, stakingtypes.BondedPoolName) == nil { authKeeper.SetModuleAccount(ctx, bondedPool) } if authKeeper.GetModuleAccount(ctx, stakingtypes.NotBondedPoolName) == nil { authKeeper.SetModuleAccount(ctx, notBondedPool) } if authKeeper.GetModuleAccount(ctx, types.ModuleName) == nil { authKeeper.SetModuleAccount(ctx, tierPool) } if authKeeper.GetModuleAccount(ctx, distrtypes.ModuleName) == nil { authKeeper.SetModuleAccount(ctx, distrPool) } if authKeeper.GetModuleAccount(ctx, minttypes.ModuleName) == nil { authKeeper.SetModuleAccount(ctx, mintAcc) } if authKeeper.GetModuleAccount(ctx, types.InsurancePoolName) == nil { authKeeper.SetModuleAccount(ctx, insurancePool) } if authKeeper.GetModuleAccount(ctx, types.DeveloperPoolName) == nil { authKeeper.SetModuleAccount(ctx, developerPool) } stakingKeeper := stakingkeeper.NewKeeper( cdc, runtime.NewKVStoreService(stakingStoreKey), authKeeper, bankKeeper, authority.String(), valOperCodec, valConsCodec, ) stakingParams := stakingtypes.DefaultParams() stakingParams.BondDenom = appparams.DefaultBondDenom require.NoError(t, stakingKeeper.SetParams(ctx, stakingParams)) distributionKeeper := distrkeeper.NewKeeper( cdc, runtime.NewKVStoreService(distrStoreKey), authKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName, authority.String(), ) epochsKeeper := epochskeeper.NewKeeper( runtime.NewKVStoreService(epochsStoreKey), log.NewNopLogger(), ) epochInfo := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: ctx.BlockTime(), Duration: time.Hour * 24 * 30, } epochsKeeper.SetEpochInfo(ctx, epochInfo) feegrantKeeper := feegrantkeeper.NewKeeper( cdc, runtime.NewKVStoreService(feegrantStoreKey), authKeeper, ) k := keeper.NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), bankKeeper, stakingKeeper, epochsKeeper, distributionKeeper, feegrantKeeper, nil, ) // Initialize params if err := k.SetParams(ctx, types.DefaultParams()); err != nil { panic(err) } return k, ctx } ================================================ FILE: testutil/mocks.go ================================================ package test import ( "context" "reflect" "time" "cosmossdk.io/math" abcitypes "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/golang/mock/gomock" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/feegrant" ) // Mock bank keeper type MockBankKeeper struct { ctrl *gomock.Controller recorder *MockBankKeeperMockRecorder } type MockBankKeeperMockRecorder struct { mock *MockBankKeeper } func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { mock := &MockBankKeeper{ctrl: ctrl} mock.recorder = &MockBankKeeperMockRecorder{mock} return mock } func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { return m.recorder } func (m *MockBankKeeper) GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) ret0 := ret[0].(sdk.Coin) return ret0 } func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) } func (m *MockBankKeeper) SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error { m.ctrl.T.Helper() m.ctrl.Call(m, "SendCoins", ctx, fromAddr, toAddr, amt) return nil } func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, fromAddr, toAddr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoins", reflect.TypeOf((*MockBankKeeper)(nil).SendCoins), ctx, fromAddr, toAddr, amt) } func (m *MockBankKeeper) BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error { m.ctrl.T.Helper() m.ctrl.Call(m, "BurnCoins", ctx, moduleName, amt) return nil } func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, moduleName, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, moduleName, amt) } func (m *MockBankKeeper) MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "MintCoins", ctx, moduleName, amt) ret0, _ := ret[0].(error) return ret0 } func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt) } func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) ret0, _ := ret[0].(error) return ret0 } func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) ret0, _ := ret[0].(error) return ret0 } func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) } func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) var err error if len(ret) > 0 && ret[0] != nil { err = ret[0].(error) } return err } func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) } func (m *MockBankKeeper) DelegateCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DelegateCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) ret0, _ := ret[0].(error) return ret0 } func (mr *MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelegateCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).DelegateCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) } func (m *MockBankKeeper) UndelegateCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UndelegateCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) ret0, _ := ret[0].(error) return ret0 } func (mr *MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UndelegateCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).UndelegateCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } func (m *MockBankKeeper) IterateAllBalances(ctx context.Context, cb func(addr sdk.AccAddress, coin sdk.Coin) bool) { m.ctrl.T.Helper() m.ctrl.Call(m, "IterateAllBalances", ctx, cb) } func (mr *MockBankKeeperMockRecorder) IterateAllBalances(ctx, cb interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).IterateAllBalances), ctx, cb) } // Mock distribution keeper type MockDistributionKeeper struct { ctrl *gomock.Controller recorder *MockDistributionKeeperRecorder } type MockDistributionKeeperRecorder struct { mock *MockDistributionKeeper } func NewMockDistributionKeeper(ctrl *gomock.Controller) *MockDistributionKeeper { mock := &MockDistributionKeeper{ctrl: ctrl} mock.recorder = &MockDistributionKeeperRecorder{mock} return mock } func (m *MockDistributionKeeper) EXPECT() *MockDistributionKeeperRecorder { return m.recorder } func (m *MockDistributionKeeper) GetPreviousProposerConsAddr(ctx context.Context) (sdk.ConsAddress, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPreviousProposerConsAddr", ctx) ret0 := ret[0].(sdk.ConsAddress) return ret0, nil } func (mr *MockDistributionKeeperRecorder) GetPreviousProposerConsAddr(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPreviousProposerConsAddr", reflect.TypeOf((*MockDistributionKeeper)(nil).GetPreviousProposerConsAddr), ctx) } func (m *MockDistributionKeeper) AllocateTokensToValidator(ctx context.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) error { m.ctrl.T.Helper() m.ctrl.Call(m, "AllocateTokensToValidator", ctx, val, tokens) return nil } func (mr *MockDistributionKeeperRecorder) AllocateTokensToValidator(ctx, val, tokens any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateTokensToValidator", reflect.TypeOf((*MockDistributionKeeper)(nil).AllocateTokensToValidator), ctx, val, tokens) } func (m *MockDistributionKeeper) AllocateTokens(ctx context.Context, totalReward int64, bondedValidators []abcitypes.VoteInfo) error { m.ctrl.T.Helper() m.ctrl.Call(m, "AllocateTokens", ctx, totalReward, bondedValidators) return nil } func (mr *MockDistributionKeeperRecorder) AllocateTokens(ctx, totalReward, bondedValidators any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateTokens", reflect.TypeOf((*MockDistributionKeeper)(nil).AllocateTokens), ctx, totalReward, bondedValidators) } func (m *MockDistributionKeeper) GetValidatorOutstandingRewards(ctx context.Context, valAddr sdk.ValAddress) (distrtypes.ValidatorOutstandingRewards, error) { m.ctrl.T.Helper() m.ctrl.Call(m, "GetValidatorOutstandingRewards", ctx, valAddr) return distrtypes.ValidatorOutstandingRewards{}, nil } func (mr *MockDistributionKeeperRecorder) GetValidatorOutstandingRewards(ctx, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorOutstandingRewards", reflect.TypeOf((*MockDistributionKeeper)(nil).GetValidatorOutstandingRewards), ctx, valAddr) } func (m *MockDistributionKeeper) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WithdrawDelegationRewards", ctx, delAddr, valAddr) var coins sdk.Coins if len(ret) > 0 { if ret[0] != nil { coins = ret[0].(sdk.Coins) } else { coins = sdk.NewCoins() } } var err error if len(ret) > 1 { if ret[1] != nil { err = ret[1].(error) } } return coins, err } func (mr *MockDistributionKeeperRecorder) WithdrawDelegationRewards(ctx, delAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithdrawDelegationRewards", reflect.TypeOf((*MockDistributionKeeper)(nil).WithdrawDelegationRewards), ctx, delAddr, valAddr) } // Mock staking keeper type MockStakingKeeper struct { ctrl *gomock.Controller recorder *MockStakingKeeperRecorder } type MockStakingKeeperRecorder struct { mock *MockStakingKeeper } func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { mock := &MockStakingKeeper{ctrl: ctrl} mock.recorder = &MockStakingKeeperRecorder{mock} return mock } func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperRecorder { return m.recorder } func (m *MockStakingKeeper) GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (stakingtypes.Validator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetValidatorByConsAddr", ctx, consAddr) ret0 := ret[0].(stakingtypes.Validator) return ret0, nil } func (mr *MockStakingKeeperRecorder) GetValidatorByConsAddr(ctx, consAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).GetValidatorByConsAddr), ctx, consAddr) } func (m *MockStakingKeeper) GetValidator(ctx context.Context, addr sdk.ValAddress) (stakingtypes.Validator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetValidator", ctx, addr) ret0, _ := ret[0].(stakingtypes.Validator) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) GetValidator(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidator", reflect.TypeOf((*MockStakingKeeper)(nil).GetValidator), ctx, addr) } func (m *MockStakingKeeper) IterateValidators(ctx context.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IterateValidators", ctx, fn) ret0, _ := ret[0].(error) return ret0 } func (mr *MockStakingKeeperRecorder) IterateValidators(ctx, fn interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateValidators", reflect.TypeOf((*MockStakingKeeper)(nil).IterateValidators), ctx, fn) } func (m *MockStakingKeeper) IterateDelegations(ctx context.Context, delAddr sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IterateDelegations", ctx, delAddr, fn) ret0, _ := ret[0].(error) return ret0 } func (mr *MockStakingKeeperRecorder) IterateDelegations(ctx, delAddr, fn interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delAddr, fn) } func (m *MockStakingKeeper) TotalBondedTokens(ctx context.Context) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TotalBondedTokens", ctx) ret0, _ := ret[0].(math.Int) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) TotalBondedTokens(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), ctx) } func (m *MockStakingKeeper) Delegate(ctx context.Context, delAddr sdk.AccAddress, bondAmt math.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (math.LegacyDec, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delegate", ctx, delAddr, bondAmt, tokenSrc, validator, subtractAccount) ret0, _ := ret[0].(math.LegacyDec) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) Delegate(ctx, delAddr, bondAmt, tokenSrc, validator, subtractAccount interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegate", reflect.TypeOf((*MockStakingKeeper)(nil).Delegate), ctx, delAddr, bondAmt, tokenSrc, validator, subtractAccount) } func (m *MockStakingKeeper) BeginRedelegation(ctx context.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount math.LegacyDec) (completionTime time.Time, err error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BeginRedelegation", ctx, delAddr, valSrcAddr, valDstAddr, sharesAmount) ret0, _ := ret[0].(time.Time) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) BeginRedelegation(ctx, delAddr, valSrcAddr, valDstAddr, sharesAmount interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginRedelegation", reflect.TypeOf((*MockStakingKeeper)(nil).BeginRedelegation), ctx, delAddr, valSrcAddr, valDstAddr, sharesAmount) } func (m *MockStakingKeeper) BondDenom(ctx context.Context) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BondDenom", ctx) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) BondDenom(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx) } func (m *MockStakingKeeper) CompleteUnbonding(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CompleteUnbonding", ctx, delAddr, valAddr) ret0, _ := ret[0].(sdk.Coins) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) CompleteUnbonding(ctx, delAddr, valAddr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteUnbonding", reflect.TypeOf((*MockStakingKeeper)(nil).CompleteUnbonding), ctx, delAddr, valAddr) } func (m *MockStakingKeeper) GetUnbondingDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) ( ubd stakingtypes.UnbondingDelegation, err error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetUnbondingDelegation", ctx, delAddr, valAddr) ret0, _ := ret[0].(stakingtypes.UnbondingDelegation) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) GetUnbondingDelegation(ctx, delAddr, valAddr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnbondingDelegation", reflect.TypeOf((*MockStakingKeeper)(nil).GetUnbondingDelegation), ctx, delAddr, valAddr) } func (m *MockStakingKeeper) RemoveUnbondingDelegation(ctx context.Context, ubd stakingtypes.UnbondingDelegation) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RemoveUnbondingDelegation", ctx, ubd) ret0, _ := ret[0].(error) return ret0 } func (mr *MockStakingKeeperRecorder) RemoveUnbondingDelegation(ctx, ubd interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUnbondingDelegation", reflect.TypeOf((*MockStakingKeeper)(nil).RemoveUnbondingDelegation), ctx, ubd) } func (m *MockStakingKeeper) SetUnbondingDelegation(ctx context.Context, ubd stakingtypes.UnbondingDelegation) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetUnbondingDelegation", ctx, ubd) ret0, _ := ret[0].(error) return ret0 } func (mr *MockStakingKeeperRecorder) SetUnbondingDelegation(ctx, ubd interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnbondingDelegation", reflect.TypeOf((*MockStakingKeeper)(nil).SetUnbondingDelegation), ctx, ubd) } func (m *MockStakingKeeper) SetValidator(ctx context.Context, addr stakingtypes.Validator) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetValidator", ctx, addr) ret0, _ := ret[0].(error) return ret0 } func (mr *MockStakingKeeperRecorder) SetValidator(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValidator", reflect.TypeOf((*MockStakingKeeper)(nil).SetValidator), ctx, addr) } func (m *MockStakingKeeper) SetValidatorByConsAddr(ctx context.Context, addr stakingtypes.Validator) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetValidatorByConsAddr", ctx, addr) ret0, _ := ret[0].(error) return ret0 } func (mr *MockStakingKeeperRecorder) SetValidatorByConsAddr(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).SetValidatorByConsAddr), ctx, addr) } func (m *MockStakingKeeper) Undelegate(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount math.LegacyDec) ( time.Time, math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Undelegate", ctx, delAddr, valAddr, sharesAmount) ret0, _ := ret[0].(time.Time) ret1, _ := ret[1].(math.Int) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } func (mr *MockStakingKeeperRecorder) Undelegate(ctx, delAddr, valAddr, sharesAmount interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Undelegate", reflect.TypeOf((*MockStakingKeeper)(nil).Undelegate), ctx, delAddr, valAddr, sharesAmount) } func (m *MockStakingKeeper) ValidateUnbondAmount(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int) ( shares math.LegacyDec, err error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateUnbondAmount", ctx, delAddr, valAddr, amt) ret0, _ := ret[0].(math.LegacyDec) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) ValidateUnbondAmount(ctx, delAddr, valAddr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateUnbondAmount", reflect.TypeOf((*MockStakingKeeper)(nil).ValidateUnbondAmount), ctx, delAddr, valAddr, amt) } func (m *MockStakingKeeper) BondedRatio(ctx context.Context) (math.LegacyDec, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BondedRatio", ctx) ret0, _ := ret[0].(math.LegacyDec) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) BondedRatio(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondedRatio", reflect.TypeOf((*MockStakingKeeper)(nil).BondedRatio), ctx) } func (m *MockStakingKeeper) StakingTokenSupply(ctx context.Context) (math.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StakingTokenSupply", ctx) ret0, _ := ret[0].(math.Int) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) StakingTokenSupply(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StakingTokenSupply", reflect.TypeOf((*MockStakingKeeper)(nil).StakingTokenSupply), ctx) } func (m *MockStakingKeeper) GetValidatorDelegations(ctx context.Context, valAddr sdk.ValAddress) ([]stakingtypes.Delegation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetValidatorDelegations", ctx, valAddr) ret0, _ := ret[0].([]stakingtypes.Delegation) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) GetValidatorDelegations(ctx, valAddr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).GetValidatorDelegations), ctx, valAddr) } func (m *MockStakingKeeper) GetAllValidators(ctx context.Context) ([]stakingtypes.Validator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllValidators", ctx) ret0, _ := ret[0].([]stakingtypes.Validator) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) GetAllValidators(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllValidators", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllValidators), ctx) } func (m *MockStakingKeeper) GetDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.Delegation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetDelegation", ctx, delAddr, valAddr) ret0, _ := ret[0].(stakingtypes.Delegation) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockStakingKeeperRecorder) GetDelegation(ctx, delAddr, valAddr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDelegation", reflect.TypeOf((*MockStakingKeeper)(nil).GetDelegation), ctx, delAddr, valAddr) } // Mock epochs keeper type MockEpochsKeeper struct { ctrl *gomock.Controller recorder *MockEpochsKeeperMockRecorder } type MockEpochsKeeperMockRecorder struct { mock *MockEpochsKeeper } func NewMockEpochsKeeper(ctrl *gomock.Controller) *MockEpochsKeeper { mock := &MockEpochsKeeper{ctrl: ctrl} mock.recorder = &MockEpochsKeeperMockRecorder{mock} return mock } func (m *MockEpochsKeeper) EXPECT() *MockEpochsKeeperMockRecorder { return m.recorder } func (m *MockEpochsKeeper) GetEpochInfo(ctx context.Context, identifier string) epochstypes.EpochInfo { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetEpochInfo", ctx, identifier) ret0, _ := ret[0].(epochstypes.EpochInfo) return ret0 } func (mr *MockEpochsKeeperMockRecorder) GetEpochInfo(ctx, identifier interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEpochInfo", reflect.TypeOf((*MockEpochsKeeper)(nil).GetEpochInfo), ctx, identifier) } func (m *MockEpochsKeeper) SetEpochInfo(ctx context.Context, info epochstypes.EpochInfo) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetEpochInfo", ctx, info) } func (mr *MockEpochsKeeperMockRecorder) SetEpochInfo(ctx, info interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType( mr.mock, "SetEpochInfo", reflect.TypeOf((*MockEpochsKeeper)(nil).SetEpochInfo), ctx, info, ) } // Mock feegrant keeper type MockFeegrantKeeper struct { ctrl *gomock.Controller recorder *MockFeegrantKeeperRecorder } type MockFeegrantKeeperRecorder struct { mock *MockFeegrantKeeper } func NewMockFeegrantKeeper(ctrl *gomock.Controller) *MockFeegrantKeeper { mock := &MockFeegrantKeeper{ctrl: ctrl} mock.recorder = &MockFeegrantKeeperRecorder{mock} return mock } func (m *MockFeegrantKeeper) EXPECT() *MockFeegrantKeeperRecorder { return m.recorder } func (m *MockFeegrantKeeper) GetAllowance(ctx context.Context, granter, grantee sdk.AccAddress) (feegrant.FeeAllowanceI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllowance", ctx, granter, grantee) ret0, _ := ret[0].(feegrant.FeeAllowanceI) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockFeegrantKeeperRecorder) GetAllowance(ctx, granter, grantee interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllowance", reflect.TypeOf((*MockFeegrantKeeper)(nil).GetAllowance), ctx, granter, grantee) } func (m *MockFeegrantKeeper) GrantAllowance(ctx context.Context, granter, grantee sdk.AccAddress, allowance feegrant.FeeAllowanceI) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GrantAllowance", ctx, granter, grantee, allowance) ret0, _ := ret[0].(error) return ret0 } func (mr *MockFeegrantKeeperRecorder) GrantAllowance(ctx, granter, grantee, allowance interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantAllowance", reflect.TypeOf((*MockFeegrantKeeper)(nil).GrantAllowance), ctx, granter, grantee, allowance) } func (m *MockFeegrantKeeper) UpdateAllowance(ctx context.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateAllowance", ctx, granter, grantee, feeAllowance) ret0, _ := ret[0].(error) return ret0 } func (mr *MockFeegrantKeeperRecorder) UpdateAllowance(ctx, granter, grantee, feeAllowance interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAllowance", reflect.TypeOf((*MockFeegrantKeeper)(nil).UpdateAllowance), ctx, granter, grantee, feeAllowance) } // DID-based feegrant methods func (m *MockFeegrantKeeper) GrantDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string, allowance feegrant.FeeAllowanceI) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GrantDIDAllowance", ctx, granter, granteeDID, allowance) ret0, _ := ret[0].(error) return ret0 } func (mr *MockFeegrantKeeperRecorder) GrantDIDAllowance(ctx, granter, granteeDID, allowance interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantDIDAllowance", reflect.TypeOf((*MockFeegrantKeeper)(nil).GrantDIDAllowance), ctx, granter, granteeDID, allowance) } func (m *MockFeegrantKeeper) UpdateDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string, feeAllowance feegrant.FeeAllowanceI) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateDIDAllowance", ctx, granter, granteeDID, feeAllowance) ret0, _ := ret[0].(error) return ret0 } func (mr *MockFeegrantKeeperRecorder) UpdateDIDAllowance(ctx, granter, granteeDID, feeAllowance interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDIDAllowance", reflect.TypeOf((*MockFeegrantKeeper)(nil).UpdateDIDAllowance), ctx, granter, granteeDID, feeAllowance) } func (m *MockFeegrantKeeper) ExpireDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ExpireDIDAllowance", ctx, granter, granteeDID) ret0, _ := ret[0].(error) return ret0 } func (mr *MockFeegrantKeeperRecorder) ExpireDIDAllowance(ctx, granter, granteeDID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireDIDAllowance", reflect.TypeOf((*MockFeegrantKeeper)(nil).ExpireDIDAllowance), ctx, granter, granteeDID) } func (m *MockFeegrantKeeper) GetDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) (feegrant.FeeAllowanceI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetDIDAllowance", ctx, granter, granteeDID) ret0, _ := ret[0].(feegrant.FeeAllowanceI) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockFeegrantKeeperRecorder) GetDIDAllowance(ctx, granter, granteeDID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDIDAllowance", reflect.TypeOf((*MockFeegrantKeeper)(nil).GetDIDAllowance), ctx, granter, granteeDID) } // Mock DID feegrant keeper type MockDIDFeegrantKeeper struct { ctrl *gomock.Controller recorder *MockDIDFeegrantKeeperMockRecorder } type MockDIDFeegrantKeeperMockRecorder struct { mock *MockDIDFeegrantKeeper } func NewMockDIDFeegrantKeeper(ctrl *gomock.Controller) *MockDIDFeegrantKeeper { mock := &MockDIDFeegrantKeeper{ctrl: ctrl} mock.recorder = &MockDIDFeegrantKeeperMockRecorder{mock} return mock } func (m *MockDIDFeegrantKeeper) EXPECT() *MockDIDFeegrantKeeperMockRecorder { return m.recorder } // UseGrantedFees implements ante.FeegrantKeeper interface func (m *MockDIDFeegrantKeeper) UseGrantedFees(ctx context.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UseGrantedFees", ctx, granter, grantee, fee, msgs) ret0, _ := ret[0].(error) return ret0 } func (mr *MockDIDFeegrantKeeperMockRecorder) UseGrantedFees(ctx, granter, grantee, fee, msgs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseGrantedFees", reflect.TypeOf((*MockDIDFeegrantKeeper)(nil).UseGrantedFees), ctx, granter, grantee, fee, msgs) } // UseGrantedFeesByDID implements DID-based feegrant functionality func (m *MockDIDFeegrantKeeper) UseGrantedFeesByDID(ctx context.Context, granter sdk.AccAddress, granteeDID string, fee sdk.Coins, msgs []sdk.Msg) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UseGrantedFeesByDID", ctx, granter, granteeDID, fee, msgs) ret0, _ := ret[0].(error) return ret0 } func (mr *MockDIDFeegrantKeeperMockRecorder) UseGrantedFeesByDID(ctx, granter, granteeDID, fee, msgs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseGrantedFeesByDID", reflect.TypeOf((*MockDIDFeegrantKeeper)(nil).UseGrantedFeesByDID), ctx, granter, granteeDID, fee, msgs) } // UseFirstAvailableDIDGrant implements DID-based feegrant functionality to find and use the first available grant func (m *MockDIDFeegrantKeeper) UseFirstAvailableDIDGrant(ctx context.Context, granteeDID string, fee sdk.Coins, msgs []sdk.Msg) (sdk.AccAddress, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UseFirstAvailableDIDGrant", ctx, granteeDID, fee, msgs) ret0, _ := ret[0].(sdk.AccAddress) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockDIDFeegrantKeeperMockRecorder) UseFirstAvailableDIDGrant(ctx, granteeDID, fee, msgs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseFirstAvailableDIDGrant", reflect.TypeOf((*MockDIDFeegrantKeeper)(nil).UseFirstAvailableDIDGrant), ctx, granteeDID, fee, msgs) } // GetDIDAllowance implements DID-based feegrant functionality func (m *MockDIDFeegrantKeeper) GetDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) (feegrant.FeeAllowanceI, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetDIDAllowance", ctx, granter, granteeDID) ret0, _ := ret[0].(feegrant.FeeAllowanceI) ret1, _ := ret[1].(error) return ret0, ret1 } func (mr *MockDIDFeegrantKeeperMockRecorder) GetDIDAllowance(ctx, granter, granteeDID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDIDAllowance", reflect.TypeOf((*MockDIDFeegrantKeeper)(nil).GetDIDAllowance), ctx, granter, granteeDID) } ================================================ FILE: testutil/network/faucet.go ================================================ package network import ( "encoding/json" "fmt" "os" "path/filepath" "cosmossdk.io/log" "cosmossdk.io/math" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/sourcenetwork/sourcehub/app" "github.com/sourcenetwork/sourcehub/app/params" hubtypes "github.com/sourcenetwork/sourcehub/x/hub/types" ) const ( faucetAddress = "source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt" faucetBalance = 100000000000000 // 100m open faucetKeyContent = `{ "mnemonic": "comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold", "name": "faucet", "address": "source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt" }` defaultDirPerm = 0755 defaultFilePerm = 0644 faucetKeyFile = "faucet-key.json" configDir = "config" ) // setupFaucetKeyFiles creates the faucet key files in the required locations. func setupFaucetKeyFiles(val network.ValidatorI) error { faucetKeyPath := filepath.Join(val.GetCtx().Config.RootDir, configDir, faucetKeyFile) if err := os.MkdirAll(filepath.Dir(faucetKeyPath), defaultDirPerm); err != nil { return fmt.Errorf("failed to create faucet key directory: %w", err) } if err := os.WriteFile(faucetKeyPath, []byte(faucetKeyContent), defaultFilePerm); err != nil { return fmt.Errorf("failed to write faucet key file: %w", err) } userHomeDir, err := os.UserHomeDir() if err != nil { return fmt.Errorf("failed to get user home directory: %w", err) } defaultNodeHome := filepath.Join(userHomeDir, ".sourcehub") defaultFaucetKeyPath := filepath.Join(defaultNodeHome, configDir, faucetKeyFile) if err := os.MkdirAll(filepath.Dir(defaultFaucetKeyPath), defaultDirPerm); err != nil { return fmt.Errorf("failed to create default faucet key directory: %w", err) } if err := os.WriteFile(defaultFaucetKeyPath, []byte(faucetKeyContent), defaultFilePerm); err != nil { return fmt.Errorf("failed to write default faucet key file: %w", err) } return nil } // setupFaucetInGenesis sets up the faucet account and balance in the genesis state. func setupFaucetInGenesis(cfg *network.Config) error { hubGenesis := hubtypes.DefaultGenesis() hubGenesis.ChainConfig.AllowZeroFeeTxs = true bz, err := json.Marshal(&hubGenesis) if err != nil { return fmt.Errorf("could not marshal x/hub/ChainConfig: %w", err) } cfg.GenesisState[hubtypes.ModuleName] = bz if err := addFaucetAccountToGenesis(cfg); err != nil { return fmt.Errorf("failed to add faucet account to genesis: %w", err) } if err := addFaucetBalanceToGenesis(cfg); err != nil { return fmt.Errorf("failed to add faucet balance to genesis: %w", err) } return nil } // addFaucetAccountToGenesis adds the faucet account to the auth genesis state. func addFaucetAccountToGenesis(cfg *network.Config) error { var authGenState authtypes.GenesisState if authGenStateBytes, exists := cfg.GenesisState[authtypes.ModuleName]; exists { if err := json.Unmarshal(authGenStateBytes, &authGenState); err != nil { authGenState = *authtypes.DefaultGenesisState() } } else { authGenState = *authtypes.DefaultGenesisState() } faucetAccAddr, err := sdk.AccAddressFromBech32(faucetAddress) if err != nil { return fmt.Errorf("invalid faucet address: %w", err) } faucetAccount := authtypes.NewBaseAccount(faucetAccAddr, nil, 0, 0) accounts, err := authtypes.PackAccounts([]authtypes.GenesisAccount{faucetAccount}) if err != nil { return fmt.Errorf("failed to pack accounts: %w", err) } authGenState.Accounts = append(authGenState.Accounts, accounts...) tempApp, err := app.New(log.NewNopLogger(), dbm.NewMemDB(), nil, true, sims.EmptyAppOptions{}) if err != nil { return fmt.Errorf("failed to create temp app: %w", err) } appCodec := tempApp.AppCodec() cfg.GenesisState[authtypes.ModuleName] = appCodec.MustMarshalJSON(&authGenState) return nil } // addFaucetBalanceToGenesis adds the faucet balance to the bank genesis state. func addFaucetBalanceToGenesis(cfg *network.Config) error { var bankGenState banktypes.GenesisState if bankGenStateBytes, exists := cfg.GenesisState[banktypes.ModuleName]; exists { if err := json.Unmarshal(bankGenStateBytes, &bankGenState); err != nil { bankGenState = *banktypes.DefaultGenesisState() } } else { bankGenState = *banktypes.DefaultGenesisState() } faucetCoins := sdk.NewCoins(sdk.NewCoin(params.DefaultBondDenom, math.NewInt(faucetBalance))) bankGenState.Balances = append(bankGenState.Balances, banktypes.Balance{ Address: faucetAddress, Coins: faucetCoins, }) tempApp, err := app.New(log.NewNopLogger(), dbm.NewMemDB(), nil, true, sims.EmptyAppOptions{}) if err != nil { return fmt.Errorf("failed to create temp app: %w", err) } appCodec := tempApp.AppCodec() cfg.GenesisState[banktypes.ModuleName] = appCodec.MustMarshalJSON(&bankGenState) return nil } ================================================ FILE: testutil/network/network.go ================================================ package network import ( "fmt" "os" "strings" "testing" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/spf13/viper" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/app" "github.com/sourcenetwork/sourcehub/app/params" ) type ( Network = network.Network Config = network.Config ) // NetworkOptions contains options for configuring the network. type NetworkOptions struct { EnableFaucet bool } // testAppOptions creates app options for testing with optional faucet configuration. type testAppOptions struct { enableFaucet bool v *viper.Viper } // NewTestAppOptions creates test app options with faucet configuration. func NewTestAppOptions(enableFaucet bool) *testAppOptions { v := viper.New() v.Set("faucet.enable_faucet", enableFaucet) return &testAppOptions{ enableFaucet: enableFaucet, v: v, } } // Get implements servertypes.AppOptions interface. func (opts *testAppOptions) Get(key string) interface{} { return opts.v.Get(key) } // New creates instance with fully configured cosmos network. // Accepts optional config, that will be used in place of the DefaultConfig() if provided. func New(t *testing.T, configs ...Config) *Network { return NewWithOptions(t, NetworkOptions{EnableFaucet: false}, configs...) } // NewWithOptions creates instance with fully configured cosmos network and custom options. // Accepts optional config and options, that will be used in place of the DefaultConfig() if provided. func NewWithOptions(t *testing.T, options NetworkOptions, configs ...Config) *Network { t.Helper() if len(configs) > 1 { panic("at most one config should be provided") } var cfg network.Config if len(configs) == 0 { cfg = DefaultConfigWithOptions(options) } else { cfg = configs[0] } baseDir, err := os.MkdirTemp("", t.Name()) require.NoError(t, err) net, err := network.New(t, baseDir, cfg) require.NoError(t, err) val := net.Validators[0] if options.EnableFaucet { err = setupFaucetKeyFiles(val) require.NoError(t, err) } _, err = net.WaitForHeight(1) require.NoError(t, err) t.Cleanup(func() { net.Cleanup() os.RemoveAll(baseDir) }) return net } // DefaultConfig will initialize config for the network with custom application, // genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig. func DefaultConfig() network.Config { return DefaultConfigWithOptions(NetworkOptions{EnableFaucet: false}) } // DefaultConfigWithOptions will initialize config for the network with custom application, // genesis and single validator, with optional faucet configuration. func DefaultConfigWithOptions(options NetworkOptions) network.Config { app.SetConfig(false) cfg, err := network.DefaultConfigWithAppConfig(app.AppConfig()) if err != nil { panic(err) } ports, err := freePorts(3) if err != nil { panic(err) } if cfg.APIAddress == "" { cfg.APIAddress = fmt.Sprintf("tcp://0.0.0.0:%s", ports[0]) } if cfg.RPCAddress == "" { cfg.RPCAddress = fmt.Sprintf("tcp://0.0.0.0:%s", ports[1]) } if cfg.GRPCAddress == "" { cfg.GRPCAddress = fmt.Sprintf("0.0.0.0:%s", ports[2]) } cfg.BondDenom = params.DefaultBondDenom if options.EnableFaucet { if err := setupFaucetInGenesis(&cfg); err != nil { panic(fmt.Sprintf("failed to setup faucet in genesis: %v", err)) } } cfg.AppConstructor = func(val network.ValidatorI) servertypes.Application { appOpts := NewTestAppOptions(options.EnableFaucet) appInstance, err := app.New( val.GetCtx().Logger, dbm.NewMemDB(), nil, true, appOpts, baseapp.SetChainID(cfg.ChainID), ) if err != nil { panic(fmt.Sprintf("failed to create app: %v", err)) } return appInstance } return cfg } // freePorts return the available ports based on the number of requested ports. func freePorts(n int) ([]string, error) { closeFns := make([]func() error, n) ports := make([]string, n) for i := 0; i < n; i++ { _, port, closeFn, err := network.FreeTCPAddr() if err != nil { return nil, err } ports[i] = port closeFns[i] = closeFn } for _, closeFn := range closeFns { if err := closeFn(); err != nil { return nil, err } } return ports, nil } // TCPToHTTP converts a TCP address to HTTP address. func TCPToHTTP(tcpAddr string) string { return strings.Replace(tcpAddr, "tcp://", "http://", 1) } ================================================ FILE: testutil/nullify/nullify.go ================================================ // Package nullify provides methods to init nil values structs for test assertion. package nullify import ( "reflect" "unsafe" sdk "github.com/cosmos/cosmos-sdk/types" ) var ( coinType = reflect.TypeOf(sdk.Coin{}) coinsType = reflect.TypeOf(sdk.Coins{}) ) // Fill analyze all struct fields and slices with // reflection and initialize the nil and empty slices, // structs, and pointers. func Fill(x interface{}) interface{} { v := reflect.Indirect(reflect.ValueOf(x)) switch v.Kind() { case reflect.Slice: for i := 0; i < v.Len(); i++ { obj := v.Index(i) objPt := reflect.NewAt(obj.Type(), unsafe.Pointer(obj.UnsafeAddr())).Interface() objPt = Fill(objPt) obj.Set(reflect.ValueOf(objPt)) } case reflect.Struct: for i := 0; i < v.NumField(); i++ { f := reflect.Indirect(v.Field(i)) if !f.CanSet() { continue } switch f.Kind() { case reflect.Slice: f.Set(reflect.MakeSlice(f.Type(), 0, 0)) case reflect.Struct: switch f.Type() { case coinType: coin := reflect.New(coinType).Interface() s := reflect.ValueOf(coin).Elem() f.Set(s) case coinsType: coins := reflect.New(coinsType).Interface() s := reflect.ValueOf(coins).Elem() f.Set(s) default: objPt := reflect.NewAt(f.Type(), unsafe.Pointer(f.UnsafeAddr())).Interface() s := Fill(objPt) f.Set(reflect.ValueOf(s)) } } } } return reflect.Indirect(v).Interface() } ================================================ FILE: testutil/sample/sample.go ================================================ package sample import ( "github.com/cometbft/cometbft/crypto/secp256k1" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" ) // AccAddress returns a sample account address func AccAddress() string { pk := ed25519.GenPrivKey().PubKey() addr := pk.Address() return sdk.AccAddress(addr).String() } // RandomAccAddress returns a sample account address func RandomAccAddress() sdk.AccAddress { pk := ed25519.GenPrivKey().PubKey() pkAddr := pk.Address() accAddr := sdk.AccAddress(pkAddr) return accAddr } // RandomValAddress generates a random ValidatorAddress for simulation func RandomValAddress() sdk.ValAddress { valPub := secp256k1.GenPrivKey().PubKey() return sdk.ValAddress(valPub.Address()) } ================================================ FILE: testutil/utils.go ================================================ package test import ( "testing" "cosmossdk.io/math" txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "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" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Codec codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino } // CreateTestValidator creates a validator for testing purposes. func CreateTestValidator( t *testing.T, ctx sdk.Context, stakingKeeper *stakingkeeper.Keeper, operatorAddress sdk.ValAddress, pubKey cryptotypes.PubKey, bondAmount math.Int, ) stakingtypes.Validator { description := stakingtypes.NewDescription( "TestSourceValidator", "mysterious_identity", "unknown_website", "suspicious_security_contact", "missing_details", ) commission := stakingtypes.NewCommission( math.LegacyMustNewDecFromStr("0.1"), // commission rate math.LegacyMustNewDecFromStr("0.2"), // max commission rate math.LegacyMustNewDecFromStr("0.01"), // max change rate ) validator, err := stakingtypes.NewValidator(operatorAddress.String(), pubKey, description) require.NoError(t, err) validator.Commission = commission validator.Status = stakingtypes.Bonded validator.Tokens = bondAmount stakingKeeper.SetValidator(ctx, validator) return validator } // CreateTestEncodingConfig creates encoding configuration for testing purposes. func CreateTestEncodingConfig() EncodingConfig { interfaceRegistry, err := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ ProtoFiles: proto.HybridResolver, SigningOptions: txsigning.Options{ AddressCodec: addresscodec.NewBech32Codec("source"), ValidatorAddressCodec: addresscodec.NewBech32Codec("sourcevaloper"), }, }) if err != nil { panic(err) } banktypes.RegisterInterfaces(interfaceRegistry) cryptocodec.RegisterInterfaces(interfaceRegistry) stakingtypes.RegisterInterfaces(interfaceRegistry) authtypes.RegisterInterfaces(interfaceRegistry) distrtypes.RegisterInterfaces(interfaceRegistry) protoCodec := codec.NewProtoCodec(interfaceRegistry) return EncodingConfig{ InterfaceRegistry: interfaceRegistry, Codec: protoCodec, TxConfig: tx.NewTxConfig(protoCodec, tx.DefaultSignModes), Amino: codec.NewLegacyAmino(), } } ================================================ FILE: tools/tools.go ================================================ //go:build tools package tools import ( _ "github.com/bufbuild/buf/cmd/buf" _ "github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar" _ "github.com/cosmos/gogoproto/protoc-gen-gocosmos" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" _ "golang.org/x/tools/cmd/goimports" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" _ "google.golang.org/protobuf/cmd/protoc-gen-go" ) ================================================ FILE: types/constants.go ================================================ package types const AccountAddrPrefix = "source" ================================================ FILE: types/utils.go ================================================ package types import ( "errors" "strings" sdk "github.com/cosmos/cosmos-sdk/types" ) // IsValidSourceHubAddr verifies whether addr is a valid bech32 prefixed by // SourceHub's prefix func IsValidSourceHubAddr(addr string) error { bz, err := sdk.GetFromBech32(addr, AccountAddrPrefix) if err != nil { return err } err = sdk.VerifyAddressFormat(bz) if err != nil { return err } return nil } // AccAddressFromBech32 returns an AccAddress from a Bech32 SourceHub address string func AccAddressFromBech32(address string) (addr sdk.AccAddress, err error) { if len(strings.TrimSpace(address)) == 0 { return sdk.AccAddress{}, errors.New("empty address string is not allowed") } bz, err := sdk.GetFromBech32(address, AccountAddrPrefix) if err != nil { return nil, err } err = sdk.VerifyAddressFormat(bz) if err != nil { return nil, err } return sdk.AccAddress(bz), nil } ================================================ FILE: utils/functional.go ================================================ package utils import "fmt" // MapSlice produces a new slice from a slice of elements and a mapping function func MapSlice[T any, U any](ts []T, mapper func(T) U) []U { us := make([]U, 0, len(ts)) for _, t := range ts { u := mapper(t) us = append(us, u) } return us } // MapFailableSlice maps a slice using a mapping function which may fail. // Returns upon all elements are mapped or terminates upon the first mapping error. func MapFailableSlice[T any, U any](ts []T, mapper func(T) (U, error)) ([]U, error) { us := make([]U, 0, len(ts)) for i, t := range ts { u, err := mapper(t) if err != nil { return nil, fmt.Errorf("slice elem %v: %w", i, err) } us = append(us, u) } return us, nil } // MapNullableSlice produces a new slice of elements from a slice of pointers, excluding 'nil' elements. func MapNullableSlice[T any, U any](ts []*T, mapper func(*T) U) []U { us := make([]U, 0, len(ts)) for _, t := range ts { if t != nil { u := mapper(t) us = append(us, u) } } return us } ================================================ FILE: utils/glob.go ================================================ package utils // credit: https://github.com/ryanuber/go-glob/blob/master/glob.go import "strings" // The character which is treated like a glob const GLOB = "*" // Glob will test a string pattern, potentially containing globs, against a // subject string. The result is a simple true/false, determining whether or // not the glob pattern matched the subject text. func Glob(pattern, subj string) bool { // Empty pattern can only match empty subject if pattern == "" { return subj == pattern } // If the pattern _is_ a glob, it matches everything if pattern == GLOB { return true } parts := strings.Split(pattern, GLOB) if len(parts) == 1 { // No globs in pattern, so test for equality return subj == pattern } leadingGlob := strings.HasPrefix(pattern, GLOB) trailingGlob := strings.HasSuffix(pattern, GLOB) end := len(parts) - 1 // Go over the leading parts and ensure they match. for i := 0; i < end; i++ { idx := strings.Index(subj, parts[i]) switch i { case 0: // Check the first section. Requires special handling. if !leadingGlob && idx != 0 { return false } default: // Check that the middle parts match. if idx < 0 { return false } } // Trim evaluated text from subj as we loop over the pattern. subj = subj[idx+len(parts[i]):] } // Reached the last section. Requires special handling. return trailingGlob || strings.HasSuffix(subj, parts[end]) } ================================================ FILE: utils/sort.go ================================================ package utils import ( "sort" ) var _ sort.Interface = (*Sortable[any])(nil) type Ordered interface { ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~float32 | ~float64 | ~string | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr } // Sortable wraps a slice of values with a type that implements sort.Interface. type Sortable[T any] struct { ts []T comparator Comparator[T] } // Extractor extracts an Ordered value from a type T type Extractor[T any, K Ordered] func(T) K // Comparator is a function which compares whether left is less than right // returns true if it is else false type Comparator[T any] func(left, right T) bool // FromExtractor builds a Sortable from a slice of values and an extractor function. // The extractor function extracts an Ordered value from the slice elements which is used as the comparassion value. // // eg. suppose T represents a Person, the extractor function: // func (p *Person) string { return p.Name } // would be used to sort all Persons in the slice by their Name. func FromExtractor[T any, K Ordered](vals []T, extractor Extractor[T, K]) Sortable[T] { comparator := func(left, right T) bool { return extractor(left) < extractor(right) } return Sortable[T]{ ts: vals, comparator: comparator, } } // FromComparator creates a Sortable from a comparator function which takes two instances of T and returns // whether left is less than right func FromComparator[T any](vals []T, comparator Comparator[T]) Sortable[T] { return Sortable[T]{ ts: vals, comparator: comparator, } } func (s *Sortable[T]) Len() int { return len(s.ts) } func (s *Sortable[T]) Swap(i, j int) { s.ts[i], s.ts[j] = s.ts[j], s.ts[i] } func (s *Sortable[T]) Less(i, j int) bool { ti, tj := s.ts[i], s.ts[j] return s.comparator(ti, tj) } // SortInPlace sorts the original slice supplied when the Sortable was initialized func (s Sortable[T]) SortInPlace() { sort.Stable(&s) } // Sort returns a sorted slice of the elements given originally func (s Sortable[T]) Sort() []T { vals := make([]T, 0, len(s.ts)) copy(vals, s.ts) sortable := Sortable[T]{ ts: vals, comparator: s.comparator, } sortable.SortInPlace() return vals } // SortSlice performs an inplace sort of a Slice of Ordered elements func SortSlice[T Ordered](elems []T) { sortable := Sortable[T]{ ts: elems, //comparator: comparator, comparator: func(left T, right T) bool { return left < right }, } sortable.SortInPlace() } ================================================ FILE: utils/span.go ================================================ package utils import ( "context" "time" sdk "github.com/cosmos/cosmos-sdk/types" ) const spanEventType = "msg_span" type spanCtxKeyType struct{} var spanCtxKey spanCtxKeyType = struct{}{} // MsgSpan is a container for execution data generated during the processing of a Msg // MsgSpan is used as tracing data and must not be relied upon by users, it's an introspection tool only. // Attributes are not guaranteed to be stable or deterministic type MsgSpan struct { start time.Time duration time.Duration message string attributes map[string]string } func NewSpan() *MsgSpan { return &MsgSpan{ start: time.Now(), attributes: make(map[string]string), } } func (s *MsgSpan) End() { s.duration = time.Since(s.start) } func (s *MsgSpan) SetMessage(msg string) { s.message = msg } func (s *MsgSpan) Attr(key, value string) { s.attributes[key] = value } func (s *MsgSpan) ToEvent() sdk.Event { var attrs []sdk.Attribute attrs = append(attrs, sdk.NewAttribute("start", s.start.String())) attrs = append(attrs, sdk.NewAttribute("duration", s.duration.String())) if s.message != "" { attrs = append(attrs, sdk.NewAttribute("message", s.message)) } for key, value := range s.attributes { attrs = append(attrs, sdk.NewAttribute(key, value)) } return sdk.NewEvent(spanEventType, attrs...) } // WithMsgSpan returns a new Context with an initialized MsgSpan func WithMsgSpan(ctx sdk.Context) sdk.Context { goCtx := ctx.Context() goCtx = context.WithValue(goCtx, spanCtxKey, NewSpan()) return ctx.WithContext(goCtx) } func GetMsgSpan(ctx sdk.Context) *MsgSpan { return ctx.Context().Value(spanCtxKey).(*MsgSpan) } // FinalizeSpan ends the span duration frame, transforms it into an SDK Event and emits it using the event manager func FinalizeSpan(ctx sdk.Context) { event := GetMsgSpan(ctx).ToEvent() ctx.EventManager().EmitEvent(event) } ================================================ FILE: x/acp/BSL.txt ================================================ Business Source License 1.1 Parameters Licensor: Democratized Data (D2) Foundation Licensed Work: SourceHub ACP Module v0.1.0 The Licensed Work is (c) 2024 D2 Foundation. Additional Use Grant: You may only use the Licensed Work for the following conditions For an application that is connected to the SourceHub network (mainnet or testnet) or another protocol connected to the SourceHub by way of the Inter-Blockchain Communication (IBC) protocol. A non-profit project in both a production and pre-production state. A for-profit project in a pre-production state only. Change Date: 2028-01-10 Change License: Apache License, Version 2.0 For information about alternative licensing arrangements for the Software, please contact us: license@source.network Notice The Business Source License (this document, or the “License”) is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License. License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. “Business Source License” is a trademark of MariaDB Corporation Ab. ----------------------------------------------------------------------------- Business Source License 1.1 Terms The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use. Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate. If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work. All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor. You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work. Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work. This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License). TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE. MariaDB hereby grants you permission to use this License’s text to license your works, and to refer to it using the trademark “Business Source License”, as long as you comply with the Covenants of Licensor below. Covenants of Licensor In consideration of the right to use this License’s text and the “Business Source License” name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor: 1. To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where “compatible” means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation. 2. To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text “None”. 3. To specify a Change Date. 4. Not to modify this License in any other way. ----------------------------------------------------------------------------- ================================================ FILE: x/acp/abci/abci_service.go ================================================ package access_ticket import ( "context" "fmt" abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/rpc/client" "github.com/cometbft/cometbft/rpc/client/http" bfttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/sourcenetwork/sourcehub/x/acp/types" ) const ( abciSocketPath string = "/websocket" ) // IAVL Store Queries expect the query to contain "key" as suffix to the Path const iavlQuerySuffix = "key" func NewABCIService(addr string) (ABCIService, error) { client, err := http.New(addr, abciSocketPath) if err != nil { return ABCIService{}, err } return ABCIService{ addr: addr, client: client, keyBuilder: keyBuilder{}, }, nil } // ABCIService performs an ABCI calls over a trusted node type ABCIService struct { addr string client *http.HTTP keyBuilder keyBuilder } // Query a CometBFT node through the ABCI query method for an AccessDecision with decisionId. // set prove true to return a query proof // height corresponds to the height of the block at which the proof is required, set 0 to use the latest block func (s *ABCIService) QueryDecision(ctx context.Context, decisionId string, prove bool, height int64) (*abcitypes.ResponseQuery, error) { opts := client.ABCIQueryOptions{ Height: height, Prove: prove, } path := s.keyBuilder.ABCIQueryPath() key := s.keyBuilder.ABCIQueryKey(decisionId) res, err := s.client.ABCIQueryWithOptions(ctx, path, key, opts) if err != nil { return nil, err } if res.Response.Value == nil { return nil, fmt.Errorf("decision %v: %w", decisionId, ErrDecisionNotFound) } return &res.Response, nil } // GetCurrentHeight returns the current height of a node func (s *ABCIService) GetCurrentHeight(ctx context.Context) (uint64, error) { resp, err := s.client.ABCIInfo(ctx) if err != nil { return 0, fmt.Errorf("%w: %v", ErrExternal, err) } return uint64(resp.Response.LastBlockHeight), nil } // GetBlockHeader returns the block header at the given height func (s *ABCIService) GetBlockHeader(ctx context.Context, height int64) (bfttypes.Header, error) { resp, err := s.client.Block(ctx, &height) if err != nil { return bfttypes.Header{}, fmt.Errorf("%w: %v", ErrExternal, err) } return resp.Block.Header, nil } // keyBuilder builds keys to execute ABCI queries for AccessDecisions type keyBuilder struct{} // ABCIQueryKey returns the Key part to be used in an ABCIQuery func (b *keyBuilder) ABCIQueryKey(decisionId string) []byte { return []byte(types.AccessDecisionRepositoryKeyPrefix + decisionId) } // KVKey returns the actual key used in the Cosmos app store. // note this key contains the prefix from the root commit multistore and the IAVL store with prefixes func (b *keyBuilder) KVKey(decisionId string) []byte { return []byte("/" + types.ModuleName + "/" + types.AccessDecisionRepositoryKeyPrefix + decisionId) } // ABCIQueryPath returns the Query Path for a query issued to the ACP module func (b *keyBuilder) ABCIQueryPath() string { // Figuring out how to issue an ABCI query to a Cosmos app is a mess. // The request goes through to Tendermint and is sent straight to the application (ie cosmos base app), // it then goes through a multiple store layers, each with requirements for the key and none of which are documented. // // The entrypoint in baseapp itself. // The BaseApp can accept a set of prefixes and do different things with it, // for store state proofs it expects a "/store" prefix. // see cosmos/cosmos-sdk/baseapp/abci.go // // The request is then dispatched to the commit multi store. // The CMS dispatches the request to one of the substores using the substore name. // In our case the ACP module name. // see cosmos/cosmos-sdk/store/rootmulti/store.go // // It then goes to a IAVL store, the IAVL store expects keys to have a // "/key" suffix as part of the ABCI query path. // see cosmos/cosmos-sdk/store/iavl/store.go // IAVL is the last layer to process the Key field in the request. Now it's only the Data part. // // For the Data part it's necessary to figure out which prefix stores have been added to the mix but that's more straight forward. return "/" + baseapp.QueryPathStore + "/" + types.ModuleName + "/" + iavlQuerySuffix } ================================================ FILE: x/acp/abci/errors.go ================================================ package access_ticket import ( "errors" "fmt" ) var ( // ErrExternal represents an error in an external system, // which means the validation procedure can be retried ErrExternal error = errors.New("external error") ErrInvalidInput = errors.New("invalid input") ErrDecisionNotFound = fmt.Errorf("decision not found: %w", ErrInvalidInput) ) ================================================ FILE: x/acp/access_decision/commands.go ================================================ package access_decision import ( "context" "fmt" sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/utils" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // DefaultExpirationDelta sets the number of blocks a Decision is valid for const DefaultExpirationDelta uint64 = 100 type EvaluateAccessRequestsCommand struct { Policy *coretypes.Policy Operations []*coretypes.Operation Actor string CreationTime *types.Timestamp // Creator is the same as the Tx signer Creator sdktypes.AccountI // Current block height CurrentHeight uint64 params *types.DecisionParams } func (c *EvaluateAccessRequestsCommand) Execute(ctx context.Context, engine coretypes.ACPEngineServer, repository Repository, paramsRepo ParamsRepository) (*types.AccessDecision, error) { err := c.validate() if err != nil { return nil, fmt.Errorf("EvaluateAccessRequest: %w", err) } err = c.evaluateRequest(ctx, engine) if err != nil { return nil, fmt.Errorf("EvaluateAccessRequest: %w", err) } c.params, err = paramsRepo.GetDefaults(ctx) if err != nil { return nil, fmt.Errorf("EvaluateAccessRequest: %w", err) } decision := c.buildDecision() err = repository.Set(ctx, decision) if err != nil { return nil, fmt.Errorf("EvaluateAccessRequest: %w", err) } return decision, nil } func (c *EvaluateAccessRequestsCommand) validate() error { if c.Policy == nil { return errors.New("policy cannot be nil", errors.ErrorType_BAD_INPUT) } if c.Operations == nil { return errors.New("access request cannot be nil", errors.ErrorType_BAD_INPUT) } if c.CurrentHeight == 0 { return errors.New("invalid height: must be nonzero positive number", errors.ErrorType_BAD_INPUT) } return nil } func (c *EvaluateAccessRequestsCommand) evaluateRequest(ctx context.Context, engine coretypes.ACPEngineServer) error { operations := utils.MapSlice(c.Operations, func(op *coretypes.Operation) *coretypes.Operation { return &coretypes.Operation{ Object: op.Object, Permission: op.Permission, } }) resp, err := engine.VerifyAccessRequest(ctx, &coretypes.VerifyAccessRequestRequest{ PolicyId: c.Policy.Id, AccessRequest: &coretypes.AccessRequest{ Operations: operations, Actor: &coretypes.Actor{ Id: c.Actor, }, }, }) if err != nil { return err } if !resp.Valid { return errors.ErrorType_UNAUTHORIZED } return nil } func (c *EvaluateAccessRequestsCommand) buildDecision() *types.AccessDecision { decision := &types.AccessDecision{ PolicyId: c.Policy.Id, Params: c.params, CreationTime: c.CreationTime, Operations: c.Operations, IssuedHeight: c.CurrentHeight, Actor: c.Actor, Creator: c.Creator.GetAddress().String(), CreatorAccSequence: c.Creator.GetSequence(), } decision.Id = decision.ProduceId() return decision } ================================================ FILE: x/acp/access_decision/commands_test.go ================================================ package access_decision /* import ( "context" "testing" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/auth_engine" "github.com/sourcenetwork/sourcehub/x/acp/policy" "github.com/sourcenetwork/sourcehub/x/acp/testutil" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var timestamp = testutil.MustDateTimeToProto("2023-07-26 14:08:30") func setupEvaluateAccessRequest(t *testing.T) (context.Context, auth_engine.AuthEngine, Repository, ParamsRepository, *types.Policy) { polStr := ` id: unregister-pol resources: file: permissions: read: expr: owner + reader + admin relations: owner: types: - actor reader: types: - actor - file->reader admin: manages: - reader types: - actor actor: name: actor ` polIR, err := policy.Unmarshal(polStr, types.PolicyMarshalingType_YAML) require.Nil(t, err) engine, _, ctx := testutil.GetTestAuthEngine(t) createCmd := policy.CreatePolicyCommand{ Policy: polIR, Creator: "cosmos1gue5de6a8fdff0jut08vw5sg9pk6rr00cstakj", CreationTime: timestamp, } db := dbm.NewMemDB() pol, err := createCmd.Execute(ctx, db, engine) require.Nil(t, err) _, err = engine.SetRelationship(ctx, pol, &types.RelationshipRecord{ Relationship: types.NewActorRelationship("file", "readme.txt", "owner", "alice"), Archived: false, Creator: "alice", }) require.Nil(t, err) _, err = engine.SetRelationship(ctx, pol, &types.RelationshipRecord{ Relationship: types.NewActorRelationship("file", "alice.txt", "owner", "alice"), Archived: false, Creator: "alice", }) require.Nil(t, err) _, err = engine.SetRelationship(ctx, pol, &types.RelationshipRecord{ Relationship: types.NewActorRelationship("file", "readme.txt", "reader", "bob"), Archived: false, Creator: "alice", }) require.Nil(t, err) storeKey := storetypes.NewKVStoreKey(types.StoreKey) db = dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) require.NoError(t, stateStore.LoadLatestVersion()) kv := stateStore.GetCommitKVStore(storeKey) require.NotNil(t, kv) repository := NewAccessDecisionRepository(kv) paramRepo := &StaticParamsRepository{} return ctx, engine, repository, paramRepo, pol } func TestEvaluateAccessRequest_GeneratesAccessDecisionWhenActorIsAuthorized(t *testing.T) { ctx, engine, repo, paramRepo, pol := setupEvaluateAccessRequest(t) cmd := EvaluateAccessRequestsCommand{ Policy: pol, Operations: []*types.Operation{ &types.Operation{ Object: types.NewObject("file", "readme.txt"), Permission: "read", }, }, Actor: &types.Actor{ Id: "bob", }, CreationTime: timestamp, Creator: "creator", CurrentHeight: 1, } decision, err := cmd.Execute(ctx, engine, repo, paramRepo) want := &types.AccessDecision{ Id: "837adcadec6abc793fea5819330d54c568a1d2f7989c7363b2ecb3fd88636756", AccessRequest: cmd.AccessRequest, Params: &types.DecisionParams{ ExpirationHeightDelta: 100, }, CreationTime: timestamp, IssuedHeight: 1, Creator: "creator", } require.Nil(t, err) require.Equal(t, decision, want) } func TestEvaluateAccessRequest_ReturnsUnauthorizedErrorWhenActorIsNotAllowedSomeOperation(t *testing.T) { ctx, engine, repo, paramRepo, pol := setupEvaluateAccessRequest(t) cmd := EvaluateAccessRequestsCommand{ Policy: pol, AccessRequest: &types.AccessRequest{ Operations: []*types.Operation{ &types.Operation{ Object: types.NewObject("file", "readme.txt"), Permission: "read", }, &types.Operation{ Object: types.NewObject("file", "alice.txt"), Permission: "read", }, }, Actor: &types.Actor{ Id: "bob", }, }, CreationTime: timestamp, Creator: "creator", CurrentHeight: 1, } decision, err := cmd.Execute(ctx, engine, repo, paramRepo) require.Nil(t, decision) require.ErrorIs(t, err, types.ErrNotAuthorized) } */ ================================================ FILE: x/acp/access_decision/params_repository.go ================================================ package access_decision import ( "context" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ ParamsRepository = (*StaticParamsRepository)(nil) // defaultExpirationDelta sets the number of blocks a Decision is valid for const defaultExpirationDelta uint64 = 100 const defaultProofExpirationDelta uint64 = 50 type StaticParamsRepository struct{} func (r *StaticParamsRepository) GetDefaults(ctx context.Context) (*types.DecisionParams, error) { return &types.DecisionParams{ DecisionExpirationDelta: defaultExpirationDelta, TicketExpirationDelta: defaultExpirationDelta, ProofExpirationDelta: defaultProofExpirationDelta, }, nil } ================================================ FILE: x/acp/access_decision/repository.go ================================================ package access_decision import ( "context" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/acp_core/pkg/errors" raccoon "github.com/sourcenetwork/raccoondb" "github.com/sourcenetwork/sourcehub/utils" "github.com/sourcenetwork/sourcehub/x/acp/stores" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type AccessDecisionRepository struct { kv storetypes.KVStore } func NewAccessDecisionRepository(store storetypes.KVStore) *AccessDecisionRepository { return &AccessDecisionRepository{ kv: store, } } func (r *AccessDecisionRepository) getStore(_ context.Context) raccoon.ObjectStore[*types.AccessDecision] { rcKV := stores.RaccoonKVFromCosmos(r.kv) marshaler := stores.NewGogoProtoMarshaler(func() *types.AccessDecision { return &types.AccessDecision{} }) ider := &decisionIder{} return raccoon.NewObjStore(rcKV, marshaler, ider) } func (r *AccessDecisionRepository) wrapErr(err error) error { if err == nil { return err } return errors.New(err.Error(), errors.ErrorType_INTERNAL) } func (r *AccessDecisionRepository) Set(ctx context.Context, decision *types.AccessDecision) error { store := r.getStore(ctx) err := store.SetObject(decision) return r.wrapErr(err) } func (r *AccessDecisionRepository) Get(ctx context.Context, id string) (*types.AccessDecision, error) { store := r.getStore(ctx) opt, err := store.GetObject([]byte(id)) var obj *types.AccessDecision if !opt.IsEmpty() { obj = opt.Value() } return obj, r.wrapErr(err) } func (r *AccessDecisionRepository) Delete(ctx context.Context, id string) error { store := r.getStore(ctx) err := store.DeleteById([]byte(id)) return r.wrapErr(err) } func (r *AccessDecisionRepository) ListIds(ctx context.Context) ([]string, error) { store := r.getStore(ctx) bytesIds, err := store.ListIds() ids := utils.MapSlice(bytesIds, func(bytes []byte) string { return string(bytes) }) return ids, r.wrapErr(err) } func (r *AccessDecisionRepository) List(ctx context.Context) ([]*types.AccessDecision, error) { store := r.getStore(ctx) objs, err := store.List() return objs, r.wrapErr(err) } type decisionIder struct{} func (i *decisionIder) Id(decision *types.AccessDecision) []byte { return []byte(decision.Id) } ================================================ FILE: x/acp/access_decision/types.go ================================================ package access_decision import ( "context" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type Repository interface { Set(ctx context.Context, decision *types.AccessDecision) error Get(ctx context.Context, id string) (*types.AccessDecision, error) Delete(ctx context.Context, id string) error // List of Ids of all Decisions ListIds(ctx context.Context) ([]string, error) List(ctx context.Context) ([]*types.AccessDecision, error) } type ParamsRepository interface { GetDefaults(context.Context) (*types.DecisionParams, error) } ================================================ FILE: x/acp/access_ticket/abci_service.go ================================================ package access_ticket import ( "context" "fmt" abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/rpc/client" "github.com/cometbft/cometbft/rpc/client/http" bfttypes "github.com/cometbft/cometbft/types" ) const ( abciSocketPath string = "/websocket" ) func NewABCIService(addr string) (abciService, error) { client, err := http.New(addr, abciSocketPath) if err != nil { return abciService{}, fmt.Errorf("%w: %v", ErrExternal, err) } return abciService{ addr: addr, client: client, keyBuilder: keyBuilder{}, }, nil } // abciService performs an ABCI calls over a trusted node type abciService struct { addr string client *http.HTTP keyBuilder keyBuilder } // Query a CometBFT node through the ABCI query method for an AccessDecision with decisionId. // set prove true to return a query proof // height corresponds to the height of the block at which the proof is required, set 0 to use the latest block func (s *abciService) QueryDecision(ctx context.Context, decisionId string, prove bool, height int64) (*abcitypes.ResponseQuery, error) { opts := client.ABCIQueryOptions{ Height: height, Prove: prove, } path := s.keyBuilder.ABCIQueryPath() key := s.keyBuilder.ABCIQueryKey(decisionId) res, err := s.client.ABCIQueryWithOptions(ctx, path, key, opts) if err != nil { return nil, err } if res.Response.Value == nil { return nil, fmt.Errorf("decision %v: %w", decisionId, ErrDecisionNotFound) } return &res.Response, nil } // GetCurrentHeight returns the current height of a node func (s *abciService) GetCurrentHeight(ctx context.Context) (int64, error) { resp, err := s.client.ABCIInfo(ctx) if err != nil { return 0, fmt.Errorf("%w: %v", ErrExternal, err) } return resp.Response.LastBlockHeight, nil } // GetBlockHeader returns the block header at the given height func (s *abciService) GetBlockHeader(ctx context.Context, height int64) (bfttypes.Header, error) { resp, err := s.client.Block(ctx, &height) if err != nil { return bfttypes.Header{}, fmt.Errorf("%w: %v", ErrExternal, err) } return resp.Block.Header, nil } ================================================ FILE: x/acp/access_ticket/errors.go ================================================ package access_ticket import ( "errors" "fmt" ) var ( // ErrExternal represents an error in an external system, // which means the validation procedure can be retried ErrExternal error = errors.New("external error") ErrInvalidInput = errors.New("invalid input") ErrDecisionNotFound = fmt.Errorf("decision not found: %w", ErrInvalidInput) // ErrInvalidTicket flags that the provided AccessTicket is // invalid and will never be valid. ErrInvalidTicket error = errors.New("invalid AccessTicket") ErrExpiredDecision = fmt.Errorf("expired decision: %w", ErrInvalidTicket) ErrExpiredProof = fmt.Errorf("expired proof: %w", ErrInvalidTicket) ErrExpiredTicket = fmt.Errorf("expired ticket: %w", ErrInvalidTicket) ErrInvalidDecisionProof = fmt.Errorf("invalid DecisionProof bytes: %w", ErrInvalidTicket) ErrdDecisionProofDenied = fmt.Errorf("DecisionProof denied: %w", ErrInvalidTicket) ErrInvalidSignature = fmt.Errorf("invalid signature for ticket: %w", ErrInvalidTicket) ErrDecisionTampered = fmt.Errorf("AccessDecision fingerprint different from DecisionId: %w", ErrInvalidTicket) ) ================================================ FILE: x/acp/access_ticket/issuer_v1.go ================================================ package access_ticket import ( "context" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // TicketIssuer is a responsible for generating Access Tickets type TicketIssuer struct { abciService *abciService marshaler Marshaler signer signer } func NewTicketIssuer(abciService *abciService) TicketIssuer { return TicketIssuer{ abciService: abciService, marshaler: Marshaler{}, signer: signer{}, } } // Issue fetches an Access Decision from its Id and generates an Access Ticket from it. func (b *TicketIssuer) IssueRaw(ctx context.Context, decisionId string, privKey cryptotypes.PrivKey) (*types.AccessTicket, error) { decision, err := b.retrieveDecision(ctx, decisionId) if err != nil { return nil, err } proof, err := b.buildProof(ctx, decisionId) if err != nil { return nil, err } ticket := &types.AccessTicket{ VersionDenominator: types.AccessTicketV1, DecisionId: decisionId, Decision: &decision, DecisionProof: proof, Signature: nil, } signature, err := b.signer.Sign(privKey, ticket) if err != nil { return nil, err } ticket.Signature = signature return ticket, nil } func (b *TicketIssuer) Issue(ctx context.Context, decisionId string, privKey cryptotypes.PrivKey) (string, error) { ticket, err := b.IssueRaw(ctx, decisionId, privKey) if err != nil { return "", err } return b.marshaler.Marshal(ticket) } func (b *TicketIssuer) buildProof(ctx context.Context, decisionId string) ([]byte, error) { decision, err := b.abciService.QueryDecision(ctx, decisionId, true, 0) if err != nil { return nil, err } bytes, err := decision.Marshal() if err != nil { return nil, err } return bytes, nil } // retrieveDecision uses an ABCI query to get the target decision object func (b *TicketIssuer) retrieveDecision(ctx context.Context, decisionId string) (types.AccessDecision, error) { var decision types.AccessDecision // retrieve a decision without a proof at the latest height response, err := b.abciService.QueryDecision(ctx, decisionId, false, 0) if err != nil { return decision, err } err = decision.Unmarshal(response.Value) if err != nil { return decision, err } return decision, nil } ================================================ FILE: x/acp/access_ticket/signer.go ================================================ package access_ticket import ( "crypto/sha256" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // signer is responsible for generating a Ticket signature and verifying it type signer struct{} func (s *signer) Sign(key cryptotypes.PrivKey, ticket *types.AccessTicket) ([]byte, error) { digest := s.hashTicket(ticket) return key.Sign(digest) } func (s *signer) Verify(key cryptotypes.PubKey, ticket *types.AccessTicket) error { digest := s.hashTicket(ticket) ok := key.VerifySignature(digest, ticket.Signature) if !ok { return ErrInvalidSignature } return nil } // hashTicket produces a sha256 which uniquely identifies a Ticket. func (b *signer) hashTicket(ticket *types.AccessTicket) []byte { hasher := sha256.New() hasher.Write([]byte(ticket.VersionDenominator)) // NOTE the Decision ID is produced as a Hash of all fields in it. // It's paramount that this invariant is not violated to ensure the // safety of the protocol hasher.Write([]byte(ticket.DecisionId)) hasher.Write(ticket.DecisionProof) return hasher.Sum(nil) } ================================================ FILE: x/acp/access_ticket/spec.go ================================================ package access_ticket import ( "context" "fmt" storetypes "cosmossdk.io/store/types" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/merkle" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func NewAccessTicketSpec(serv *abciService, resolver did.Resolver) AccessTicketSpec { return AccessTicketSpec{ abciService: serv, resolver: resolver, marshaler: Marshaler{}, } } type AccessTicketSpec struct { abciService *abciService resolver did.Resolver keyBuilder keyBuilder signer signer marshaler Marshaler } func (s *AccessTicketSpec) Satisfies(ctx context.Context, ticket string) error { tkt, err := s.marshaler.Unmarshal(ticket) if err != nil { return err } return s.SatisfiesRaw(ctx, tkt) } // Satisfies inspects an AccessTicket and verifies whether it meets specification and is valid. // Returns a non-nil error if the Ticket is invalid func (s *AccessTicketSpec) SatisfiesRaw(ctx context.Context, ticket *types.AccessTicket) error { err := s.verifyProof(ctx, ticket.DecisionId, ticket.DecisionProof) if err != nil { return err } didStr := ticket.Decision.Actor did := key.DIDKey(didStr) pubBytes, _, keytype, err := did.Decode() if err != nil { return err } if keytype != crypto.SECP256k1 { return fmt.Errorf("unsupported key type: expected SECP256k1: got %v", keytype) } pkey := &secp256k1.PubKey{ Key: pubBytes, } err = s.signer.Verify(pkey, ticket) if err != nil { return err } err = s.validateDecision(ticket) if err != nil { return err } heightInt, err := s.abciService.GetCurrentHeight(ctx) height := uint64(heightInt) if err != nil { return err } decisionExpiration := s.computeDecisionExpiration(ticket.Decision) proofExpiration := s.computeProofExpiration(ticket.Decision) ticketExpiration := s.computeTicketExpiration(ticket.Decision) if height > decisionExpiration { return ErrExpiredDecision } if height > proofExpiration { return ErrExpiredDecision } if height > ticketExpiration { return ErrExpiredTicket } return nil } func (s *AccessTicketSpec) computeDecisionExpiration(decision *types.AccessDecision) uint64 { return decision.IssuedHeight + decision.Params.DecisionExpirationDelta } func (s *AccessTicketSpec) computeTicketExpiration(decision *types.AccessDecision) uint64 { return decision.IssuedHeight + decision.Params.TicketExpirationDelta } func (s *AccessTicketSpec) computeProofExpiration(decision *types.AccessDecision) uint64 { return decision.IssuedHeight + decision.Params.ProofExpirationDelta } func (s *AccessTicketSpec) verifyProof(ctx context.Context, decisionId string, decisionProof []byte) error { abciQuery := &abcitypes.ResponseQuery{} err := abciQuery.Unmarshal(decisionProof) if err != nil { return ErrInvalidDecisionProof } height := abciQuery.Height + 1 header, err := s.abciService.GetBlockHeader(ctx, height) if err != nil { return err } root := header.AppHash.Bytes() key := string(s.keyBuilder.KVKey(decisionId)) runtime := merkle.NewProofRuntime() runtime.RegisterOpDecoder(storetypes.ProofOpIAVLCommitment, storetypes.CommitmentOpDecoder) runtime.RegisterOpDecoder(storetypes.ProofOpSimpleMerkleCommitment, storetypes.CommitmentOpDecoder) err = runtime.VerifyValue(abciQuery.ProofOps, root, key, abciQuery.Value) if err != nil { return fmt.Errorf("%w: %v", ErrInvalidDecisionProof, err) } return nil } func (s *AccessTicketSpec) validateDecision(ticket *types.AccessTicket) error { decisionHash := ticket.Decision.ProduceId() if decisionHash != ticket.DecisionId { return fmt.Errorf("expected %v got %v: %w", ticket.DecisionId, decisionHash, ErrDecisionTampered) } if decisionHash != ticket.Decision.Id { return fmt.Errorf("expected %v got %v: %w", ticket.DecisionId, decisionHash, ErrDecisionTampered) } return nil } ================================================ FILE: x/acp/access_ticket/types.go ================================================ package access_ticket import ( "context" "encoding/base64" "fmt" "strings" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) const separator = "." // IAVL Store Queries expect the query to contain "key" as suffix to the Path const iavlQuerySuffix = "key" // Marshaler is responsible for marshaling and unmarshaling an AccessTicket to and from a string representation type Marshaler struct{} func (m *Marshaler) Marshal(ticket *types.AccessTicket) (string, error) { version := ticket.VersionDenominator ticketBytes, err := ticket.Marshal() if err != nil { return "", err } ticketEncoded := base64.URLEncoding.EncodeToString(ticketBytes) return version + separator + ticketEncoded, nil } func (m *Marshaler) Unmarshal(ticket string) (*types.AccessTicket, error) { version, encodedTicket, found := strings.Cut(ticket, separator) if !found { return nil, fmt.Errorf("invalid ticket: separator not found") } if version != types.AccessTicketV1 { return nil, fmt.Errorf("invalid ticket: invalid version") } ticketBytes, err := base64.URLEncoding.DecodeString(encodedTicket) if err != nil { return nil, fmt.Errorf("invalid ticket: encoded ticket: %v", err) } tkt := &types.AccessTicket{} err = tkt.Unmarshal(ticketBytes) if err != nil { return nil, fmt.Errorf("invalid ticket: encoded ticket: %v", err) } return tkt, nil } // keyBuilder builds keys to execute ABCI queries for AccessDecisions type keyBuilder struct{} // ABCIQueryKey returns the Key part to be used in an ABCIQuery func (b *keyBuilder) ABCIQueryKey(decisionId string) []byte { return []byte(types.AccessDecisionRepositoryKeyPrefix + decisionId) } // KVKey returns the actual key used in the Cosmos app store. // note this key contains the prefix from the root commit multistore and the IAVL store with prefixes func (b *keyBuilder) KVKey(decisionId string) []byte { return []byte("/" + types.ModuleName + "/" + types.AccessDecisionRepositoryKeyPrefix + decisionId) } // ABCIQueryPath returns the Query Path for a query issued to the ACP module func (b *keyBuilder) ABCIQueryPath() string { // Figuring out how to issue an ABCI query to a Cosmos app is a mess. // The request goes through to Tendermint and is sent straight to the application (ie cosmos base app), // it then goes through a multiple store layers, each with requirements for the key and none of which are documented. // // The entrypoint in baseapp itself. // The BaseApp can accept a set of prefixes and do different things with it, // for store state proofs it expects a "/store" prefix. // see cosmos/cosmos-sdk/baseapp/abci.go // // The request is then dispatched to the commit multi store. // The CMS dispatches the request to one of the substores using the substore name. // In our case the ACP module name. // see cosmos/cosmos-sdk/store/rootmulti/store.go // // It then goes to a IAVL store, the IAVL store expects keys to have a // "/key" suffix as part of the ABCI query path. // see cosmos/cosmos-sdk/store/iavl/store.go // IAVL is the last layer to process the Key field in the request. Now it's only the Data part. // // For the Data part it's necessary to figure out which prefix stores have been added to the mix but that's more straight forward. return "/" + baseapp.QueryPathStore + "/" + types.ModuleName + "/" + iavlQuerySuffix } func UnmarshalAndVerify(ctx context.Context, trustedNodeAddr string, ticketStr string) (*types.AccessTicket, error) { marshaler := Marshaler{} service, err := NewABCIService(trustedNodeAddr) if err != nil { return nil, err } ticketSpec := NewAccessTicketSpec(&service, &did.KeyResolver{}) ticket, err := marshaler.Unmarshal(ticketStr) if err != nil { return nil, err } err = ticketSpec.SatisfiesRaw(ctx, ticket) if err != nil { return nil, err } return ticket, nil } ================================================ FILE: x/acp/bearer_token/bearer_token.go ================================================ // package bearer_token defines an authentication method for Policy operations using a self issued JWS package bearer_token import ( "context" "fmt" "time" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // AuthorizeMsg verifies whether the given MsgBearerPolicyCmd should be authorized // to execute. // If the validation is successful, returns the authenticated Actor DID or an error // // Note: an Authorized Msg means that the msg's Bearer token is well formed and valid (actor authentication) // and that the token is bound to the account that signed the Tx (msg authorization). func AuthorizeMsg(ctx context.Context, resolver did.Resolver, msg *types.MsgBearerPolicyCmd, currentTime time.Time) (string, error) { token, err := parseValidateJWS(ctx, resolver, msg.BearerToken) if err != nil { return "", err } err = validateBearerToken(&token, ¤tTime) if err != nil { return "", err } if msg.Creator != token.AuthorizedAccount { return "", fmt.Errorf("msg creator %v: expected creator %v: %w", msg.Creator, token.AuthorizedAccount, ErrMsgUnauthorized) } return token.IssuerID, nil } ================================================ FILE: x/acp/bearer_token/bearer_token_test.go ================================================ package bearer_token import ( "context" "crypto" "testing" "time" acpdid "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) const validSourceHubAddr = "source19djduggm345yf2dn0y0jqqgkr5q0pt234dkyvd" const msgCreator = validSourceHubAddr // bearerValidationTestVector models a test case which generates a JWS from the BearerToken definition // and verifies whether the Token is valid or not type bearerValidationTestVector struct { Description string Token BearerToken ExpectedError error Signer crypto.Signer ServerTime time.Time } func Test_AuthorizeMsg_Errors(t *testing.T) { validDID, signer, err := acpdid.ProduceDID() require.NoError(t, err) jwsTestVectors := []bearerValidationTestVector{ { Description: "payload without issuer rejected", Token: BearerToken{ IssuerID: "", ExpirationTime: mustUnixTime("2024-06-17 14:20:00"), IssuedTime: mustUnixTime("2024-06-17 14:00:00"), AuthorizedAccount: validSourceHubAddr, }, ExpectedError: ErrMissingClaim, Signer: signer, ServerTime: mustTime("2024-06-17 14:10:00"), }, { Description: "payload without authorization_account rejected", Token: BearerToken{ IssuerID: validDID, ExpirationTime: mustUnixTime("2024-06-17 14:20:00"), IssuedTime: mustUnixTime("2024-06-17 14:00:00"), AuthorizedAccount: "", }, ExpectedError: ErrMissingClaim, Signer: signer, ServerTime: mustTime("2024-06-17 14:10:00"), }, { Description: "payload without isa rejected", Token: BearerToken{ IssuerID: validDID, ExpirationTime: mustUnixTime("2024-06-17 14:20:00"), IssuedTime: 0, AuthorizedAccount: validSourceHubAddr, }, ExpectedError: ErrMissingClaim, Signer: signer, ServerTime: mustTime("2024-06-17 14:10:00"), }, { Description: "payload without exp rejected", Token: BearerToken{ IssuerID: validDID, ExpirationTime: 0, IssuedTime: mustUnixTime("2024-06-17 14:00:00"), AuthorizedAccount: validSourceHubAddr, }, ExpectedError: ErrMissingClaim, Signer: signer, ServerTime: mustTime("2024-06-17 14:10:00"), }, { Description: "iss as invalid did rejected", Token: BearerToken{ IssuerID: "did:invalid", ExpirationTime: mustUnixTime("2024-06-17 14:20:00"), IssuedTime: mustUnixTime("2024-06-17 14:00:00"), AuthorizedAccount: validSourceHubAddr, }, ExpectedError: ErrInvalidIssuer, Signer: signer, ServerTime: mustTime("2024-06-17 14:10:00"), }, { Description: "authorization_account invalid sourcehub addr rejected", Token: BearerToken{ IssuerID: validDID, ExpirationTime: mustUnixTime("2024-06-17 14:20:00"), IssuedTime: mustUnixTime("2024-06-17 14:00:00"), AuthorizedAccount: "notsource123456z", }, ExpectedError: ErrInvalidAuhtorizedAccount, Signer: signer, ServerTime: mustTime("2024-06-17 14:10:00"), }, { Description: "expired token rejected", Token: BearerToken{ IssuerID: validDID, IssuedTime: mustUnixTime("2024-06-17 14:00:00"), ExpirationTime: mustUnixTime("2024-06-17 14:20:00"), AuthorizedAccount: validSourceHubAddr, }, ExpectedError: ErrTokenExpired, Signer: signer, ServerTime: mustTime("2024-06-17 14:30:00"), }, { Description: "tx signer different from authorized_account", Token: BearerToken{ IssuerID: validDID, IssuedTime: mustUnixTime("2024-06-17 14:00:00"), ExpirationTime: mustUnixTime("2024-06-17 14:20:00"), AuthorizedAccount: "source1dsc8ah9rytxrzhq0suj994anwuhvq7yjeh67dp", }, ExpectedError: ErrMsgUnauthorized, Signer: signer, ServerTime: mustTime("2024-06-17 14:10:00"), }, } for _, test := range jwsTestVectors { t.Run(test.Description, func(t *testing.T) { jws, err := test.Token.ToJWS(test.Signer) require.NoError(t, err) testAuthorizeMsg(t, jws, test.ServerTime, test.ExpectedError) }) } } func Test_JWS_InvalidSignatureIsRejected(t *testing.T) { jws := "eyJhbGciOiJFZERTQSJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWt0VHdhdFZtQ3d6YzJuYlpiTUt5YmNpdGlMaXFVZ21Kb2FOWTdmdm9YQzVpRCIsImF1dGhvcml6ZWRfYWNjb3VudCI6InNvdXJjZTE5ZGpkdWdnbTM0NXlmMmRuMHkwanFxZ2tyNXEwcHQyMzRka3l2ZCIsImlhdCI6MTcxODYzMjgwMCwiZXhwIjoxNzE4NjM0MDAwfQ.cIis7b8ctEctoSUrxvk5_X2jUC9-nmNCey2D0d1NrbtWKaPSnahJrj54CaLLCEiogc_NkqTjazrvF_Kp1y1-BQ" testAuthorizeMsg(t, jws, mustTime("2024-06-17 14:10:00"), ErrInvalidBearerToken) } func Test_JWS_WithTamperedHeaderIsRejected(t *testing.T) { // Original JWS: // eyJhbGciOiJFZERTQSJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWtnM1lnM2I2TU5zeU10aXJyZlh2NUdaM2p1TTJtNkhiVTZWbnN4ZjFtcEVleSIsImF1dGhvcml6ZWRfYWNjb3VudCI6InNvdXJjZTE5ZGpkdWdnbTM0NXlmMmRuMHkwanFxZ2tyNXEwcHQyMzRka3l2ZCIsImlhdCI6MTcxODYzMjgwMCwiZXhwIjoxNzE4NjM0MDAwfQ.X2T5KpLjH1IGDCxYJ5Hp2CvScwWjLwqtleEHg0PZiYDCpIWh-tgxzfEFPHoHyYjnvcHS8FQk4arlJQaJuW3IBA jws := "eyJhbbciOiJFZERTQSJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWtnM1lnM2I2TU5zeU10aXJyZlh2NUdaM2p1TTJtNkhiVTZWbnN4ZjFtcEVleSIsImF1dGhvcml6ZWRfYWNjb3VudCI6InNvdXJjZTE5ZGpkdWdnbTM0NXlmMmRuMHkwanFxZ2tyNXEwcHQyMzRka3l2ZCIsImlhdCI6MTcxODYzMjgwMCwiZXhwIjoxNzE4NjM0MDAwfQ.X2T5KpLjH1IGDCxYJ5Hp2CvScwWjLwqtleEHg0PZiYDCpIWh-tgxzfEFPHoHyYjnvcHS8FQk4arlJQaJuW3IBA" testAuthorizeMsg(t, jws, mustTime("2024-06-17 14:10:00"), ErrInvalidBearerToken) } func Test_JWS_JSONSerializationIsRejected(t *testing.T) { jsonSerializedToken := ` { "payload":"eyJpc3MiOiJkaWQ6a2V5Ono2TWtxUTNhY2J0NWdVaHV1QnFSZUtTanpEcWNIZlREa0hMb3dhWFY2YURIREw4RCIsImF1dGhvcml6ZWRfYWNjb3VudCI6InNvdXJjZTE5ZGpkdWdnbTM0NXlmMmRuMHkwanFxZ2tyNXEwcHQyMzRka3l2ZCIsImlhdCI6MTcxODcyNzk4NCwiZXhwIjoxNzE4NzI4ODg0fQ", "protected":"eyJhbGciOiJFZERTQSJ9", "signature":"DuwXmY3pRMSIejK7mK4lSEzrMCP4PhI7etLncuRlGI3QhRjrbcWaQnEC3fcziAsQZ1cLgtCiffgX9zCTSg8iBg" }` testAuthorizeMsg(t, jsonSerializedToken, mustTime("2024-06-17 14:10:00"), ErrJSONSerializationUnsupported) } func testAuthorizeMsg(t *testing.T, jws string, serverTime time.Time, expectedErr error) { ctx := context.TODO() resolver := acpdid.KeyResolver{} msg := types.MsgBearerPolicyCmd{ Creator: msgCreator, BearerToken: jws, } actorId, err := AuthorizeMsg(ctx, &resolver, &msg, serverTime) require.Empty(t, actorId) require.ErrorIs(t, err, expectedErr) } func mustUnixTime(ts string) int64 { return mustTime(ts).Unix() } func mustTime(ts string) time.Time { t, err := time.Parse(time.DateTime, ts) if err != nil { panic(err) } return t } ================================================ FILE: x/acp/bearer_token/errors.go ================================================ package bearer_token import ( "fmt" "time" "github.com/sourcenetwork/acp_core/pkg/errors" ) var ErrInvalidBearerToken = errors.Wrap("invalid bearer token", errors.ErrorType_BAD_INPUT) var ErrMsgUnauthorized = errors.Wrap("bearer policy msg: authorized_account doesn't match", errors.ErrorType_UNAUTHORIZED) var ErrInvalidIssuer = errors.Wrap("invalid issuer: expected did", ErrInvalidBearerToken) var ErrInvalidAuhtorizedAccount = errors.Wrap("invalid authorized_account: expects SourceHub address", ErrInvalidBearerToken) var ErrTokenExpired = errors.Wrap("token expired", ErrInvalidBearerToken) var ErrMissingClaim = errors.Wrap("required claim not found", ErrInvalidBearerToken) var ErrJSONSerializationUnsupported = errors.Wrap("JWS JSON Serialization not supported", ErrInvalidBearerToken) func newErrTokenExpired(expiresUnix int64, nowUnix int64) error { expires := time.Unix(expiresUnix, 0).Format(time.DateTime) now := time.Unix(nowUnix, 0).Format(time.DateTime) return fmt.Errorf("expired %v: now %v: %w", expires, now, ErrTokenExpired) } func newErrMissingClaim(claim string) error { return fmt.Errorf("claim %v: %w", claim, ErrMissingClaim) } ================================================ FILE: x/acp/bearer_token/parser.go ================================================ package bearer_token import ( "context" "encoding/json" "fmt" "strings" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/go-jose/go-jose/v3" "github.com/lestrrat-go/jwx/v2/jwa" jwxjws "github.com/lestrrat-go/jwx/v2/jws" "github.com/sourcenetwork/sourcehub/x/acp/did" ) var requiredClaims = []string{ IssuedAtClaim, IssuerClaim, AuthorizedAccountClaim, ExpiresClaim, } // parseValidateJWS processes a JWS Bearer token by unmarshaling it and verifying its signature. // Returns a BearerToken is the JWS is valid and the signature matches the IssuerID // // Note: the JWS must be compact serialized, JSON serialization will be rejected as a conservative // security measure against unprotected header attacks. func parseValidateJWS(ctx context.Context, resolver did.Resolver, bearerJWS string) (BearerToken, error) { bearerJWS = strings.TrimLeft(bearerJWS, " \n\t\r") if strings.HasPrefix(bearerJWS, "{") { return BearerToken{}, ErrJSONSerializationUnsupported } jws, err := jose.ParseSigned(bearerJWS) if err != nil { return BearerToken{}, fmt.Errorf("failed parsing jws: %v: %w", err, ErrInvalidBearerToken) } payloadBytes := jws.UnsafePayloadWithoutVerification() bearer, err := unmarshalJWSPayload(payloadBytes) if err != nil { return BearerToken{}, err } err = validateBearerTokenValues(&bearer) if err != nil { return BearerToken{}, err } // currently the ssi-sdk key resolver does not support secp256k1 // therefore we skip using the did pkg resolver and decode it directly, // as that does not error. did := bearer.IssuerID didKey := key.DIDKey(did) pubBytes, _, keytype, err := didKey.Decode() if err != nil { return BearerToken{}, fmt.Errorf("failed to resolve actor did: %v: %w", err, ErrInvalidBearerToken) } pubKey, err := crypto.BytesToPubKey(pubBytes, keytype) if err != nil { return BearerToken{}, fmt.Errorf("failed to retrieve pub key: %v: %w", err, ErrInvalidBearerToken) } var algs []jwa.SignatureAlgorithm if secpKey, ok := pubKey.(secp.PublicKey); ok { // https://www.rfc-editor.org/rfc/rfc8812 algs = []jwa.SignatureAlgorithm{jwa.ES256K} pubKey = secpKey.ToECDSA() } else { algs, err = jwxjws.AlgorithmsForKey(pubKey) if err != nil { return BearerToken{}, fmt.Errorf("failed to retrieve algs for pub key: %v: %w", err, ErrInvalidBearerToken) } } _, err = jwxjws.Verify([]byte(bearerJWS), jwxjws.WithKey(algs[0], pubKey)) if err != nil { return BearerToken{}, fmt.Errorf("could not verify actor signature for jwk: %v: %w", err, ErrInvalidBearerToken) } return bearer, nil } // unmarshalJWSPayload unmarshals the JWS bytes into a BearerToken. // // The unmarshaling is strict, meaning that if the json object did not contain *all* // required claims, it returns an error. func unmarshalJWSPayload(payload []byte) (BearerToken, error) { obj := make(map[string]any) err := json.Unmarshal(payload, &obj) if err != nil { return BearerToken{}, err } for _, claim := range requiredClaims { _, ok := obj[claim] if !ok { return BearerToken{}, newErrMissingClaim(claim) } } token := BearerToken{} err = json.Unmarshal(payload, &token) if err != nil { return BearerToken{}, fmt.Errorf("could not unmarshal payload: %v: %w", err, ErrInvalidBearerToken) } return token, nil } ================================================ FILE: x/acp/bearer_token/spec.go ================================================ package bearer_token import ( "fmt" "time" hubtypes "github.com/sourcenetwork/sourcehub/types" "github.com/sourcenetwork/sourcehub/x/acp/did" ) func validateBearerTokenValues(token *BearerToken) error { if did.IsValidDID(token.IssuerID) != nil { return ErrInvalidIssuer } if err := hubtypes.IsValidSourceHubAddr(token.AuthorizedAccount); err != nil { return fmt.Errorf("%v: %w", err, ErrInvalidAuhtorizedAccount) } if token.ExpirationTime < token.IssuedTime { return fmt.Errorf("issue time cannot be after expiration time: %w", ErrInvalidBearerToken) } return nil } func validateBearerToken(token *BearerToken, currentTime *time.Time) error { err := validateBearerTokenValues(token) if err != nil { return err } now := currentTime.Unix() if now > token.ExpirationTime { return newErrTokenExpired(token.ExpirationTime, now) } return nil } ================================================ FILE: x/acp/bearer_token/types.go ================================================ package bearer_token import ( "crypto" "encoding/json" "time" "github.com/go-jose/go-jose/v3" "github.com/go-jose/go-jose/v3/cryptosigner" ) const ( IssuedAtClaim = "iat" ExpiresClaim = "exp" IssuerClaim = "iss" // AuthorizedAccountClaim is the name of the expected field in the JWS // which authorizes a SourceHub account to produce Txs on behalf of the // token issuer AuthorizedAccountClaim = "authorized_account" ) const DefaultExpirationTime = time.Minute * 15 // BearerToken contains the structured fields included in the JWS Bearer Token type BearerToken struct { // IssuerID is the Actor ID for the Token signer IssuerID string `json:"iss,omitempty"` // AuthorizedAccount is the SourceHub account address which is allowed to use this token AuthorizedAccount string `json:"authorized_account,omitempty"` // IssuedTime is the timestamp at which the token was generated IssuedTime int64 `json:"iat,omitempty"` // ExpirationTime is the timestamp at which the token will expire ExpirationTime int64 `json:"exp,omitempty"` } // ToJWS serializes the Token payload, signs it and marshals the result // to a JWS using the compact serialization mode func (t *BearerToken) ToJWS(signer crypto.Signer) (string, error) { bytes, err := json.Marshal(t) if err != nil { return "", err } payload := string(bytes) opaque := cryptosigner.Opaque(signer) key := jose.SigningKey{ Algorithm: opaque.Algs()[0], Key: opaque, } var opts *jose.SignerOptions joseSigner, err := jose.NewSigner(key, opts) if err != nil { return "", err } obj, err := joseSigner.Sign([]byte(payload)) if err != nil { return "", err } return obj.CompactSerialize() } // NewBearerTokenNow issues a BearerToken using the current time and the default expiration delta func NewBearerTokenNow(actorID string, authorizedAccount string) BearerToken { now := time.Now() expires := now.Add(DefaultExpirationTime) return BearerToken{ IssuerID: actorID, AuthorizedAccount: authorizedAccount, IssuedTime: now.Unix(), ExpirationTime: expires.Unix(), } } // NewBearerTokenFromTime constructs a BearerToken from timestamps func NewBearerTokenFromTime(actorID string, authorizedAcc string, issuedAt time.Time, expires time.Time) BearerToken { return BearerToken{ IssuerID: actorID, AuthorizedAccount: authorizedAcc, IssuedTime: issuedAt.Unix(), ExpirationTime: expires.Unix(), } } ================================================ FILE: x/acp/capability/doc.go ================================================ // package capability provides types that manage capabilities tied to acp policies. // // Example usage: // Calling modules may create a new Policy using acp keeper's `CreateModulePolicy` method, // which returns a capability. // The returned capability represents an object which, if presented to the keeper, // grants the caller unrestricted access to the policy bound to the capability. // // Callers which receive a capability are required to Claim this capability, // using either cosmos-sdk capability keeper directly or the CapabilityManager abstraction. // Claiming a capability allows it to be subsequently recovered at a later instant of time. // // In order to operate over a Policy registered by the module, it must present the Claimed // capability, which can be fetch with the `Fetch` method of the manager. package capability ================================================ FILE: x/acp/capability/error.go ================================================ package capability import "github.com/sourcenetwork/acp_core/pkg/errors" var ErrInvalidCapability error = errors.New("invalid capability", errors.ErrorType_UNAUTHORIZED) ================================================ FILE: x/acp/capability/manager.go ================================================ package capability import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/sourcenetwork/raccoondb/v2/utils" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // Overall this would work and is a nice abstraction wrt to the capability name, // however it's not great because this wrapper essentially requires that acp // code has access to an external module's capability keeper - // consequently any capability that acp knows the name of - // which callers may not like. // NewPolicyCapabilityManager returns a PolicyCapabilityManager scoped to the calling module. // // Requires a scoped capability keeper, which authenticates the caller and limits // the capabilities they have access to. func NewPolicyCapabilityManager(keeper *capabilitykeeper.ScopedKeeper) *PolicyCapabilityManager { return &PolicyCapabilityManager{ scopedKeeper: keeper, } } // PolicyCapabilityManager models a manager for PolicyCapabilities. // // The manager provides methods to claim and fetch capabilities returned by the acp keeper. type PolicyCapabilityManager struct { scopedKeeper *capabilitykeeper.ScopedKeeper } // Fetch looks up a PolicyCapability based on a policyId. // This capability will be an exact replica of the capability returned by the acp keeper, // upon policy registration. // // The capability will only be returned if it was previously registered with `Claim`. func (m *PolicyCapabilityManager) Fetch(ctx sdk.Context, policyId string) (*PolicyCapability, error) { cap := &PolicyCapability{ policyId: policyId, } sdkCap, ok := m.scopedKeeper.GetCapability(ctx, cap.GetCapabilityName()) if !ok { return nil, fmt.Errorf("fetching capability for policy %v", policyId) } cap.capability = sdkCap return cap, nil } // Claim registers the current module as one of the owners of capability. // Callers which have received a capability are responsible for Claiming it. // // The registration is bound to the module's scoped capability keeper, // which binds the capability to the caller module. // // This step is necessary in order to retrieve the capability in the future. func (m *PolicyCapabilityManager) Claim(ctx sdk.Context, capability *PolicyCapability) error { return m.scopedKeeper.ClaimCapability(ctx, capability.capability, capability.GetCapabilityName()) } // Issue creates a new PolicyCapability from a policyId. // The created capability is bound to the calling module's name. func (m *PolicyCapabilityManager) Issue(ctx sdk.Context, policyId string) (*PolicyCapability, error) { polCap := &PolicyCapability{ policyId: policyId, } cap, err := m.scopedKeeper.NewCapability(ctx, polCap.GetCapabilityName()) if err != nil { return nil, err } polCap.capability = cap return polCap, nil } // Validate verifies whether the given capability is valid. func (m *PolicyCapabilityManager) Validate(ctx sdk.Context, capability *PolicyCapability) error { ok := m.scopedKeeper.AuthenticateCapability(ctx, capability.capability, capability.GetCapabilityName()) if !ok { return errors.Wrap("authentication failed", ErrInvalidCapability) } // check if the capability is also owned by acp module. // this prevents a malicious module from creating a capability using a known policy id, // which would give the module full control over the policy. // // By verifying that a PolicyCapability is owned by the ACP module, we implicitly verify // that the Policy was created through the CreateModulePolicy call, // as opposed to the regular user flow. // // This verification depends on the invariant that the acp keeper // never claims any capability, it only issues them. ownedByAcp, err := m.isOwnedByAcpModule(ctx, capability) if err != nil { return err } if !ownedByAcp { return errors.Wrap("capability not issued by acp module", ErrInvalidCapability) } return nil } // GetOwnerModule returns the co-owner of a PolicyCapability. // ie. the module which received the capability from the ACP module and claimed it. func (m *PolicyCapabilityManager) GetOwnerModule(ctx sdk.Context, capability *PolicyCapability) (string, error) { mods, _, err := m.scopedKeeper.LookupModules(ctx, capability.GetCapabilityName()) if err != nil { return "", fmt.Errorf("looking up capability owner: %v", err) //TODO } mods = utils.FilterSlice(mods, func(name string) bool { return name != types.ModuleName }) if len(mods) == 0 { return "", errors.Wrap("capability not claimed by any module", ErrInvalidCapability) } return mods[0], nil } // isOwnedByAcpModule returns true if the acp module is an owner of the given PolicyCapability. func (m *PolicyCapabilityManager) isOwnedByAcpModule(ctx sdk.Context, capability *PolicyCapability) (bool, error) { mods, _, err := m.scopedKeeper.LookupModules(ctx, capability.GetCapabilityName()) if err != nil { return false, fmt.Errorf("looking up capability owner: %v", err) } mods = utils.FilterSlice(mods, func(name string) bool { return name != types.ModuleName }) if len(mods) == 0 { return false, nil } return true, nil } ================================================ FILE: x/acp/capability/types.go ================================================ package capability import ( capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ) // PolicyCapability models a capability which grants // irrevocable access to any command within a policy type PolicyCapability struct { policyId string capability *capabilitytypes.Capability } // GetCapabilityName returns the name of the given PolicyCapability func (c *PolicyCapability) GetCapabilityName() string { return "/acp/module_policies/" + c.policyId } // GetPolicyId returns the Id of the policy which this capability is bound to func (c *PolicyCapability) GetPolicyId() string { return c.policyId } // GetCosmosCapability returns the underlying cosmos Capability func (c *PolicyCapability) GetCosmosCapability() *capabilitytypes.Capability { return c.capability } ================================================ FILE: x/acp/client/cli/policy_cmd.go ================================================ package cli import ( "encoding/hex" "fmt" "strconv" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/gogoproto/jsonpb" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/spf13/cobra" ) type dispatcher = func(*cobra.Command, string, *types.PolicyCmd) error func CmdSetRelationship(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "set-relationship policy-id resource objectId relation [subject resource] subjectId [subjRel]", Short: "Issue a SetRelationship PolicyCmd", Long: ``, Args: cobra.MinimumNArgs(5), RunE: func(cmd *cobra.Command, args []string) (err error) { polId, polCmd, err := parseSetRelationshipArgs(args) if err != nil { return err } err = dispatcher(cmd, polId, polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } func CmdDeleteRelationship(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "delete-relationship policy-id resource objectId relation [subject resource] subjectId [subjRel]", Short: "Issues a DeleteRelationship PolicyCmd", Long: ``, Args: cobra.MinimumNArgs(5), RunE: func(cmd *cobra.Command, args []string) (err error) { polId, polCmd, err := parseDeleteRelationshipArgs(args) if err != nil { return err } err = dispatcher(cmd, polId, polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } func CmdRegisterObject(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "register-object policy-id resource objectId", Short: "Issue RegisterObject PolicyCmd", Long: ``, Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { polId, polCmd, err := parseRegisterObjectArgs(args) if err != nil { return err } err = dispatcher(cmd, polId, polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } func CmdArchiveObject(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "archive-object policy-id resource objectId", Short: "Issue ArchiveObject PolicyCmd", Long: ``, Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { polId, polCmd, err := parseArchiveObjectArgs(args) if err != nil { return err } err = dispatcher(cmd, polId, polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } func CmdRevealRegistration(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "reveal-registration commitment-id json-proof", Short: "Reveal an Object Registration for a Commitment", Long: ``, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { commitId, err := strconv.ParseUint(args[0], 10, 64) if err != nil { return fmt.Errorf("invalid commitId: %w", err) } proofJson := args[1] proof := &types.RegistrationProof{} err = jsonpb.UnmarshalString(proofJson, proof) if err != nil { return fmt.Errorf("unmarshaling proof: %v", err) } polCmd := types.NewRevealRegistrationCmd(commitId, proof) err = dispatcher(cmd, "", polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } func CmdCreateCommitment(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "create-commitment policy-id hex-commitment", Short: "Create a new Registration Commitment on SourceHub", Long: ``, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { polId := args[0] commitment, err := hex.DecodeString(args[1]) if err != nil { return fmt.Errorf("decoding commitment: %v", err) } polCmd := types.NewCommitRegistrationCmd(commitment) err = dispatcher(cmd, polId, polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } func CmdFlagHijack(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "flag-hijack policy-id event-id", Short: "Issue UnregisterObject PolicyCmd", Long: ``, Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { polId := args[0] eventId, err := strconv.ParseUint(args[1], 10, 64) if err != nil { return fmt.Errorf("invalid event id: %w", err) } polCmd := types.NewFlagHijackAttemptCmd(eventId) err = dispatcher(cmd, polId, polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } func CmdUnarchiveObject(dispatcher dispatcher) *cobra.Command { cmd := &cobra.Command{ Use: "unarchive-object policy-id resource objectId", Short: "Issue UnarchiveObject PolicyCmd", Long: ``, Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { polId := args[0] obj := coretypes.NewObject(args[1], args[2]) polCmd := types.NewUnarchiveObjectCmd(obj) err = dispatcher(cmd, polId, polCmd) if err != nil { return err } return nil }, } flags.AddTxFlagsToCmd(cmd) return cmd } // parseSetRelationshipArgs parses a SetRelationship from cli args // format: policy-id resource objectId relation [subject resource] subjectId [subjRel] func parseSetRelationshipArgs(args []string) (string, *types.PolicyCmd, error) { polId := args[0] resource := args[1] objId := args[2] relation := args[3] var relationship *coretypes.Relationship if len(args) == 5 { subjectId := args[4] relationship = coretypes.NewActorRelationship(resource, objId, relation, subjectId) } else if len(args) == 6 { subjResource := args[4] subjectId := args[5] relationship = coretypes.NewRelationship(resource, objId, relation, subjResource, subjectId) } else if len(args) == 7 { subjResource := args[4] subjectId := args[5] subjRel := args[6] relationship = coretypes.NewActorSetRelationship(resource, objId, relation, subjResource, subjectId, subjRel) } else { return "", nil, fmt.Errorf("invalid number of arguments: Set Relationship expects [5,7] cli args") } cmd := types.NewSetRelationshipCmd(relationship) return polId, cmd, nil } // parseDeleteRelationshipArgs parses a DeleteRelationship from cli args // format: policy-id resource objectId relation [subject resource] subjectId [subjRel] func parseDeleteRelationshipArgs(args []string) (string, *types.PolicyCmd, error) { polId := args[0] resource := args[1] objId := args[2] relation := args[3] var relationship *coretypes.Relationship if len(args) == 5 { subjectId := args[4] relationship = coretypes.NewActorRelationship(resource, objId, relation, subjectId) } else if len(args) == 6 { subjResource := args[4] subjectId := args[5] relationship = coretypes.NewRelationship(resource, objId, relation, subjResource, subjectId) } else if len(args) == 7 { subjResource := args[4] subjectId := args[5] subjRel := args[6] relationship = coretypes.NewActorSetRelationship(resource, objId, relation, subjResource, subjectId, subjRel) } else { return "", nil, fmt.Errorf("invalid number of arguments: Delete Relationship expects [5,7] cli args") } cmd := types.NewDeleteRelationshipCmd(relationship) return polId, cmd, nil } // parseRegisterObjectArgs parses a RegisterObject from cli args // format: policy-id resource objectId func parseRegisterObjectArgs(args []string) (string, *types.PolicyCmd, error) { if len(args) != 3 { return "", nil, fmt.Errorf("RegisterObject: invalid number of arguments: policy-id resource objectId") } polId := args[0] resource := args[1] objId := args[2] return polId, types.NewRegisterObjectCmd(coretypes.NewObject(resource, objId)), nil } func parseArchiveObjectArgs(args []string) (string, *types.PolicyCmd, error) { if len(args) != 3 { return "", nil, fmt.Errorf("ArchiveObject: invalid number of arguments: policy-id resource objectId") } polId := args[0] resource := args[1] objId := args[2] return polId, types.NewArchiveObjectCmd(coretypes.NewObject(resource, objId)), nil } ================================================ FILE: x/acp/client/cli/query.go ================================================ package cli import ( "fmt" // "strings" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" // "github.com/cosmos/cosmos-sdk/client/flags" // sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // GetQueryCmd returns the cli query commands for this module func GetQueryCmd(queryRoute string) *cobra.Command { // Group acp queries under a subcommand cmd := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } cmd.AddCommand(CmdQueryFilterRelationships()) cmd.AddCommand(CmdQueryVerifyAccessRequest()) cmd.AddCommand(CmdQueryOjectOwner()) cmd.AddCommand(CmdQueryGenerateCommitment()) // this line is used by starport scaffolding # 1 return cmd } ================================================ FILE: x/acp/client/cli/query_filter_relationships.go ================================================ package cli import ( "strings" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func CmdQueryFilterRelationships() *cobra.Command { cmd := &cobra.Command{ Use: "filter-relationships [policy-id] [object] [relation] [subject]", Short: "Filters through relationships in a policy", Long: `Filters thourgh all relationships in a Policy. Performs a lookup using the object, relation and subject filters. Uses a mini grammar as describe: object := resource:id | * relation := name | * subject := id | * Returns`, Args: cobra.ExactArgs(4), Aliases: []string{"relationships"}, RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err } polId := args[0] object := args[1] relation := args[2] subject := args[3] queryClient := types.NewQueryClient(clientCtx) req := types.QueryFilterRelationshipsRequest{ PolicyId: polId, Selector: buildSelector(object, relation, subject), } res, err := queryClient.FilterRelationships(cmd.Context(), &req) if err != nil { return err } return clientCtx.PrintProto(res) }, } flags.AddQueryFlagsToCmd(cmd) return cmd } func buildSelector(object, relation, subject string) *coretypes.RelationshipSelector { objSelector := &coretypes.ObjectSelector{} relSelector := &coretypes.RelationSelector{} subjSelector := &coretypes.SubjectSelector{} if object == "*" { objSelector.Selector = &coretypes.ObjectSelector_Wildcard{ Wildcard: &coretypes.WildcardSelector{}, } } else { res, id, _ := strings.Cut(object, ":") objSelector.Selector = &coretypes.ObjectSelector_Object{ Object: &coretypes.Object{ Resource: res, Id: id, }, } } if relation == "*" { relSelector.Selector = &coretypes.RelationSelector_Wildcard{ Wildcard: &coretypes.WildcardSelector{}, } } else { relSelector.Selector = &coretypes.RelationSelector_Relation{ Relation: relation, } } if subject == "*" { subjSelector.Selector = &coretypes.SubjectSelector_Wildcard{ Wildcard: &coretypes.WildcardSelector{}, } } else { subjSelector.Selector = &coretypes.SubjectSelector_Subject{ Subject: &coretypes.Subject{ Subject: &coretypes.Subject_Actor{ Actor: &coretypes.Actor{ Id: subject, }, }, }, } } return &coretypes.RelationshipSelector{ ObjectSelector: objSelector, RelationSelector: relSelector, SubjectSelector: subjSelector, } } ================================================ FILE: x/acp/client/cli/query_generate_commitment.go ================================================ package cli import ( "strings" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/spf13/cobra" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func CmdQueryGenerateCommitment() *cobra.Command { cmd := &cobra.Command{ Use: "generate-commitment policyId actorId [resource:object]+", Short: "Generates a hex encoded commitment for the given objects", Long: ` `, Args: cobra.MinimumNArgs(3), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err } policyId := args[0] actorId := args[1] var objs []*coretypes.Object for _, operationStr := range args[2:] { resource, object, _ := strings.Cut(operationStr, ":") obj := coretypes.NewObject(resource, object) objs = append(objs, obj) } queryClient := acptypes.NewQueryClient(clientCtx) req := acptypes.QueryGenerateCommitmentRequest{ PolicyId: policyId, Objects: objs, Actor: coretypes.NewActor(actorId), } resp, err := queryClient.GenerateCommitment(cmd.Context(), &req) if err != nil { return err } return clientCtx.PrintProto(resp) }, } flags.AddQueryFlagsToCmd(cmd) return cmd } ================================================ FILE: x/acp/client/cli/query_object_owner.go ================================================ package cli import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func CmdQueryOjectOwner() *cobra.Command { cmd := &cobra.Command{ Use: "object-owner [policy-id] [resource] [object-id]", Short: "Queries an object for its owner", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { polId := args[0] resource := args[1] objId := args[2] clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err } queryClient := types.NewQueryClient(clientCtx) req := types.QueryObjectOwnerRequest{ PolicyId: polId, Object: coretypes.NewObject(resource, objId), } res, err := queryClient.ObjectOwner(cmd.Context(), &req) if err != nil { return err } return clientCtx.PrintProto(res) }, } flags.AddQueryFlagsToCmd(cmd) return cmd } ================================================ FILE: x/acp/client/cli/query_verify_access_request.go ================================================ package cli import ( "strings" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/spf13/cobra" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" ) func CmdQueryVerifyAccessRequest() *cobra.Command { cmd := &cobra.Command{ Use: "verify-access-request [policyId] [actor] {resource:object#relation}", Short: "Verifies an access request against a policy and its relationships", Long: ` Builds an AccessRequest for from policyId, actor and the set of Operations (ie. object, relation pairs). The AccessRequest is evaluated and returns true iff all Operations were authorized by the authorization engine. `, Args: cobra.MinimumNArgs(3), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err } policyId := args[0] actorId := args[1] var operations []*coretypes.Operation for _, operationStr := range args[2:] { resource, operationStr, _ := strings.Cut(operationStr, ":") objId, relation, _ := strings.Cut(operationStr, "#") operation := &coretypes.Operation{ Object: coretypes.NewObject(resource, objId), Permission: relation, } operations = append(operations, operation) } queryClient := acptypes.NewQueryClient(clientCtx) req := acptypes.QueryVerifyAccessRequestRequest{ PolicyId: policyId, AccessRequest: &coretypes.AccessRequest{ Operations: operations, Actor: &coretypes.Actor{Id: actorId}, }, } resp, err := queryClient.VerifyAccessRequest(cmd.Context(), &req) if err != nil { return err } return clientCtx.PrintProto(resp) }, } flags.AddQueryFlagsToCmd(cmd) return cmd } ================================================ FILE: x/acp/client/cli/tx.go ================================================ package cli import ( "fmt" "time" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" // "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var ( DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) ) const ( flagPacketTimeoutTimestamp = "packet-timeout-timestamp" listSeparator = "," ) // GetTxCmd returns the transaction commands for this module func GetTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } cmd.AddCommand(CmdCreatePolicy()) cmd.AddCommand(CmdEditPolicy()) cmd.AddCommand(CmdCheckAccess()) cmd.AddCommand(CmdBearerPolicyCmd()) cmd.AddCommand(CmdDirectPolicyCmd()) cmd.AddCommand(CmdSignedPolicyCmd()) // this line is used by starport scaffolding # 1 return cmd } ================================================ FILE: x/acp/client/cli/tx_bearer_policy_cmd.go ================================================ package cli import ( "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ = strconv.Itoa(0) const BearerFlag = "bearer-token" func bearerDispatcher(cmd *cobra.Command, polId string, polCmd *types.PolicyCmd) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } flag := cmd.Flag(BearerFlag) token := flag.Value.String() creator := clientCtx.GetFromAddress().String() msg := types.NewMsgBearerPolicyCmd(creator, token, polId, polCmd) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) } func CmdBearerPolicyCmd() *cobra.Command { cmd := &cobra.Command{ Use: "bearer-policy-cmd", Short: "Broadcast a BearerPolicyCommand msg", } flags := cmd.PersistentFlags() flags.String(BearerFlag, "", "specifies the bearer token to be broadcast with the command") cmd.AddCommand(CmdRegisterObject(bearerDispatcher)) cmd.AddCommand(CmdArchiveObject(bearerDispatcher)) cmd.AddCommand(CmdSetRelationship(bearerDispatcher)) cmd.AddCommand(CmdDeleteRelationship(bearerDispatcher)) cmd.AddCommand(CmdCreateCommitment(bearerDispatcher)) cmd.AddCommand(CmdRevealRegistration(bearerDispatcher)) cmd.AddCommand(CmdFlagHijack(bearerDispatcher)) cmd.AddCommand(CmdUnarchiveObject(bearerDispatcher)) return cmd } ================================================ FILE: x/acp/client/cli/tx_check_access.go ================================================ package cli import ( "strconv" "strings" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ = strconv.Itoa(0) func CmdCheckAccess() *cobra.Command { cmd := &cobra.Command{ Use: "check-access [policy-id] [subject] {resource:objId#permission}", Short: "Broadcast message CheckAccess", Args: cobra.MinimumNArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { policyId := args[0] subject := args[1] var operations []*coretypes.Operation for _, operationStr := range args[2:] { resource, operationStr, _ := strings.Cut(operationStr, ":") objId, relation, _ := strings.Cut(operationStr, "#") operation := &coretypes.Operation{ Object: coretypes.NewObject(resource, objId), Permission: relation, } operations = append(operations, operation) } accessRequest := &coretypes.AccessRequest{ Operations: operations, Actor: &coretypes.Actor{ Id: subject, }, } clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } msg := &types.MsgCheckAccess{ Creator: clientCtx.GetFromAddress().String(), PolicyId: policyId, AccessRequest: accessRequest, } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } flags.AddTxFlagsToCmd(cmd) return cmd } ================================================ FILE: x/acp/client/cli/tx_create_policy.go ================================================ package cli import ( "fmt" "io" "os" "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ = strconv.Itoa(0) func CmdCreatePolicy() *cobra.Command { cmd := &cobra.Command{ Use: "create-policy [marshaling_type] {policy_file | -}", Short: "Broadcast message CreatePolicy", Long: ` Broadcast message CreatePolicy. marshaling_type specifies the marshaling format for the policy. Defaults to SHORT_YAML. See PolicyMarshalingType for accepted values. policy_file specifies a file whose contents is the policy. - to read from stdin. Note: if reading from stdin make sure flag --yes is set.`, Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { var policyFile string var marshalingType coretypes.PolicyMarshalingType if len(args) == 2 { marshalingType = coretypes.PolicyMarshalingType_UNKNOWN policyFile = args[1] marshalingTypeCode, ok := coretypes.PolicyMarshalingType_value[args[0]] if ok { marshalingType = coretypes.PolicyMarshalingType(marshalingTypeCode) } } else { policyFile = args[0] marshalingType = coretypes.PolicyMarshalingType_YAML } var file io.Reader if policyFile != "-" { sysFile, err := os.Open(policyFile) if err != nil { return fmt.Errorf("could not open policy file: %w", err) } defer sysFile.Close() file = sysFile } else { file = os.Stdin } policy, err := io.ReadAll(file) if err != nil { return fmt.Errorf("could not read policy file: %w", err) } clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } msg := &types.MsgCreatePolicy{ Creator: clientCtx.GetFromAddress().String(), Policy: string(policy), MarshalType: marshalingType, } if err := msg.ValidateBasic(); err != nil { return err } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } flags.AddTxFlagsToCmd(cmd) return cmd } ================================================ FILE: x/acp/client/cli/tx_direct_policy_cmd.go ================================================ package cli import ( "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ = strconv.Itoa(0) func directDispatcher(cmd *cobra.Command, polId string, polCmd *types.PolicyCmd) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } creator := clientCtx.GetFromAddress().String() msg := types.NewMsgDirectPolicyCmd(creator, polId, polCmd) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) } func CmdDirectPolicyCmd() *cobra.Command { cmd := &cobra.Command{ Use: "direct-policy-cmd", Short: "Broadcast a DirectPolicyCommand msg", } cmd.AddCommand(CmdRegisterObject(directDispatcher)) cmd.AddCommand(CmdArchiveObject(directDispatcher)) cmd.AddCommand(CmdSetRelationship(directDispatcher)) cmd.AddCommand(CmdDeleteRelationship(directDispatcher)) cmd.AddCommand(CmdCreateCommitment(directDispatcher)) cmd.AddCommand(CmdRevealRegistration(directDispatcher)) cmd.AddCommand(CmdFlagHijack(directDispatcher)) cmd.AddCommand(CmdUnarchiveObject(directDispatcher)) return cmd } ================================================ FILE: x/acp/client/cli/tx_edit_policy.go ================================================ package cli import ( "fmt" "io" "os" "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ = strconv.Itoa(0) func CmdEditPolicy() *cobra.Command { cmd := &cobra.Command{ Use: "edit-policy policy_id {policy_file | -}", Short: "Broadcast message EditPolicy", Long: ` Broadcast message EditPolicy. policy_id is the id of the policy that is going to be edited. policy_file specifies a file whose contents is the policy. - to read from stdin. Note: if reading from stdin make sure flag --yes is set.`, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { policyId := args[0] policyFile := args[1] var file io.Reader if policyFile != "-" { sysFile, err := os.Open(policyFile) if err != nil { return fmt.Errorf("could not open policy file: %w", err) } defer sysFile.Close() file = sysFile } else { file = os.Stdin } policy, err := io.ReadAll(file) if err != nil { return fmt.Errorf("could not read policy file: %w", err) } clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } msg := &types.MsgEditPolicy{ Creator: clientCtx.GetFromAddress().String(), Policy: string(policy), PolicyId: policyId, MarshalType: coretypes.PolicyMarshalingType_YAML, } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } flags.AddTxFlagsToCmd(cmd) return cmd } ================================================ FILE: x/acp/client/cli/tx_signed_policy_cmd.go ================================================ package cli import ( "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ = strconv.Itoa(0) func CmdSignedPolicyCmd() *cobra.Command { cmd := &cobra.Command{ Use: "signed-policy-cmd jws-payload", Short: "Broadcast a SignedPolicyCmd msg from a JWS", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } creator := clientCtx.GetFromAddress().String() msg := types.NewMsgSignedPolicyCmdFromJWS(creator, args[0]) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } flags.AddTxFlagsToCmd(cmd) return cmd } ================================================ FILE: x/acp/commitment/commitment.go ================================================ package commitment import ( "crypto/sha256" "slices" "github.com/tendermint/tendermint/crypto/merkle" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/acp_core/pkg/utils" "github.com/sourcenetwork/sourcehub/x/acp/types" ) const leafPrefix byte = 0x00 const nodePrefix byte = 0x01 // VerifyProof consumes a root hash of a merkle tree, policy id, actor and an opening proof // and verify whether the proof is a valid merkle tree proof. // // Returns true if the proof is valid, false if it's not or an error if the opening is malformed func VerifyProof(root []byte, policyId string, actor *coretypes.Actor, opening *types.RegistrationProof) (bool, error) { if actor == nil || actor.Id == "" { return false, errors.Wrap("invalid actor", errors.ErrorType_BAD_INPUT) } if len(root) != sha256.Size { return false, errors.Wrap("invalid root commitment", errors.ErrorType_BAD_INPUT) } if opening == nil || opening.Object == nil || opening.Object.Id == "" || opening.Object.Resource == "" { return false, errors.Wrap("invalid opening", errors.ErrorType_BAD_INPUT) } proof := merkle.Proof{ Total: int64(opening.LeafCount), Index: int64(opening.LeafIndex), LeafHash: produceLeafHash(policyId, actor, opening.Object), Aunts: opening.MerkleProof, } err := proof.Verify(root, GenerateLeafValue(policyId, actor, opening.Object)) if err != nil { return false, nil } return true, nil } // GenerateCommitmentWithoutValidation generates a byte commitment (merkle root) of the given // set of objects. // It does not verify whether the given objects are registered or valid against the given policy. func GenerateCommitmentWithoutValidation(policyId string, actor *coretypes.Actor, objs []*coretypes.Object) ([]byte, error) { t, err := NewObjectCommitmentTree(policyId, actor, objs) if err != nil { return nil, err } return t.GetCommitment(), nil } // ProofForObject generated an opening Proof for the given objects, actor and policy id func ProofForObject(policyId string, actor *coretypes.Actor, idx int, objs []*coretypes.Object) (*types.RegistrationProof, error) { t, err := NewObjectCommitmentTree(policyId, actor, objs) if err != nil { return nil, err } return t.GetProofForIdx(idx) } // GenerateLeafValue produces a byte slice representing an individual object registration // which will be committed to. // // The leaf value is the concatenation of PolicyId, object resource, object id and actor Id func GenerateLeafValue(policyId string, actor *coretypes.Actor, o *coretypes.Object) []byte { return []byte(policyId + o.Resource + o.Id + actor.Id) } // produceLeafHash hashes a Merkle Tree leaf as per RFC 6962 // https://www.rfc-editor.org/rfc/rfc6962#section-2.1 func produceLeafHash(policyId string, actor *coretypes.Actor, o *coretypes.Object) []byte { merkleVal := GenerateLeafValue(policyId, actor, o) hasher := sha256.New() hasher.Write([]byte{leafPrefix}) hasher.Write(merkleVal) return hasher.Sum(nil) } // NewObjectCommitmentTree returns a RegistrationCommitmentTree for the given objects func NewObjectCommitmentTree(policyId string, actor *coretypes.Actor, objs []*coretypes.Object) (*RegistrationCommitmentTree, error) { if len(objs) == 0 { return nil, errors.Wrap("cannot generate commitment to empty object set", errors.ErrorType_BAD_INPUT) } tree := &RegistrationCommitmentTree{ policyId: policyId, actor: actor, objs: objs, } tree.genCommitment() return tree, nil } // RegistrationCommitmentTree is a helper to generate openings and roots for a set of objects type RegistrationCommitmentTree struct { policyId string actor *coretypes.Actor objs []*coretypes.Object commitment []byte leaves [][]byte } // genCommitment computes the merkle root func (t *RegistrationCommitmentTree) genCommitment() { t.leaves = utils.MapSlice(t.objs, func(o *coretypes.Object) []byte { return GenerateLeafValue(t.policyId, t.actor, o) }) t.commitment = merkle.HashFromByteSlices(t.leaves) } // GetCommitment returns the merkle tree for the tree func (t *RegistrationCommitmentTree) GetCommitment() []byte { return t.commitment } // GetProofForObject returns an opening proof for the given object // If the object was not included in the tree, errors func (t *RegistrationCommitmentTree) GetProofForObj(obj *coretypes.Object) (*types.RegistrationProof, error) { idx, err := t.findIdx(obj) if err != nil { return nil, err } return t.proofForIdx(idx) } // GetProofForIdx returns an opening proof for the i-th object func (t *RegistrationCommitmentTree) GetProofForIdx(i int) (*types.RegistrationProof, error) { return t.proofForIdx(i) } // proofForIdx returns the RegistrationProof for object at idx func (t *RegistrationCommitmentTree) proofForIdx(idx int) (*types.RegistrationProof, error) { if idx >= len(t.objs) || idx < 0 { return nil, errors.Wrap("index out of bounds:", errors.ErrorType_BAD_INPUT) } _, proofs := merkle.ProofsFromByteSlices(t.leaves) return &types.RegistrationProof{ MerkleProof: proofs[idx].Aunts, Object: t.objs[idx], LeafCount: uint64(len(t.objs)), LeafIndex: uint64(idx), }, nil } // findIdx looks up the idx of obj in the current tree func (t *RegistrationCommitmentTree) findIdx(obj *coretypes.Object) (int, error) { i := slices.IndexFunc(t.objs, func(o *coretypes.Object) bool { return objEq(obj, o) }) if i == -1 { return 0, errors.Wrap("proof does not contain object", errors.ErrorType_BAD_INPUT) } return i, nil } func objEq(a, b *coretypes.Object) bool { return a.Id == b.Id && a.Resource == b.Resource } ================================================ FILE: x/acp/commitment/commitment_test.go ================================================ package commitment import ( "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" ) const testPolicyID = "095d86e559a22cef11c7aa7240560b9fd3acf8657fc3743fb16c271a854171e3" // testCorrectness is a minimal test case which given setup data, // asserts that generating a commitment, a proof for an object within it // and finally verifying the proof is a valid operation. func testCorrectness(t *testing.T, policyId string, idx int, objs []*coretypes.Object, actor *coretypes.Actor) { commitment, err := GenerateCommitmentWithoutValidation(policyId, actor, objs) require.NoError(t, err) proof, err := ProofForObject(policyId, actor, idx, objs) require.NoError(t, err) ok, err := VerifyProof(commitment, policyId, actor, proof) require.NoError(t, err) require.True(t, ok) } func TestCommitmentEvenObjects(t *testing.T) { actor := coretypes.NewActor("did:example:bob") objs := []*coretypes.Object{ coretypes.NewObject("file", "foo"), coretypes.NewObject("file", "tester"), } for idx, obj := range objs { t.Run(obj.String(), func(t *testing.T) { testCorrectness(t, testPolicyID, idx, objs, actor) }) } } func TestCommitmentOddObjects(t *testing.T) { actor := coretypes.NewActor("did:example:bob") objs := []*coretypes.Object{ coretypes.NewObject("file", "bar"), coretypes.NewObject("file", "deez"), coretypes.NewObject("file", "zaz"), } for idx, obj := range objs { t.Run(obj.String(), func(t *testing.T) { testCorrectness(t, testPolicyID, idx, objs, actor) }) } } func TestCommitmentSingleObject(t *testing.T) { actor := coretypes.NewActor("did:example:bob") objs := []*coretypes.Object{ coretypes.NewObject("file", "foo"), } testCorrectness(t, testPolicyID, 0, objs, actor) } ================================================ FILE: x/acp/commitment/constants.go ================================================ package commitment // commitmentBytes is a Sha256 Hash, meaning we expect 32 bytes const commitmentBytes int = 32 ================================================ FILE: x/acp/commitment/errors.go ================================================ package commitment import ( "fmt" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func errInvalidCommitment(policy string, commitment []byte) error { return types.New(fmt.Sprintf("invalid commitment size : got %v, want %v bytes", len(commitment), commitmentBytes), types.ErrorType_BAD_INPUT, errors.Pair("policy", policy)) } ================================================ FILE: x/acp/commitment/repository.go ================================================ package commitment import ( "context" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/sourcenetwork/raccoondb/v2/iterator" "github.com/sourcenetwork/raccoondb/v2/marshal" "github.com/sourcenetwork/raccoondb/v2/store" "github.com/sourcenetwork/raccoondb/v2/table" rctypes "github.com/sourcenetwork/raccoondb/v2/types" "github.com/sourcenetwork/sourcehub/x/acp/stores" "github.com/sourcenetwork/sourcehub/x/acp/types" ) const commitmentObjsPrefix = "/objs" const commitmentCounterPrefix = "/counter" // NewCommitmentRepository returns a CommitmentRepository from a kv func NewCommitmentRepository(kv store.KVStore) (*CommitmentRepository, error) { marshaler := stores.NewGogoProtoMarshaler(func() *types.RegistrationsCommitment { return &types.RegistrationsCommitment{} }) t := table.NewTable(kv, marshaler) tsExtractor := func(rec **types.RegistrationsCommitment) bool { return (*rec).Expired } expiredIdx, err := table.NewIndex(t, "expired", tsExtractor, marshal.BoolMarshaler{}) if err != nil { return nil, err } commExtractor := func(rec **types.RegistrationsCommitment) []byte { return (*rec).Commitment } commIdx, err := table.NewIndex(t, "commitment", commExtractor, marshal.BytesMarshaler{}) if err != nil { return nil, err } getter := func(rec **types.RegistrationsCommitment) uint64 { return (*rec).Id } setter := func(rec **types.RegistrationsCommitment, id uint64) { (*rec).Id = id } incrementer := table.NewAutoIncrementer(t, getter, setter) return &CommitmentRepository{ table: t, incrementer: incrementer, commIndex: commIdx, expiredIdx: expiredIdx, }, nil } // CommitmentRepository exposes an interface to manipulate RegistrationsCommitment records type CommitmentRepository struct { table *table.Table[*types.RegistrationsCommitment] incrementer *table.Autoincrementer[*types.RegistrationsCommitment] commIndex table.IndexReader[*types.RegistrationsCommitment, []byte] expiredIdx table.IndexReader[*types.RegistrationsCommitment, bool] } func (r *CommitmentRepository) wrapErr(err error) error { if err == nil { return err } return errors.NewWithCause("commitment repository", err, errors.ErrorType_INTERNAL) } // update stores the updated RegistrationCommitment record func (r *CommitmentRepository) update(ctx context.Context, reg *types.RegistrationsCommitment) error { err := r.incrementer.Update(ctx, ®) return r.wrapErr(err) } // create sets a new RegistrationCommitment using the next free up id. // Sets reg.Id with the effective record Id used. func (r *CommitmentRepository) create(ctx context.Context, reg *types.RegistrationsCommitment) error { err := r.incrementer.Insert(ctx, ®) return r.wrapErr(err) } // GetById returns a RegistrationCommitment with the given id func (r *CommitmentRepository) GetById(ctx context.Context, id uint64) (rctypes.Option[*types.RegistrationsCommitment], error) { comm := &types.RegistrationsCommitment{Id: id} opt, err := r.incrementer.GetByRecordID(ctx, &comm) if err != nil { return rctypes.None[*types.RegistrationsCommitment](), r.wrapErr(err) } return opt, nil } // FilterByCommitment returns all RegistrationCommitment records with the given commitment func (r *CommitmentRepository) FilterByCommitment(ctx context.Context, commitment []byte) (iterator.Iterator[*types.RegistrationsCommitment], error) { keyIter, err := r.commIndex.IterateKeys(ctx, &commitment, store.NewOpenIterator()) if err != nil { return nil, err } iter := table.MaterializeObjects(ctx, r.table, keyIter) return iter, nil } // GetNonExpiredCommitments returns all commitments whose expiration flag is false func (r *CommitmentRepository) GetNonExpiredCommitments(ctx context.Context) (iterator.Iterator[*types.RegistrationsCommitment], error) { bkt := false keyIter, err := r.expiredIdx.IterateKeys(ctx, &bkt, store.NewOpenIterator()) if err != nil { return nil, err } iter := table.MaterializeObjects(ctx, r.table, keyIter) return iter, nil } ================================================ FILE: x/acp/commitment/service.go ================================================ package commitment import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func NewCommitmentService(engine coretypes.ACPEngineServer, repository *CommitmentRepository) *CommitmentService { return &CommitmentService{ engine: engine, repository: repository, } } // CommitmentService abstracts registration commitment operations type CommitmentService struct { engine coretypes.ACPEngineServer repository *CommitmentRepository } // BuildCommitment produces a byte commitment for actor and objects. // The commitment is guaranteed to be valid, as we verify that no object has been registered yet. func (s *CommitmentService) BuildCommitment(ctx sdk.Context, policyId string, actor *coretypes.Actor, objects []*coretypes.Object) ([]byte, error) { rec, err := s.engine.GetPolicy(ctx, &coretypes.GetPolicyRequest{ Id: policyId, }) if err != nil { return nil, err } if rec == nil { return nil, errors.ErrPolicyNotFound(policyId) } for _, obj := range objects { status, err := s.engine.GetObjectRegistration(ctx, &coretypes.GetObjectRegistrationRequest{ PolicyId: policyId, Object: obj, }) if err != nil { return nil, err } if status.IsRegistered { return nil, errors.Wrap("object already registered", errors.ErrorType_BAD_INPUT, errors.Pair("policy", policyId), errors.Pair("resource", obj.Resource), errors.Pair("object", obj.Id), ) } } return GenerateCommitmentWithoutValidation(policyId, actor, objects) } // FlagExpiredCommitments iterates over stored commitments, // filters for expired commitments wrt the current block time, // flags them as expired and returns the newly expired commitments func (s *CommitmentService) FlagExpiredCommitments(ctx sdk.Context) ([]*types.RegistrationsCommitment, error) { now, err := types.TimestampFromCtx(ctx) if err != nil { return nil, err } iter, err := s.repository.GetNonExpiredCommitments(ctx) if err != nil { return nil, err } defer iter.Close() var processed []*types.RegistrationsCommitment for !iter.Finished() { commitment, err := iter.Value() if err != nil { return nil, err } expired, err := commitment.IsExpiredAgainst(now) if err != nil { return nil, err } if expired { commitment.Expired = true processed = append(processed, commitment) } err = iter.Next(ctx) if err != nil { return nil, err } } for _, commitment := range processed { err := s.repository.update(ctx, commitment) if err != nil { return nil, errors.Wrap("expiring commitment", err, errors.Pair("commitment", fmt.Sprintf("%v", commitment.Id))) } } return processed, nil } // SetNewCommitment sets a new RegistrationCommitment func (s *CommitmentService) SetNewCommitment(ctx sdk.Context, policyId string, commitment []byte, actor *coretypes.Actor, params *types.Params, msgCreator string) (*types.RegistrationsCommitment, error) { rec, err := s.engine.GetPolicy(ctx, &coretypes.GetPolicyRequest{ Id: policyId, }) if err != nil { return nil, err } if rec == nil { return nil, errors.ErrPolicyNotFound(policyId) } if len(commitment) != commitmentBytes { return nil, errInvalidCommitment(policyId, commitment) } metadata, err := types.BuildRecordMetadata(ctx, actor.Id, msgCreator) if err != nil { return nil, err } registration := &types.RegistrationsCommitment{ Id: 0, // doesn't matter since it will be auto-generated PolicyId: policyId, Commitment: commitment, Expired: false, Validity: params.RegistrationsCommitmentValidity, Metadata: metadata, } err = s.repository.create(ctx, registration) if err != nil { return nil, err } return registration, nil } // ValidateOpening verifies whether the given opening proof is valid for the authenticated actor and // the objects // returns true if opening is valid func (s *CommitmentService) ValidateOpening(ctx sdk.Context, commitmentId uint64, proof *types.RegistrationProof, actor *coretypes.Actor) (*types.RegistrationsCommitment, bool, error) { opt, err := s.repository.GetById(ctx, commitmentId) if err != nil { return nil, false, err } if opt.Empty() { return nil, false, errors.Wrap("RegistrationsCommitment", errors.ErrorType_NOT_FOUND, errors.Pair("id", fmt.Sprintf("%v", commitmentId))) } commitment := opt.GetValue() now, err := types.TimestampFromCtx(ctx) if err != nil { return commitment, false, errors.NewWithCause("failed determining current timestamp", err, errors.ErrorType_INTERNAL) } after, err := commitment.Metadata.CreationTs.IsAfter(commitment.Validity, now) if err != nil { return commitment, false, errors.NewWithCause("invalid timestamp format", err, errors.ErrorType_INTERNAL) } if after { return commitment, false, errors.Wrap("commitment expired", errors.ErrorType_OPERATION_FORBIDDEN, errors.Pair("commitment", fmt.Sprintf("%v", commitmentId))) } ok, err := VerifyProof(commitment.Commitment, commitment.PolicyId, actor, proof) if err != nil { return commitment, false, errors.Wrap("invalid registration opening", err) } return commitment, ok, nil } ================================================ FILE: x/acp/did/did.go ================================================ package did import ( stdcrypto "crypto" "crypto/ed25519" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" ) func ProduceDID() (string, stdcrypto.Signer, error) { pkey, skey, err := ed25519.GenerateKey(nil) if err != nil { return "", nil, err } keyType := crypto.Ed25519 did, err := key.CreateDIDKey(keyType, []byte(pkey)) if err != nil { return "", nil, err } return did.String(), skey, nil } ================================================ FILE: x/acp/did/key.go ================================================ package did import ( "context" "github.com/TBD54566975/ssi-sdk/did/key" ) var _ Resolver = (*KeyResolver)(nil) type KeyResolver struct { } func (r *KeyResolver) Resolve(ctx context.Context, did string) (DIDDocument, error) { didkey := key.DIDKey(did) doc, err := didkey.Expand() if err != nil { return DIDDocument{}, err } return DIDDocument{ Document: doc, }, nil } ================================================ FILE: x/acp/did/key_test.go ================================================ package did import ( "context" "testing" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1" "github.com/stretchr/testify/require" ) func TestSECP256K1ToDIDThenResolve(t *testing.T) { priv := secp256k1.GenPrivKey() pub := priv.PubKey() did, err := DIDFromPubKey(pub) require.NoError(t, err) resolver := KeyResolver{} _, err = resolver.Resolve(context.Background(), did) require.NoError(t, err) } func TestSECP256R1ToDIDThenResolve(t *testing.T) { priv, err := secp256r1.GenPrivKey() require.NoError(t, err) pub := priv.PubKey() did, err := DIDFromPubKey(pub) require.NoError(t, err) resolver := KeyResolver{} _, err = resolver.Resolve(context.Background(), did) require.NoError(t, err) } func TestED25519ToDIDThenResolve(t *testing.T) { priv := ed25519.GenPrivKey() pub := priv.PubKey() did, err := DIDFromPubKey(pub) require.NoError(t, err) resolver := KeyResolver{} _, err = resolver.Resolve(context.Background(), did) require.NoError(t, err) } ================================================ FILE: x/acp/did/types.go ================================================ package did import ( "context" "crypto/ecdsa" "crypto/elliptic" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did" "github.com/TBD54566975/ssi-sdk/did/key" "github.com/TBD54566975/ssi-sdk/did/resolution" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) type DIDDocument struct { *did.Document } type Resolver interface { Resolve(ctx context.Context, did string) (DIDDocument, error) } // IsValidDID verifies the validity of the specified did string. func IsValidDID(didStr string) error { _, err := resolution.GetMethodForDID(didStr) if err != nil { return err } return nil } // IssueDID produces a DID for a SourceHub account. func IssueDID(acc sdk.AccountI) (string, error) { return DIDFromPubKey(acc.GetPubKey()) } // DIDFromPubKey constructs and returns a DID from a public key. func DIDFromPubKey(pk cryptotypes.PubKey) (string, error) { var keyType crypto.KeyType switch t := pk.(type) { case *secp256k1.PubKey: keyType = crypto.SECP256k1 case *secp256r1.PubKey: keyType = crypto.P256 case *ed25519.PubKey: keyType = crypto.Ed25519 default: return "", fmt.Errorf( "failed to issue did for key %v: account key type must be secp256k1, secp256r1, or ed25519, got %v", pk.Bytes(), t, ) } pkBytes := pk.Bytes() if keyType == crypto.P256 { sdkPubKey := pk.(*secp256r1.PubKey) ecdsaPubKey := &ecdsa.PublicKey{Curve: elliptic.P256(), X: sdkPubKey.Key.X, Y: sdkPubKey.Key.Y} ecdhPubKey, err := ecdsaPubKey.ECDH() if err != nil { return "", fmt.Errorf("failed to create ecdh public key: %w", err) } pkBytes = ecdhPubKey.Bytes() } did, err := key.CreateDIDKey(keyType, pkBytes) if err != nil { return "", fmt.Errorf("failed to generated did for %v: %v", pk.Bytes(), err) } return did.String(), nil } // IssueModuleDID produces a DID for a SourceHub module, based on its name. // // The issued did uses a pseudo-method named "module", which simply appends the module name. func IssueModuleDID(moduleName string) string { return "did:module:" + moduleName } // IssueInterchainAccountDID produces a DID based on the ICA account address. // // The issued did uses a pseudo-method named "ica", which appends the ICA address. func IssueInterchainAccountDID(icaAddr string) string { return "did:ica:" + icaAddr } ================================================ FILE: x/acp/docs/README.md ================================================ --- date: 2024-03-07 --- # About Docs directory contains ADRs and Design Docs for ACP module features ================================================ FILE: x/acp/docs/adr-001-polcy-cmd.md ================================================ --- date: 2024-03-07 --- This ADR registers design decisions regarding the MsgPolicyCmd transaction. MsgPolicyCmd enables the ACP module to accept Commands to a Policy from users that do not have a SourceHub account. This feature works by introducing a payload which contains the command, the actor's DID, metadata and a signature issued by the Actor. To execute the command the payload's signature is validated using the DID's `VerificationMethod` and a series of checks are performed, iff the payload is valid the ACP module extracts the command and executes it. Intro ===== This ADR registers design decisions regarding the MsgPolicyCmd transaction. MsgPolicyCmd enables the ACP module to accept Commands to a Policy from users that do not have a SourceHub account. This feature works by introducing a payload which contains the command, the actor's DID, metadata and a signature issued by the Actor. To execute the command the payload's signature is validated using the DID's `VerificationMethod` and a series of checks are performed, iff the payload is valid the ACP module extracts the command and executes it. Body ==== ## Removing the need for SourceHub accounts Prior to this message, any operation done under a Policy required the Actor to issue a Tx signed from a SourceHub account. The ACP Module messages would issue each SourceHub address a DID which would be used as the Subject for the Relationships. This system imposed a great limitation upon the identifiers a Policy was able to accept, since effectively only SourceHub accounts could be Actors under a Policy. The MsgPolicyCmd solves this problem by decoupling the Tx signer from the Msg issuer by introducing a signed payload to the system. This signed payload was designed to accept any DID Actor, so long as the DID is resolvable to a DID Document which contains some VerificationMethod / public key. A related question is why dids as opposed to an arbitrary actor registration system? DIDs were simple and convenient in that they're a self contained identifier which can be easily resolved to key material for authentication. An alternative to DIDs would be self signed certificates, however they're often quite bulky in comparasion and often times the additional data is not needed for an application. As such, this system was designed to support DIDs as first class citzens. Note that the restriction to DIDs now does not prohibits the use of arbitrary string IDs in the future. It would be possible to add a mapping layer which could take an arbitrary string and associate it to a DID. ## Signed Payload Ths signed payload is simply a data-signature pair which contains a Command for the ACP module to execute. The signature is used to guarantee integrity and authenticate the issuer at the same time. The nature of DIDs means they are resolved to a Public Key which is used to verify the signature - thus verifying integrity and authenticating all at once. The signed payload is by design a single use entity which is sent only once, from an Actor to SourceHub. Upon accepting a payload, the ACP module must not process it again, otherwise the system is vulnerable to replay attacks. See section on preventing attacks for an overview of the protection systems in place. ### Payload Fields - id: id MUST be an UUID v4 identifier to uniquely identify the payload. v4 is chosen to preserve user privacy - actor: actor MUST be a valid did string which contains a "VerificationMethod". - issued_height: issued_height acts as metadata for users indicating the SourceHub block height for which the payload was generated - expiration_height: expiration_height defines an upperbound at which the payload will be accepted. If SourceHub's current height is greater than expiration_height, the payload MUST be rejected. - command: command is an oneof field containing the command the ACP module will execute. A related question might be: why not JWT fields? There are two lines of thought to this: a desire (perhaps unjustified) to not tie the payload to JWS only and certain semantics wouldn't translate 1-1, most notably iat, nbf, exp which specifies timestamps (NumericDate) as opposed to block heights. ## Signed Payload Format and Validation The Signed Payload was designed to support multiple formats. ## JWS - ignore any field other than alg in header - only accept web encoded jws ### Security Notes TLDR: Ignore ALL JOSE headers while verifying a JWS in the ACP module. Verification MUST use the DID specificied in the `actor` field of the payload. The JOSE standard is infamous for being easily exploitable and difficult to make secure. Over the years some clever attacks have been executed, such as changing the header alg from a signature algorithm to a MAC. The issue always boiled down to trusting the JWS when it shouldn't be trusted. The payload and header are somewhat malleable, despite the signature. The current best practice is to restrict the JWS to only be validated for a set of previously configured algorithms. To further complicate matters, JWS JSON Serialization supports a "JWS Unprotected Header" option which opens yet another can of worms. With all the challenges and nuances, correctly verifying a JWS can be tricky. In the case of the ACP module there's one additional detail which must be kept in mind. The Adversary model for ACP is different than the usual Adversary for JWSs out in the wild. The common use case for JWS is to share a signed and verified payload between applications. The payload is generated by some trusted party and the verification address the question of "was this payload generated with a key I trust?". As such, most attacks such as kid trickery or changing from Sign to MAC attempts to trick the code into saying "yes, this JWS was issued with this key". The assumption is that if the JWS was verified it meant that it was issue by a trusted party and therefore the payload can be trusted. On the other hand, the ACP module does not care who issued the JWS. There is no previously known set of trusted parties that could've issued that JWS, they are all self issued / signed. The JWS serves as an authentication mechanism, proving that the issuer controls the private key matching the public key in the JWS. An ACP Adversary is playing a completely different game from regulary Adversaries, there is no challenge in making ACP accept a JWS token, any adversary can issue a valid JWS. The game the Adversary is playing is that of impersonation, an Adversary would succeed if it is able to generate a verifiable JWS (easy) which tricks the ACP module into thinking it was generated by someone else (must be hard), which is quite different from the regular case. In the regular case the Adversary doesn't care about who the Server thinks the issuer is, it just has to accept the JWS; the ACP adversary can easily make the server accept a JWS, but their challenge is trickying the server into thinking the JWS was issued by another Actor. Since the JWS header can be used to inject verification information (eg embedding a JWK, kid, x509 urls) it MUST be ignored while validating an ACP JWS, otherwise libraries or incorrect code might use the header data to verify the JWS as though it was issued by the `actor` in the payload. The JOSE Header can be exploited by the Adversary so they can win the game. ## Replay Attack Protection - expiration_height - cache id until expiration_height ## Verification Steps - extract did from payload - resolve did - extract did's verification method - verify signature using did's verification method - verify expeiration_height is less than current height - verify that id is not in cache of payloads - accept Conclusion ========== ================================================ FILE: x/acp/keeper/abci.go ================================================ package keeper import ( "context" "time" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // EndBlocker is a function which should be called after processing a proposal and before finalizing a block, // as specified by the ABCI spec. // // Currently EndBlocker iterates over valid (non-expired) RegistrationCommitments and checks whether // they are still valid, otherwise flags them as expired. func (k *Keeper) EndBlocker(goCtx context.Context) ([]*types.RegistrationsCommitment, error) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) repo := k.getRegistrationsCommitmentRepository(ctx) service := commitment.NewCommitmentService(engine, repo) commitments, err := service.FlagExpiredCommitments(ctx) if err != nil { return nil, err } return commitments, nil } ================================================ FILE: x/acp/keeper/abci_test.go ================================================ package keeper import ( "testing" "time" prototypes "github.com/cosmos/gogoproto/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/acp/utils" ) func TestEndBlocker(t *testing.T) { ctx, k, _ := setupKeeper(t) params := &types.Params{ RegistrationsCommitmentValidity: &types.Duration{ Duration: &types.Duration_ProtoDuration{ ProtoDuration: &prototypes.Duration{ Nanos: 1, }, }, }, } engine := k.getACPEngine(ctx) ctx, err := utils.InjectPrincipal(ctx, "did:example:bob") require.NoError(t, err) resp, err := engine.CreatePolicy(ctx, &coretypes.CreatePolicyRequest{ Policy: ` name: test `, MarshalType: coretypes.PolicyMarshalingType_YAML, }) require.NoError(t, err) repo := k.getRegistrationsCommitmentRepository(ctx) service := commitment.NewCommitmentService(k.getACPEngine(ctx), repo) commitment := make([]byte, 32) comm, err := service.SetNewCommitment(ctx, resp.Record.Policy.Id, commitment, coretypes.NewActor("test"), params, "source1234") require.NoError(t, err) // no expired commitments at this point expired, err := k.EndBlocker(ctx) require.NoError(t, err) require.Nil(t, expired) // set commitment to expire ctx = ctx.WithBlockTime(time.Now().Add(time.Nanosecond * 2)) // should return exactly one expired commitment expired, err = k.EndBlocker(ctx) require.NoError(t, err) require.NotNil(t, expired) require.Len(t, expired, 1) want := comm want.Expired = true require.Equal(t, want, expired[0]) } ================================================ FILE: x/acp/keeper/acp_core.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" prototypes "github.com/cosmos/gogoproto/types" "github.com/sourcenetwork/acp_core/pkg/runtime" ) var _ runtime.TimeService = (*SourceHubTimeProvider)(nil) // SourceHubTimeProvider implements acp_core's TimeService // in order to synchronize the block time with acp_core's engine time. type SourceHubTimeProvider struct{} // GetNow implements TimeService func (p *SourceHubTimeProvider) GetNow(goCtx context.Context) (*prototypes.Timestamp, error) { ctx := sdk.UnwrapSDKContext(goCtx) time := ctx.BlockTime() ts, err := prototypes.TimestampProto(time) if err != nil { return nil, err } return ts, nil } ================================================ FILE: x/acp/keeper/actor.go ================================================ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) // GetActorDID returns the actor DID for the current transaction. // It prioritizes the DID extracted from the extension option bearer token if present, // otherwise falls back to issuing a DID from the provided account address. func (k *Keeper) GetActorDID(ctx sdk.Context, accountAddr string) (string, error) { // Check if a DID was extracted from the extension option bearer token if extractedDID, ok := ctx.Value(appparams.ExtractedDIDContextKey).(string); ok && extractedDID != "" { return extractedDID, nil } // Fall back to issuing DID from account address return k.IssueDIDFromAccountAddr(ctx, accountAddr) } ================================================ FILE: x/acp/keeper/actor_test.go ================================================ package keeper import ( "testing" "github.com/stretchr/testify/require" coretypes "github.com/sourcenetwork/acp_core/pkg/types" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestGetActorDID_WithExtractedDID(t *testing.T) { ctx, k, accK := setupKeeper(t) testAddr := accK.GenAccount().GetAddress().String() extractedDID := "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" // Inject extracted DID into context ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, extractedDID) // GetActorDID should return the extracted DID actorDID, err := k.GetActorDID(ctx, testAddr) require.NoError(t, err) require.Equal(t, extractedDID, actorDID, "Should use extracted DID from context") } func TestGetActorDID_WithoutExtractedDID(t *testing.T) { ctx, k, accK := setupKeeper(t) testAddr := accK.GenAccount().GetAddress().String() // GetActorDID should issue DID from account address (no extracted DID in context) actorDID, err := k.GetActorDID(ctx, testAddr) require.NoError(t, err) require.NotEmpty(t, actorDID, "Should issue DID from account address") require.Contains(t, actorDID, "did:key:", "Should be a valid DID") } func TestGetActorDID_WithEmptyExtractedDID(t *testing.T) { ctx, k, accK := setupKeeper(t) testAddr := accK.GenAccount().GetAddress().String() ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, "") // GetActorDID should fall back to issuing DID from account address actorDID, err := k.GetActorDID(ctx, testAddr) require.NoError(t, err) require.NotEmpty(t, actorDID, "Should issue DID from account address when extracted DID is empty") require.Contains(t, actorDID, "did:key:", "Should be a valid DID") } func TestCreatePolicy_WithExtractedDID(t *testing.T) { ctx, msgServer, accK := setupMsgServer(t) // Create an account and extract DID from bearer token testAddr := accK.GenAccount().GetAddress().String() extractedDID := "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, extractedDID) // Create a policy msg := &types.MsgCreatePolicy{ Creator: testAddr, Policy: "name: test\nresources:\n- name: file", MarshalType: coretypes.PolicyMarshalingType_YAML, } resp, err := msgServer.CreatePolicy(ctx, msg) require.NoError(t, err) require.NotNil(t, resp) require.NotNil(t, resp.Record) require.NotNil(t, resp.Record.Metadata) // The policy owner should be the extracted DID require.Equal(t, extractedDID, resp.Record.Metadata.OwnerDid, "Policy owner DID should be the extracted DID") } func TestCreatePolicy_WithoutExtractedDID(t *testing.T) { ctx, msgServer, accK := setupMsgServer(t) // Create an account (no extracted DID) testAddr := accK.GenAccount().GetAddress().String() // Create a policy msg := &types.MsgCreatePolicy{ Creator: testAddr, Policy: "name: test\nresources:\n- name: file", MarshalType: coretypes.PolicyMarshalingType_YAML, } resp, err := msgServer.CreatePolicy(ctx, msg) require.NoError(t, err) require.NotNil(t, resp) require.NotNil(t, resp.Record) require.NotNil(t, resp.Record.Metadata) // The policy owner should be a DID issued from the creator address require.Contains(t, resp.Record.Metadata.OwnerDid, "did:key:", "Policy owner DID should be a valid DID") require.NotEmpty(t, resp.Record.Metadata.OwnerDid, "Policy owner DID should not be empty") } func TestEditPolicy_WithExtractedDID(t *testing.T) { ctx, msgServer, accK := setupMsgServer(t) // Create an account and extract DID from bearer token testAddr := accK.GenAccount().GetAddress().String() extractedDID := "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" // Inject extracted DID before creating the policy so it becomes the policy owner ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, extractedDID) createMsg := &types.MsgCreatePolicy{ Creator: testAddr, Policy: ` name: test resources: - name: file `, MarshalType: coretypes.PolicyMarshalingType_YAML, } createResp, err := msgServer.CreatePolicy(ctx, createMsg) require.NoError(t, err) policyID := createResp.Record.Policy.Id // Verify the policy was created with the extracted DID as owner require.Equal(t, extractedDID, createResp.Record.Metadata.OwnerDid) // Edit the policy with the same extracted DID editMsg := &types.MsgEditPolicy{ Creator: testAddr, PolicyId: policyID, Policy: ` name: test 2 resources: - name: file `, MarshalType: coretypes.PolicyMarshalingType_YAML, } editResp, err := msgServer.EditPolicy(ctx, editMsg) require.NoError(t, err) require.NotNil(t, editResp) require.NotNil(t, editResp.Record) require.NotNil(t, editResp.Record.Policy) // Verify the policy owner didn't change require.Equal(t, extractedDID, editResp.Record.Metadata.OwnerDid) } func TestDirectPolicyCmd_WithExtractedDID(t *testing.T) { ctx, msgServer, accK := setupMsgServer(t) // Setup: Create an account and extract DID from bearer token testAddr := accK.GenAccount().GetAddress().String() extractedDID := "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" // Inject extracted DID into context before creating policy ctx = ctx.WithValue(appparams.ExtractedDIDContextKey, extractedDID) createMsg := &types.MsgCreatePolicy{ Creator: testAddr, Policy: ` name: test resources: - name: file `, MarshalType: coretypes.PolicyMarshalingType_YAML, } createResp, err := msgServer.CreatePolicy(ctx, createMsg) require.NoError(t, err) policyID := createResp.Record.Policy.Id // Verify the policy was created with the extracted DID as owner require.Equal(t, extractedDID, createResp.Record.Metadata.OwnerDid) // Execute a policy command to register an object (extracted DID still in context) cmdMsg := &types.MsgDirectPolicyCmd{ Creator: testAddr, PolicyId: policyID, Cmd: types.NewRegisterObjectCmd(&coretypes.Object{ Resource: "file", Id: "file1", }), } cmdResp, err := msgServer.DirectPolicyCmd(ctx, cmdMsg) require.NoError(t, err) require.NotNil(t, cmdResp) require.NotEmpty(t, cmdResp.Result) } ================================================ FILE: x/acp/keeper/grpc_query.go ================================================ package keeper import ( "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ types.QueryServer = &Keeper{} ================================================ FILE: x/acp/keeper/keeper.go ================================================ package keeper import ( "encoding/binary" "fmt" "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" acpruntime "github.com/sourcenetwork/acp_core/pkg/runtime" "github.com/sourcenetwork/acp_core/pkg/services" "github.com/sourcenetwork/raccoondb/v2/primitives" "github.com/sourcenetwork/sourcehub/x/acp/capability" cosmosadapter "github.com/sourcenetwork/sourcehub/x/acp/stores/cosmos" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" "github.com/sourcenetwork/sourcehub/x/acp/access_decision" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/keeper/policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/registration" "github.com/sourcenetwork/sourcehub/x/acp/stores" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type ( Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService logger log.Logger // the address capable of executing a MsgUpdateParams message. Typically, this // should be the x/gov module account. authority string accountKeeper types.AccountKeeper capKeeper *capabilitykeeper.ScopedKeeper hubKeeper types.HubKeeper } ) func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, accountKeeper types.AccountKeeper, capKeeper *capabilitykeeper.ScopedKeeper, hubKeeper types.HubKeeper, ) Keeper { if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic(fmt.Sprintf("invalid authority address: %s", authority)) } return Keeper{ cdc: cdc, storeService: storeService, authority: authority, logger: logger, accountKeeper: accountKeeper, capKeeper: capKeeper, hubKeeper: hubKeeper, } } // GetAuthority returns the module's authority. func (k *Keeper) GetAuthority() string { return k.authority } // Logger returns a module-specific logger. func (k *Keeper) Logger() log.Logger { return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) } // getAccessDecisionRepository returns the module's default access decision repository. func (k *Keeper) getAccessDecisionRepository(ctx sdk.Context) access_decision.Repository { kv := k.storeService.OpenKVStore(ctx) prefixKey := []byte(types.AccessDecisionRepositoryKeyPrefix) adapted := runtime.KVStoreAdapter(kv) adapted = prefix.NewStore(adapted, prefixKey) return access_decision.NewAccessDecisionRepository(adapted) } // getACPEngine returns the module's default ACP Core Engine. func (k *Keeper) getACPEngine(ctx sdk.Context) *services.EngineService { kv := k.storeService.OpenKVStore(ctx) adapted := runtime.KVStoreAdapter(kv) raccoonAdapted := stores.RaccoonKVFromCosmos(adapted) runtime, err := acpruntime.NewRuntimeManager( acpruntime.WithKVStore(raccoonAdapted), acpruntime.WithTimeService(&SourceHubTimeProvider{}), ) if err != nil { panic(err) } return services.NewACPEngine(runtime) } // getRegistrationsCommitmentRepository returns the module's default Registration Commitment Repository. func (k *Keeper) getRegistrationsCommitmentRepository(ctx sdk.Context) *commitment.CommitmentRepository { cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.RegistrationsCommitmentKeyPrefix)) repo, err := commitment.NewCommitmentRepository(kv) if err != nil { panic(err) } return repo } // getAmendmentEventRepository returns the module's default AmendmentEventRepository. func (k *Keeper) getAmendmentEventRepository(ctx sdk.Context) *registration.AmendmentEventRepository { cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.AmendmentEventKeyPrefix)) repo, err := registration.NewAmendmentEventRepository(kv) if err != nil { panic(err) } return repo } // GetComitmentService returns the module's default CommitmentService instance. func (k *Keeper) getCommitmentService(ctx sdk.Context) *commitment.CommitmentService { return commitment.NewCommitmentService( k.getACPEngine(ctx), k.getRegistrationsCommitmentRepository(ctx), ) } // getRegistrationService returns the module's default RegistrationService instance. func (k *Keeper) getRegistrationService(ctx sdk.Context) *registration.RegistrationService { return registration.NewRegistrationService( k.getACPEngine(ctx), k.getAmendmentEventRepository(ctx), k.getCommitmentService(ctx), ) } // getPolicyCmdHandler returns the module's default PolicyCmd Handler instance. func (k *Keeper) getPolicyCmdHandler(ctx sdk.Context) *policy_cmd.Handler { return policy_cmd.NewPolicyCmdHandler( k.getACPEngine(ctx), k.getRegistrationService(ctx), k.getCommitmentService(ctx), ) } // hasSeenSignedPolicyCmd checks the replay cache for the given payload id. func (k *Keeper) hasSeenSignedPolicyCmd(ctx sdk.Context, payloadID []byte, currentHeight uint64) bool { cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.SignedPolicyCmdSeenKeyPrefix)) opt, err := kv.Get(ctx, payloadID) if err != nil { return false } if opt.Empty() { return false } bz := opt.GetValue() if len(bz) != 8 { kv.Delete(ctx, payloadID) return false } exp := binary.BigEndian.Uint64(bz) if exp < currentHeight { kv.Delete(ctx, payloadID) return false } return true } // markSignedPolicyCmdSeen stores the payload id with its expiration height if not already present. func (k *Keeper) markSignedPolicyCmdSeen(ctx sdk.Context, payloadID []byte, expireHeight uint64) error { cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.SignedPolicyCmdSeenKeyPrefix)) has, err := kv.Has(ctx, payloadID) if err != nil { return fmt.Errorf("failed to check if signed policy cmd exists: %w", err) } if has { return fmt.Errorf("signed policy cmd already processed") } var bz [8]byte binary.BigEndian.PutUint64(bz[:], expireHeight) _, err = kv.Set(ctx, payloadID, bz[:]) if err != nil { return fmt.Errorf("failed to store signed policy cmd: %w", err) } return nil } // getPolicyCapabilityManager returns the module's default Capability Manager instance. func (k *Keeper) getPolicyCapabilityManager(ctx sdk.Context) *capability.PolicyCapabilityManager { return capability.NewPolicyCapabilityManager(k.capKeeper) } // InitializeCapabilityKeeper allows app to set the capability keeper after the moment of creation. // // This is supported since currently the capability module // does not integrate with the new module dependency injection system. // // Panics if the keeper was previously initialized (ie inner pointer != nil). func (k *Keeper) InitializeCapabilityKeeper(keeper *capabilitykeeper.ScopedKeeper) { if k.capKeeper != nil { panic("capability keeper already initialized") } k.capKeeper = keeper } ================================================ FILE: x/acp/keeper/keeper_common_test.go ================================================ package keeper import ( "context" "crypto" "testing" "time" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" prototypes "github.com/cosmos/gogoproto/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/signed_policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/testutil" "github.com/sourcenetwork/sourcehub/x/acp/types" hubtestutil "github.com/sourcenetwork/sourcehub/x/hub/testutil" ) var timestamp, _ = prototypes.TimestampProto(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)) func setupMsgServer(t *testing.T) (sdk.Context, types.MsgServer, *testutil.AccountKeeperStub) { ctx, k, accK := setupKeeper(t) return ctx, &k, accK } func setupKeeperWithCapability(t *testing.T) (sdk.Context, Keeper, *testutil.AccountKeeperStub, *capabilitykeeper.Keeper) { acpStoreKey := storetypes.NewKVStoreKey(types.StoreKey) capabilityStoreKey := storetypes.NewKVStoreKey("capkeeper") capabilityMemStoreKey := storetypes.NewKVStoreKey("capkeepermem") db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) // mount stores stateStore.MountStoreWithDB(acpStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityMemStoreKey, storetypes.StoreTypeDB, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) capKeeper := capabilitykeeper.NewKeeper(cdc, capabilityStoreKey, capabilityMemStoreKey) acpCapKeeper := capKeeper.ScopeToModule(types.ModuleName) accKeeper := &testutil.AccountKeeperStub{} accKeeper.GenAccount() acpKeeper := NewKeeper( cdc, runtime.NewKVStoreService(acpStoreKey), log.NewNopLogger(), authority.String(), accKeeper, &acpCapKeeper, hubtestutil.NewHubKeeperStub(), ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) ctx = ctx.WithEventManager(sdk.NewEventManager()) // Initialize params acpKeeper.SetParams(ctx, types.DefaultParams()) return ctx, acpKeeper, accKeeper, capKeeper } func setupKeeper(t *testing.T) (sdk.Context, Keeper, *testutil.AccountKeeperStub) { ctx, k, accK, _ := setupKeeperWithCapability(t) return ctx, k, accK } func mustGenerateActor() (string, crypto.Signer) { bob, bobSigner, err := did.ProduceDID() if err != nil { panic(err) } return bob, bobSigner } var _ signed_policy_cmd.LogicalClock = (*logicalClockImpl)(nil) type logicalClockImpl struct{} func (c *logicalClockImpl) GetTimestampNow(context.Context) (uint64, error) { return 1, nil } var logicalClock logicalClockImpl var params types.Params = types.DefaultParams() ================================================ FILE: x/acp/keeper/keeper_test.go ================================================ package keeper import ( "encoding/binary" "testing" "github.com/sourcenetwork/raccoondb/v2/primitives" "github.com/stretchr/testify/require" cosmosadapter "github.com/sourcenetwork/sourcehub/x/acp/stores/cosmos" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // Test that an expired replay key is lazily removed and does not block resubmission. func TestHasSeenSignedPolicyCmd_ExpiredKeyIsPruned(t *testing.T) { ctx, k, _ := setupKeeper(t) ctx = ctx.WithBlockHeight(10) payloadID := []byte("test-id") current := uint64(ctx.BlockHeight()) cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.SignedPolicyCmdSeenKeyPrefix)) var bz [8]byte binary.BigEndian.PutUint64(bz[:], uint64(current-1)) kv.Set(ctx, payloadID, bz[:]) seen := k.hasSeenSignedPolicyCmd(ctx, payloadID, uint64(ctx.BlockHeight())) require.False(t, seen) has, err := kv.Has(ctx, payloadID) require.NoError(t, err) require.False(t, has) } // Test that malformed stored values are deleted and treated as unseen. func TestHasSeenSignedPolicyCmd_MalformedValueDeleted(t *testing.T) { ctx, k, _ := setupKeeper(t) payloadID := []byte("test-id") cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.SignedPolicyCmdSeenKeyPrefix)) kv.Set(ctx, payloadID, []byte{0x01}) seen := k.hasSeenSignedPolicyCmd(ctx, payloadID, uint64(ctx.BlockHeight())) require.False(t, seen) has, err := kv.Has(ctx, payloadID) require.NoError(t, err) require.False(t, has) } // Test that markSignedPolicyCmdSeen stores the expiration and prevents duplicate marks. func TestMarkSignedPolicyCmdSeen_StoresAndBlocksReplay(t *testing.T) { ctx, k, _ := setupKeeper(t) ctx = ctx.WithBlockHeight(10) payloadID := []byte("test-id") expire := uint64(25) err := k.markSignedPolicyCmdSeen(ctx, payloadID, expire) require.NoError(t, err) seen := k.hasSeenSignedPolicyCmd(ctx, payloadID, uint64(ctx.BlockHeight())) require.True(t, seen) cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.SignedPolicyCmdSeenKeyPrefix)) opt, _ := kv.Get(ctx, payloadID) require.False(t, opt.Empty()) bz := opt.GetValue() require.Len(t, bz, 8) got := binary.BigEndian.Uint64(bz) require.Equal(t, expire, got) err = k.markSignedPolicyCmdSeen(ctx, payloadID, expire) require.Error(t, err) } // Test that marking with an already expired height results in immediate prune on check. func TestMarkSignedPolicyCmdSeen_ExpiredImmediatelyPruned(t *testing.T) { ctx, k, _ := setupKeeper(t) ctx = ctx.WithBlockHeight(10) payloadID := []byte("test-id") expire := uint64(ctx.BlockHeight() - 1) err := k.markSignedPolicyCmdSeen(ctx, payloadID, expire) require.NoError(t, err) seen := k.hasSeenSignedPolicyCmd(ctx, payloadID, uint64(ctx.BlockHeight())) require.False(t, seen) cmtkv := k.storeService.OpenKVStore(ctx) kv := cosmosadapter.NewFromCoreKVStore(cmtkv) kv = primitives.NewPrefixedKV(kv, []byte(types.SignedPolicyCmdSeenKeyPrefix)) has, err := kv.Has(ctx, payloadID) require.NoError(t, err) require.False(t, has) } ================================================ FILE: x/acp/keeper/main_test.go ================================================ package keeper_test import ( "os" "testing" "github.com/sourcenetwork/sourcehub/app" ) func TestMain(m *testing.M) { app.SetConfig(true) os.Exit(m.Run()) } ================================================ FILE: x/acp/keeper/module_acp.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/capability" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/keeper/policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/acp/utils" ) // CreateModulePolicy creates a new Policy within the ACP module, bound to some calling module. // Returns the created Policy and a Capability, which authorizes the presenter to operate over this policy. // // Callers must Claim the capability, as it is a unique instance which cannot be recreated after dropped. // Claiming can be done using the callers capability keeper directly or the policy capability manager provided in the capability package. func (k *Keeper) CreateModulePolicy(goCtx context.Context, policy string, marshalType coretypes.PolicyMarshalingType, module string) (*types.PolicyRecord, *capability.PolicyCapability, error) { ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) moduleDID := did.IssueModuleDID(module) metadata, err := types.BuildACPSuppliedMetadata(ctx, moduleDID, module) if err != nil { return nil, nil, errors.Wrap("CreateModulePolicy", err) } ctx, err = utils.InjectPrincipal(ctx, moduleDID) if err != nil { return nil, nil, errors.Wrap("CreateModulePolicy", err) } coreResult, err := engine.CreatePolicy(ctx, &coretypes.CreatePolicyRequest{ Policy: policy, MarshalType: marshalType, Metadata: metadata, }) if err != nil { return nil, nil, errors.Wrap("CreateModulePolicy", err) } rec, err := types.MapPolicy(coreResult.Record) if err != nil { return nil, nil, errors.Wrap("CreateModulePolicy", err) } capMananager := k.getPolicyCapabilityManager(ctx) cap, err := capMananager.Issue(ctx, rec.Policy.Id) if err != nil { return nil, nil, errors.Wrap("CreateModulePolicy", err) } return rec, cap, nil } // EditModulePolicy updates the policy definition attached to the given PolicyCapability // Returns the new policy record, the number of removed relationships and an error func (k *Keeper) EditModulePolicy(goCtx context.Context, cap *capability.PolicyCapability, policy string, marshalType coretypes.PolicyMarshalingType) (*types.PolicyRecord, uint64, error) { ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) capManager := k.getPolicyCapabilityManager(ctx) err := capManager.Validate(ctx, cap) if err != nil { return nil, 0, errors.Wrap("EditModulePolicy", err) } module, err := capManager.GetOwnerModule(ctx, cap) if err != nil { return nil, 0, errors.Wrap("EditModulePolicy", err) } moduleDID := did.IssueModuleDID(module) ctx, err = utils.InjectPrincipal(ctx, moduleDID) if err != nil { return nil, 0, errors.Wrap("EditModulePolicy", err) } coreResult, err := engine.EditPolicy(ctx, &coretypes.EditPolicyRequest{ PolicyId: cap.GetPolicyId(), Policy: policy, MarshalType: marshalType, }) if err != nil { return nil, 0, errors.Wrap("EditModulePolicy", err) } rec, err := types.MapPolicy(coreResult.Record) if err != nil { return nil, 0, errors.Wrap("EditModulePolicy", err) } return rec, coreResult.RelatinshipsRemoved, nil } // ModulePolicyCmdForActorAccount issues a policy command for the policy bound to the provided capability. // The command skips authentication and is assumed to be issued by actorAcc, which must be a valid sourcehub account address. func (k *Keeper) ModulePolicyCmdForActorAccount(goCtx context.Context, cap *capability.PolicyCapability, cmd *types.PolicyCmd, actorAcc string, txSigner string) (*types.PolicyCmdResult, error) { ctx := sdk.UnwrapSDKContext(goCtx) actorDID, err := k.IssueDIDFromAccountAddr(ctx, actorAcc) if err != nil { return nil, errors.Wrap("ModulePolicyCmdForActorAccount: could not issue did to creator", err, errors.Pair("address", actorAcc)) } result, err := k.dispatchModulePolicyCmd(goCtx, cap, cmd, actorDID, txSigner) if err != nil { return nil, errors.Wrap("ModulePolicyCmdForActorAccount", err) } return result, nil } // ModulePolicyCmdForActorDID issues a policy command for the policy bound to the provided capability. // The command skips authentication and is assumed to be issued by the actor given by actorID, which must be a valid DID. func (k *Keeper) ModulePolicyCmdForActorDID(goCtx context.Context, capability *capability.PolicyCapability, cmd *types.PolicyCmd, actorDID string, txSigner string) (*types.PolicyCmdResult, error) { result, err := k.dispatchModulePolicyCmd(goCtx, capability, cmd, actorDID, txSigner) if err != nil { return nil, errors.Wrap("ModulePolicyCmdForActorDID", err) } return result, nil } func (k *Keeper) dispatchModulePolicyCmd(goCtx context.Context, capability *capability.PolicyCapability, cmd *types.PolicyCmd, actorDID string, txSigner string) (*types.PolicyCmdResult, error) { ctx := sdk.UnwrapSDKContext(goCtx) err := k.getPolicyCapabilityManager(ctx).Validate(ctx, capability) if err != nil { return nil, err } polId := capability.GetPolicyId() cmdCtx, err := policy_cmd.NewPolicyCmdCtx(ctx, polId, actorDID, txSigner, k.GetParams(ctx)) if err != nil { return nil, err } handler := k.getPolicyCmdHandler(ctx) result, err := handler.Dispatch(&cmdCtx, cmd) if err != nil { return nil, err } return result, nil } ================================================ FILE: x/acp/keeper/module_acp_test.go ================================================ package keeper import ( "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/capability" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) func Test_CreateModulePolicy_ModuleCanCreatePolicy(t *testing.T) { ctx, k, _, _ := setupKeeperWithCapability(t) pol := "name: test" record, capability, err := k.CreateModulePolicy(ctx, pol, coretypes.PolicyMarshalingType_YAML, "external") require.NoError(t, err) require.Equal(t, pol, record.RawPolicy) require.Equal(t, record.Policy.Id, capability.GetPolicyId()) require.Equal(t, "/acp/module_policies/"+record.Policy.Id, capability.GetCapabilityName()) require.NotNil(t, capability.GetCosmosCapability()) } func Test_EditModulePolicy_CannotEditWithoutClaimingCapability(t *testing.T) { ctx, k, _, _ := setupKeeperWithCapability(t) // Given Policy created by module without a claimed capability pol := "name: test" _, cap, err := k.CreateModulePolicy(ctx, pol, coretypes.PolicyMarshalingType_YAML, "external") require.NoError(t, err) // When the module attempts to edit the policy pol = "name: new-name" result, _, err := k.EditModulePolicy(ctx, cap, pol, coretypes.PolicyMarshalingType_YAML) // Then cmd is reject due to invalid capability require.Nil(t, result) require.ErrorIs(t, err, capability.ErrInvalidCapability) } func Test_EditModulePolicy_ModuleCanEditPolicyTiedToClaimedCapability(t *testing.T) { ctx, k, _, capK := setupKeeperWithCapability(t) moduleName := "test_module" scopedKeeper := capK.ScopeToModule(moduleName) // Given policy create by test_module pol := "name: test" _, cap, err := k.CreateModulePolicy(ctx, pol, coretypes.PolicyMarshalingType_YAML, moduleName) require.NoError(t, err) // And capability claimed by the module manager := capability.NewPolicyCapabilityManager(&scopedKeeper) err = manager.Claim(ctx, cap) require.NoError(t, err) // When the module edits the policy pol = "name: new-name" record, _, err := k.EditModulePolicy(ctx, cap, pol, coretypes.PolicyMarshalingType_YAML) // Then policy record was edited with no error require.NoError(t, err) require.Equal(t, pol, record.RawPolicy) } func Test_ModulePolicyCmdForActorDID_ModuleCanAddRelationshipsToTheirPolicy(t *testing.T) { ctx, k, _, capK := setupKeeperWithCapability(t) // Given policy created pol := ` name: test resources: - name: file ` moduleName := "mod1" _, cap, err := k.CreateModulePolicy(ctx, pol, coretypes.PolicyMarshalingType_YAML, moduleName) require.NoError(t, err) // And claimed by mod1 scopedKeeper := capK.ScopeToModule(moduleName) manager := capability.NewPolicyCapabilityManager(&scopedKeeper) err = manager.Claim(ctx, cap) require.NoError(t, err) // When module issues a policy cmd cmd := types.NewRegisterObjectCmd(coretypes.NewObject("file", "foo")) signer := "source1twjwexwrsvflt9nv9xwk27e0f2defa9fdjaeus" result, err := k.ModulePolicyCmdForActorDID(ctx, cap, cmd, "did:example:bob", signer) // Then it is accepted require.NoError(t, err) resultCmd := result.GetRegisterObjectResult() require.Equal(t, "did:example:bob", resultCmd.Record.Metadata.OwnerDid) require.Equal(t, signer, resultCmd.Record.Metadata.TxSigner) } func Test_ModulePolicyCmdForActorAccount_ModuleCanAddRelationshipsToTheirPolicy(t *testing.T) { ctx, k, accKeep, capK := setupKeeperWithCapability(t) // Given policy created pol := ` name: test resources: - name: file ` moduleName := "mod1" _, cap, err := k.CreateModulePolicy(ctx, pol, coretypes.PolicyMarshalingType_YAML, moduleName) require.NoError(t, err) // And claimed by mod1 scopedKeeper := capK.ScopeToModule(moduleName) manager := capability.NewPolicyCapabilityManager(&scopedKeeper) err = manager.Claim(ctx, cap) require.NoError(t, err) // When module issues a policy cmd to an actor acc cmd := types.NewRegisterObjectCmd(coretypes.NewObject("file", "foo")) signer := "source1twjwexwrsvflt9nv9xwk27e0f2defa9fdjaeus" accAddr := accKeep.FirstAcc().GetAddress().String() result, err := k.ModulePolicyCmdForActorAccount(ctx, cap, cmd, accAddr, signer) // Then it is accepted require.NoError(t, err) resultCmd := result.GetRegisterObjectResult() accDID, err := did.IssueDID(accKeep.FirstAcc()) require.NoError(t, err) require.Equal(t, accDID, resultCmd.Record.Metadata.OwnerDid) require.Equal(t, signer, resultCmd.Record.Metadata.TxSigner) } func Test_ModulePolicyCmdForActorAccount_ModuleCannotUsePolicyWithoutClaimingCapability(t *testing.T) { ctx, k, accKeep, _ := setupKeeperWithCapability(t) // Given Policy created by module without a claimed capability pol := "name: test" _, cap, err := k.CreateModulePolicy(ctx, pol, coretypes.PolicyMarshalingType_YAML, "external") require.NoError(t, err) // When module issues a policy cmd to an actor acc cmd := types.NewRegisterObjectCmd(coretypes.NewObject("file", "foo")) signer := "source1twjwexwrsvflt9nv9xwk27e0f2defa9fdjaeus" accAddr := accKeep.FirstAcc().GetAddress().String() result, err := k.ModulePolicyCmdForActorAccount(ctx, cap, cmd, accAddr, signer) // Then cmd is reject due to invalid capability require.Nil(t, result) require.ErrorIs(t, err, capability.ErrInvalidCapability) } ================================================ FILE: x/acp/keeper/msg_server.go ================================================ package keeper import ( "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ types.MsgServer = &Keeper{} ================================================ FILE: x/acp/keeper/msg_server_bearer_policy_cmd.go ================================================ package keeper import ( "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/bearer_token" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/keeper/policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) BearerPolicyCmd(goCtx context.Context, msg *types.MsgBearerPolicyCmd) (*types.MsgBearerPolicyCmdResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) resolver := &did.KeyResolver{} actorID, err := bearer_token.AuthorizeMsg(ctx, resolver, msg, ctx.BlockTime()) if err != nil { return nil, err } cmdCtx, err := policy_cmd.NewPolicyCmdCtx(ctx, msg.PolicyId, actorID, msg.Creator, k.GetParams(ctx)) if err != nil { return nil, err } handler := k.getPolicyCmdHandler(ctx) result, err := handler.Dispatch(&cmdCtx, msg.Cmd) if err != nil { return nil, fmt.Errorf("PolicyCmd failed: %w", err) } return &types.MsgBearerPolicyCmdResponse{ Result: result, }, nil } ================================================ FILE: x/acp/keeper/msg_server_check_access.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/access_decision" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) CheckAccess(goCtx context.Context, msg *types.MsgCheckAccess) (*types.MsgCheckAccessResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) repository := k.getAccessDecisionRepository(ctx) paramsRepository := access_decision.StaticParamsRepository{} engine := k.getACPEngine(ctx) record, err := engine.GetPolicy(goCtx, &coretypes.GetPolicyRequest{Id: msg.PolicyId}) if err != nil { return nil, err } if record == nil { return nil, errors.ErrPolicyNotFound(msg.PolicyId) } creatorAddr, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { return nil, types.NewErrInvalidAccAddrErr(err, msg.Creator) } creatorAcc := k.accountKeeper.GetAccount(ctx, creatorAddr) if creatorAcc == nil { return nil, types.NewAccNotFoundErr(msg.Creator) } ts, err := types.TimestampFromCtx(ctx) if err != nil { return nil, err } cmd := access_decision.EvaluateAccessRequestsCommand{ Policy: record.Record.Policy, Operations: msg.AccessRequest.Operations, Actor: msg.AccessRequest.Actor.Id, CreationTime: ts, Creator: creatorAcc, CurrentHeight: uint64(ctx.BlockHeight()), } decision, err := cmd.Execute(goCtx, engine, repository, ¶msRepository) if err != nil { return nil, err } err = ctx.EventManager().EmitTypedEvent(&coretypes.EventAccessDecisionCreated{ Creator: msg.Creator, PolicyId: msg.PolicyId, DecisionId: decision.Id, Actor: decision.Actor, }) if err != nil { return nil, err } return &types.MsgCheckAccessResponse{ Decision: decision, }, nil } ================================================ FILE: x/acp/keeper/msg_server_create_policy.go ================================================ package keeper import ( "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/utils" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) CreatePolicy(goCtx context.Context, msg *types.MsgCreatePolicy) (*types.MsgCreatePolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) actorID, err := k.GetActorDID(ctx, msg.Creator) if err != nil { return nil, fmt.Errorf("CreatePolicy: %w", err) } metadata, err := types.BuildACPSuppliedMetadata(ctx, actorID, msg.Creator) if err != nil { return nil, err } ctx, err = utils.InjectPrincipal(ctx, actorID) if err != nil { return nil, err } coreResult, err := engine.CreatePolicy(ctx, &coretypes.CreatePolicyRequest{ Policy: msg.Policy, MarshalType: msg.MarshalType, Metadata: metadata, }) if err != nil { return nil, fmt.Errorf("CreatePolicy: %w", err) } rec, err := types.MapPolicy(coreResult.Record) if err != nil { return nil, fmt.Errorf("CreatePolicy: %w", err) } err = ctx.EventManager().EmitTypedEvent(&coretypes.EventPolicyCreated{ PolicyId: rec.Policy.Id, PolicyName: msg.Policy, }) if err != nil { return nil, err } return &types.MsgCreatePolicyResponse{ Record: rec, }, nil } ================================================ FILE: x/acp/keeper/msg_server_direct_policy_cmd.go ================================================ package keeper import ( "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/keeper/policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) DirectPolicyCmd(goCtx context.Context, msg *types.MsgDirectPolicyCmd) (*types.MsgDirectPolicyCmdResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) actorID, err := k.GetActorDID(ctx, msg.Creator) if err != nil { return nil, fmt.Errorf("DirectPolicyCmd: %w", err) } cmdCtx, err := policy_cmd.NewPolicyCmdCtx(ctx, msg.PolicyId, actorID, msg.Creator, k.GetParams(ctx)) if err != nil { return nil, err } handler := k.getPolicyCmdHandler(ctx) result, err := handler.Dispatch(&cmdCtx, msg.Cmd) if err != nil { return nil, err } return &types.MsgDirectPolicyCmdResponse{ Result: result, }, nil } ================================================ FILE: x/acp/keeper/msg_server_edit_policy.go ================================================ package keeper import ( "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/utils" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) EditPolicy(goCtx context.Context, msg *types.MsgEditPolicy) (*types.MsgEditPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) actorID, err := k.GetActorDID(ctx, msg.Creator) if err != nil { return nil, fmt.Errorf("EditPolicy: %w", err) } ctx, err = utils.InjectPrincipal(ctx, actorID) if err != nil { return nil, fmt.Errorf("EditPolicy: %w", err) } response, err := engine.EditPolicy(ctx, &coretypes.EditPolicyRequest{ PolicyId: msg.PolicyId, Policy: msg.Policy, MarshalType: msg.MarshalType, }) if err != nil { return nil, fmt.Errorf("EditPolicy: %w", err) } rec, err := types.MapPolicy(response.Record) if err != nil { return nil, fmt.Errorf("EditPolicy: %w", err) } err = ctx.EventManager().EmitTypedEvent(&coretypes.EventPolicyEdited{ PolicyId: rec.Policy.Id, PolicyName: msg.Policy, RelationshipsRemoved: response.RelatinshipsRemoved, }) if err != nil { return nil, err } return &types.MsgEditPolicyResponse{ RelationshipsRemoved: response.RelatinshipsRemoved, Record: rec, }, nil } ================================================ FILE: x/acp/keeper/msg_server_signed_policy_cmd.go ================================================ package keeper import ( "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/keeper/policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/signed_policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) SignedPolicyCmd(goCtx context.Context, msg *types.MsgSignedPolicyCmd) (*types.MsgSignedPolicyCmdResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) resolver := &did.KeyResolver{} params := k.GetParams(ctx) payload, err := signed_policy_cmd.ValidateAndExtractCmd(ctx, params, resolver, msg.Payload, msg.Type, uint64(ctx.BlockHeight())) if err != nil { return nil, fmt.Errorf("PolicyCmd: %w", err) } cmdCtx, err := policy_cmd.NewPolicyCmdCtx(ctx, payload.PolicyId, payload.Actor, msg.Creator, k.GetParams(ctx)) if err != nil { return nil, err } id := signed_policy_cmd.ComputePayloadID(msg.Payload) expireHeight := payload.IssuedHeight + payload.ExpirationDelta if k.hasSeenSignedPolicyCmd(ctx, id, uint64(ctx.BlockHeight())) { return nil, fmt.Errorf("PolicyCmd: %w", signed_policy_cmd.ErrPayloadAlreadyProcessed) } if err := k.markSignedPolicyCmdSeen(ctx, id, expireHeight); err != nil { return nil, fmt.Errorf("PolicyCmd: %w", err) } handler := k.getPolicyCmdHandler(ctx) result, err := handler.Dispatch(&cmdCtx, payload.Cmd) if err != nil { return nil, err } return &types.MsgSignedPolicyCmdResponse{ Result: result, }, nil } ================================================ FILE: x/acp/keeper/msg_server_signed_policy_cmd_test.go ================================================ package keeper import ( "context" "testing" "github.com/stretchr/testify/require" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/signed_policy_cmd" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestSignedPolicyCmd_ReplayProtection(t *testing.T) { ctx, k, accK := setupKeeper(t) creator := accK.GenAccount().GetAddress().String() policyStr := ` description: ok name: policy resources: - name: file permissions: - doc: own doc name: own - expr: reader name: read relations: - name: reader types: - actor ` msg := types.MsgCreatePolicy{ Creator: creator, Policy: policyStr, MarshalType: coretypes.PolicyMarshalingType_YAML, } resp, err := k.CreatePolicy(ctx, &msg) require.Nil(t, err) actor, signer := mustGenerateActor() registerCmd := types.NewRegisterObjectCmd(coretypes.NewObject("file", "foo")) builder := signed_policy_cmd.NewCmdBuilder(&logicalClock, params) builder.Actor(actor) builder.PolicyID(resp.Record.Policy.Id) builder.PolicyCmd(registerCmd) builder.SetSigner(signer) registerJWS, err := builder.BuildJWS(context.Background()) require.NoError(t, err) // First command should succeed _, err = k.SignedPolicyCmd(ctx, types.NewMsgSignedPolicyCmdFromJWS(creator, registerJWS)) require.NoError(t, err) // Submitting the same command again should fail _, err = k.SignedPolicyCmd(ctx, types.NewMsgSignedPolicyCmdFromJWS(creator, registerJWS)) require.Error(t, err) require.ErrorIs(t, err, signed_policy_cmd.ErrPayloadAlreadyProcessed) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) // Submitting the same command with a different block height should fail _, err = k.SignedPolicyCmd(ctx, types.NewMsgSignedPolicyCmdFromJWS(creator, registerJWS)) require.Error(t, err) require.ErrorIs(t, err, signed_policy_cmd.ErrPayloadAlreadyProcessed) relationship := coretypes.NewActorRelationship("file", "foo", "reader", "did:key:alice") cmd := types.NewSetRelationshipCmd(relationship) builder.PolicyCmd(cmd) relationshipJWS, err := builder.BuildJWS(context.Background()) require.NoError(t, err) // Submitting a different command should succeed _, err = k.SignedPolicyCmd(ctx, types.NewMsgSignedPolicyCmdFromJWS(creator, relationshipJWS)) require.NoError(t, err) // Submitting the same command again should fail _, err = k.SignedPolicyCmd(ctx, types.NewMsgSignedPolicyCmdFromJWS(creator, relationshipJWS)) require.Error(t, err) require.ErrorIs(t, err, signed_policy_cmd.ErrPayloadAlreadyProcessed) } ================================================ FILE: x/acp/keeper/msg_update_params.go ================================================ package keeper import ( "context" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if k.GetAuthority() != req.Authority { return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), req.Authority) } ctx := sdk.UnwrapSDKContext(goCtx) if err := k.SetParams(ctx, req.Params); err != nil { return nil, err } return &types.MsgUpdateParamsResponse{}, nil } ================================================ FILE: x/acp/keeper/msg_update_params_test.go ================================================ package keeper_test import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestMsgUpdateParams(t *testing.T) { k, ctx := keepertest.AcpKeeper(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) wctx := sdk.UnwrapSDKContext(ctx) // 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: k.GetAuthority(), Params: types.Params{}, }, expErr: false, }, { name: "all good", input: &types.MsgUpdateParams{ Authority: k.GetAuthority(), Params: params, }, expErr: false, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { _, err := k.UpdateParams(wctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } ================================================ FILE: x/acp/keeper/params.go ================================================ package keeper import ( "context" "github.com/cosmos/cosmos-sdk/runtime" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // GetParams get all parameters as types.Params func (k *Keeper) GetParams(ctx context.Context) (params types.Params) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.ParamsKey) if bz == nil { return params } k.cdc.MustUnmarshal(bz, ¶ms) return params } // SetParams set the params func (k *Keeper) SetParams(ctx context.Context, params types.Params) error { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz, err := k.cdc.Marshal(¶ms) if err != nil { return err } store.Set(types.ParamsKey, bz) return nil } ================================================ FILE: x/acp/keeper/params_test.go ================================================ package keeper_test import ( "testing" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestGetParams(t *testing.T) { k, ctx := keepertest.AcpKeeper(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) require.EqualValues(t, params, k.GetParams(ctx)) } ================================================ FILE: x/acp/keeper/policy_cmd/doc.go ================================================ // package policy_cmd provides common handlers for PolicyCmd messages package policy_cmd ================================================ FILE: x/acp/keeper/policy_cmd/handler.go ================================================ package policy_cmd import ( "fmt" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/registration" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/acp/utils" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" ) // Handler acts as a common entrypoint to handle PolicyCmd objects. // Handler can be used for direct, bearer and signed PolicyCmds type Handler struct { engine coretypes.ACPEngineServer registrationService *registration.RegistrationService commitmentService *commitment.CommitmentService } // NewPolicyCmdHandler returns a handler for PolicyCmds func NewPolicyCmdHandler(engine coretypes.ACPEngineServer, registrationService *registration.RegistrationService, commitmentService *commitment.CommitmentService, ) *Handler { return &Handler{ engine: engine, registrationService: registrationService, commitmentService: commitmentService, } } // Dispatch consumes a PolicyCmd and returns its result func (h *Handler) Dispatch(ctx *PolicyCmdCtx, cmd *types.PolicyCmd) (*types.PolicyCmdResult, error) { var err error ctx.Ctx, err = utils.InjectPrincipal(ctx.Ctx, ctx.PrincipalDID) if err != nil { return nil, err } switch c := cmd.Cmd.(type) { case *types.PolicyCmd_SetRelationshipCmd: return h.setRelationship(ctx, c.SetRelationshipCmd) case *types.PolicyCmd_DeleteRelationshipCmd: return h.deleteRelationship(ctx, c.DeleteRelationshipCmd) case *types.PolicyCmd_RegisterObjectCmd: return h.registerObject(ctx, c.RegisterObjectCmd) case *types.PolicyCmd_ArchiveObjectCmd: return h.archiveObject(ctx, c.ArchiveObjectCmd) case *types.PolicyCmd_CommitRegistrationsCmd: return h.commitRegistrations(ctx, c.CommitRegistrationsCmd) case *types.PolicyCmd_FlagHijackAttemptCmd: return h.flagHijackAttempt(ctx, c.FlagHijackAttemptCmd) case *types.PolicyCmd_RevealRegistrationCmd: return h.revealRegistration(ctx, c.RevealRegistrationCmd) case *types.PolicyCmd_UnarchiveObjectCmd: return h.unarchiveObject(ctx, c.UnarchiveObjectCmd) default: return nil, errors.Wrap("unsuported command", errors.ErrUnknownVariant) } } func (h *Handler) setRelationship(ctx *PolicyCmdCtx, cmd *types.SetRelationshipCmd) (*types.PolicyCmdResult, error) { metadata, err := types.BuildACPSuppliedMetadata(ctx.Ctx, ctx.PrincipalDID, ctx.Signer) if err != nil { return nil, fmt.Errorf("marshaling metadata: %w", err) } resp, err := h.engine.SetRelationship(ctx.Ctx, &coretypes.SetRelationshipRequest{ PolicyId: ctx.PolicyId, Relationship: cmd.Relationship, Metadata: metadata, }) if err != nil { return nil, err } rec, err := types.MapRelationshipRecord(resp.Record) if err != nil { return nil, fmt.Errorf("mapping relationship record: %w", err) } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_SetRelationshipResult{ SetRelationshipResult: &types.SetRelationshipCmdResult{ RecordExisted: resp.RecordExisted, Record: rec, }, }, }, nil } func (h *Handler) deleteRelationship(ctx *PolicyCmdCtx, cmd *types.DeleteRelationshipCmd) (*types.PolicyCmdResult, error) { resp, err := h.engine.DeleteRelationship(ctx.Ctx, &coretypes.DeleteRelationshipRequest{ PolicyId: ctx.PolicyId, Relationship: cmd.Relationship, }) if err != nil { return nil, err } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_DeleteRelationshipResult{ DeleteRelationshipResult: &types.DeleteRelationshipCmdResult{ RecordFound: resp.RecordFound, }, }, }, nil } func (h *Handler) registerObject(ctx *PolicyCmdCtx, cmd *types.RegisterObjectCmd) (*types.PolicyCmdResult, error) { actor := coretypes.NewActor(ctx.PrincipalDID) resp, err := h.registrationService.RegisterObject(ctx.Ctx, ctx.PolicyId, cmd.Object, actor, ctx.Signer) if err != nil { return nil, err } r, err := types.MapRelationshipRecord(resp.Record) if err != nil { return nil, err } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_RegisterObjectResult{ RegisterObjectResult: &types.RegisterObjectCmdResult{ Record: r, }, }, }, nil } func (h *Handler) archiveObject(ctx *PolicyCmdCtx, cmd *types.ArchiveObjectCmd) (*types.PolicyCmdResult, error) { response, err := h.registrationService.ArchiveObject(ctx.Ctx, ctx.PolicyId, cmd.Object) if err != nil { return nil, err } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_ArchiveObjectResult{ ArchiveObjectResult: &types.ArchiveObjectCmdResult{ Found: true, RelationshipsRemoved: response.RelationshipsRemoved, }, }, }, nil } func (h *Handler) commitRegistrations(ctx *PolicyCmdCtx, cmd *types.CommitRegistrationsCmd) (*types.PolicyCmdResult, error) { actor := coretypes.NewActor(ctx.PrincipalDID) commitment, err := h.commitmentService.SetNewCommitment(ctx.Ctx, ctx.PolicyId, cmd.Commitment, actor, &ctx.Params, ctx.Signer) if err != nil { return nil, err } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_CommitRegistrationsResult{ CommitRegistrationsResult: &types.CommitRegistrationsCmdResult{ RegistrationsCommitment: commitment, }, }, }, nil } func (h *Handler) revealRegistration(ctx *PolicyCmdCtx, cmd *types.RevealRegistrationCmd) (*types.PolicyCmdResult, error) { actor := coretypes.NewActor(ctx.PrincipalDID) rec, ev, err := h.registrationService.RevealRegistration(ctx.Ctx, cmd.RegistrationsCommitmentId, cmd.Proof, actor, ctx.Signer) if err != nil { return nil, err } r, err := types.MapRelationshipRecord(rec) if err != nil { return nil, err } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_RevealRegistrationResult{ RevealRegistrationResult: &types.RevealRegistrationCmdResult{ Record: r, Event: ev, }, }, }, nil } func (h *Handler) flagHijackAttempt(ctx *PolicyCmdCtx, cmd *types.FlagHijackAttemptCmd) (*types.PolicyCmdResult, error) { actor := coretypes.NewActor(ctx.PrincipalDID) event, err := h.registrationService.FlagHijackEvent(ctx.Ctx, cmd.EventId, actor) if err != nil { return nil, err } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_FlagHijackAttemptResult{ FlagHijackAttemptResult: &types.FlagHijackAttemptCmdResult{ Event: event, }, }, }, nil } func (h *Handler) unarchiveObject(ctx *PolicyCmdCtx, cmd *types.UnarchiveObjectCmd) (*types.PolicyCmdResult, error) { resp, err := h.registrationService.UnarchiveObject(ctx.Ctx, ctx.PolicyId, cmd.Object) if err != nil { return nil, err } r, err := types.MapRelationshipRecord(resp.Record) if err != nil { return nil, err } return &types.PolicyCmdResult{ Result: &types.PolicyCmdResult_UnarchiveObjectResult{ UnarchiveObjectResult: &types.UnarchiveObjectCmdResult{ Record: r, RelationshipModified: resp.RecordModified, }, }, }, nil } ================================================ FILE: x/acp/keeper/policy_cmd/types.go ================================================ package policy_cmd import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func NewPolicyCmdCtx(ctx sdk.Context, policyId string, actorDID string, signer string, params types.Params) (PolicyCmdCtx, error) { ts, err := types.TimestampFromCtx(ctx) if err != nil { return PolicyCmdCtx{}, err } return PolicyCmdCtx{ Ctx: ctx, PolicyId: policyId, PrincipalDID: actorDID, Now: ts, Params: params, Signer: signer, }, nil } // PolicyCmdCtx bundles actor and time data bound to a PolicyCmd type PolicyCmdCtx struct { Ctx sdk.Context PolicyId string PrincipalDID string Now *types.Timestamp Params types.Params Signer string } ================================================ FILE: x/acp/keeper/query_access_decision.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) AccessDecision( goCtx context.Context, req *types.QueryAccessDecisionRequest, ) (*types.QueryAccessDecisionResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) repository := k.getAccessDecisionRepository(ctx) decision, err := repository.Get(goCtx, req.Id) if err != nil { return nil, err } return &types.QueryAccessDecisionResponse{ Decision: decision, }, nil } ================================================ FILE: x/acp/keeper/query_access_decision_test.go ================================================ package keeper import ( "context" "testing" prototypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type queryAccessDecisionSuite struct { suite.Suite testDecision *types.AccessDecision } func TestAccessDecision(t *testing.T) { suite.Run(t, &queryAccessDecisionSuite{}) } func (s *queryAccessDecisionSuite) setup(t *testing.T) (context.Context, Keeper) { ctx, k, _ := setupKeeper(t) decision := &types.AccessDecision{ Id: "decision-1", PolicyId: "policy-1", Creator: "creator-1", CreatorAccSequence: 12345, Operations: []*coretypes.Operation{ { Object: &coretypes.Object{ Resource: "file", Id: "file-1", }, Permission: "read", }, }, Actor: "collaborator", Params: &types.DecisionParams{ DecisionExpirationDelta: 3600, ProofExpirationDelta: 7200, TicketExpirationDelta: 86400, }, CreationTime: &types.Timestamp{ ProtoTs: &prototypes.Timestamp{}, BlockHeight: 0, }, IssuedHeight: 100, } repo := k.getAccessDecisionRepository(ctx) err := repo.Set(ctx, decision) require.NoError(t, err) s.testDecision = decision return ctx, k } func (s *queryAccessDecisionSuite) TestQueryAccessDecision_ValidRequest() { ctx, k := s.setup(s.T()) resp, err := k.AccessDecision(ctx, &types.QueryAccessDecisionRequest{ Id: s.testDecision.Id, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.Equal(s.T(), s.testDecision, resp.Decision) } func (s *queryAccessDecisionSuite) TestQueryAccessDecision_InvalidRequest() { ctx, k := s.setup(s.T()) resp, err := k.AccessDecision(ctx, nil) require.Error(s.T(), err) require.Nil(s.T(), resp) require.Equal(s.T(), codes.InvalidArgument, status.Code(err)) } func (s *queryAccessDecisionSuite) TestQueryAccessDecision_InvalidId() { ctx, k := s.setup(s.T()) resp, err := k.AccessDecision(ctx, &types.QueryAccessDecisionRequest{ Id: "", }) require.NoError(s.T(), err) require.Equal(s.T(), &types.QueryAccessDecisionResponse{}, resp) require.Equal(s.T(), codes.OK, status.Code(err)) } ================================================ FILE: x/acp/keeper/query_filter_relationships.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/utils" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) FilterRelationships( goCtx context.Context, req *types.QueryFilterRelationshipsRequest, ) (*types.QueryFilterRelationshipsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) records, err := engine.FilterRelationships(goCtx, &coretypes.FilterRelationshipsRequest{ PolicyId: req.PolicyId, Selector: req.Selector, }) if err != nil { return nil, err } mappedRecs, err := utils.MapFailableSlice(records.Records, types.MapRelationshipRecord) if err != nil { return nil, err } return &types.QueryFilterRelationshipsResponse{ Records: mappedRecs, }, nil } ================================================ FILE: x/acp/keeper/query_generate_commitment.go ================================================ package keeper import ( "context" "encoding/hex" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/jsonpb" "github.com/sourcenetwork/sourcehub/utils" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) func (k *Keeper) GenerateCommitment( goCtx context.Context, req *types.QueryGenerateCommitmentRequest, ) (*types.QueryGenerateCommitmentResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) commitRepo := k.getRegistrationsCommitmentRepository(ctx) commitmentService := commitment.NewCommitmentService(engine, commitRepo) comm, err := commitmentService.BuildCommitment(ctx, req.PolicyId, req.Actor, req.Objects) if err != nil { return nil, err } proofs := make([]*types.RegistrationProof, 0, len(req.Objects)) for i := range req.Objects { proof, err := commitment.ProofForObject(req.PolicyId, req.Actor, i, req.Objects) if err != nil { return nil, fmt.Errorf("generating proof for obj %v: %v", i, err) } proofs = append(proofs, proof) } proofsJson, err := utils.MapFailableSlice(proofs, func(p *types.RegistrationProof) (string, error) { marshaler := jsonpb.Marshaler{} return marshaler.MarshalToString(p) }) if err != nil { return nil, err } return &types.QueryGenerateCommitmentResponse{ Commitment: comm, HexCommitment: hex.EncodeToString(comm), Proofs: proofs, ProofsJson: proofsJson, }, nil } ================================================ FILE: x/acp/keeper/query_hijack_attempts_by_policy.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/raccoondb/v2/iterator" "github.com/sourcenetwork/sourcehub/x/acp/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) func (k *Keeper) HijackAttemptsByPolicy( goCtx context.Context, req *types.QueryHijackAttemptsByPolicyRequest, ) (*types.QueryHijackAttemptsByPolicyResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) repo := k.getAmendmentEventRepository(ctx) iter, err := repo.ListHijackEventsByPolicy(ctx, req.PolicyId) if err != nil { return nil, err } evs, err := iterator.Consume(ctx, iter) if err != nil { return nil, err } return &types.QueryHijackAttemptsByPolicyResponse{ Events: evs, }, nil } ================================================ FILE: x/acp/keeper/query_object_owner.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) ObjectOwner(goCtx context.Context, req *types.QueryObjectOwnerRequest) (*types.QueryObjectOwnerResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) result, err := engine.GetObjectRegistration(ctx, &coretypes.GetObjectRegistrationRequest{ PolicyId: req.PolicyId, Object: req.Object, }) if err != nil { return nil, err } var record *types.RelationshipRecord if result.IsRegistered { record, err = types.MapRelationshipRecord(result.Record) if err != nil { return nil, err } } return &types.QueryObjectOwnerResponse{ IsRegistered: result.IsRegistered, Record: record, }, nil } ================================================ FILE: x/acp/keeper/query_object_owner_test.go ================================================ package keeper import ( "context" "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type queryObjectOwnerSuite struct { suite.Suite obj *coretypes.Object } func TestObjectOwner(t *testing.T) { suite.Run(t, &queryObjectOwnerSuite{}) } func (s *queryObjectOwnerSuite) setup(t *testing.T) (context.Context, Keeper, sdk.AccountI, string, string) { s.obj = coretypes.NewObject("file", "1") policyStr := ` description: ok name: policy resources: - name: file permissions: - doc: own doc name: own - expr: reader name: read relations: - manages: - reader name: admin - name: reader ` ctx, k, accKeep := setupKeeper(t) creator := accKeep.FirstAcc().GetAddress().String() msg := types.MsgCreatePolicy{ Creator: creator, Policy: policyStr, MarshalType: coretypes.PolicyMarshalingType_YAML, } resp, err := k.CreatePolicy(ctx, &msg) require.Nil(t, err) _, err = k.DirectPolicyCmd(ctx, &types.MsgDirectPolicyCmd{ Creator: creator, PolicyId: resp.Record.Policy.Id, Cmd: types.NewRegisterObjectCmd(s.obj), }) require.Nil(t, err) return ctx, k, accKeep.FirstAcc(), creator, resp.Record.Policy.Id } func (s *queryObjectOwnerSuite) TestQueryReturnsObjectOwner() { ctx, k, _, _, policyId := s.setup(s.T()) resp, err := k.ObjectOwner(ctx, &types.QueryObjectOwnerRequest{ PolicyId: policyId, Object: s.obj, }) require.Equal(s.T(), resp, &types.QueryObjectOwnerResponse{ IsRegistered: true, Record: resp.Record, }) require.Nil(s.T(), err) } func (s *queryObjectOwnerSuite) TestQueryingForUnregisteredObjectReturnsEmptyOwner() { ctx, k, _, _, policyId := s.setup(s.T()) resp, err := k.ObjectOwner(ctx, &types.QueryObjectOwnerRequest{ PolicyId: policyId, Object: coretypes.NewObject("file", "404"), }) require.Nil(s.T(), err) require.Equal(s.T(), resp, &types.QueryObjectOwnerResponse{ IsRegistered: false, Record: nil, }) } func (s *queryObjectOwnerSuite) TestQueryingPolicyThatDoesNotExistReturnError() { ctx, k, _, _, _ := s.setup(s.T()) resp, err := k.ObjectOwner(ctx, &types.QueryObjectOwnerRequest{ PolicyId: "some-policy", Object: s.obj, }) require.ErrorIs(s.T(), err, errors.ErrorType_NOT_FOUND) require.Nil(s.T(), resp) } func (s *queryObjectOwnerSuite) TestQueryingForObjectInNonExistingPolicyReturnsError() { ctx, k, _, _, policyId := s.setup(s.T()) resp, err := k.ObjectOwner(ctx, &types.QueryObjectOwnerRequest{ PolicyId: policyId, Object: coretypes.NewObject("missing-resource", "abc"), }) require.Nil(s.T(), resp) require.NotNil(s.T(), err) } ================================================ FILE: x/acp/keeper/query_params.go ================================================ package keeper import ( "context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil } ================================================ FILE: x/acp/keeper/query_params_test.go ================================================ package keeper_test import ( "testing" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func TestParamsQuery(t *testing.T) { k, ctx := keepertest.AcpKeeper(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) response, err := k.Params(ctx, &types.QueryParamsRequest{}) require.NoError(t, err) require.Equal(t, &types.QueryParamsResponse{Params: params}, response) } ================================================ FILE: x/acp/keeper/query_policy.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) Policy(goCtx context.Context, req *types.QueryPolicyRequest) (*types.QueryPolicyResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) response, err := engine.GetPolicy(goCtx, &coretypes.GetPolicyRequest{ Id: req.Id, }) if err != nil { return nil, err } if response == nil { return nil, errors.ErrPolicyNotFound(req.Id) } record, err := types.MapPolicy(response.Record) if err != nil { return nil, err } return &types.QueryPolicyResponse{ Record: record, }, nil } ================================================ FILE: x/acp/keeper/query_policy_ids.go ================================================ package keeper import ( "context" "encoding/binary" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/utils" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) PolicyIds(goCtx context.Context, req *types.QueryPolicyIdsRequest) (*types.QueryPolicyIdsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) resp, err := engine.ListPolicies(ctx, &coretypes.ListPoliciesRequest{}) if err != nil { return nil, err } // Use MapNullableSlice to filter out 'nil' policies and get policy IDs allPolicyIds := utils.MapNullableSlice(resp.Records, func(p *coretypes.PolicyRecord) string { return p.Policy.Id }) // Apply pagination policyIds, pageRes := paginateSlice(allPolicyIds, req.Pagination) return &types.QueryPolicyIdsResponse{ Ids: policyIds, Pagination: pageRes, }, nil } // paginateSlice applies pagination to a slice of strings following Cosmos SDK patterns. func paginateSlice(items []string, pageReq *query.PageRequest) ([]string, *query.PageResponse) { total := uint64(len(items)) if pageReq == nil { return items, &query.PageResponse{Total: total} } // Handle key-based pagination offset := pageReq.Offset if len(pageReq.Key) > 0 { // Decode offset from key (uint64 = 8 bytes) if len(pageReq.Key) != 8 { return []string{}, &query.PageResponse{ Total: total, } } offset = binary.BigEndian.Uint64(pageReq.Key) } // Determine limit limit := pageReq.Limit if limit == 0 { if offset > 0 { limit = query.DefaultLimit } else { return items, &query.PageResponse{Total: total} } } if limit > query.PaginationMaxLimit { limit = query.PaginationMaxLimit } // Validate offset if offset >= total { return []string{}, &query.PageResponse{Total: total} } // Calculate end index end := offset + limit if end > total { end = total } result := items[offset:end] // Encode next key using proper uint64 encoding var nextKey []byte if end < total { nextKey = make([]byte, 8) binary.BigEndian.PutUint64(nextKey, end) } return result, &query.PageResponse{ NextKey: nextKey, Total: total, } } ================================================ FILE: x/acp/keeper/query_policy_ids_test.go ================================================ package keeper import ( "context" "strconv" "strings" "testing" "text/template" "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type queryPolicyIdsSuite struct { suite.Suite } func TestPolicyIds(t *testing.T) { suite.Run(t, &queryPolicyIdsSuite{}) } func (s *queryPolicyIdsSuite) setupPolicies( t *testing.T, ctx context.Context, k Keeper, creator string, policyNames []string, marshalingType coretypes.PolicyMarshalingType, ) []string { polTemplate := ` name: {{.Name}} description: {{.Name}} meta: k1: v1 k2: v2 resources: - name: file permissions: - name: manage relations: - name: reader ` policyIds := []string{} for _, name := range policyNames { params := map[string]string{ "Name": name, } tmp, err := template.New("test").Parse(polTemplate) require.NoError(t, err) builder := strings.Builder{} err = tmp.Execute(&builder, params) require.NoError(t, err) msg := types.MsgCreatePolicy{ Creator: creator, Policy: builder.String(), MarshalType: marshalingType, } resp, err := k.CreatePolicy(ctx, &msg) require.NoError(t, err) require.NotNil(t, resp) policyIds = append(policyIds, resp.Record.Policy.Id) } return policyIds } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_YAML() { ctx, k, accKeep := setupKeeper(s.T()) creator := accKeep.FirstAcc().GetAddress().String() policyIds := s.setupPolicies(s.T(), ctx, k, creator, []string{"P1", "P2", "P3"}, coretypes.PolicyMarshalingType_YAML) resp, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{}) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.ElementsMatch(s.T(), policyIds, resp.Ids) } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_NoPoliciesRegistered() { ctx, k, _ := setupKeeper(s.T()) resp, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{}) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.Empty(s.T(), resp.Ids) } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_DuplicatePolicyNames() { ctx, k, accKeep := setupKeeper(s.T()) creator := accKeep.FirstAcc().GetAddress().String() _ = s.setupPolicies(s.T(), ctx, k, creator, []string{"P1", "P1"}, coretypes.PolicyMarshalingType_YAML) resp, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{}) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.Equal(s.T(), 2, len(resp.Ids)) } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_LargeNumberOfPolicies_YAML() { ctx, k, accKeep := setupKeeper(s.T()) creator := accKeep.FirstAcc().GetAddress().String() names := []string{} for i := 0; i < 10_000; i++ { names = append(names, "Policy"+strconv.Itoa(i)) } policyIds := s.setupPolicies(s.T(), ctx, k, creator, names, coretypes.PolicyMarshalingType_YAML) resp, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{}) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.ElementsMatch(s.T(), policyIds, resp.Ids) } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_WithPagination() { ctx, k, accKeep := setupKeeper(s.T()) creator := accKeep.FirstAcc().GetAddress().String() // Create 25 policies names := []string{} for i := 0; i < 25; i++ { names = append(names, "Policy"+strconv.Itoa(i)) } allPolicyIds := s.setupPolicies(s.T(), ctx, k, creator, names, coretypes.PolicyMarshalingType_YAML) // Test first page with limit 10 resp1, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp1) require.Len(s.T(), resp1.Ids, 10) require.Equal(s.T(), uint64(25), resp1.Pagination.Total) require.NotNil(s.T(), resp1.Pagination.NextKey) // Test second page with offset 10 resp2, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Offset: 10, Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp2) require.Len(s.T(), resp2.Ids, 10) require.Equal(s.T(), uint64(25), resp2.Pagination.Total) // Test third page with offset 20 (should get remaining 5) resp3, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Offset: 20, Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp3) require.Len(s.T(), resp3.Ids, 5) require.Equal(s.T(), uint64(25), resp3.Pagination.Total) require.Nil(s.T(), resp3.Pagination.NextKey) // Verify all pages combined match all policy IDs allPages := append(resp1.Ids, resp2.Ids...) allPages = append(allPages, resp3.Ids...) require.ElementsMatch(s.T(), allPolicyIds, allPages) // Verify no overlap between pages require.NotContains(s.T(), resp2.Ids, resp1.Ids[0]) require.NotContains(s.T(), resp3.Ids, resp1.Ids[0]) require.NotContains(s.T(), resp3.Ids, resp2.Ids[0]) } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_WithKeyBasedPagination() { ctx, k, accKeep := setupKeeper(s.T()) creator := accKeep.FirstAcc().GetAddress().String() // Create 25 policies names := []string{} for i := 0; i < 25; i++ { names = append(names, "Policy"+strconv.Itoa(i)) } allPolicyIds := s.setupPolicies(s.T(), ctx, k, creator, names, coretypes.PolicyMarshalingType_YAML) // Test first page with limit 10 resp1, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp1) require.Len(s.T(), resp1.Ids, 10) require.Equal(s.T(), uint64(25), resp1.Pagination.Total) require.NotNil(s.T(), resp1.Pagination.NextKey) // Test second page using NextKey from first page resp2, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Key: resp1.Pagination.NextKey, Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp2) require.Len(s.T(), resp2.Ids, 10) require.Equal(s.T(), uint64(25), resp2.Pagination.Total) require.NotNil(s.T(), resp2.Pagination.NextKey) // Test third page using NextKey from second page resp3, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Key: resp2.Pagination.NextKey, Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp3) require.Len(s.T(), resp3.Ids, 5) require.Equal(s.T(), uint64(25), resp3.Pagination.Total) require.Nil(s.T(), resp3.Pagination.NextKey) // Verify all pages combined match all policy IDs allPages := append(resp1.Ids, resp2.Ids...) allPages = append(allPages, resp3.Ids...) require.ElementsMatch(s.T(), allPolicyIds, allPages) // Verify no overlap between pages require.NotContains(s.T(), resp2.Ids, resp1.Ids[0]) require.NotContains(s.T(), resp3.Ids, resp1.Ids[0]) require.NotContains(s.T(), resp3.Ids, resp2.Ids[0]) } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_LargeOffset() { ctx, k, accKeep := setupKeeper(s.T()) creator := accKeep.FirstAcc().GetAddress().String() // Create policies to test large offset handling names := []string{} for i := 0; i < 100; i++ { names = append(names, "Policy"+strconv.Itoa(i)) } _ = s.setupPolicies(s.T(), ctx, k, creator, names, coretypes.PolicyMarshalingType_YAML) // Test with offset beyond total resp, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Offset: 300, Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.Empty(s.T(), resp.Ids) require.Equal(s.T(), uint64(100), resp.Pagination.Total) } func (s *queryPolicyIdsSuite) TestQueryPolicyIds_MalformedKey() { ctx, k, accKeep := setupKeeper(s.T()) creator := accKeep.FirstAcc().GetAddress().String() names := []string{"P1", "P2", "P3"} _ = s.setupPolicies(s.T(), ctx, k, creator, names, coretypes.PolicyMarshalingType_YAML) // Test with malformed key resp, err := k.PolicyIds(ctx, &types.QueryPolicyIdsRequest{ Pagination: &query.PageRequest{ Key: []byte{0x01, 0x02}, // Only 2 bytes instead of 8 Limit: 10, }, }) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.Empty(s.T(), resp.Ids) // Should return empty on malformed key require.Equal(s.T(), uint64(3), resp.Pagination.Total) } ================================================ FILE: x/acp/keeper/query_policy_test.go ================================================ package keeper import ( "context" "testing" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type queryPolicySuite struct { suite.Suite } func TestQueryPolicy(t *testing.T) { suite.Run(t, &queryPolicySuite{}) } func (s *queryPolicySuite) setupPolicy(t *testing.T) (context.Context, Keeper, string) { policyStr := ` description: A valid policy name: Source Policy resources: - name: file permissions: - name: read - name: write relations: - name: rm-root ` ctx, k, accKeep := setupKeeper(t) creator := accKeep.FirstAcc().GetAddress().String() msg := types.MsgCreatePolicy{ Creator: creator, Policy: policyStr, MarshalType: coretypes.PolicyMarshalingType_YAML, } resp, err := k.CreatePolicy(ctx, &msg) require.NoError(t, err) return ctx, k, resp.Record.Policy.Id } func (s *queryPolicySuite) TestQueryPolicy_Success() { ctx, k, policyID := s.setupPolicy(s.T()) req := types.QueryPolicyRequest{ Id: policyID, } resp, err := k.Policy(ctx, &req) require.NoError(s.T(), err) require.NotNil(s.T(), resp) require.Equal(s.T(), "Source Policy", resp.Record.Policy.Name) require.Equal(s.T(), "A valid policy", resp.Record.Policy.Description) } func (s *queryPolicySuite) TestQueryPolicy_UnknownPolicyReturnsPolicyNotFoundErr() { ctx, k, _ := setupKeeper(s.T()) req := types.QueryPolicyRequest{ Id: "not found", } resp, err := k.Policy(ctx, &req) require.Nil(s.T(), resp) require.ErrorIs(s.T(), err, errors.ErrorType_NOT_FOUND) require.Contains(s.T(), err.Error(), "policy not found") } func (s *queryPolicySuite) TestQueryPolicy_NilRequestReturnsInvalidRequestErr() { ctx, k, _ := setupKeeper(s.T()) resp, err := k.Policy(ctx, nil) require.Nil(s.T(), resp) require.Error(s.T(), err) require.Contains(s.T(), err.Error(), "invalid request") } ================================================ FILE: x/acp/keeper/query_registrations_commitment.go ================================================ package keeper import ( "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/sourcenetwork/sourcehub/x/acp/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) func (k *Keeper) RegistrationsCommitment( goCtx context.Context, req *types.QueryRegistrationsCommitmentRequest, ) (*types.QueryRegistrationsCommitmentResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) repo := k.getRegistrationsCommitmentRepository(ctx) opt, err := repo.GetById(ctx, req.Id) if err != nil { return nil, err } if opt.Empty() { return nil, errors.Wrap("commitment not found", errors.ErrorType_NOT_FOUND, errors.Pair("commitment", fmt.Sprintf("%v", req.Id)), ) } return &types.QueryRegistrationsCommitmentResponse{ RegistrationsCommitment: opt.GetValue(), }, nil } ================================================ FILE: x/acp/keeper/query_registrations_commitment_by_commitment.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/raccoondb/v2/iterator" "github.com/sourcenetwork/sourcehub/x/acp/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) func (k *Keeper) RegistrationsCommitmentByCommitment( goCtx context.Context, req *types.QueryRegistrationsCommitmentByCommitmentRequest, ) (*types.QueryRegistrationsCommitmentByCommitmentResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) repo := k.getRegistrationsCommitmentRepository(ctx) iter, err := repo.FilterByCommitment(ctx, req.Commitment) if err != nil { return nil, err } commitments, err := iterator.Consume(ctx, iter) if err != nil { return nil, err } return &types.QueryRegistrationsCommitmentByCommitmentResponse{ RegistrationsCommitments: commitments, }, nil } ================================================ FILE: x/acp/keeper/query_validate_policy.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) ValidatePolicy( goCtx context.Context, req *types.QueryValidatePolicyRequest, ) (*types.QueryValidatePolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) resp, err := engine.ValidatePolicy(ctx, &coretypes.ValidatePolicyRequest{ Policy: req.Policy, MarshalType: req.MarshalType, }) if err != nil { return nil, err } return &types.QueryValidatePolicyResponse{ Valid: resp.Valid, ErrorMsg: resp.ErrorMsg, Policy: resp.Policy, }, nil } ================================================ FILE: x/acp/keeper/query_validate_policy_test.go ================================================ package keeper import ( "testing" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type queryValidatePolicySuite struct { suite.Suite } func TestValidatePolicy(t *testing.T) { suite.Run(t, &queryValidatePolicySuite{}) } func (s *queryValidatePolicySuite) TestValidatePolicy_ValidPolicy() { ctx, k, _ := setupKeeper(s.T()) req := &types.QueryValidatePolicyRequest{ Policy: ` description: A valid policy name: Source Policy resources: - name: file permissions: - name: read - name: write `, MarshalType: coretypes.PolicyMarshalingType_YAML, } result, err := k.ValidatePolicy(ctx, req) want := &types.QueryValidatePolicyResponse{ Valid: true, ErrorMsg: "", Policy: &coretypes.Policy{ Id: "", Name: "Source Policy", Description: "A valid policy", ActorResource: &coretypes.ActorResource{ Name: "actor", Doc: "actor resource models the set of actors defined within a policy", }, Attributes: nil, SpecificationType: 0, Resources: []*coretypes.Resource{ { Name: "file", Permissions: []*coretypes.Permission{ { Name: "read", Expression: "", EffectiveExpression: "owner", }, { Name: "write", Expression: "", EffectiveExpression: "owner", }, }, Relations: []*coretypes.Relation{}, ManagementRules: []*coretypes.ManagementRule{ { Relation: "owner", Expression: "owner", Managers: []string{ "owner", }, }, }, Owner: &coretypes.Relation{ Name: "owner", Doc: "owner relations represents the object owner", Manages: []string{"owner"}, VrTypes: []*coretypes.Restriction{ { ResourceName: "actor", }, }, }, }, }, }, } require.Equal(s.T(), want, result) require.Nil(s.T(), err) } func (s *queryValidatePolicySuite) TestValidatePolicy_ComplexValidPolicy() { ctx, k, _ := setupKeeper(s.T()) req := &types.QueryValidatePolicyRequest{ Policy: ` description: Another valid policy name: Source Policy resources: - name: file permissions: - doc: own doc name: own - expr: reader name: read relations: - manages: - reader name: admin - name: reader `, MarshalType: coretypes.PolicyMarshalingType_YAML, } result, err := k.ValidatePolicy(ctx, req) require.True(s.T(), result.Valid) require.Nil(s.T(), err) } func (s *queryValidatePolicySuite) TestValidatePolicy_InvalidSyntax() { ctx, k, _ := setupKeeper(s.T()) req := &types.QueryValidatePolicyRequest{ Policy: ` name: Invalid policy description: Policy with invalid syntax resources: file permissions: read: expr: owner `, MarshalType: coretypes.PolicyMarshalingType_YAML, } result, err := k.ValidatePolicy(ctx, req) require.NotNil(s.T(), result) require.False(s.T(), result.Valid) require.Contains(s.T(), result.ErrorMsg, "mapping values are not allowed in this context") require.Nil(s.T(), err) } func (s *queryValidatePolicySuite) TestValidatePolicy_EmptyPolicy() { ctx, k, _ := setupKeeper(s.T()) req := &types.QueryValidatePolicyRequest{ Policy: "", MarshalType: coretypes.PolicyMarshalingType_YAML, } result, err := k.ValidatePolicy(ctx, req) require.False(s.T(), result.Valid) require.Contains(s.T(), result.ErrorMsg, "name required") require.Nil(s.T(), err) } ================================================ FILE: x/acp/keeper/query_verify_access_request.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func (k *Keeper) VerifyAccessRequest( goCtx context.Context, req *types.QueryVerifyAccessRequestRequest, ) (*types.QueryVerifyAccessRequestResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) engine := k.getACPEngine(ctx) actorId := req.AccessRequest.Actor.Id if did, err := k.GetActorDID(ctx, actorId); err == nil { req.AccessRequest.Actor.Id = did } result, err := engine.VerifyAccessRequest(ctx, &coretypes.VerifyAccessRequestRequest{ PolicyId: req.PolicyId, AccessRequest: req.AccessRequest, }) if err != nil { return nil, err } return &types.QueryVerifyAccessRequestResponse{ Valid: result.Valid, }, nil } ================================================ FILE: x/acp/keeper/query_verify_access_request_test.go ================================================ package keeper import ( "context" "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type queryVerifyAccessRequestSuite struct { suite.Suite } func TestVerifyAccessRequest(t *testing.T) { suite.Run(t, &queryVerifyAccessRequestSuite{}) } func setupTestVerifyAccessRequest(t *testing.T) (context.Context, Keeper, *coretypes.Policy, string) { ctx, k, accKeep := setupKeeper(t) creatorAcc := accKeep.GenAccount() creator := creatorAcc.GetAddress().String() creatorDID, _ := did.IssueDID(creatorAcc) obj := coretypes.NewObject("file", "1") policyStr := ` name: policy resources: - name: file permissions: - name: read - name: write relations: - name: rm-root ` msg := types.MsgCreatePolicy{ Creator: creator, Policy: policyStr, MarshalType: coretypes.PolicyMarshalingType_YAML, } resp, err := k.CreatePolicy(ctx, &msg) require.Nil(t, err) _, err = k.DirectPolicyCmd(ctx, &types.MsgDirectPolicyCmd{ Creator: creator, PolicyId: resp.Record.Policy.Id, Cmd: types.NewRegisterObjectCmd(obj), }) require.Nil(t, err) return ctx, k, resp.Record.Policy, creatorDID } func (s *queryVerifyAccessRequestSuite) TestVerifyAccessRequest_QueryingObjectsTheActorHasAccessToReturnsTrue() { ctx, k, pol, creator := setupTestVerifyAccessRequest(s.T()) req := &types.QueryVerifyAccessRequestRequest{ PolicyId: pol.Id, AccessRequest: &coretypes.AccessRequest{ Operations: []*coretypes.Operation{ { Object: coretypes.NewObject("file", "1"), Permission: "read", }, { Object: coretypes.NewObject("file", "1"), Permission: "write", }, }, Actor: &coretypes.Actor{ Id: creator, }, }, } result, err := k.VerifyAccessRequest(ctx, req) want := &types.QueryVerifyAccessRequestResponse{ Valid: true, } require.Equal(s.T(), want, result) require.Nil(s.T(), err) } func (s *queryVerifyAccessRequestSuite) TestVerifyAccessRequest_QueryingOperationActorIsNotAuthorizedReturnNotValid() { ctx, k, pol, creator := setupTestVerifyAccessRequest(s.T()) req := &types.QueryVerifyAccessRequestRequest{ PolicyId: pol.Id, AccessRequest: &coretypes.AccessRequest{ Operations: []*coretypes.Operation{ { Object: coretypes.NewObject("file", "1"), Permission: "rm-root", }, }, Actor: &coretypes.Actor{ Id: creator, }, }, } result, err := k.VerifyAccessRequest(ctx, req) want := &types.QueryVerifyAccessRequestResponse{ Valid: false, } require.Equal(s.T(), want, result) require.Nil(s.T(), err) } func (s *queryVerifyAccessRequestSuite) TestVerifyAccessRequest_QueryingObjectThatDoesNotExistReturnValidFalse() { ctx, k, pol, creator := setupTestVerifyAccessRequest(s.T()) req := &types.QueryVerifyAccessRequestRequest{ PolicyId: pol.Id, AccessRequest: &coretypes.AccessRequest{ Operations: []*coretypes.Operation{ { Object: coretypes.NewObject("file", "file-that-is-not-registered"), Permission: "read", }, }, Actor: &coretypes.Actor{ Id: creator, }, }, } result, err := k.VerifyAccessRequest(ctx, req) want := &types.QueryVerifyAccessRequestResponse{ Valid: false, } require.Equal(s.T(), want, result) require.Nil(s.T(), err) } ================================================ FILE: x/acp/keeper/utils.go ================================================ package keeper import ( "context" "fmt" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" ed25519sdk "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" "github.com/sourcenetwork/acp_core/pkg/errors" hubtypes "github.com/sourcenetwork/sourcehub/types" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // IssueDIDFromAccountAddr issues a DID based on the specified address string. func (k *Keeper) IssueDIDFromAccountAddr(ctx context.Context, addr string) (string, error) { sdkAddr, err := hubtypes.AccAddressFromBech32(addr) if err != nil { return "", fmt.Errorf("IssueDIDFromAccountAddr: %v: %w", err, types.NewErrInvalidAccAddrErr(err, addr)) } acc := k.accountKeeper.GetAccount(ctx, sdkAddr) if acc == nil { return "", fmt.Errorf("IssueDIDFromAccountAddr: %w", types.NewAccNotFoundErr(addr)) } // Check if this is an ICA address if _, found := k.hubKeeper.GetICAConnection(sdk.UnwrapSDKContext(ctx), addr); found { controllerDID := did.IssueInterchainAccountDID(addr) return controllerDID, nil } did, err := did.IssueDID(acc) if err != nil { return "", errors.NewWithCause("could not issue did", err, errors.ErrorType_BAD_INPUT, errors.Pair("address", addr), ) } return did, nil } // GetAddressFromDID extracts and returns the bech32 address from a DID. func (k *Keeper) GetAddressFromDID(ctx context.Context, didStr string) (sdk.AccAddress, error) { if err := did.IsValidDID(didStr); err != nil { return nil, fmt.Errorf("invalid DID: %w", err) } didKey := key.DIDKey(didStr) pubBytes, _, keyType, err := didKey.Decode() if err != nil { return nil, fmt.Errorf("failed to decode DID key: %w", err) } var pubKey cryptotypes.PubKey switch keyType { case crypto.SECP256k1: pubKey = &secp256k1.PubKey{Key: pubBytes} case crypto.Ed25519: pubKey = &ed25519sdk.PubKey{Key: pubBytes} default: return nil, fmt.Errorf("unsupported key type: %v", keyType) } addr := sdk.AccAddress(pubKey.Address()) return addr, nil } ================================================ FILE: x/acp/keeper/utils_test.go ================================================ package keeper import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) func TestIssueDIDFromAccountAddr(t *testing.T) { ctx, k, accountKeeper := setupKeeper(t) t.Run("empty address", func(t *testing.T) { did, err := k.IssueDIDFromAccountAddr(ctx, "") require.Error(t, err) require.Empty(t, did) }) t.Run("valid regular account address", func(t *testing.T) { account := accountKeeper.GenAccount() addr := account.GetAddress().String() did, err := k.IssueDIDFromAccountAddr(ctx, addr) require.NoError(t, err) require.NotEmpty(t, did) require.Contains(t, did, "did:key:") }) t.Run("invalid address format", func(t *testing.T) { invalidAddr := "invalid-address" did, err := k.IssueDIDFromAccountAddr(ctx, invalidAddr) require.Error(t, err) require.Empty(t, did) require.Contains(t, err.Error(), "IssueDIDFromAccountAddr") }) t.Run("valid address but account not found", func(t *testing.T) { nonExistentAddr := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" did, err := k.IssueDIDFromAccountAddr(ctx, nonExistentAddr) require.Error(t, err) require.Empty(t, did) require.Contains(t, err.Error(), "account not found") }) t.Run("ICA address - should use IssueInterchainAccountDID", func(t *testing.T) { icaAccount := accountKeeper.GenAccount() icaAddress := icaAccount.GetAddress().String() controllerAddress := "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" controllerChainID := "shinzo-1" connectionID := "connection-0" err := k.hubKeeper.SetICAConnection(sdk.UnwrapSDKContext(ctx), icaAddress, controllerAddress, controllerChainID, connectionID) require.NoError(t, err) did, err := k.IssueDIDFromAccountAddr(ctx, icaAddress) require.NoError(t, err) require.NotEmpty(t, did) require.Contains(t, did, "did:ica:") }) t.Run("ICA address without account should still fail", func(t *testing.T) { icaAddress := "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy" controllerAddress := "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" controllerChainID := "shinzo-1" connectionID := "connection-1" err := k.hubKeeper.SetICAConnection(sdk.UnwrapSDKContext(ctx), icaAddress, controllerAddress, controllerChainID, connectionID) require.NoError(t, err) did, err := k.IssueDIDFromAccountAddr(ctx, icaAddress) require.Error(t, err) require.Empty(t, did) require.Contains(t, err.Error(), "account not found") }) t.Run("ICA address with account exists", func(t *testing.T) { icaAccount := accountKeeper.GenAccount() icaAddress := icaAccount.GetAddress().String() controllerAddress := "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" controllerChainID := "shinzo-1" connectionID := "connection-full" err := k.hubKeeper.SetICAConnection(sdk.UnwrapSDKContext(ctx), icaAddress, controllerAddress, controllerChainID, connectionID) require.NoError(t, err) did, err := k.IssueDIDFromAccountAddr(ctx, icaAddress) require.NoError(t, err) require.NotEmpty(t, did) require.Contains(t, did, "did:ica:") connection, found := k.hubKeeper.GetICAConnection(sdk.UnwrapSDKContext(ctx), icaAddress) require.True(t, found) require.Equal(t, controllerAddress, connection.ControllerAddress) require.Equal(t, controllerChainID, connection.ControllerChainId) require.Equal(t, connectionID, connection.ConnectionId) }) } func TestGetAddressFromDID(t *testing.T) { ctx, k, accountKeeper := setupKeeper(t) t.Run("round-trip: account -> DID -> address", func(t *testing.T) { account := accountKeeper.GenAccount() originalAddr := account.GetAddress() did, err := k.IssueDIDFromAccountAddr(ctx, originalAddr.String()) require.NoError(t, err) require.NotEmpty(t, did) require.Contains(t, did, "did:key:") derivedAddr, err := k.GetAddressFromDID(ctx, did) require.NoError(t, err) require.NotNil(t, derivedAddr) require.Equal(t, originalAddr.String(), derivedAddr.String(), "Address derived from DID should match original address") }) t.Run("invalid DID format", func(t *testing.T) { invalidDID := "not-a-valid-did" addr, err := k.GetAddressFromDID(ctx, invalidDID) require.Error(t, err) require.Nil(t, addr) require.Contains(t, err.Error(), "invalid DID") }) t.Run("empty DID", func(t *testing.T) { addr, err := k.GetAddressFromDID(ctx, "") require.Error(t, err) require.Nil(t, addr) }) t.Run("valid did:key format with secp256k1", func(t *testing.T) { testDID := "did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme" addr, err := k.GetAddressFromDID(ctx, testDID) require.NoError(t, err) require.NotNil(t, addr) require.NotEmpty(t, addr.String()) require.True(t, len(addr) > 0) }) t.Run("multiple conversions of same DID produce same address", func(t *testing.T) { account := accountKeeper.GenAccount() originalAddr := account.GetAddress() did, err := k.IssueDIDFromAccountAddr(ctx, originalAddr.String()) require.NoError(t, err) addr1, err := k.GetAddressFromDID(ctx, did) require.NoError(t, err) addr2, err := k.GetAddressFromDID(ctx, did) require.NoError(t, err) addr3, err := k.GetAddressFromDID(ctx, did) require.NoError(t, err) require.Equal(t, addr1.String(), addr2.String()) require.Equal(t, addr2.String(), addr3.String()) require.Equal(t, originalAddr.String(), addr1.String()) }) } ================================================ FILE: x/acp/metrics/metrics.go ================================================ package metrics const ( // counter // label for grpc method // not sure - host? weird because scraping multiple targets would skew the distribution since everyone executes this msg MsgTotal = "sourcehub_acp_msg_total" // counter // label for grpc method MsgErrors = "sourcehub_acp_msg_errors_total" // histogram // label for grpc method MsgSeconds = "sourcehub_acp_msg_seconds" // counter InvariantViolation = "sourcehub_acp_invariant_violation_total" // counter // label for grpc method QueryTotal = "sourcehub_acp_query_total" // counter // label for grpc method (?) QueryErrors = "sourcehub_acp_query_errors_total" // histogram // label for grpc method // label for error or not QuerySeconds = "sourcehub_acp_query_seconds" ) ================================================ FILE: x/acp/module/autocli.go ================================================ package acp import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/acp" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.Query_ServiceDesc.ServiceName, EnhanceCustomCommand: true, // only required if you want to use the custom command RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Params", Use: "params", Short: "Shows the parameters of the module", }, { RpcMethod: "Policy", Use: "policy [id]", Short: "Queries for a Policy by its ID", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, }, { RpcMethod: "PolicyIds", Use: "policy-ids", Short: "Lists Registered Policies IDs", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, { RpcMethod: "ValidatePolicy", Use: "validate-policy [policy] [marshal_type]", Short: "Validates the Payload of a Policy", PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "policy"}, {ProtoField: "marshal_type"}, }, }, { RpcMethod: "AccessDecision", Use: "access-decision [id]", Short: "Returns an AccessDecision by its id", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, }, { RpcMethod: "RegistrationsCommitment", Use: "registrations-commitment", Short: "Query RegistrationsCommitment", PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "id"}, }, }, { RpcMethod: "RegistrationsCommitmentByCommitment", Use: "registrations-commitment-by-commitment", Short: "Query RegistrationsCommitmentByCommitment", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, { RpcMethod: "HijackAttemptsByPolicy", Use: "hijack-attempts-by-policy", Short: "Query HijackAttemptsByPolicy", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, // this line is used by ignite scaffolding # autocli/query }, }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.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 }, // this line is used by ignite scaffolding # autocli/tx }, }, } } ================================================ FILE: x/acp/module/genesis.go ================================================ package acp import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState) { k.SetParams(ctx, genState.Params) } // ExportGenesis returns the module's exported genesis. func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) return genesis } ================================================ FILE: x/acp/module/genesis_test.go ================================================ package acp_test import ( "testing" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/testutil/nullify" acp "github.com/sourcenetwork/sourcehub/x/acp/module" "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/stretchr/testify/require" ) func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), } k, ctx := keepertest.AcpKeeper(t) acp.InitGenesis(ctx, &k, genesisState) got := acp.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) nullify.Fill(&genesisState) nullify.Fill(got) } ================================================ FILE: x/acp/module/module.go ================================================ package acp import ( "context" "encoding/json" "fmt" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/acp/module" "github.com/sourcenetwork/sourcehub/app/metrics" "github.com/sourcenetwork/sourcehub/x/acp/client/cli" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var ( _ module.AppModuleBasic = (*AppModule)(nil) _ module.AppModuleSimulation = (*AppModule)(nil) _ module.HasGenesis = (*AppModule)(nil) _ module.HasInvariants = (*AppModule)(nil) _ module.HasConsensusVersion = (*AppModule)(nil) _ appmodule.AppModule = (*AppModule)(nil) _ appmodule.HasBeginBlocker = (*AppModule)(nil) _ appmodule.HasEndBlocker = (*AppModule)(nil) ) // ---------------------------------------------------------------------------- // AppModuleBasic // ---------------------------------------------------------------------------- // AppModuleBasic implements the AppModuleBasic interface that defines the // independent methods a Cosmos SDK module needs to implement. type AppModuleBasic struct { cdc codec.BinaryCodec } func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } // Name returns the name of the module as a string. func (AppModuleBasic) Name() string { return types.ModuleName } // RegisterLegacyAminoCodec registers the amino codec for the module, which is used // to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } // 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 (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesis()) } // ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } return genState.Validate() } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { panic(err) } } // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- // AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement type AppModule struct { AppModuleBasic keeper *keeper.Keeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper } func NewAppModule( cdc codec.Codec, keeper *keeper.Keeper, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, accountKeeper: accountKeeper, bankKeeper: bankKeeper, } } // GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module func (a AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd() } // GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd(types.StoreKey) } // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { // Inject instrumentation into msg service handler descriptor := metrics.WrapMsgServerServiceDescriptor(types.ModuleName, types.Msg_serviceDesc) cfg.MsgServer().RegisterService(&descriptor, am.keeper) // Inject instrumentation into query service handler descriptor = metrics.WrapQueryServiceDescriptor(types.ModuleName, types.Query_serviceDesc) cfg.QueryServer().RegisterService(&descriptor, am.keeper) } // RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the module's genesis initialization. It returns no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { var genState types.GenesisState // Initialize global index to index in genesis state cdc.MustUnmarshalJSON(gs, &genState) InitGenesis(ctx, am.keeper, genState) } // ExportGenesis returns the module's exported genesis state as raw JSON bytes. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { genState := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(genState) } // 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(ctx context.Context) error { _, err := am.keeper.EndBlocker(ctx) if err != nil { am.keeper.Logger().Error("EndBlocker failed", "error", err) } return nil } // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} // ---------------------------------------------------------------------------- // App Wiring Setup // ---------------------------------------------------------------------------- func init() { appmodule.Register( &modulev1.Module{}, appmodule.Provide(ProvideModule), ) } type ModuleInputs struct { depinject.In StoreService store.KVStoreService Cdc codec.Codec Config *modulev1.Module Logger log.Logger AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper HubKeeper types.HubKeeper } type ModuleOutputs struct { depinject.Out AcpKeeper *keeper.Keeper Module appmodule.AppModule } func ProvideModule(in ModuleInputs) ModuleOutputs { // default to governance authority if not provided authority := authtypes.NewModuleAddress(govtypes.ModuleName) if in.Config.Authority != "" { authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) } k := keeper.NewKeeper( in.Cdc, in.StoreService, in.Logger, authority.String(), in.AccountKeeper, nil, // cap keeper is initialized after depinject is finished executing in.HubKeeper, ) m := NewAppModule( in.Cdc, &k, in.AccountKeeper, in.BankKeeper, ) return ModuleOutputs{AcpKeeper: &k, Module: m} } ================================================ FILE: x/acp/module/simulation.go ================================================ package acp import ( "math/rand" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/sourcenetwork/sourcehub/testutil/sample" acpsimulation "github.com/sourcenetwork/sourcehub/x/acp/simulation" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // avoid unused import issue var ( _ = acpsimulation.FindAccount _ = rand.Rand{} _ = sample.AccAddress _ = sdk.AccAddress{} _ = simulation.MsgEntryKind ) const ( opWeightMsgCreatePolicy = "op_weight_msg_create_policy" // TODO: Determine the simulation weight value defaultWeightMsgCreatePolicy int = 100 opWeightMsgCheckAccess = "op_weight_msg_check_access" // TODO: Determine the simulation weight value defaultWeightMsgCheckAccess int = 100 opWeightMsgPolicyCmd = "op_weight_msg_policy_cmd" // TODO: Determine the simulation weight value defaultWeightMsgPolicyCmd int = 100 opWeightMsgMsgEditPolicy = "op_weight_msg_msg_edit_policy" // TODO: Determine the simulation weight value defaultWeightMsgMsgEditPolicy int = 100 // this line is used by starport scaffolding # simapp/module/const ) // 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() } acpGenesis := types.GenesisState{ Params: types.DefaultParams(), // this line is used by starport scaffolding # simapp/module/genesisState } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&acpGenesis) } // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} // ProposalContents doesn't return any content functions for governance proposals. func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // 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) var weightMsgCreatePolicy int simState.AppParams.GetOrGenerate(opWeightMsgCreatePolicy, &weightMsgCreatePolicy, nil, func(_ *rand.Rand) { weightMsgCreatePolicy = defaultWeightMsgCreatePolicy }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgCreatePolicy, acpsimulation.SimulateMsgCreatePolicy(am.accountKeeper, am.bankKeeper, am.keeper), )) var weightMsgCheckAccess int simState.AppParams.GetOrGenerate(opWeightMsgCheckAccess, &weightMsgCheckAccess, nil, func(_ *rand.Rand) { weightMsgCheckAccess = defaultWeightMsgCheckAccess }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgCheckAccess, acpsimulation.SimulateMsgCheckAccess(am.accountKeeper, am.bankKeeper, am.keeper), )) var weightMsgPolicyCmd int simState.AppParams.GetOrGenerate(opWeightMsgPolicyCmd, &weightMsgPolicyCmd, nil, func(_ *rand.Rand) { weightMsgPolicyCmd = defaultWeightMsgPolicyCmd }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgPolicyCmd, acpsimulation.SimulateMsgPolicyCmd(am.accountKeeper, am.bankKeeper, am.keeper), )) var weightMsgMsgEditPolicy int simState.AppParams.GetOrGenerate(opWeightMsgMsgEditPolicy, &weightMsgMsgEditPolicy, nil, func(_ *rand.Rand) { weightMsgMsgEditPolicy = defaultWeightMsgMsgEditPolicy }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgMsgEditPolicy, acpsimulation.SimulateMsgMsgEditPolicy(am.accountKeeper, am.bankKeeper, am.keeper), )) // this line is used by starport scaffolding # simapp/module/operation return operations } // ProposalMsgs returns msgs used for governance proposals for simulations. func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { return []simtypes.WeightedProposalMsg{ simulation.NewWeightedProposalMsg( opWeightMsgCreatePolicy, defaultWeightMsgCreatePolicy, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { acpsimulation.SimulateMsgCreatePolicy(am.accountKeeper, am.bankKeeper, am.keeper) return nil }, ), simulation.NewWeightedProposalMsg( opWeightMsgCheckAccess, defaultWeightMsgCheckAccess, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { acpsimulation.SimulateMsgCheckAccess(am.accountKeeper, am.bankKeeper, am.keeper) return nil }, ), simulation.NewWeightedProposalMsg( opWeightMsgPolicyCmd, defaultWeightMsgPolicyCmd, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { acpsimulation.SimulateMsgPolicyCmd(am.accountKeeper, am.bankKeeper, am.keeper) return nil }, ), simulation.NewWeightedProposalMsg( opWeightMsgMsgEditPolicy, defaultWeightMsgMsgEditPolicy, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { acpsimulation.SimulateMsgMsgEditPolicy(am.accountKeeper, am.bankKeeper, am.keeper) return nil }, ), // this line is used by starport scaffolding # simapp/module/OpMsg } } ================================================ FILE: x/acp/registration/repository.go ================================================ package registration import ( "context" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/sourcenetwork/raccoondb/v2/iterator" "github.com/sourcenetwork/raccoondb/v2/marshal" "github.com/sourcenetwork/raccoondb/v2/store" "github.com/sourcenetwork/raccoondb/v2/table" rctypes "github.com/sourcenetwork/raccoondb/v2/types" "github.com/sourcenetwork/sourcehub/x/acp/stores" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // NewAmendmentEventRepository returns a repository which manages AmendmentEvent records func NewAmendmentEventRepository(kv store.KVStore) (*AmendmentEventRepository, error) { marshaler := stores.NewGogoProtoMarshaler(func() *types.AmendmentEvent { return &types.AmendmentEvent{} }) t := table.NewTable(kv, marshaler) getter := func(ev **types.AmendmentEvent) uint64 { return (*ev).Id } setter := func(ev **types.AmendmentEvent, id uint64) { (*ev).Id = id } incrementer := table.NewAutoIncrementer(t, getter, setter) extractor := func(ev **types.AmendmentEvent) string { return (*ev).PolicyId } polIdx, err := table.NewIndex(t, "policy", extractor, marshal.StringMarshaler{}) if err != nil { return nil, err } return &AmendmentEventRepository{ t: t, incrementer: incrementer, polIdx: polIdx, }, nil } // AmendmentEventRepository exposes operations // to access and store AmendmentEvent records type AmendmentEventRepository struct { t *table.Table[*types.AmendmentEvent] polIdx table.IndexReader[*types.AmendmentEvent, string] incrementer *table.Autoincrementer[*types.AmendmentEvent] } func (r *AmendmentEventRepository) wrapErr(err error) error { if err == nil { return err } return errors.NewWithCause("amendment event repository", err, errors.ErrorType_INTERNAL) } // create uses Raccoon's autoincrement to // insert a new event with an autoincremented ID func (r *AmendmentEventRepository) create(ctx context.Context, reg *types.AmendmentEvent) error { err := r.incrementer.Insert(ctx, ®) return r.wrapErr(err) } // update updates the data in a record func (r *AmendmentEventRepository) update(ctx context.Context, reg *types.AmendmentEvent) error { err := r.incrementer.Update(ctx, ®) return r.wrapErr(err) } // GetById returns a record with the given ID func (r *AmendmentEventRepository) GetById(ctx context.Context, id uint64) (rctypes.Option[*types.AmendmentEvent], error) { opt, err := r.incrementer.GetByID(ctx, id) if err != nil { return rctypes.None[*types.AmendmentEvent](), r.wrapErr(err) } return opt, nil } // ListHijackEventsByPolicy returns all flagged AmendmentEvents for a Policy func (r *AmendmentEventRepository) ListHijackEventsByPolicy(ctx context.Context, policyId string) (iterator.Iterator[*types.AmendmentEvent], error) { iter, err := r.ListEventsByPolicy(ctx, policyId) if err != nil { return nil, err } iter = iterator.Filter(iter, func(ev *types.AmendmentEvent) bool { return ev.HijackFlag }) return iter, nil } // ListEventsByPolicy returns all AmendmentEvents for a Policy func (r *AmendmentEventRepository) ListEventsByPolicy(ctx context.Context, policyId string) (iterator.Iterator[*types.AmendmentEvent], error) { keysIter, err := r.polIdx.IterateKeys(ctx, &policyId, store.NewOpenIterator()) if err != nil { return nil, r.wrapErr(err) } iter := table.MaterializeObjects(ctx, r.t, keysIter) return iter, nil } ================================================ FILE: x/acp/registration/service.go ================================================ package registration import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/auth" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/sourcenetwork/acp_core/pkg/services" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/commitment" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // NewRegistrationService returns an abstraction // layer which exposes object registration operations func NewRegistrationService(engine *services.EngineService, eventRepo *AmendmentEventRepository, commitmentService *commitment.CommitmentService) *RegistrationService { return &RegistrationService{ engine: engine, commitmentService: commitmentService, eventRepo: eventRepo, } } // RegistrationService abstracts object registration operations type RegistrationService struct { engine *services.EngineService commitmentService *commitment.CommitmentService eventRepo *AmendmentEventRepository } // UnarchiveObject flags a given object as active, effectively re-establishing the owner relationship. // Only the previous owner can unarchive an object. // This operation is idempotent. // // If no change to the state was made, returns a nil ObjectRegistrationEvent. // If an error happened, returns nil, nil and error func (s *RegistrationService) UnarchiveObject(ctx sdk.Context, polId string, object *coretypes.Object) (*coretypes.UnarchiveObjectResponse, error) { return s.engine.UnarchiveObject(ctx, &coretypes.UnarchiveObjectRequest{ PolicyId: polId, Object: object, }) } // ArchiveObject flags an object as archived and // removes relationships from it func (s *RegistrationService) ArchiveObject(ctx sdk.Context, polId string, object *coretypes.Object) (*coretypes.ArchiveObjectResponse, error) { return s.engine.ArchiveObject(ctx, &coretypes.ArchiveObjectRequest{ PolicyId: polId, Object: object, }) } // RegisterObject attempts to bind an object id to an actor // If the object has been previously registered, returns an error // // This operation is not idempotent. func (s *RegistrationService) RegisterObject(ctx sdk.Context, polId string, object *coretypes.Object, actor *coretypes.Actor, msgCreator string) (*coretypes.RegisterObjectResponse, error) { metadata, err := types.BuildACPSuppliedMetadata(ctx, actor.Id, msgCreator) if err != nil { return nil, err } return s.engine.RegisterObject(ctx, &coretypes.RegisterObjectRequest{ PolicyId: polId, Object: object, Metadata: metadata, }) } // amendRegistration transfers the ownership of the object in record // to actor. // a new amendment event is created func (s *RegistrationService) amendRegistration(ctx sdk.Context, commitment *types.RegistrationsCommitment, record *coretypes.RelationshipRecord, actor *coretypes.Actor, msgCreator string) (*coretypes.RelationshipRecord, *types.AmendmentEvent, error) { object := record.Relationship.Object registrationMetadata, err := types.ExtractRecordMetadata(record.Metadata) if err != nil { return nil, nil, err } // registration is older than commitment if registrationMetadata.CreationTs.BlockHeight < commitment.Metadata.CreationTs.BlockHeight { return nil, nil, errors.Wrap("amendment failed: current registration older than commitment", errors.ErrorType_OPERATION_FORBIDDEN, errors.Pair("policy", commitment.PolicyId), errors.Pair("resource", object.Resource), errors.Pair("object", object.Id), ) } amendMetadata, err := types.BuildACPSuppliedMetadataWithTime(ctx, commitment.Metadata.CreationTs, actor.Id, msgCreator) if err != nil { return nil, nil, err } goCtx := auth.InjectPrincipal(ctx, coretypes.RootPrincipal()) ctx = ctx.WithContext(goCtx) result, err := s.engine.AmendRegistration(ctx, &coretypes.AmendRegistrationRequest{ PolicyId: commitment.PolicyId, Object: object, NewOwner: actor, NewCreationTs: commitment.Metadata.CreationTs.ProtoTs, Metadata: amendMetadata, }) if err != nil { return nil, nil, err } eventMetadata, err := types.BuildRecordMetadata(ctx, actor.Id, msgCreator) if err != nil { return nil, nil, err } event := &types.AmendmentEvent{ Id: 0, // doesn't matter, will get autogenerated PolicyId: commitment.PolicyId, Object: object, NewOwner: actor, PreviousOwner: coretypes.NewActor(record.Metadata.Creator.Identifier), CommitmentId: commitment.Id, HijackFlag: false, Metadata: eventMetadata, } err = s.eventRepo.create(ctx, event) if err != nil { return nil, nil, err } return result.Record, event, nil } // RevealRegistration attempts to register an object from a commitment opening. // If the opening is valid, registers the object. // Returns an AmendmentEvent if the object registration was amended // // In the event where the opening is valid and the object was already registered, // if the commitment is older than the registration, run the amendment protocol // which transfers the object's ownership to the commitment author. func (s *RegistrationService) RevealRegistration(ctx sdk.Context, commitmentId uint64, proof *types.RegistrationProof, actor *coretypes.Actor, msgSigner string) (*coretypes.RelationshipRecord, *types.AmendmentEvent, error) { commitment, ok, err := s.commitmentService.ValidateOpening(ctx, commitmentId, proof, actor) if err != nil { return nil, nil, err } if !ok { return nil, nil, errors.Wrap("invalid registration opening", errors.ErrorType_UNAUTHORIZED) } registrationRecord, err := s.engine.GetObjectRegistration(ctx, &coretypes.GetObjectRegistrationRequest{ PolicyId: commitment.PolicyId, Object: proof.Object, }) if err != nil { return nil, nil, err } if !registrationRecord.IsRegistered { // Use the commitment creation ts to prevent a secondary amendment metadata, err := types.BuildACPSuppliedMetadataWithTime(ctx, commitment.Metadata.CreationTs, actor.Id, msgSigner) if err != nil { return nil, nil, err } result, err := s.engine.RevealRegistration(ctx, &coretypes.RevealRegistrationRequest{ PolicyId: commitment.PolicyId, Object: proof.Object, Metadata: metadata, CreationTs: commitment.Metadata.CreationTs.ProtoTs, }) if err != nil { return nil, nil, err } return result.Record, nil, nil } return s.amendRegistration(ctx, commitment, registrationRecord.Record, actor, msgSigner) } // FlagHijackEvent sets the hijack flag of an amendment event to true func (s *RegistrationService) FlagHijackEvent(ctx sdk.Context, eventId uint64, actor *coretypes.Actor) (*types.AmendmentEvent, error) { opt, err := s.eventRepo.GetById(ctx, eventId) if err != nil { return nil, err } if opt.Empty() { return nil, errors.Wrap("event not found", errors.ErrorType_NOT_FOUND, errors.Pair("event", fmt.Sprintf("%v", eventId))) } event := opt.GetValue() if event.Metadata.OwnerDid != actor.Id { return nil, errors.Wrap("event actor mismatch: actor must be event subject", errors.ErrorType_UNAUTHORIZED, errors.Pair("event", fmt.Sprintf("%v", eventId)), errors.Pair("expected_actor", actor.Id), ) } event.HijackFlag = true err = s.eventRepo.update(ctx, event) if err != nil { return nil, err } return event, nil } ================================================ FILE: x/acp/signed_policy_cmd/builder.go ================================================ package signed_policy_cmd import ( "context" "crypto" "fmt" "strings" "github.com/cosmos/gogoproto/jsonpb" prototypes "github.com/cosmos/gogoproto/types" "github.com/go-jose/go-jose/v3" "github.com/go-jose/go-jose/v3/cryptosigner" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func NewCmdBuilder(clock LogicalClock, params types.Params) *CmdBuilder { return &CmdBuilder{ clock: clock, params: params, } } // CmdBuilder builds PolicyCmdPayloads type CmdBuilder struct { clock LogicalClock cmd types.SignedPolicyCmdPayload params types.Params cmdErr error signer crypto.Signer } // BuildJWS produces a signed JWS for the specified Cmd func (b *CmdBuilder) BuildJWS(ctx context.Context) (string, error) { if b.signer == nil { return "", fmt.Errorf("cmdBuilder failed: %w", ErrSignerRequired) } payload, err := b.Build(ctx) if err != nil { return "", err } return SignPayload(payload, b.signer) } // SetSigner sets the Signer for the Builder, which will be used to produce a JWS func (b *CmdBuilder) SetSigner(signer crypto.Signer) { b.signer = signer } // GetSigner returns the currently set Signer func (b *CmdBuilder) GetSigner() crypto.Signer { return b.signer } // Build validates the data provided to the Builder, validates it and returns a SignedPolicyCmdPayload or an error. func (b *CmdBuilder) Build(ctx context.Context) (types.SignedPolicyCmdPayload, error) { height, err := b.clock.GetTimestampNow(ctx) if err != nil { return types.SignedPolicyCmdPayload{}, fmt.Errorf("cmdBuilder: timestamp failed: %v", err) } b.cmd.IssuedHeight = height if b.cmd.IssuedAt == nil { b.cmd.IssuedAt = prototypes.TimestampNow() } if b.cmd.ExpirationDelta == 0 { b.cmd.ExpirationDelta = b.params.PolicyCommandMaxExpirationDelta } if b.cmd.PolicyId == "" { return types.SignedPolicyCmdPayload{}, fmt.Errorf("cmdBuilder: policy id: %w", ErrBuilderMissingArgument) } if b.cmd.ExpirationDelta > b.params.PolicyCommandMaxExpirationDelta { return types.SignedPolicyCmdPayload{}, fmt.Errorf("cmdBuilder: %v", ErrExpirationDeltaTooLarge) } if err := did.IsValidDID(b.cmd.Actor); err != nil { return types.SignedPolicyCmdPayload{}, fmt.Errorf("cmdBuilder: invalid actor: %v", err) } if b.cmd.Cmd == nil { return types.SignedPolicyCmdPayload{}, fmt.Errorf("cmdBuilder: Command not specified: %v", ErrBuilderMissingArgument) } if b.cmdErr != nil { return types.SignedPolicyCmdPayload{}, fmt.Errorf("cmdBuilder: Command invalid: %v", b.cmdErr) } if err := validatePolicyCmd(b.cmd.Cmd); err != nil { return types.SignedPolicyCmdPayload{}, fmt.Errorf("cmdBuilder: Command invalid: %v", err) } return b.cmd, nil } // validatePolicyCmd performs basic structural validation on the embedded PolicyCmd. // It ensures required fields are present and non-empty for each command variant. func validatePolicyCmd(cmd *types.PolicyCmd) error { switch c := cmd.GetCmd().(type) { case *types.PolicyCmd_SetRelationshipCmd: rel := c.SetRelationshipCmd.GetRelationship() if rel == nil { return fmt.Errorf("set_relationship: relationship is required") } obj := rel.GetObject() if obj == nil || strings.TrimSpace(obj.GetResource()) == "" || strings.TrimSpace(obj.GetId()) == "" { return fmt.Errorf("set_relationship: object resource and id are required") } if strings.TrimSpace(rel.GetRelation()) == "" { return fmt.Errorf("set_relationship: relation is required") } subj := rel.GetSubject() if subj == nil { return fmt.Errorf("set_relationship: subject is required") } validSubject := false if a := subj.GetActor(); a != nil && strings.TrimSpace(a.GetId()) != "" { validSubject = true } if o := subj.GetObject(); o != nil && strings.TrimSpace(o.GetResource()) != "" && strings.TrimSpace(o.GetId()) != "" { validSubject = true } if as := subj.GetActorSet(); as != nil && strings.TrimSpace(as.GetRelation()) != "" { validSubject = true } if subj.GetAllActors() != nil { validSubject = true } if !validSubject { return fmt.Errorf("set_relationship: invalid subject") } return nil case *types.PolicyCmd_DeleteRelationshipCmd: rel := c.DeleteRelationshipCmd.GetRelationship() if rel == nil { return fmt.Errorf("delete_relationship: relationship is required") } obj := rel.GetObject() if obj == nil || strings.TrimSpace(obj.GetResource()) == "" || strings.TrimSpace(obj.GetId()) == "" { return fmt.Errorf("delete_relationship: object resource and id are required") } if strings.TrimSpace(rel.GetRelation()) == "" { return fmt.Errorf("delete_relationship: relation is required") } if rel.GetSubject() == nil { return fmt.Errorf("delete_relationship: subject is required") } return nil case *types.PolicyCmd_RegisterObjectCmd: obj := c.RegisterObjectCmd.GetObject() if obj == nil || strings.TrimSpace(obj.GetResource()) == "" || strings.TrimSpace(obj.GetId()) == "" { return fmt.Errorf("register_object: object resource and id are required") } return nil case *types.PolicyCmd_ArchiveObjectCmd: obj := c.ArchiveObjectCmd.GetObject() if obj == nil || strings.TrimSpace(obj.GetResource()) == "" || strings.TrimSpace(obj.GetId()) == "" { return fmt.Errorf("archive_object: object resource and id are required") } return nil case *types.PolicyCmd_UnarchiveObjectCmd: obj := c.UnarchiveObjectCmd.GetObject() if obj == nil || strings.TrimSpace(obj.GetResource()) == "" || strings.TrimSpace(obj.GetId()) == "" { return fmt.Errorf("unarchive_object: object resource and id are required") } return nil case *types.PolicyCmd_CommitRegistrationsCmd: if len(c.CommitRegistrationsCmd.GetCommitment()) == 0 { return fmt.Errorf("commit_registrations: commitment is required") } return nil case *types.PolicyCmd_RevealRegistrationCmd: if c.RevealRegistrationCmd.GetProof() == nil { return fmt.Errorf("reveal_registration: proof is required") } if c.RevealRegistrationCmd.GetRegistrationsCommitmentId() == 0 { return fmt.Errorf("reveal_registration: registrations_commitment_id must be > 0") } return nil case *types.PolicyCmd_FlagHijackAttemptCmd: if c.FlagHijackAttemptCmd.GetEventId() == 0 { return fmt.Errorf("flag_hijack_attempt: event_id must be > 0") } return nil default: return fmt.Errorf("unknown command variant") } } // IssuedAt sets the creation timestamp func (b *CmdBuilder) IssuedAt(ts *prototypes.Timestamp) { b.cmd.IssuedAt = ts } // Actor sets the Actor for the Command func (b *CmdBuilder) Actor(did string) { b.cmd.Actor = did } // ExpirationDelta specifies the number of blocks after the issue height for which the Command will be valid. func (b *CmdBuilder) ExpirationDelta(delta uint64) { b.cmd.ExpirationDelta = delta } // PolicyID sets the Policy ID for the payload func (b *CmdBuilder) PolicyID(id string) { b.cmd.PolicyId = id } // PolicyCmd sets the command to be issued with the Signed token func (b *CmdBuilder) PolicyCmd(cmd *types.PolicyCmd) { b.cmd.Cmd = cmd } // SignPayload produces a JWS serialized version of a Payload from a signing key func SignPayload(cmd types.SignedPolicyCmdPayload, skey crypto.Signer) (string, error) { marshaler := jsonpb.Marshaler{} payload, err := marshaler.MarshalToString(&cmd) if err != nil { return "", err } opaque := cryptosigner.Opaque(skey) key := jose.SigningKey{ Algorithm: opaque.Algs()[0], Key: opaque, } var opts *jose.SignerOptions signer, err := jose.NewSigner(key, opts) if err != nil { return "", err } obj, err := signer.Sign([]byte(payload)) if err != nil { return "", err } return obj.FullSerialize(), nil } ================================================ FILE: x/acp/signed_policy_cmd/builder_test.go ================================================ package signed_policy_cmd import ( "context" "testing" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/acp/types" ) type fixedClock struct{ h uint64 } func (c fixedClock) GetTimestampNow(ctx context.Context) (uint64, error) { return c.h, nil } func newTestBuilder(t *testing.T) *CmdBuilder { t.Helper() return NewCmdBuilder(fixedClock{h: 100}, types.DefaultParams()) } func TestCmdBuilder_ValidateCmd_RegisterObject_OK(t *testing.T) { b := newTestBuilder(t) b.Actor("did:key:test-actor") b.PolicyID("policy-1") b.PolicyCmd(types.NewRegisterObjectCmd(coretypes.NewObject("file", "foo"))) payload, err := b.Build(context.Background()) require.NoError(t, err) require.Equal(t, "policy-1", payload.PolicyId) } func TestCmdBuilder_ValidateCmd_RegisterObject_Invalid(t *testing.T) { b := newTestBuilder(t) b.Actor("did:key:test-actor") b.PolicyID("policy-1") b.PolicyCmd(types.NewRegisterObjectCmd(coretypes.NewObject("file", ""))) _, err := b.Build(context.Background()) require.Error(t, err) } func TestCmdBuilder_ValidateCmd_SetRelationship_OK(t *testing.T) { b := newTestBuilder(t) b.Actor("did:key:test-actor") b.PolicyID("policy-1") rel := coretypes.NewActorRelationship("file", "foo", "viewer", "did:key:bob") b.PolicyCmd(types.NewSetRelationshipCmd(rel)) _, err := b.Build(context.Background()) require.NoError(t, err) } func TestCmdBuilder_ValidateCmd_SetRelationship_InvalidRelation(t *testing.T) { b := newTestBuilder(t) b.Actor("did:key:test-actor") b.PolicyID("policy-1") rel := coretypes.NewActorRelationship("file", "foo", "", "did:key:bob") b.PolicyCmd(types.NewSetRelationshipCmd(rel)) _, err := b.Build(context.Background()) require.Error(t, err) } ================================================ FILE: x/acp/signed_policy_cmd/errors.go ================================================ package signed_policy_cmd import ( "errors" ) var ( ErrExpirationDeltaTooLarge = errors.New("expiration delta greater than threshold") ErrCommandExpired = errors.New("PolicyCmdPayload expiration height is stale") ErrBuilderMissingArgument = errors.New("missing argument") ErrSignerRequired = errors.New("no signer set for builder") ErrPayloadAlreadyProcessed = errors.New("PolicyCmdPayload already processed") ) ================================================ FILE: x/acp/signed_policy_cmd/jws.go ================================================ package signed_policy_cmd import ( "context" "crypto/sha256" "fmt" "github.com/TBD54566975/ssi-sdk/crypto" "github.com/TBD54566975/ssi-sdk/did/key" "github.com/cosmos/gogoproto/jsonpb" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/go-jose/go-jose/v3" "github.com/lestrrat-go/jwx/v2/jwa" jwxjws "github.com/lestrrat-go/jwx/v2/jws" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func newJWSVerifier(resolver did.Resolver) jwsVerifier { return jwsVerifier{ resolver: resolver, } } // jwsVerifier verifies the Signature of a JWS which contains a PolicyCmd type jwsVerifier struct { resolver did.Resolver } // Verify verifies the integrity of the JWS payload, returns the Payload if OK // // The verification extracts a VerificationMethod from the resolved Actor DID in the PolicyCmd. // The JOSE header attributes are ignored and only the key derived from the Actor DID is accepted. // This is done to assure no impersonation happens by tinkering the JOSE header in order to produce a valid // JWS, signed by key different than that of the DID owner. func (s *jwsVerifier) Verify(ctx context.Context, jwsStr string) (*types.SignedPolicyCmdPayload, error) { jws, err := jose.ParseSigned(jwsStr) if err != nil { return nil, fmt.Errorf("failed parsing jws: %v", err) } payloadBytes := jws.UnsafePayloadWithoutVerification() payload := &types.SignedPolicyCmdPayload{} err = jsonpb.UnmarshalString(string(payloadBytes), payload) if err != nil { return nil, fmt.Errorf("failed unmarshaling PolicyCmd payload: %v", err) } did := payload.Actor // currently the ssi-sdk key resolver does not support secp256k1 // therefore we skip using the did pkg resolver and decode it directly, // as that does not error. didKey := key.DIDKey(did) pubBytes, _, keytype, err := didKey.Decode() if err != nil { return nil, fmt.Errorf("failed to resolve actor did: %v", err) } pubKey, err := crypto.BytesToPubKey(pubBytes, keytype) if err != nil { return nil, fmt.Errorf("failed to retrieve pub key: %v", err) } var algs []jwa.SignatureAlgorithm if secpKey, ok := pubKey.(secp.PublicKey); ok { // https://www.rfc-editor.org/rfc/rfc8812 algs = []jwa.SignatureAlgorithm{jwa.ES256K} pubKey = secpKey.ToECDSA() } else { algs, err = jwxjws.AlgorithmsForKey(pubKey) if err != nil { return nil, fmt.Errorf("failed to retrieve algs for pub key: %v", err) } } _, err = jwxjws.Verify([]byte(jwsStr), jwxjws.WithKey(algs[0], pubKey)) if err != nil { return nil, fmt.Errorf("could not verify actor signature for jwk: %v", err) } return payload, nil } // ComputePayloadID hashes a JWS payload to produce an ID used for replay protection. func ComputePayloadID(jwsPayload string) []byte { hasher := sha256.New() hasher.Write([]byte(jwsPayload)) return hasher.Sum(nil) } ================================================ FILE: x/acp/signed_policy_cmd/jws_test.go ================================================ package signed_policy_cmd import ( "testing" "github.com/stretchr/testify/require" ) // reject jws with critical header: If any of the listed extension Header Parameters are not understood //and supported by the recipient, then the JWS is invalid // reject jws with jose kid, x5c, x5u, kid, jwk, jku // test jws containing kid and signed with kids key is rejected // test did no verification method is rejected func TestComputePayloadID_ValidJWS(t *testing.T) { jws1 := `{"payload":"eyJhY3RvciI6ImRpZDprZXk6ejZNa3JNZGthUFFlWGZCUGJLelkyYlhNNkE1UktxUHF1cDgxeDE1UEdnQVJZRVVaIiwiaXNzdWVkSGVpZ2h0IjoiMSIsImlzc3VlZEF0IjoiMjAyNS0wOC0xOVQxMjoxODo1NS4yOTI3NDdaIiwiZXhwaXJhdGlvbkRlbHRhIjoiNDMyMDAiLCJwb2xpY3lJZCI6ImRhN2JlNjUwMjc2NjQ3MDg1NTFmOTcxOTdiYTVmNTk5M2FhOTliYzdiNTcwNTVkZjk3NjY0MjZkYzZkYTk2MDUiLCJjbWQiOnsicmVnaXN0ZXJPYmplY3RDbWQiOnsib2JqZWN0Ijp7InJlc291cmNlIjoiZmlsZSIsImlkIjoiZm9vIn19fX0","protected":"eyJhbGciOiJFZERTQSJ9","signature":"XJjL-DwobYDKmvwWDovTu1TbGbdr355hTzHJsXaOYnfim1wdlVyggGkAr1y10xB_zRf_k7CHZSLrh98lZhuyCw"}` jws2 := ` {"payload":"eyJhY3RvciI6ImRpZDprZXk6ejZNa2lvRTR6ejcydjk1SERFRjgxTkFrQjVwbllyalVzYUFhSzhCUDdhQWFlaEZuIiwiaXNzdWVkSGVpZ2h0IjoiMSIsImlzc3VlZEF0IjoiMjAyNS0wOC0xOVQxMjo1NzoxMS4wNzUxNzhaIiwiZXhwaXJhdGlvbkRlbHRhIjoiNDMyMDAiLCJwb2xpY3lJZCI6IjgxZDUwNTU5YzUyZjM5YWNiOTc4NGRkY2I3ZmM1MTY2ZWRjZDczMmQ3NzU4Y2QyMjQ2NWE4NjhjNGI5NmJiNmIiLCJjbWQiOnsicmVnaXN0ZXJPYmplY3RDbWQiOnsib2JqZWN0Ijp7InJlc291cmNlIjoiZmlsZSIsImlkIjoiZm9vIn19fX0","protected":"eyJhbGciOiJFZERTQSJ9","signature":"5WKgw-80H6HTH5-CVBWykyFKHMjz1tEeIJNbuWJOHNlEM9nd8FfEpOuR0Ha6iHwsyviqcpfUXF8_Jqy2nou-Dg"}` id1 := ComputePayloadID(jws1) require.NotEmpty(t, id1) id2 := ComputePayloadID(jws2) require.NotEmpty(t, id2) id3 := ComputePayloadID(jws1) require.NotEmpty(t, id3) require.Equal(t, id1, id3) require.NotEqual(t, id1, id2) } func TestComputePayloadID_EmptyInput(t *testing.T) { id := ComputePayloadID("") require.NotEmpty(t, id) } func TestComputePayloadID_InvalidJWS(t *testing.T) { invalidJSON := `{"payload": eyJhY3RvciI6ImRp}` id := ComputePayloadID(invalidJSON) require.NotEmpty(t, id) } func TestComputePayloadID_MalformedJWS(t *testing.T) { malformedJWS := `{"payload": "test"}` id := ComputePayloadID(malformedJWS) require.NotEmpty(t, id) } ================================================ FILE: x/acp/signed_policy_cmd/spec.go ================================================ package signed_policy_cmd import ( "context" "fmt" "github.com/sourcenetwork/acp_core/pkg/errors" "github.com/sourcenetwork/sourcehub/x/acp/did" "github.com/sourcenetwork/sourcehub/x/acp/types" ) // payloadSpec executes validation against a PolicyCmdPayload to ensure it should be accepted func payloadSpec(params types.Params, currentHeight uint64, payload *types.SignedPolicyCmdPayload) error { if payload.ExpirationDelta > params.PolicyCommandMaxExpirationDelta { return fmt.Errorf("%w: max %v, given %v", ErrExpirationDeltaTooLarge, params.PolicyCommandMaxExpirationDelta, payload.ExpirationDelta) } maxHeight := payload.IssuedHeight + payload.ExpirationDelta if currentHeight > maxHeight { return fmt.Errorf("%v: current %v limit %v", ErrCommandExpired, currentHeight, maxHeight) } return nil } // ValidateAndExtractCmd validates a MsgPolicyCmd and return the Cmd payload func ValidateAndExtractCmd(ctx context.Context, params types.Params, resolver did.Resolver, payload string, contentType types.MsgSignedPolicyCmd_ContentType, currentHeight uint64) (*types.SignedPolicyCmdPayload, error) { var cmd *types.SignedPolicyCmdPayload var err error switch contentType { case types.MsgSignedPolicyCmd_JWS: verifier := newJWSVerifier(resolver) cmd, err = verifier.Verify(ctx, payload) default: err = fmt.Errorf("invalid signed command: cmd %v: %w", payload, errors.ErrUnknownVariant) } if err != nil { return nil, fmt.Errorf("invalid signed command: %w", err) } err = payloadSpec(params, currentHeight, cmd) if err != nil { return nil, fmt.Errorf("invalid payload: %v", err) } return cmd, nil } ================================================ FILE: x/acp/signed_policy_cmd/types.go ================================================ package signed_policy_cmd import ( "context" "fmt" "github.com/cometbft/cometbft/rpc/client" ) // LogicalClock models a Provider for logical timestamps. // Timestamps must be monotonically increasing and are used as reference // for the total ordering of events in the system. // // This abstraction is general purpose but for the current context of SourceHub // this primarily means the current system block height. type LogicalClock interface { // GetTimestamp returns an integer for the current timestamp in the system. GetTimestampNow(ctx context.Context) (uint64, error) } var _ LogicalClock = (*abciLogicalClock)(nil) func LogicalClockFromCometClient(client client.Client) LogicalClock { return &abciLogicalClock{ rpcClient: client, } } type abciLogicalClock struct { rpcClient client.Client } func (c *abciLogicalClock) GetTimestampNow(ctx context.Context) (uint64, error) { resp, err := c.rpcClient.ABCIInfo(ctx) if err != nil { return 0, fmt.Errorf("failed to fetch latest block: %v", err) } return uint64(resp.Response.LastBlockHeight), nil } ================================================ FILE: x/acp/simulation/check_access.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func SimulateMsgCheckAccess( ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgCheckAccess{ Creator: simAccount.Address.String(), } // TODO: Handling the CheckAccess simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "CheckAccess simulation not implemented"), nil, nil } } ================================================ FILE: x/acp/simulation/create_policy.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func SimulateMsgCreatePolicy( ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgCreatePolicy{ Creator: simAccount.Address.String(), } // TODO: Handling the CreatePolicy simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "CreatePolicy simulation not implemented"), nil, nil } } ================================================ FILE: x/acp/simulation/helpers.go ================================================ package simulation import ( sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) // FindAccount find a specific address from an account list func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { creator, err := sdk.AccAddressFromBech32(address) if err != nil { panic(err) } return simtypes.FindAccount(accs, creator) } ================================================ FILE: x/acp/simulation/msg_edit_policy.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func SimulateMsgMsgEditPolicy( ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgEditPolicy{ Creator: simAccount.Address.String(), } // TODO: Handling the MsgEditPolicy simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "MsgEditPolicy simulation not implemented"), nil, nil } } ================================================ FILE: x/acp/simulation/policy_cmd.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/acp/types" ) func SimulateMsgPolicyCmd( ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgSignedPolicyCmd{ Creator: simAccount.Address.String(), } // TODO: Handling the PolicyCmd simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "PolicyCmd simulation not implemented"), nil, nil } } ================================================ FILE: x/acp/stores/cosmos/doc.go ================================================ // package cosmos implements Raccoon wrappers for Cosmos store types package cosmos ================================================ FILE: x/acp/stores/cosmos/error.go ================================================ package cosmos import ( "fmt" "github.com/sourcenetwork/raccoondb/v2/errors" ) var ErrCosmosKV = errors.New("cosmossdk store") // wrapErr wraps an error with ErrCosmosKV func wrapErr(err error) error { return fmt.Errorf("%w: %w", ErrCosmosKV, err) } ================================================ FILE: x/acp/stores/cosmos/iter.go ================================================ package cosmos import ( "context" cosmosstore "cosmossdk.io/core/store" "github.com/sourcenetwork/raccoondb/v2/iterator" "github.com/sourcenetwork/raccoondb/v2/store" ) var _ iterator.Iterator[[]byte] = (*iterAdapter)(nil) type iterAdapter struct { iter cosmosstore.Iterator params store.IterationParam finished bool } func (i *iterAdapter) Next(ctx context.Context) error { i.iter.Next() if !i.iter.Valid() { i.finished = true } err := i.iter.Error() if err != nil { return wrapErr(err) } return nil } func (i *iterAdapter) Value() ([]byte, error) { if i.finished { return nil, nil } return i.iter.Value(), nil } func (i *iterAdapter) Finished() bool { return i.finished } func (i *iterAdapter) Close() error { err := i.iter.Close() if err != nil { return wrapErr(err) } return nil } func (i *iterAdapter) GetParams() store.IterationParam { return i.params } func (i *iterAdapter) CurrentKey() []byte { if i.finished { return nil } return i.iter.Key() } ================================================ FILE: x/acp/stores/cosmos/store.go ================================================ package cosmos import ( "context" corestore "cosmossdk.io/core/store" cosmosdb "github.com/cosmos/cosmos-db" "github.com/sourcenetwork/raccoondb/v2/store" "github.com/sourcenetwork/raccoondb/v2/types" ) var _ store.KVStore = (*kvAdapter)(nil) // NewFromCoreKVStore returns a Raccoon KVStore from // cosmossdk.io/core/store KVStore func NewFromCoreKVStore(cosmosKV corestore.KVStore) store.KVStore { return &kvAdapter{ store: cosmosKV, } } // NewFromCosmosDBStore returns a Raccoon KVStore from // a cosmos-db DB func NewFromCosmosDB(db cosmosdb.DB) store.KVStore { return &kvAdapter{ store: db, } } // kvAdapter implements Raccoon KVStore interface type kvAdapter struct { store corestore.KVStore } func (k *kvAdapter) Iterate(ctx context.Context, opt store.IterationParam) (store.StoreIterator[[]byte], error) { var iter corestore.Iterator var err error if opt.IsReverse() { iter, err = k.store.ReverseIterator(opt.GetLeftBound(), opt.GetRightBound()) } else { iter, err = k.store.Iterator(opt.GetLeftBound(), opt.GetRightBound()) } if err != nil { return nil, wrapErr(err) } if iter.Error() != nil { return nil, wrapErr(iter.Error()) } return &iterAdapter{ iter: iter, finished: false, params: opt, }, nil } func (k *kvAdapter) Get(ctx context.Context, key []byte) (types.Option[[]byte], error) { if key == nil { return types.None[[]byte](), wrapErr(store.ErrKeyNil) } bytes, err := k.store.Get(key) if err != nil { return types.None[[]byte](), wrapErr(err) } if bytes == nil { return types.None[[]byte](), nil } return types.Some(bytes), nil } func (k *kvAdapter) Has(ctx context.Context, key []byte) (bool, error) { if key == nil { return false, wrapErr(store.ErrKeyNil) } has, err := k.store.Has(key) if err != nil { return false, wrapErr(err) } return has, nil } func (k *kvAdapter) Set(ctx context.Context, key, value []byte) (store.KeyCreated, error) { if key == nil { return false, wrapErr(store.ErrKeyNil) } has, err := k.store.Has(key) if err != nil { return false, wrapErr(err) } err = k.store.Set(key, value) if err != nil { return false, wrapErr(err) } return store.KeyCreated(!has), nil } func (k *kvAdapter) Delete(ctx context.Context, key []byte) (store.KeyRemoved, error) { if key == nil { return false, wrapErr(store.ErrKeyNil) } has, err := k.store.Has(key) if err != nil { return false, wrapErr(err) } err = k.store.Delete(key) if err != nil { return false, wrapErr(err) } return store.KeyRemoved(has), nil } ================================================ FILE: x/acp/stores/cosmos/store_test.go ================================================ package cosmos import ( "testing" cosmosdb "github.com/cosmos/cosmos-db" "github.com/sourcenetwork/raccoondb/v2/store" "github.com/sourcenetwork/raccoondb/v2/store/test" ) func Test_CosmosCoreKVStore_Suite(t *testing.T) { factory := func() store.KVStore { db := cosmosdb.NewMemDB() return NewFromCoreKVStore(db) } test.RunSuite(t, factory) } func Test_CosmosDB_Suite(t *testing.T) { factory := func() store.KVStore { db := cosmosdb.NewMemDB() return NewFromCosmosDB(db) } test.RunSuite(t, factory) } ================================================ FILE: x/acp/stores/kv_stores_cosmos.go ================================================ package stores import ( storetypes "cosmossdk.io/store/types" rcdb "github.com/sourcenetwork/raccoondb" ) // RaccoonKVFromCosmos adapts a cosmossdk KVStore // into a raccoondb v1 KVStore func RaccoonKVFromCosmos(store storetypes.KVStore) rcdb.KVStore { return &cosmosKvWrapper{ store: store, } } type cosmosKvWrapper struct { store storetypes.KVStore } func (s *cosmosKvWrapper) Get(key []byte) ([]byte, error) { return s.store.Get(key), nil } func (s *cosmosKvWrapper) Has(key []byte) (bool, error) { return s.store.Has(key), nil } func (s *cosmosKvWrapper) Set(key []byte, val []byte) error { s.store.Set(key, val) return nil } func (s *cosmosKvWrapper) Delete(key []byte) error { s.store.Delete(key) return nil } func (s *cosmosKvWrapper) Iterator(start, end []byte) rcdb.Iterator { return s.store.Iterator(start, end) } ================================================ FILE: x/acp/stores/marshaler.go ================================================ package stores import ( gogoproto "github.com/cosmos/gogoproto/proto" raccoon "github.com/sourcenetwork/raccoondb" ) var _ raccoon.Marshaler[gogoproto.Message] = (*gogoProtoMarshaler[gogoproto.Message])(nil) // NewGogoProtoMarshaler returns a raccoon Marshaler // which marshals and unmarshals a Message using gogoproto. // // Requires a factory method which returns an instance of T func NewGogoProtoMarshaler[T gogoproto.Message](factory func() T) raccoon.Marshaler[T] { return &gogoProtoMarshaler[T]{ factory: factory, } } type gogoProtoMarshaler[T gogoproto.Message] struct { factory func() T } func (m *gogoProtoMarshaler[T]) Marshal(t *T) ([]byte, error) { return gogoproto.Marshal(*t) } func (m *gogoProtoMarshaler[T]) Unmarshal(bytes []byte) (T, error) { t := m.factory() err := gogoproto.Unmarshal(bytes, t) if err != nil { return t, err } return t, nil } ================================================ FILE: x/acp/testutil/account_keeper.go ================================================ package testutil import ( "context" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/sourcenetwork/sourcehub/x/acp/types" ) var _ types.AccountKeeper = (*AccountKeeperStub)(nil) type AccountKeeperStub struct { Accounts map[string]sdk.AccountI } func (s *AccountKeeperStub) GetAccount(ctx context.Context, address sdk.AccAddress) sdk.AccountI { acc := s.Accounts[address.String()] return acc } func (s *AccountKeeperStub) GenAccount() sdk.AccountI { pubKey := secp256k1.GenPrivKey().PubKey() return s.NewAccount(pubKey) } func (s *AccountKeeperStub) FirstAcc() sdk.AccountI { for _, acc := range s.Accounts { return acc } return nil } func (s *AccountKeeperStub) NewAccount(key cryptotypes.PubKey) sdk.AccountI { if s.Accounts == nil { s.Accounts = make(map[string]sdk.AccountI) } addr := sdk.AccAddress(key.Address()) acc := authtypes.NewBaseAccount(addr, key, 1, 1) s.Accounts[addr.String()] = acc return acc } ================================================ FILE: x/acp/testutil/assertions.go ================================================ package testutil import ( "reflect" "testing" proto "github.com/cosmos/gogoproto/proto" "github.com/cosmos/cosmos-sdk/types" ) func AssertEventEmmited(t *testing.T, ctx types.Context, event any) { var ev types.Event switch cast := event.(type) { case types.Event: ev = cast default: var err error ev, err = types.TypedEventToEvent(cast.(proto.Message)) if err != nil { panic(err) } } for _, e := range ctx.EventManager().Events() { if reflect.DeepEqual(e, ev) { return } } t.Fatalf("EventManager did not emit wanted event: want %v", event) } ================================================ FILE: x/acp/testutil/proto.go ================================================ package testutil import ( "testing" "github.com/google/go-cmp/cmp" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/testing/protocmp" ) func ProtoEq[Msg proto.Message](t *testing.T, left, right Msg) { opt := protocmp.Transform() if diff := cmp.Diff(left, right, opt); diff != "" { t.Errorf("mismatch (-left +right):\n%s", diff) } } ================================================ FILE: x/acp/testutil/time.go ================================================ package testutil import ( "time" gogotypes "github.com/cosmos/gogoproto/types" ) // MustDateTimeToProto parses a time.DateTime (YYYY-MM-DD HH:MM:SS) timestamp // and converts into a proto Timestamp. // Panics if input is invalid func MustDateTimeToProto(timestamp string) *gogotypes.Timestamp { t, err := time.Parse(time.DateTime, timestamp) if err != nil { panic(err) } ts, err := gogotypes.TimestampProto(t) if err != nil { panic(err) } return ts } ================================================ FILE: x/acp/types/access_decision.go ================================================ package types import ( "crypto/sha256" "encoding/base32" "fmt" prototypes "github.com/cosmos/gogoproto/types" "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/utils" ) // ProduceId uses all fields in an AccessDecision (ignoring the ID) to produce an ID // for the Decision. func (d *AccessDecision) ProduceId() string { hash := d.hashDecision() return base32.StdEncoding.EncodeToString(hash) } // hashDecision produces a sha256 hash of all fields (except the id) of an AccessDecision. // The hash is used to produce an unique and deterministic ID for a decision func (decision *AccessDecision) hashDecision() []byte { sortableOperations := utils.FromComparator(decision.Operations, func(left, right *types.Operation) bool { return left.Object.Resource < right.Object.Resource && left.Object.Id < right.Object.Id && left.Permission < right.Permission }) operations := sortableOperations.Sort() hasher := sha256.New() hasher.Write([]byte(decision.PolicyId)) hasher.Write([]byte(decision.Creator)) hasher.Write([]byte(decision.Actor)) hasher.Write([]byte(fmt.Sprintf("%v", decision.CreatorAccSequence))) hasher.Write([]byte(fmt.Sprintf("%v", decision.IssuedHeight))) hasher.Write([]byte(prototypes.TimestampString(decision.CreationTime.ProtoTs))) for _, operation := range operations { hasher.Write([]byte(operation.Object.Resource)) hasher.Write([]byte(operation.Object.Id)) hasher.Write([]byte(operation.Permission)) } hasher.Write(decision.hashParams()) return hasher.Sum(nil) } // hashParams produces a sha256 of the DecisionParameters func (d *AccessDecision) hashParams() []byte { hasher := sha256.New() hasher.Write([]byte(fmt.Sprintf("%v", d.Params.DecisionExpirationDelta))) hasher.Write([]byte(fmt.Sprintf("%v", d.Params.ProofExpirationDelta))) hasher.Write([]byte(fmt.Sprintf("%v", d.Params.TicketExpirationDelta))) return hasher.Sum(nil) } ================================================ FILE: x/acp/types/access_decision.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/access_decision.proto package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" types "github.com/sourcenetwork/acp_core/pkg/types" 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 // AccessDecision models the result of evaluating a set of AccessRequests for an Actor type AccessDecision struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` CreatorAccSequence uint64 `protobuf:"varint,4,opt,name=creator_acc_sequence,json=creatorAccSequence,proto3" json:"creator_acc_sequence,omitempty"` Operations []*types.Operation `protobuf:"bytes,5,rep,name=operations,proto3" json:"operations,omitempty"` Actor string `protobuf:"bytes,6,opt,name=actor,proto3" json:"actor,omitempty"` Params *DecisionParams `protobuf:"bytes,7,opt,name=params,proto3" json:"params,omitempty"` CreationTime *Timestamp `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // issued_height stores the block height when the Decision was evaluated IssuedHeight uint64 `protobuf:"varint,9,opt,name=issued_height,json=issuedHeight,proto3" json:"issued_height,omitempty"` } func (m *AccessDecision) Reset() { *m = AccessDecision{} } func (m *AccessDecision) String() string { return proto.CompactTextString(m) } func (*AccessDecision) ProtoMessage() {} func (*AccessDecision) Descriptor() ([]byte, []int) { return fileDescriptor_1d553fec1c2b5021, []int{0} } func (m *AccessDecision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AccessDecision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AccessDecision.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 *AccessDecision) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessDecision.Merge(m, src) } func (m *AccessDecision) XXX_Size() int { return m.Size() } func (m *AccessDecision) XXX_DiscardUnknown() { xxx_messageInfo_AccessDecision.DiscardUnknown(m) } var xxx_messageInfo_AccessDecision proto.InternalMessageInfo func (m *AccessDecision) GetId() string { if m != nil { return m.Id } return "" } func (m *AccessDecision) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *AccessDecision) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *AccessDecision) GetCreatorAccSequence() uint64 { if m != nil { return m.CreatorAccSequence } return 0 } func (m *AccessDecision) GetOperations() []*types.Operation { if m != nil { return m.Operations } return nil } func (m *AccessDecision) GetActor() string { if m != nil { return m.Actor } return "" } func (m *AccessDecision) GetParams() *DecisionParams { if m != nil { return m.Params } return nil } func (m *AccessDecision) GetCreationTime() *Timestamp { if m != nil { return m.CreationTime } return nil } func (m *AccessDecision) GetIssuedHeight() uint64 { if m != nil { return m.IssuedHeight } return 0 } // DecisionParams stores auxiliary information regarding the validity of a decision type DecisionParams struct { // number of blocks a Decision is valid for DecisionExpirationDelta uint64 `protobuf:"varint,1,opt,name=decision_expiration_delta,json=decisionExpirationDelta,proto3" json:"decision_expiration_delta,omitempty"` // number of blocks a DecisionProof is valid for ProofExpirationDelta uint64 `protobuf:"varint,2,opt,name=proof_expiration_delta,json=proofExpirationDelta,proto3" json:"proof_expiration_delta,omitempty"` // number of blocks an AccessTicket is valid for TicketExpirationDelta uint64 `protobuf:"varint,3,opt,name=ticket_expiration_delta,json=ticketExpirationDelta,proto3" json:"ticket_expiration_delta,omitempty"` } func (m *DecisionParams) Reset() { *m = DecisionParams{} } func (m *DecisionParams) String() string { return proto.CompactTextString(m) } func (*DecisionParams) ProtoMessage() {} func (*DecisionParams) Descriptor() ([]byte, []int) { return fileDescriptor_1d553fec1c2b5021, []int{1} } func (m *DecisionParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DecisionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DecisionParams.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 *DecisionParams) XXX_Merge(src proto.Message) { xxx_messageInfo_DecisionParams.Merge(m, src) } func (m *DecisionParams) XXX_Size() int { return m.Size() } func (m *DecisionParams) XXX_DiscardUnknown() { xxx_messageInfo_DecisionParams.DiscardUnknown(m) } var xxx_messageInfo_DecisionParams proto.InternalMessageInfo func (m *DecisionParams) GetDecisionExpirationDelta() uint64 { if m != nil { return m.DecisionExpirationDelta } return 0 } func (m *DecisionParams) GetProofExpirationDelta() uint64 { if m != nil { return m.ProofExpirationDelta } return 0 } func (m *DecisionParams) GetTicketExpirationDelta() uint64 { if m != nil { return m.TicketExpirationDelta } return 0 } func init() { proto.RegisterType((*AccessDecision)(nil), "sourcehub.acp.AccessDecision") proto.RegisterType((*DecisionParams)(nil), "sourcehub.acp.DecisionParams") } func init() { proto.RegisterFile("sourcehub/acp/access_decision.proto", fileDescriptor_1d553fec1c2b5021) } var fileDescriptor_1d553fec1c2b5021 = []byte{ // 486 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x6f, 0xd3, 0x30, 0x18, 0xc6, 0x97, 0xb4, 0xeb, 0x56, 0x6f, 0xed, 0xc1, 0x2a, 0xcc, 0x0c, 0x11, 0xca, 0xc6, 0xa1, 0x5c, 0x12, 0x34, 0xfe, 0x1c, 0x90, 0x38, 0x14, 0x0d, 0x69, 0x9c, 0x40, 0x81, 0x13, 0x97, 0xc8, 0x75, 0xbc, 0xd4, 0x5a, 0x9b, 0xd7, 0xd8, 0x8e, 0xd8, 0xbe, 0x05, 0x9f, 0x87, 0x4f, 0xc0, 0x71, 0x47, 0x8e, 0xa8, 0xfd, 0x1c, 0x48, 0x28, 0x76, 0x3c, 0x48, 0x27, 0x6e, 0xf6, 0xfb, 0x7b, 0x9e, 0xf8, 0x7d, 0xf2, 0xbe, 0xe8, 0x58, 0x43, 0xa5, 0x18, 0x9f, 0x57, 0xb3, 0x84, 0x32, 0x99, 0x50, 0xc6, 0xb8, 0xd6, 0x59, 0xce, 0x99, 0xd0, 0x02, 0xca, 0x58, 0x2a, 0x30, 0x80, 0x07, 0x37, 0xa2, 0x98, 0x32, 0x79, 0x38, 0x2a, 0xa0, 0x00, 0x4b, 0x92, 0xfa, 0xe4, 0x44, 0x87, 0x0f, 0x0b, 0x80, 0x62, 0xc1, 0x13, 0x7b, 0x9b, 0x55, 0xe7, 0x89, 0x11, 0x4b, 0xae, 0x0d, 0x5d, 0xca, 0x46, 0x40, 0xda, 0x4f, 0xd5, 0xb8, 0x21, 0x4f, 0x1c, 0x29, 0xb9, 0xf9, 0x0a, 0xea, 0xa2, 0xa6, 0x19, 0x03, 0xc5, 0x13, 0xc5, 0x17, 0xd4, 0x08, 0x28, 0xf5, 0x5c, 0xf8, 0x8f, 0x3c, 0xfe, 0xaf, 0xf4, 0x4b, 0xc5, 0xb5, 0x71, 0xaa, 0xa3, 0xdf, 0x21, 0x1a, 0x4e, 0x6d, 0x94, 0xd3, 0x26, 0x09, 0x1e, 0xa2, 0x50, 0xe4, 0x24, 0x18, 0x07, 0x93, 0x7e, 0x1a, 0x8a, 0x1c, 0xdf, 0x47, 0x7d, 0x09, 0x0b, 0xc1, 0xae, 0x32, 0x91, 0x93, 0xd0, 0x96, 0x77, 0x5d, 0xe1, 0x5d, 0x8e, 0x09, 0xda, 0x61, 0x8a, 0x53, 0x03, 0x8a, 0x74, 0x2c, 0xf2, 0x57, 0xfc, 0x14, 0x8d, 0x9a, 0x63, 0x46, 0x19, 0xcb, 0x74, 0xfd, 0x6c, 0xc9, 0x38, 0xe9, 0x8e, 0x83, 0x49, 0x37, 0xc5, 0x0d, 0x9b, 0x32, 0xf6, 0xb1, 0x21, 0x78, 0x8a, 0x10, 0x48, 0xae, 0x5c, 0x10, 0xb2, 0x3d, 0xee, 0x4c, 0xf6, 0x4e, 0x1e, 0xc5, 0xad, 0x18, 0xb1, 0x8f, 0x11, 0xbf, 0xf7, 0xca, 0xf4, 0x1f, 0x13, 0x1e, 0xa1, 0x6d, 0xca, 0xea, 0x66, 0x7a, 0xb6, 0x19, 0x77, 0xc1, 0x2f, 0x50, 0x4f, 0x52, 0x45, 0x97, 0x9a, 0xec, 0x8c, 0x83, 0xc9, 0xde, 0xc9, 0x83, 0xb8, 0x35, 0xa6, 0xd8, 0x47, 0xff, 0x60, 0x45, 0x69, 0x23, 0xc6, 0xaf, 0xd1, 0xc0, 0x76, 0x29, 0xa0, 0xcc, 0xea, 0x19, 0x90, 0x5d, 0xeb, 0x26, 0x1b, 0xee, 0x4f, 0x7e, 0x7a, 0xe9, 0xbe, 0x97, 0xd7, 0x25, 0x7c, 0x8c, 0x06, 0x42, 0xeb, 0x8a, 0xe7, 0xd9, 0x9c, 0x8b, 0x62, 0x6e, 0x48, 0xdf, 0x26, 0xdf, 0x77, 0xc5, 0x33, 0x5b, 0x3b, 0xfa, 0x1e, 0xa0, 0x61, 0xfb, 0x79, 0xfc, 0x0a, 0xdd, 0xf3, 0x5b, 0x95, 0xf1, 0x4b, 0x29, 0x5c, 0xb6, 0x2c, 0xe7, 0x0b, 0x43, 0xed, 0x58, 0xba, 0xe9, 0x81, 0x17, 0xbc, 0xbd, 0xe1, 0xa7, 0x35, 0xc6, 0xcf, 0xd1, 0x5d, 0xa9, 0x00, 0xce, 0x6f, 0x1b, 0x43, 0x6b, 0x1c, 0x59, 0xba, 0xe9, 0x7a, 0x89, 0x0e, 0x8c, 0x60, 0x17, 0xdc, 0xdc, 0xb6, 0x75, 0xac, 0xed, 0x8e, 0xc3, 0x1b, 0xbe, 0x37, 0x67, 0x3f, 0x56, 0x51, 0x70, 0xbd, 0x8a, 0x82, 0x5f, 0xab, 0x28, 0xf8, 0xb6, 0x8e, 0xb6, 0xae, 0xd7, 0xd1, 0xd6, 0xcf, 0x75, 0xb4, 0xf5, 0x39, 0x2e, 0x84, 0xa9, 0xff, 0x0f, 0x83, 0x65, 0xd2, 0xde, 0xc3, 0xbf, 0xab, 0x7d, 0xe9, 0x96, 0xfb, 0x4a, 0x72, 0x3d, 0xeb, 0xd9, 0x6d, 0x7c, 0xf6, 0x27, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x3b, 0x6e, 0x88, 0x65, 0x03, 0x00, 0x00, } func (m *AccessDecision) 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 *AccessDecision) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *AccessDecision) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.IssuedHeight != 0 { i = encodeVarintAccessDecision(dAtA, i, uint64(m.IssuedHeight)) i-- dAtA[i] = 0x48 } if m.CreationTime != nil { { size, err := m.CreationTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAccessDecision(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 } if m.Params != nil { { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAccessDecision(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } if len(m.Actor) > 0 { i -= len(m.Actor) copy(dAtA[i:], m.Actor) i = encodeVarintAccessDecision(dAtA, i, uint64(len(m.Actor))) i-- dAtA[i] = 0x32 } if len(m.Operations) > 0 { for iNdEx := len(m.Operations) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Operations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAccessDecision(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } } if m.CreatorAccSequence != 0 { i = encodeVarintAccessDecision(dAtA, i, uint64(m.CreatorAccSequence)) i-- dAtA[i] = 0x20 } if len(m.Creator) > 0 { i -= len(m.Creator) copy(dAtA[i:], m.Creator) i = encodeVarintAccessDecision(dAtA, i, uint64(len(m.Creator))) i-- dAtA[i] = 0x1a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintAccessDecision(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintAccessDecision(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *DecisionParams) 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 *DecisionParams) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DecisionParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.TicketExpirationDelta != 0 { i = encodeVarintAccessDecision(dAtA, i, uint64(m.TicketExpirationDelta)) i-- dAtA[i] = 0x18 } if m.ProofExpirationDelta != 0 { i = encodeVarintAccessDecision(dAtA, i, uint64(m.ProofExpirationDelta)) i-- dAtA[i] = 0x10 } if m.DecisionExpirationDelta != 0 { i = encodeVarintAccessDecision(dAtA, i, uint64(m.DecisionExpirationDelta)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintAccessDecision(dAtA []byte, offset int, v uint64) int { offset -= sovAccessDecision(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *AccessDecision) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Id) if l > 0 { n += 1 + l + sovAccessDecision(uint64(l)) } l = len(m.PolicyId) if l > 0 { n += 1 + l + sovAccessDecision(uint64(l)) } l = len(m.Creator) if l > 0 { n += 1 + l + sovAccessDecision(uint64(l)) } if m.CreatorAccSequence != 0 { n += 1 + sovAccessDecision(uint64(m.CreatorAccSequence)) } if len(m.Operations) > 0 { for _, e := range m.Operations { l = e.Size() n += 1 + l + sovAccessDecision(uint64(l)) } } l = len(m.Actor) if l > 0 { n += 1 + l + sovAccessDecision(uint64(l)) } if m.Params != nil { l = m.Params.Size() n += 1 + l + sovAccessDecision(uint64(l)) } if m.CreationTime != nil { l = m.CreationTime.Size() n += 1 + l + sovAccessDecision(uint64(l)) } if m.IssuedHeight != 0 { n += 1 + sovAccessDecision(uint64(m.IssuedHeight)) } return n } func (m *DecisionParams) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.DecisionExpirationDelta != 0 { n += 1 + sovAccessDecision(uint64(m.DecisionExpirationDelta)) } if m.ProofExpirationDelta != 0 { n += 1 + sovAccessDecision(uint64(m.ProofExpirationDelta)) } if m.TicketExpirationDelta != 0 { n += 1 + sovAccessDecision(uint64(m.TicketExpirationDelta)) } return n } func sovAccessDecision(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozAccessDecision(x uint64) (n int) { return sovAccessDecision(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *AccessDecision) 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 ErrIntOverflowAccessDecision } 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: AccessDecision: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: AccessDecision: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } 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 ErrInvalidLengthAccessDecision } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAccessDecision } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } 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 ErrInvalidLengthAccessDecision } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAccessDecision } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: 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 ErrIntOverflowAccessDecision } 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 ErrInvalidLengthAccessDecision } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAccessDecision } if postIndex > l { return io.ErrUnexpectedEOF } m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatorAccSequence", wireType) } m.CreatorAccSequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CreatorAccSequence |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAccessDecision } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAccessDecision } if postIndex > l { return io.ErrUnexpectedEOF } m.Operations = append(m.Operations, &types.Operation{}) if err := m.Operations[len(m.Operations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } 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 ErrInvalidLengthAccessDecision } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAccessDecision } if postIndex > l { return io.ErrUnexpectedEOF } m.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: 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 ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAccessDecision } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAccessDecision } if postIndex > l { return io.ErrUnexpectedEOF } if m.Params == nil { m.Params = &DecisionParams{} } if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAccessDecision } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAccessDecision } if postIndex > l { return io.ErrUnexpectedEOF } if m.CreationTime == nil { m.CreationTime = &Timestamp{} } if err := m.CreationTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IssuedHeight", wireType) } m.IssuedHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.IssuedHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipAccessDecision(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAccessDecision } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DecisionParams) 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 ErrIntOverflowAccessDecision } 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: DecisionParams: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DecisionParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DecisionExpirationDelta", wireType) } m.DecisionExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.DecisionExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProofExpirationDelta", wireType) } m.ProofExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProofExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TicketExpirationDelta", wireType) } m.TicketExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessDecision } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TicketExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipAccessDecision(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAccessDecision } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipAccessDecision(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, ErrIntOverflowAccessDecision } 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, ErrIntOverflowAccessDecision } 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, ErrIntOverflowAccessDecision } 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, ErrInvalidLengthAccessDecision } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupAccessDecision } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthAccessDecision } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthAccessDecision = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAccessDecision = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAccessDecision = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/access_ticket.go ================================================ package types const ( AccessTicketV1 string = "v1" ) ================================================ FILE: x/acp/types/access_ticket.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/access_ticket.proto package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" 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 // Represents a Capability token containing an opaque proof and a set of Operations // the Actor is allowed to perform. // Tickets should be verified by a Reference Monitor before granting access to the requested operations. type AccessTicket struct { // identified the ticket version VersionDenominator string `protobuf:"bytes,1,opt,name=version_denominator,json=versionDenominator,proto3" json:"version_denominator,omitempty"` DecisionId string `protobuf:"bytes,2,opt,name=decision_id,json=decisionId,proto3" json:"decision_id,omitempty"` Decision *AccessDecision `protobuf:"bytes,3,opt,name=decision,proto3" json:"decision,omitempty"` // proof of existance that the given decision exists in the chain // validation strategy is dependent on ticket version DecisionProof []byte `protobuf:"bytes,4,opt,name=decision_proof,json=decisionProof,proto3" json:"decision_proof,omitempty"` // signature of ticket which must match actor pkey in the access decision Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *AccessTicket) Reset() { *m = AccessTicket{} } func (m *AccessTicket) String() string { return proto.CompactTextString(m) } func (*AccessTicket) ProtoMessage() {} func (*AccessTicket) Descriptor() ([]byte, []int) { return fileDescriptor_bd5443967ce9352d, []int{0} } func (m *AccessTicket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AccessTicket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AccessTicket.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 *AccessTicket) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessTicket.Merge(m, src) } func (m *AccessTicket) XXX_Size() int { return m.Size() } func (m *AccessTicket) XXX_DiscardUnknown() { xxx_messageInfo_AccessTicket.DiscardUnknown(m) } var xxx_messageInfo_AccessTicket proto.InternalMessageInfo func (m *AccessTicket) GetVersionDenominator() string { if m != nil { return m.VersionDenominator } return "" } func (m *AccessTicket) GetDecisionId() string { if m != nil { return m.DecisionId } return "" } func (m *AccessTicket) GetDecision() *AccessDecision { if m != nil { return m.Decision } return nil } func (m *AccessTicket) GetDecisionProof() []byte { if m != nil { return m.DecisionProof } return nil } func (m *AccessTicket) GetSignature() []byte { if m != nil { return m.Signature } return nil } func init() { proto.RegisterType((*AccessTicket)(nil), "sourcehub.acp.AccessTicket") } func init() { proto.RegisterFile("sourcehub/acp/access_ticket.proto", fileDescriptor_bd5443967ce9352d) } var fileDescriptor_bd5443967ce9352d = []byte{ // 308 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xbf, 0x4e, 0xf3, 0x30, 0x14, 0xc5, 0xeb, 0xef, 0x03, 0x44, 0xdd, 0x96, 0xc1, 0x30, 0x44, 0x15, 0xb8, 0x05, 0x84, 0xd4, 0x29, 0x96, 0x60, 0x62, 0x04, 0x75, 0x80, 0x0d, 0x55, 0x4c, 0x2c, 0x95, 0xeb, 0xb8, 0xc6, 0x2a, 0xc9, 0xb5, 0x6c, 0x87, 0x3f, 0x6f, 0xc1, 0x63, 0x31, 0x76, 0x64, 0xac, 0xda, 0x17, 0x41, 0x71, 0x9a, 0x44, 0x48, 0x6c, 0xbe, 0xe7, 0xfc, 0x74, 0x7d, 0xee, 0xc1, 0xa7, 0x0e, 0x72, 0x2b, 0xe4, 0x73, 0x3e, 0x63, 0x5c, 0x18, 0xc6, 0x85, 0x90, 0xce, 0x4d, 0xbd, 0x16, 0x0b, 0xe9, 0x63, 0x63, 0xc1, 0x03, 0xe9, 0xd5, 0x48, 0xcc, 0x85, 0xe9, 0x1f, 0x29, 0x50, 0x10, 0x1c, 0x56, 0xbc, 0x4a, 0xa8, 0x3f, 0x50, 0x00, 0xea, 0x45, 0xb2, 0x30, 0xcd, 0xf2, 0x39, 0xf3, 0x3a, 0x95, 0xce, 0xf3, 0xd4, 0x6c, 0x81, 0xf3, 0x3f, 0x3f, 0x4a, 0xa4, 0xd0, 0x4e, 0x43, 0x56, 0x42, 0x67, 0x2b, 0x84, 0xbb, 0x37, 0xc1, 0x79, 0x0c, 0x09, 0x08, 0xc3, 0x87, 0xaf, 0xd2, 0x16, 0xc4, 0x34, 0x91, 0x19, 0xa4, 0x3a, 0xe3, 0x1e, 0x6c, 0x84, 0x86, 0x68, 0xd4, 0x9e, 0x90, 0xad, 0x35, 0x6e, 0x1c, 0x32, 0xc0, 0x9d, 0x6a, 0xe7, 0x54, 0x27, 0xd1, 0xbf, 0x00, 0xe2, 0x4a, 0xba, 0x4f, 0xc8, 0x35, 0xde, 0xaf, 0xa6, 0xe8, 0xff, 0x10, 0x8d, 0x3a, 0x97, 0x27, 0xf1, 0xaf, 0x03, 0xe3, 0x32, 0xc0, 0x78, 0x0b, 0x4d, 0x6a, 0x9c, 0x5c, 0xe0, 0x83, 0x7a, 0xb7, 0xb1, 0x00, 0xf3, 0x68, 0x67, 0x88, 0x46, 0xdd, 0x49, 0xaf, 0x52, 0x1f, 0x0a, 0x91, 0x1c, 0xe3, 0xb6, 0xd3, 0x2a, 0xe3, 0x3e, 0xb7, 0x32, 0xda, 0x0d, 0x44, 0x23, 0xdc, 0xde, 0x7d, 0xad, 0x29, 0x5a, 0xae, 0x29, 0x5a, 0xad, 0x29, 0xfa, 0xdc, 0xd0, 0xd6, 0x72, 0x43, 0x5b, 0xdf, 0x1b, 0xda, 0x7a, 0x8a, 0x95, 0xf6, 0x45, 0x06, 0x01, 0x29, 0x2b, 0x13, 0x65, 0xd2, 0xbf, 0x81, 0x5d, 0xb0, 0xa6, 0xba, 0xf7, 0x50, 0x9e, 0xff, 0x30, 0xd2, 0xcd, 0xf6, 0x42, 0x67, 0x57, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xf0, 0x38, 0xfc, 0xc3, 0x01, 0x00, 0x00, } func (m *AccessTicket) 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 *AccessTicket) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *AccessTicket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintAccessTicket(dAtA, i, uint64(len(m.Signature))) i-- dAtA[i] = 0x2a } if len(m.DecisionProof) > 0 { i -= len(m.DecisionProof) copy(dAtA[i:], m.DecisionProof) i = encodeVarintAccessTicket(dAtA, i, uint64(len(m.DecisionProof))) i-- dAtA[i] = 0x22 } if m.Decision != nil { { size, err := m.Decision.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAccessTicket(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.DecisionId) > 0 { i -= len(m.DecisionId) copy(dAtA[i:], m.DecisionId) i = encodeVarintAccessTicket(dAtA, i, uint64(len(m.DecisionId))) i-- dAtA[i] = 0x12 } if len(m.VersionDenominator) > 0 { i -= len(m.VersionDenominator) copy(dAtA[i:], m.VersionDenominator) i = encodeVarintAccessTicket(dAtA, i, uint64(len(m.VersionDenominator))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintAccessTicket(dAtA []byte, offset int, v uint64) int { offset -= sovAccessTicket(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *AccessTicket) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.VersionDenominator) if l > 0 { n += 1 + l + sovAccessTicket(uint64(l)) } l = len(m.DecisionId) if l > 0 { n += 1 + l + sovAccessTicket(uint64(l)) } if m.Decision != nil { l = m.Decision.Size() n += 1 + l + sovAccessTicket(uint64(l)) } l = len(m.DecisionProof) if l > 0 { n += 1 + l + sovAccessTicket(uint64(l)) } l = len(m.Signature) if l > 0 { n += 1 + l + sovAccessTicket(uint64(l)) } return n } func sovAccessTicket(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozAccessTicket(x uint64) (n int) { return sovAccessTicket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *AccessTicket) 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 ErrIntOverflowAccessTicket } 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: AccessTicket: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: AccessTicket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VersionDenominator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessTicket } 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 ErrInvalidLengthAccessTicket } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAccessTicket } if postIndex > l { return io.ErrUnexpectedEOF } m.VersionDenominator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DecisionId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessTicket } 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 ErrInvalidLengthAccessTicket } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAccessTicket } if postIndex > l { return io.ErrUnexpectedEOF } m.DecisionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Decision", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessTicket } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAccessTicket } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAccessTicket } if postIndex > l { return io.ErrUnexpectedEOF } if m.Decision == nil { m.Decision = &AccessDecision{} } if err := m.Decision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DecisionProof", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessTicket } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAccessTicket } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAccessTicket } if postIndex > l { return io.ErrUnexpectedEOF } m.DecisionProof = append(m.DecisionProof[:0], dAtA[iNdEx:postIndex]...) if m.DecisionProof == nil { m.DecisionProof = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccessTicket } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAccessTicket } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAccessTicket } if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAccessTicket(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAccessTicket } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipAccessTicket(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, ErrIntOverflowAccessTicket } 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, ErrIntOverflowAccessTicket } 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, ErrIntOverflowAccessTicket } 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, ErrInvalidLengthAccessTicket } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupAccessTicket } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthAccessTicket } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthAccessTicket = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAccessTicket = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAccessTicket = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/codec.go ================================================ package types import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreatePolicy{}, ) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCheckAccess{}, ) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSignedPolicyCmd{}, ) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgBearerPolicyCmd{}, ) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgDirectPolicyCmd{}, ) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgEditPolicy{}, ) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParams{}, ) registerResponses(registry) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } // registerResponses additionally registers all acp modules // tx response types in the InterfaceRegistry. // // This is done in order to ease tx response unmarshaling // from cometbft TxResult structure func registerResponses(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreatePolicyResponse{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCheckAccessResponse{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSignedPolicyCmdResponse{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgBearerPolicyCmdResponse{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgDirectPolicyCmdResponse{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParamsResponse{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgEditPolicyResponse{}) } ================================================ FILE: x/acp/types/commitment.go ================================================ package types // IsExpiredAgainst return true if c is expired when taking ts as the target time func (c *RegistrationsCommitment) IsExpiredAgainst(ts *Timestamp) (bool, error) { return c.Metadata.CreationTs.IsAfter(c.Validity, ts) } ================================================ FILE: x/acp/types/commitment.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/commitment.proto package types import ( fmt "fmt" proto "github.com/cosmos/gogoproto/proto" types "github.com/sourcenetwork/acp_core/pkg/types" 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 // RegistrationProof models an opening proof for a RegistrationCommitment type RegistrationProof struct { Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` // Hash of neighbors required to validate proof. // // Hashes must be ordered as a RFC6962 "merkle audit path" // https://www.rfc-editor.org/rfc/rfc6962#section-2.1.1 MerkleProof [][]byte `protobuf:"bytes,2,rep,name=merkle_proof,json=merkleProof,proto3" json:"merkle_proof,omitempty"` LeafCount uint64 `protobuf:"varint,3,opt,name=leaf_count,json=leafCount,proto3" json:"leaf_count,omitempty"` LeafIndex uint64 `protobuf:"varint,4,opt,name=leaf_index,json=leafIndex,proto3" json:"leaf_index,omitempty"` } func (m *RegistrationProof) Reset() { *m = RegistrationProof{} } func (m *RegistrationProof) String() string { return proto.CompactTextString(m) } func (*RegistrationProof) ProtoMessage() {} func (*RegistrationProof) Descriptor() ([]byte, []int) { return fileDescriptor_6112833ff0b7565d, []int{0} } func (m *RegistrationProof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RegistrationProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RegistrationProof.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 *RegistrationProof) XXX_Merge(src proto.Message) { xxx_messageInfo_RegistrationProof.Merge(m, src) } func (m *RegistrationProof) XXX_Size() int { return m.Size() } func (m *RegistrationProof) XXX_DiscardUnknown() { xxx_messageInfo_RegistrationProof.DiscardUnknown(m) } var xxx_messageInfo_RegistrationProof proto.InternalMessageInfo func (m *RegistrationProof) GetObject() *types.Object { if m != nil { return m.Object } return nil } func (m *RegistrationProof) GetMerkleProof() [][]byte { if m != nil { return m.MerkleProof } return nil } func (m *RegistrationProof) GetLeafCount() uint64 { if m != nil { return m.LeafCount } return 0 } func (m *RegistrationProof) GetLeafIndex() uint64 { if m != nil { return m.LeafIndex } return 0 } // RegistrationsCommitment models a batched cryptographic commitment // of a set of Object registrations issued by an Actor type RegistrationsCommitment struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` // commitment is a merkle root of registrations Commitment []byte `protobuf:"bytes,3,opt,name=commitment,proto3" json:"commitment,omitempty"` Expired bool `protobuf:"varint,4,opt,name=expired,proto3" json:"expired,omitempty"` // validity models the duration for which the commitment is valid for Validity *Duration `protobuf:"bytes,5,opt,name=validity,proto3" json:"validity,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *RegistrationsCommitment) Reset() { *m = RegistrationsCommitment{} } func (m *RegistrationsCommitment) String() string { return proto.CompactTextString(m) } func (*RegistrationsCommitment) ProtoMessage() {} func (*RegistrationsCommitment) Descriptor() ([]byte, []int) { return fileDescriptor_6112833ff0b7565d, []int{1} } func (m *RegistrationsCommitment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RegistrationsCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RegistrationsCommitment.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 *RegistrationsCommitment) XXX_Merge(src proto.Message) { xxx_messageInfo_RegistrationsCommitment.Merge(m, src) } func (m *RegistrationsCommitment) XXX_Size() int { return m.Size() } func (m *RegistrationsCommitment) XXX_DiscardUnknown() { xxx_messageInfo_RegistrationsCommitment.DiscardUnknown(m) } var xxx_messageInfo_RegistrationsCommitment proto.InternalMessageInfo func (m *RegistrationsCommitment) GetId() uint64 { if m != nil { return m.Id } return 0 } func (m *RegistrationsCommitment) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *RegistrationsCommitment) GetCommitment() []byte { if m != nil { return m.Commitment } return nil } func (m *RegistrationsCommitment) GetExpired() bool { if m != nil { return m.Expired } return false } func (m *RegistrationsCommitment) GetValidity() *Duration { if m != nil { return m.Validity } return nil } func (m *RegistrationsCommitment) GetMetadata() *RecordMetadata { if m != nil { return m.Metadata } return nil } func init() { proto.RegisterType((*RegistrationProof)(nil), "sourcehub.acp.RegistrationProof") proto.RegisterType((*RegistrationsCommitment)(nil), "sourcehub.acp.RegistrationsCommitment") } func init() { proto.RegisterFile("sourcehub/acp/commitment.proto", fileDescriptor_6112833ff0b7565d) } var fileDescriptor_6112833ff0b7565d = []byte{ // 402 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x41, 0x6e, 0x13, 0x31, 0x14, 0x86, 0xe3, 0x34, 0x84, 0xc4, 0x0d, 0x48, 0x78, 0x53, 0x2b, 0xa8, 0x56, 0xe8, 0x2a, 0x6c, 0x3c, 0x12, 0x95, 0x90, 0xd8, 0x52, 0x16, 0x74, 0x81, 0x40, 0x5e, 0xb2, 0x19, 0x39, 0xf6, 0x6b, 0x6b, 0x3a, 0x33, 0xb6, 0x3c, 0x1e, 0x48, 0x6e, 0xc1, 0x41, 0x38, 0x08, 0xcb, 0x2e, 0x59, 0xa2, 0xe4, 0x02, 0x1c, 0x01, 0x8d, 0x9d, 0x4e, 0x3a, 0x5d, 0xfa, 0xff, 0xbf, 0xf7, 0xf4, 0xeb, 0xfd, 0xc6, 0xac, 0xb6, 0x8d, 0x57, 0x70, 0xd3, 0xac, 0x32, 0xa9, 0x5c, 0xa6, 0x6c, 0x59, 0x9a, 0x50, 0x42, 0x15, 0xb8, 0xf3, 0x36, 0x58, 0xf2, 0xac, 0xf3, 0xb9, 0x54, 0x6e, 0x3e, 0xef, 0xe3, 0x1e, 0x94, 0xf5, 0x3a, 0xa1, 0x73, 0xda, 0xf7, 0x82, 0x29, 0x61, 0xef, 0xbc, 0x4e, 0x4e, 0x05, 0xe1, 0x87, 0xf5, 0xb7, 0xad, 0x9b, 0x2b, 0xeb, 0x21, 0xf3, 0x50, 0xc8, 0x60, 0x6c, 0x55, 0xdf, 0x18, 0x97, 0xd0, 0xb3, 0x5f, 0x08, 0xbf, 0x10, 0x70, 0x6d, 0xea, 0xe0, 0xa3, 0xf5, 0xc5, 0x5b, 0x7b, 0x45, 0xde, 0xe2, 0xb1, 0x5d, 0x7d, 0x03, 0x15, 0x28, 0x5a, 0xa0, 0xe5, 0xf1, 0x1b, 0xc6, 0x7b, 0x1b, 0xf9, 0xfd, 0x46, 0xfe, 0x39, 0x52, 0x62, 0x4f, 0x93, 0x57, 0x78, 0x56, 0x82, 0xbf, 0x2d, 0x20, 0x77, 0xed, 0x1e, 0x3a, 0x5c, 0x1c, 0x2d, 0x67, 0xe2, 0x38, 0x69, 0x69, 0xf5, 0x29, 0xc6, 0x05, 0xc8, 0xab, 0x5c, 0xd9, 0xa6, 0x0a, 0xf4, 0x68, 0x81, 0x96, 0x23, 0x31, 0x6d, 0x95, 0x8b, 0x56, 0xe8, 0x6c, 0x53, 0x69, 0x58, 0xd3, 0xd1, 0xc1, 0xbe, 0x6c, 0x85, 0xb3, 0x7f, 0x08, 0x9f, 0x3c, 0x8c, 0x5b, 0x5f, 0x74, 0x07, 0x24, 0xcf, 0xf1, 0xd0, 0xe8, 0x18, 0x78, 0x24, 0x86, 0x46, 0x93, 0x97, 0x78, 0xea, 0x6c, 0x61, 0xd4, 0x26, 0x37, 0x9a, 0x0e, 0x17, 0x68, 0x39, 0x15, 0x93, 0x24, 0x5c, 0x6a, 0xc2, 0x30, 0x3e, 0xdc, 0x3e, 0xc6, 0x98, 0x89, 0x07, 0x0a, 0xa1, 0xf8, 0x29, 0xac, 0x9d, 0xf1, 0xa0, 0x63, 0x88, 0x89, 0xb8, 0x7f, 0x92, 0x73, 0x3c, 0xf9, 0x2e, 0x0b, 0xa3, 0x4d, 0xd8, 0xd0, 0x27, 0xf1, 0x3a, 0x27, 0xbc, 0x57, 0x1a, 0xff, 0xd0, 0xa4, 0x70, 0xa2, 0x03, 0xc9, 0x3b, 0x3c, 0x29, 0x21, 0x48, 0x2d, 0x83, 0xa4, 0xe3, 0x38, 0x74, 0xfa, 0x68, 0x48, 0xc4, 0x6a, 0x3f, 0xed, 0x21, 0xd1, 0xe1, 0xef, 0x3f, 0xfe, 0xde, 0x32, 0x74, 0xb7, 0x65, 0xe8, 0xef, 0x96, 0xa1, 0x9f, 0x3b, 0x36, 0xb8, 0xdb, 0xb1, 0xc1, 0x9f, 0x1d, 0x1b, 0x7c, 0xe5, 0xd7, 0x26, 0xb4, 0xe3, 0xca, 0x96, 0x59, 0xbf, 0xf1, 0xc3, 0xcf, 0x58, 0xa7, 0xbf, 0xb1, 0x71, 0x50, 0xaf, 0xc6, 0xb1, 0xf2, 0xf3, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x48, 0x15, 0xb5, 0x84, 0x02, 0x00, 0x00, } func (m *RegistrationProof) 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 *RegistrationProof) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RegistrationProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.LeafIndex != 0 { i = encodeVarintCommitment(dAtA, i, uint64(m.LeafIndex)) i-- dAtA[i] = 0x20 } if m.LeafCount != 0 { i = encodeVarintCommitment(dAtA, i, uint64(m.LeafCount)) i-- dAtA[i] = 0x18 } if len(m.MerkleProof) > 0 { for iNdEx := len(m.MerkleProof) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.MerkleProof[iNdEx]) copy(dAtA[i:], m.MerkleProof[iNdEx]) i = encodeVarintCommitment(dAtA, i, uint64(len(m.MerkleProof[iNdEx]))) i-- dAtA[i] = 0x12 } } if m.Object != nil { { size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintCommitment(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *RegistrationsCommitment) 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 *RegistrationsCommitment) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RegistrationsCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Metadata != nil { { size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintCommitment(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } if m.Validity != nil { { size, err := m.Validity.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintCommitment(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } if m.Expired { i-- if m.Expired { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x20 } if len(m.Commitment) > 0 { i -= len(m.Commitment) copy(dAtA[i:], m.Commitment) i = encodeVarintCommitment(dAtA, i, uint64(len(m.Commitment))) i-- dAtA[i] = 0x1a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintCommitment(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0x12 } if m.Id != 0 { i = encodeVarintCommitment(dAtA, i, uint64(m.Id)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintCommitment(dAtA []byte, offset int, v uint64) int { offset -= sovCommitment(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *RegistrationProof) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Object != nil { l = m.Object.Size() n += 1 + l + sovCommitment(uint64(l)) } if len(m.MerkleProof) > 0 { for _, b := range m.MerkleProof { l = len(b) n += 1 + l + sovCommitment(uint64(l)) } } if m.LeafCount != 0 { n += 1 + sovCommitment(uint64(m.LeafCount)) } if m.LeafIndex != 0 { n += 1 + sovCommitment(uint64(m.LeafIndex)) } return n } func (m *RegistrationsCommitment) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { n += 1 + sovCommitment(uint64(m.Id)) } l = len(m.PolicyId) if l > 0 { n += 1 + l + sovCommitment(uint64(l)) } l = len(m.Commitment) if l > 0 { n += 1 + l + sovCommitment(uint64(l)) } if m.Expired { n += 2 } if m.Validity != nil { l = m.Validity.Size() n += 1 + l + sovCommitment(uint64(l)) } if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovCommitment(uint64(l)) } return n } func sovCommitment(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozCommitment(x uint64) (n int) { return sovCommitment(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *RegistrationProof) 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 ErrIntOverflowCommitment } 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: RegistrationProof: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RegistrationProof: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthCommitment } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthCommitment } if postIndex > l { return io.ErrUnexpectedEOF } if m.Object == nil { m.Object = &types.Object{} } if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MerkleProof", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthCommitment } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthCommitment } if postIndex > l { return io.ErrUnexpectedEOF } m.MerkleProof = append(m.MerkleProof, make([]byte, postIndex-iNdEx)) copy(m.MerkleProof[len(m.MerkleProof)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LeafCount", wireType) } m.LeafCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LeafCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LeafIndex", wireType) } m.LeafIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LeafIndex |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipCommitment(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCommitment } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RegistrationsCommitment) 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 ErrIntOverflowCommitment } 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: RegistrationsCommitment: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RegistrationsCommitment: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } 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 ErrInvalidLengthCommitment } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthCommitment } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthCommitment } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthCommitment } if postIndex > l { return io.ErrUnexpectedEOF } m.Commitment = append(m.Commitment[:0], dAtA[iNdEx:postIndex]...) if m.Commitment == nil { m.Commitment = []byte{} } iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Expired", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Expired = bool(v != 0) case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Validity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthCommitment } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthCommitment } if postIndex > l { return io.ErrUnexpectedEOF } if m.Validity == nil { m.Validity = &Duration{} } if err := m.Validity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthCommitment } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthCommitment } if postIndex > l { return io.ErrUnexpectedEOF } if m.Metadata == nil { m.Metadata = &RecordMetadata{} } if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCommitment(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCommitment } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipCommitment(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, ErrIntOverflowCommitment } 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, ErrIntOverflowCommitment } 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, ErrIntOverflowCommitment } 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, ErrInvalidLengthCommitment } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupCommitment } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthCommitment } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthCommitment = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCommitment = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCommitment = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/constants.go ================================================ package types import "time" // PolicyCommandMaxExpirationDelta configures the maximum lifetime of a PolicyCmd signed payload. // Since SourceHub is expected to operate roughly with 1-2 seconds block time, // the payload would live for roughly 12-24h const DefaultPolicyCommandMaxExpirationDelta = 60 * 60 * 12 // DefaultRegistrationCommitmentLifetime configures the default lifetime // for a RegistrationCommitment object var DefaultRegistrationCommitmentLifetime *Duration = NewDurationFromTimeDuration(time.Minute * 10) ================================================ FILE: x/acp/types/errors.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" "github.com/sourcenetwork/acp_core/pkg/errors" ) // x/acp module sentinel errors var ( ErrInvalidSigner = errorsmod.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") ) type Error = errors.Error type ErrorType = errors.ErrorType const ( ErrorType_UNKNOWN = errors.ErrorType_UNKNOWN ErrorType_INTERNAL = errors.ErrorType_INTERNAL ErrorType_UNAUTHENTICATED = errors.ErrorType_UNAUTHENTICATED ErrorType_UNAUTHORIZED = errors.ErrorType_UNAUTHORIZED ErrorType_BAD_INPUT = errors.ErrorType_BAD_INPUT ErrorType_OPERATION_FORBIDDEN = errors.ErrorType_OPERATION_FORBIDDEN ErrorType_NOT_FOUND = errors.ErrorType_NOT_FOUND ) var New = errors.New var Wrap = errors.Wrap var NewWithCause = errors.NewWithCause func NewErrInvalidAccAddrErr(cause error, addr string) error { return errors.NewWithCause("invalid account address", cause, errors.ErrorType_BAD_INPUT, errors.Pair("address", addr)) } func NewAccNotFoundErr(addr string) error { return errors.Wrap("account not found", errors.ErrorType_NOT_FOUND, errors.Pair("address", addr)) } ================================================ FILE: x/acp/types/expected_keepers.go ================================================ package types import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" hubtypes "github.com/sourcenetwork/sourcehub/x/hub/types" ) // AccountKeeper defines the expected interface for the Account module. type AccountKeeper interface { GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // 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{}) } // HubKeeper defines the expected interface for the hub module. type HubKeeper interface { GetICAConnection(ctx sdk.Context, icaAddress string) (hubtypes.ICAConnection, bool) SetICAConnection(ctx sdk.Context, icaAddress, controllerAddress, controllerChainID, connectionID string) error } ================================================ FILE: x/acp/types/genesis.go ================================================ package types // DefaultIndex is the default global index const DefaultIndex uint64 = 1 // 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() } ================================================ FILE: x/acp/types/genesis.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/genesis.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 // GenesisState defines the acp 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_84434e1feb0cb187, []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), "sourcehub.acp.GenesisState") } func init() { proto.RegisterFile("sourcehub/acp/genesis.proto", fileDescriptor_84434e1feb0cb187) } var fileDescriptor_84434e1feb0cb187 = []byte{ // 207 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x4f, 0x4c, 0x2e, 0xd0, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x85, 0x4b, 0xea, 0x25, 0x26, 0x17, 0x48, 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x0a, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0x30, 0x53, 0x1f, 0xc4, 0x82, 0x8a, 0x4a, 0xa1, 0x1a, 0x5a, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x35, 0x53, 0xc9, 0x83, 0x8b, 0xc7, 0x1d, 0x62, 0x49, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x05, 0x17, 0x1b, 0x44, 0x5e, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x54, 0x0f, 0xc5, 0x52, 0xbd, 0x00, 0xb0, 0xa4, 0x13, 0xe7, 0x89, 0x7b, 0xf2, 0x0c, 0x2b, 0x9e, 0x6f, 0xd0, 0x62, 0x0c, 0x82, 0xaa, 0x77, 0xf2, 0x38, 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, 0xbd, 0xf4, 0xcc, 0x12, 0x90, 0xfe, 0xe4, 0xfc, 0x5c, 0x7d, 0x88, 0x69, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0xfa, 0x08, 0x87, 0x55, 0x80, 0x9d, 0x56, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0x9a, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x40, 0xa0, 0xfb, 0xeb, 0x0d, 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") ) ================================================ FILE: x/acp/types/genesis_test.go ================================================ package types_test import ( "testing" "github.com/sourcenetwork/sourcehub/x/acp/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{ // this line is used by starport scaffolding # types/genesis/validField }, valid: true, }, // this line is used by starport scaffolding # types/genesis/testcase } 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) } }) } } ================================================ FILE: x/acp/types/keys.go ================================================ package types const ( // ModuleName defines the module name ModuleName = "acp" // StoreKey defines the primary module store key StoreKey = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_acp" // AccessDecisionRepositoryKeyPrefix defines the namespace for Access Decisions AccessDecisionRepositoryKeyPrefix = "access_decision/" // RegistrationsCommitmentKeyPrefix defines a key prefix for RegistrationsCommitments RegistrationsCommitmentKeyPrefix = "commitment/" // AmendmentEventKeyPrefix defines a key prefix for Amendment Events AmendmentEventKeyPrefix = "amendment_event/" // SignedPolicyCmdSeenKeyPrefix defines a key prefix for seen signed policy command payloads SignedPolicyCmdSeenKeyPrefix = "spc_seen/" ) var ( ParamsKey = []byte("p_acp") ) ================================================ FILE: x/acp/types/mapper.go ================================================ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/utils" ) // BuildRecordMetadata returns a RecordMetadata from an sdk Context // and authenticated actor / signer data. func BuildRecordMetadata(ctx sdk.Context, actorDID string, msgCreator string) (*RecordMetadata, error) { ts, err := TimestampFromCtx(ctx) if err != nil { return nil, err } dt := &RecordMetadata{ CreationTs: ts, TxHash: utils.HashTx(ctx.TxBytes()), OwnerDid: actorDID, TxSigner: msgCreator, } return dt, nil } // BuildACPSuppliedMetadata returns an acp SuppliedMetadata // object which embeds a SourceHub RecordMetadata // built from ctx, actorDID and msgCreator func BuildACPSuppliedMetadata(ctx sdk.Context, actorDID string, msgCreator string) (*coretypes.SuppliedMetadata, error) { metadata, err := BuildRecordMetadata(ctx, actorDID, msgCreator) if err != nil { return nil, err } bytes, err := metadata.Marshal() if err != nil { return nil, err } return &coretypes.SuppliedMetadata{ Blob: bytes, }, nil } // BuildACPSuppliedMetadataWithTime returns an acp SuppliedMetadata // object which embeds a SourceHub RecordMetadata // built from ctx, ts, actorDID and msgCreator func BuildACPSuppliedMetadataWithTime(ctx sdk.Context, ts *Timestamp, actorDID string, msgCreator string) (*coretypes.SuppliedMetadata, error) { metadata := &RecordMetadata{ CreationTs: ts, TxHash: utils.HashTx(ctx.TxBytes()), OwnerDid: actorDID, TxSigner: msgCreator, } bytes, err := metadata.Marshal() if err != nil { return nil, err } return &coretypes.SuppliedMetadata{ Blob: bytes, }, nil } // ExtractRecordMetadata extracts and unmarshals // a RecordMetadata from the blob field in acp_core's metadata func ExtractRecordMetadata(md *coretypes.RecordMetadata) (*RecordMetadata, error) { metadata := &RecordMetadata{} err := metadata.Unmarshal(md.Supplied.Blob) if err != nil { return nil, errors.Wrap("unmarshaling record metadata", err) } return metadata, nil } // MapRelationshipRecord maps an acp_core RelationshipRecord // into a SourceHub RelationshipRecord func MapRelationshipRecord(rec *coretypes.RelationshipRecord) (*RelationshipRecord, error) { metadata, err := ExtractRecordMetadata(rec.Metadata) if err != nil { return nil, err } return &RelationshipRecord{ PolicyId: rec.PolicyId, Archived: rec.Archived, Relationship: rec.Relationship, Metadata: metadata, }, nil } // MapPolicy maps an acp core PolicyRecord into a SourceHub // PolicyRecord func MapPolicy(rec *coretypes.PolicyRecord) (*PolicyRecord, error) { metadata, err := ExtractRecordMetadata(rec.Metadata) if err != nil { return nil, err } return &PolicyRecord{ Policy: rec.Policy, Metadata: metadata, MarshalType: rec.MarshalType, RawPolicy: rec.PolicyDefinition, }, nil } ================================================ FILE: x/acp/types/message_bearer_policy_cmd.go ================================================ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgDirectPolicyCmd{} func NewMsgBearerPolicyCmd(creator string, token string, policyId string, cmd *PolicyCmd) *MsgBearerPolicyCmd { return &MsgBearerPolicyCmd{ Creator: creator, BearerToken: token, PolicyId: policyId, Cmd: cmd, } } ================================================ FILE: x/acp/types/message_check_access.go ================================================ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/types" ) var _ sdk.Msg = &MsgCheckAccess{} func NewMsgCheckAccess(creator string, policyId string, accesReq *types.AccessRequest) *MsgCheckAccess { return &MsgCheckAccess{ Creator: creator, PolicyId: policyId, AccessRequest: accesReq, } } ================================================ FILE: x/acp/types/message_create_policy.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" acptypes "github.com/sourcenetwork/acp_core/pkg/types" ) var _ sdk.Msg = &MsgCreatePolicy{} func NewMsgCreatePolicy(creator string, policy string, marshalingType acptypes.PolicyMarshalingType) *MsgCreatePolicy { return &MsgCreatePolicy{ Creator: creator, Policy: policy, MarshalType: marshalingType, } } func (msg *MsgCreatePolicy) ValidateBasic() error { // ValidateBasic should probably unmarshal the policy and validate it _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } return nil } ================================================ FILE: x/acp/types/message_create_policy_test.go ================================================ package types import ( "testing" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/sourcenetwork/sourcehub/testutil/sample" "github.com/stretchr/testify/require" ) func TestMsgCreatePolicy_ValidateBasic(t *testing.T) { tests := []struct { name string msg MsgCreatePolicy err error }{ { name: "invalid address", msg: MsgCreatePolicy{ Creator: "invalid_address", }, err: sdkerrors.ErrInvalidAddress, }, { name: "valid address", msg: MsgCreatePolicy{ Creator: sample.AccAddress(), }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := tt.msg.ValidateBasic() if tt.err != nil { require.ErrorIs(t, err, tt.err) return } require.NoError(t, err) }) } } ================================================ FILE: x/acp/types/message_direct_policy_cmd.go ================================================ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgDirectPolicyCmd{} func NewMsgDirectPolicyCmd(creator string, policyId string, cmd *PolicyCmd) *MsgDirectPolicyCmd { return &MsgDirectPolicyCmd{ Creator: creator, PolicyId: policyId, Cmd: cmd, } } ================================================ FILE: x/acp/types/message_edit_policy.go ================================================ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" ) var _ sdk.Msg = &MsgEditPolicy{} func NewMsgEditPolicy(creator string, policyId string, policy string, marshalType coretypes.PolicyMarshalingType) *MsgEditPolicy { return &MsgEditPolicy{ Creator: creator, PolicyId: policyId, Policy: policy, MarshalType: marshalType, } } ================================================ FILE: x/acp/types/message_policy_cmd.go ================================================ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgSignedPolicyCmd{} func NewMsgSignedPolicyCmd(creator string, payload string, contentType MsgSignedPolicyCmd_ContentType) *MsgSignedPolicyCmd { return &MsgSignedPolicyCmd{ Creator: creator, Payload: payload, Type: contentType, } } func NewMsgSignedPolicyCmdFromJWS(creator string, jws string) *MsgSignedPolicyCmd { return &MsgSignedPolicyCmd{ Creator: creator, Type: MsgSignedPolicyCmd_JWS, Payload: jws, } } ================================================ FILE: x/acp/types/msg_update_params.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgUpdateParams{} // ValidateBasic does a sanity check on the provided data. func (m *MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { return errorsmod.Wrap(err, "invalid authority address") } if err := m.Params.Validate(); err != nil { return err } return nil } ================================================ FILE: x/acp/types/params.go ================================================ package types import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) var _ paramtypes.ParamSet = (*Params)(nil) // ParamKeyTable the param key table for launch module func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } // NewParams creates a new Params instance func NewParams(policyCmdExpirationDelta uint64, registrationCommitmentValidity *Duration) Params { return Params{ PolicyCommandMaxExpirationDelta: policyCmdExpirationDelta, RegistrationsCommitmentValidity: registrationCommitmentValidity, } } // DefaultParams returns a default set of parameters func DefaultParams() Params { return NewParams(DefaultPolicyCommandMaxExpirationDelta, DefaultRegistrationCommitmentLifetime) } // ParamSetPairs get the params.ParamSet func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{} } // Validate validates the set of params func (p Params) Validate() error { return nil } ================================================ FILE: x/acp/types/params.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/params.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 // Params defines the parameters for the module. type Params struct { // policy_command_max_expiration_delta specifies a global thershold for how old a Command will be accepted for. PolicyCommandMaxExpirationDelta uint64 `protobuf:"varint,1,opt,name=policy_command_max_expiration_delta,json=policyCommandMaxExpirationDelta,proto3" json:"policy_command_max_expiration_delta,omitempty"` // registrations_commitment_validity specifies a duration for the lifetime of a commitment. // Performing a RevealRegistration against an expired commitment causes a protocol error. RegistrationsCommitmentValidity *Duration `protobuf:"bytes,2,opt,name=registrations_commitment_validity,json=registrationsCommitmentValidity,proto3" json:"registrations_commitment_validity,omitempty"` } 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_042bc00af41a360e, []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 (m *Params) GetPolicyCommandMaxExpirationDelta() uint64 { if m != nil { return m.PolicyCommandMaxExpirationDelta } return 0 } func (m *Params) GetRegistrationsCommitmentValidity() *Duration { if m != nil { return m.RegistrationsCommitmentValidity } return nil } func init() { proto.RegisterType((*Params)(nil), "sourcehub.acp.Params") } func init() { proto.RegisterFile("sourcehub/acp/params.proto", fileDescriptor_042bc00af41a360e) } var fileDescriptor_042bc00af41a360e = []byte{ // 295 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x4f, 0x4c, 0x2e, 0xd0, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x85, 0xcb, 0xe9, 0x25, 0x26, 0x17, 0x48, 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x0a, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0x30, 0x53, 0x1f, 0xc4, 0x82, 0x8a, 0x4a, 0xa0, 0x9a, 0x59, 0x92, 0x99, 0x9b, 0x0a, 0x91, 0x51, 0xba, 0xc1, 0xc8, 0xc5, 0x16, 0x00, 0xb6, 0x42, 0xc8, 0x87, 0x4b, 0xb9, 0x20, 0x3f, 0x27, 0x33, 0xb9, 0x32, 0x3e, 0x39, 0x3f, 0x37, 0x37, 0x31, 0x2f, 0x25, 0x3e, 0x37, 0xb1, 0x22, 0x3e, 0xb5, 0xa2, 0x20, 0xb3, 0x28, 0xb1, 0x24, 0x33, 0x3f, 0x2f, 0x3e, 0x25, 0x35, 0xa7, 0x24, 0x51, 0x82, 0x51, 0x81, 0x51, 0x83, 0x25, 0x48, 0x1e, 0xa2, 0xd4, 0x19, 0xa2, 0xd2, 0x37, 0xb1, 0xc2, 0x15, 0xae, 0xce, 0x05, 0xa4, 0x4c, 0x28, 0x99, 0x4b, 0xb1, 0x28, 0x35, 0x3d, 0xb3, 0xb8, 0x04, 0x22, 0x58, 0x0c, 0x36, 0x34, 0xb3, 0x24, 0x37, 0x35, 0xaf, 0x24, 0xbe, 0x2c, 0x31, 0x27, 0x33, 0x25, 0xb3, 0xa4, 0x52, 0x82, 0x49, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x5c, 0x0f, 0xc5, 0x5b, 0x7a, 0x2e, 0xa5, 0x10, 0x3d, 0x41, 0xf2, 0x28, 0x26, 0x38, 0xc3, 0x0d, 0x08, 0x83, 0xea, 0xb7, 0x92, 0xee, 0x7a, 0xbe, 0x41, 0x4b, 0x0c, 0xe1, 0xb9, 0x0a, 0xb0, 0xf7, 0x20, 0xfe, 0x71, 0xf2, 0x38, 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, 0xbd, 0xf4, 0xcc, 0x12, 0x90, 0x65, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0xcd, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0xfa, 0xe8, 0x46, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xdb, 0x3b, 0xde, 0x9b, 0x01, 0x00, 0x00, } 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 if m.RegistrationsCommitmentValidity != nil { { size, err := m.RegistrationsCommitmentValidity.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintParams(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.PolicyCommandMaxExpirationDelta != 0 { i = encodeVarintParams(dAtA, i, uint64(m.PolicyCommandMaxExpirationDelta)) i-- dAtA[i] = 0x8 } 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 if m.PolicyCommandMaxExpirationDelta != 0 { n += 1 + sovParams(uint64(m.PolicyCommandMaxExpirationDelta)) } if m.RegistrationsCommitmentValidity != nil { l = m.RegistrationsCommitmentValidity.Size() n += 1 + l + sovParams(uint64(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 { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyCommandMaxExpirationDelta", wireType) } m.PolicyCommandMaxExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.PolicyCommandMaxExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitmentValidity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthParams } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthParams } if postIndex > l { return io.ErrUnexpectedEOF } if m.RegistrationsCommitmentValidity == nil { m.RegistrationsCommitmentValidity = &Duration{} } if err := m.RegistrationsCommitmentValidity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex 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") ) ================================================ FILE: x/acp/types/policy_cmd.go ================================================ package types import coretypes "github.com/sourcenetwork/acp_core/pkg/types" func NewSetRelationshipCmd(rel *coretypes.Relationship) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_SetRelationshipCmd{ SetRelationshipCmd: &SetRelationshipCmd{ Relationship: rel, }, }, } } func NewDeleteRelationshipCmd(rel *coretypes.Relationship) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_DeleteRelationshipCmd{ DeleteRelationshipCmd: &DeleteRelationshipCmd{ Relationship: rel, }, }, } } func NewRegisterObjectCmd(obj *coretypes.Object) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_RegisterObjectCmd{ RegisterObjectCmd: &RegisterObjectCmd{ Object: obj, }, }, } } func NewArchiveObjectCmd(obj *coretypes.Object) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_ArchiveObjectCmd{ ArchiveObjectCmd: &ArchiveObjectCmd{ Object: obj, }, }, } } func NewCommitRegistrationCmd(commitment []byte) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_CommitRegistrationsCmd{ CommitRegistrationsCmd: &CommitRegistrationsCmd{ Commitment: commitment, }, }, } } func NewRevealRegistrationCmd(commitmentId uint64, proof *RegistrationProof) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_RevealRegistrationCmd{ RevealRegistrationCmd: &RevealRegistrationCmd{ Proof: proof, RegistrationsCommitmentId: commitmentId, }, }, } } func NewFlagHijackAttemptCmd(eventId uint64) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_FlagHijackAttemptCmd{ FlagHijackAttemptCmd: &FlagHijackAttemptCmd{ EventId: eventId, }, }, } } func NewUnarchiveObjectCmd(object *coretypes.Object) *PolicyCmd { return &PolicyCmd{ Cmd: &PolicyCmd_UnarchiveObjectCmd{ UnarchiveObjectCmd: &UnarchiveObjectCmd{ Object: object, }, }, } } ================================================ FILE: x/acp/types/policy_cmd.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/policy_cmd.proto package types import ( fmt "fmt" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" types "github.com/sourcenetwork/acp_core/pkg/types" 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 // PolicyCmd models an operation to be performed against the context of a Policy type PolicyCmd struct { // Types that are valid to be assigned to Cmd: // *PolicyCmd_SetRelationshipCmd // *PolicyCmd_DeleteRelationshipCmd // *PolicyCmd_RegisterObjectCmd // *PolicyCmd_ArchiveObjectCmd // *PolicyCmd_CommitRegistrationsCmd // *PolicyCmd_RevealRegistrationCmd // *PolicyCmd_FlagHijackAttemptCmd // *PolicyCmd_UnarchiveObjectCmd Cmd isPolicyCmd_Cmd `protobuf_oneof:"cmd"` } func (m *PolicyCmd) Reset() { *m = PolicyCmd{} } func (m *PolicyCmd) String() string { return proto.CompactTextString(m) } func (*PolicyCmd) ProtoMessage() {} func (*PolicyCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{0} } func (m *PolicyCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PolicyCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PolicyCmd.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 *PolicyCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_PolicyCmd.Merge(m, src) } func (m *PolicyCmd) XXX_Size() int { return m.Size() } func (m *PolicyCmd) XXX_DiscardUnknown() { xxx_messageInfo_PolicyCmd.DiscardUnknown(m) } var xxx_messageInfo_PolicyCmd proto.InternalMessageInfo type isPolicyCmd_Cmd interface { isPolicyCmd_Cmd() MarshalTo([]byte) (int, error) Size() int } type PolicyCmd_SetRelationshipCmd struct { SetRelationshipCmd *SetRelationshipCmd `protobuf:"bytes,1,opt,name=set_relationship_cmd,json=setRelationshipCmd,proto3,oneof" json:"set_relationship_cmd,omitempty"` } type PolicyCmd_DeleteRelationshipCmd struct { DeleteRelationshipCmd *DeleteRelationshipCmd `protobuf:"bytes,2,opt,name=delete_relationship_cmd,json=deleteRelationshipCmd,proto3,oneof" json:"delete_relationship_cmd,omitempty"` } type PolicyCmd_RegisterObjectCmd struct { RegisterObjectCmd *RegisterObjectCmd `protobuf:"bytes,3,opt,name=register_object_cmd,json=registerObjectCmd,proto3,oneof" json:"register_object_cmd,omitempty"` } type PolicyCmd_ArchiveObjectCmd struct { ArchiveObjectCmd *ArchiveObjectCmd `protobuf:"bytes,4,opt,name=archive_object_cmd,json=archiveObjectCmd,proto3,oneof" json:"archive_object_cmd,omitempty"` } type PolicyCmd_CommitRegistrationsCmd struct { CommitRegistrationsCmd *CommitRegistrationsCmd `protobuf:"bytes,5,opt,name=commit_registrations_cmd,json=commitRegistrationsCmd,proto3,oneof" json:"commit_registrations_cmd,omitempty"` } type PolicyCmd_RevealRegistrationCmd struct { RevealRegistrationCmd *RevealRegistrationCmd `protobuf:"bytes,6,opt,name=reveal_registration_cmd,json=revealRegistrationCmd,proto3,oneof" json:"reveal_registration_cmd,omitempty"` } type PolicyCmd_FlagHijackAttemptCmd struct { FlagHijackAttemptCmd *FlagHijackAttemptCmd `protobuf:"bytes,7,opt,name=flag_hijack_attempt_cmd,json=flagHijackAttemptCmd,proto3,oneof" json:"flag_hijack_attempt_cmd,omitempty"` } type PolicyCmd_UnarchiveObjectCmd struct { UnarchiveObjectCmd *UnarchiveObjectCmd `protobuf:"bytes,8,opt,name=unarchive_object_cmd,json=unarchiveObjectCmd,proto3,oneof" json:"unarchive_object_cmd,omitempty"` } func (*PolicyCmd_SetRelationshipCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_DeleteRelationshipCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_RegisterObjectCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_ArchiveObjectCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_CommitRegistrationsCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_RevealRegistrationCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_FlagHijackAttemptCmd) isPolicyCmd_Cmd() {} func (*PolicyCmd_UnarchiveObjectCmd) isPolicyCmd_Cmd() {} func (m *PolicyCmd) GetCmd() isPolicyCmd_Cmd { if m != nil { return m.Cmd } return nil } func (m *PolicyCmd) GetSetRelationshipCmd() *SetRelationshipCmd { if x, ok := m.GetCmd().(*PolicyCmd_SetRelationshipCmd); ok { return x.SetRelationshipCmd } return nil } func (m *PolicyCmd) GetDeleteRelationshipCmd() *DeleteRelationshipCmd { if x, ok := m.GetCmd().(*PolicyCmd_DeleteRelationshipCmd); ok { return x.DeleteRelationshipCmd } return nil } func (m *PolicyCmd) GetRegisterObjectCmd() *RegisterObjectCmd { if x, ok := m.GetCmd().(*PolicyCmd_RegisterObjectCmd); ok { return x.RegisterObjectCmd } return nil } func (m *PolicyCmd) GetArchiveObjectCmd() *ArchiveObjectCmd { if x, ok := m.GetCmd().(*PolicyCmd_ArchiveObjectCmd); ok { return x.ArchiveObjectCmd } return nil } func (m *PolicyCmd) GetCommitRegistrationsCmd() *CommitRegistrationsCmd { if x, ok := m.GetCmd().(*PolicyCmd_CommitRegistrationsCmd); ok { return x.CommitRegistrationsCmd } return nil } func (m *PolicyCmd) GetRevealRegistrationCmd() *RevealRegistrationCmd { if x, ok := m.GetCmd().(*PolicyCmd_RevealRegistrationCmd); ok { return x.RevealRegistrationCmd } return nil } func (m *PolicyCmd) GetFlagHijackAttemptCmd() *FlagHijackAttemptCmd { if x, ok := m.GetCmd().(*PolicyCmd_FlagHijackAttemptCmd); ok { return x.FlagHijackAttemptCmd } return nil } func (m *PolicyCmd) GetUnarchiveObjectCmd() *UnarchiveObjectCmd { if x, ok := m.GetCmd().(*PolicyCmd_UnarchiveObjectCmd); ok { return x.UnarchiveObjectCmd } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*PolicyCmd) XXX_OneofWrappers() []interface{} { return []interface{}{ (*PolicyCmd_SetRelationshipCmd)(nil), (*PolicyCmd_DeleteRelationshipCmd)(nil), (*PolicyCmd_RegisterObjectCmd)(nil), (*PolicyCmd_ArchiveObjectCmd)(nil), (*PolicyCmd_CommitRegistrationsCmd)(nil), (*PolicyCmd_RevealRegistrationCmd)(nil), (*PolicyCmd_FlagHijackAttemptCmd)(nil), (*PolicyCmd_UnarchiveObjectCmd)(nil), } } // SetRelationship creates or updates a Relationship within a Policy // A Relationship is a statement which ties together an object and a subjecto with a "relation", // which means the set of high level rules defined in the Policy will apply to these entities. type SetRelationshipCmd struct { Relationship *types.Relationship `protobuf:"bytes,1,opt,name=relationship,proto3" json:"relationship,omitempty"` } func (m *SetRelationshipCmd) Reset() { *m = SetRelationshipCmd{} } func (m *SetRelationshipCmd) String() string { return proto.CompactTextString(m) } func (*SetRelationshipCmd) ProtoMessage() {} func (*SetRelationshipCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{1} } func (m *SetRelationshipCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SetRelationshipCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SetRelationshipCmd.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 *SetRelationshipCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_SetRelationshipCmd.Merge(m, src) } func (m *SetRelationshipCmd) XXX_Size() int { return m.Size() } func (m *SetRelationshipCmd) XXX_DiscardUnknown() { xxx_messageInfo_SetRelationshipCmd.DiscardUnknown(m) } var xxx_messageInfo_SetRelationshipCmd proto.InternalMessageInfo func (m *SetRelationshipCmd) GetRelationship() *types.Relationship { if m != nil { return m.Relationship } return nil } // DelereRelationship removes a Relationship from a Policy. // If the Relationship was not found in a Policy, this Cmd is a no-op. type DeleteRelationshipCmd struct { Relationship *types.Relationship `protobuf:"bytes,1,opt,name=relationship,proto3" json:"relationship,omitempty"` } func (m *DeleteRelationshipCmd) Reset() { *m = DeleteRelationshipCmd{} } func (m *DeleteRelationshipCmd) String() string { return proto.CompactTextString(m) } func (*DeleteRelationshipCmd) ProtoMessage() {} func (*DeleteRelationshipCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{2} } func (m *DeleteRelationshipCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DeleteRelationshipCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DeleteRelationshipCmd.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 *DeleteRelationshipCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_DeleteRelationshipCmd.Merge(m, src) } func (m *DeleteRelationshipCmd) XXX_Size() int { return m.Size() } func (m *DeleteRelationshipCmd) XXX_DiscardUnknown() { xxx_messageInfo_DeleteRelationshipCmd.DiscardUnknown(m) } var xxx_messageInfo_DeleteRelationshipCmd proto.InternalMessageInfo func (m *DeleteRelationshipCmd) GetRelationship() *types.Relationship { if m != nil { return m.Relationship } return nil } // RegisterObject creates a special kind of Relationship within a Policy which ties // the msg's Actor as the owner of the msg's Object. // The Owner has complete control over the set of subjects that are related to their Object, // giving them autonomy to share the object and revoke acces to the object, // much like owners in a Discretionary Access Control model. // // Attempting to register a previously registered Object is an error, // Object IDs are therefore assumed to be unique within a Policy. type RegisterObjectCmd struct { Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` } func (m *RegisterObjectCmd) Reset() { *m = RegisterObjectCmd{} } func (m *RegisterObjectCmd) String() string { return proto.CompactTextString(m) } func (*RegisterObjectCmd) ProtoMessage() {} func (*RegisterObjectCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{3} } func (m *RegisterObjectCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RegisterObjectCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RegisterObjectCmd.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 *RegisterObjectCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_RegisterObjectCmd.Merge(m, src) } func (m *RegisterObjectCmd) XXX_Size() int { return m.Size() } func (m *RegisterObjectCmd) XXX_DiscardUnknown() { xxx_messageInfo_RegisterObjectCmd.DiscardUnknown(m) } var xxx_messageInfo_RegisterObjectCmd proto.InternalMessageInfo func (m *RegisterObjectCmd) GetObject() *types.Object { if m != nil { return m.Object } return nil } // CommitRegistrationsCmd creates a new batched commitment to a set of Object registrations type CommitRegistrationsCmd struct { Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` } func (m *CommitRegistrationsCmd) Reset() { *m = CommitRegistrationsCmd{} } func (m *CommitRegistrationsCmd) String() string { return proto.CompactTextString(m) } func (*CommitRegistrationsCmd) ProtoMessage() {} func (*CommitRegistrationsCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{4} } func (m *CommitRegistrationsCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CommitRegistrationsCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CommitRegistrationsCmd.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 *CommitRegistrationsCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitRegistrationsCmd.Merge(m, src) } func (m *CommitRegistrationsCmd) XXX_Size() int { return m.Size() } func (m *CommitRegistrationsCmd) XXX_DiscardUnknown() { xxx_messageInfo_CommitRegistrationsCmd.DiscardUnknown(m) } var xxx_messageInfo_CommitRegistrationsCmd proto.InternalMessageInfo func (m *CommitRegistrationsCmd) GetCommitment() []byte { if m != nil { return m.Commitment } return nil } type CommitRegistrationsCmdResult struct { RegistrationsCommitment *RegistrationsCommitment `protobuf:"bytes,1,opt,name=registrations_commitment,json=registrationsCommitment,proto3" json:"registrations_commitment,omitempty"` } func (m *CommitRegistrationsCmdResult) Reset() { *m = CommitRegistrationsCmdResult{} } func (m *CommitRegistrationsCmdResult) String() string { return proto.CompactTextString(m) } func (*CommitRegistrationsCmdResult) ProtoMessage() {} func (*CommitRegistrationsCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{5} } func (m *CommitRegistrationsCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CommitRegistrationsCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CommitRegistrationsCmdResult.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 *CommitRegistrationsCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitRegistrationsCmdResult.Merge(m, src) } func (m *CommitRegistrationsCmdResult) XXX_Size() int { return m.Size() } func (m *CommitRegistrationsCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_CommitRegistrationsCmdResult.DiscardUnknown(m) } var xxx_messageInfo_CommitRegistrationsCmdResult proto.InternalMessageInfo func (m *CommitRegistrationsCmdResult) GetRegistrationsCommitment() *RegistrationsCommitment { if m != nil { return m.RegistrationsCommitment } return nil } type RevealRegistrationCmd struct { RegistrationsCommitmentId uint64 `protobuf:"varint,1,opt,name=registrations_commitment_id,json=registrationsCommitmentId,proto3" json:"registrations_commitment_id,omitempty"` Proof *RegistrationProof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` } func (m *RevealRegistrationCmd) Reset() { *m = RevealRegistrationCmd{} } func (m *RevealRegistrationCmd) String() string { return proto.CompactTextString(m) } func (*RevealRegistrationCmd) ProtoMessage() {} func (*RevealRegistrationCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{6} } func (m *RevealRegistrationCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RevealRegistrationCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RevealRegistrationCmd.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 *RevealRegistrationCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_RevealRegistrationCmd.Merge(m, src) } func (m *RevealRegistrationCmd) XXX_Size() int { return m.Size() } func (m *RevealRegistrationCmd) XXX_DiscardUnknown() { xxx_messageInfo_RevealRegistrationCmd.DiscardUnknown(m) } var xxx_messageInfo_RevealRegistrationCmd proto.InternalMessageInfo func (m *RevealRegistrationCmd) GetRegistrationsCommitmentId() uint64 { if m != nil { return m.RegistrationsCommitmentId } return 0 } func (m *RevealRegistrationCmd) GetProof() *RegistrationProof { if m != nil { return m.Proof } return nil } type RevealRegistrationCmdResult struct { Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` Event *AmendmentEvent `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` } func (m *RevealRegistrationCmdResult) Reset() { *m = RevealRegistrationCmdResult{} } func (m *RevealRegistrationCmdResult) String() string { return proto.CompactTextString(m) } func (*RevealRegistrationCmdResult) ProtoMessage() {} func (*RevealRegistrationCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{7} } func (m *RevealRegistrationCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RevealRegistrationCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RevealRegistrationCmdResult.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 *RevealRegistrationCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_RevealRegistrationCmdResult.Merge(m, src) } func (m *RevealRegistrationCmdResult) XXX_Size() int { return m.Size() } func (m *RevealRegistrationCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_RevealRegistrationCmdResult.DiscardUnknown(m) } var xxx_messageInfo_RevealRegistrationCmdResult proto.InternalMessageInfo func (m *RevealRegistrationCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } return nil } func (m *RevealRegistrationCmdResult) GetEvent() *AmendmentEvent { if m != nil { return m.Event } return nil } type FlagHijackAttemptCmd struct { EventId uint64 `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` } func (m *FlagHijackAttemptCmd) Reset() { *m = FlagHijackAttemptCmd{} } func (m *FlagHijackAttemptCmd) String() string { return proto.CompactTextString(m) } func (*FlagHijackAttemptCmd) ProtoMessage() {} func (*FlagHijackAttemptCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{8} } func (m *FlagHijackAttemptCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FlagHijackAttemptCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FlagHijackAttemptCmd.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 *FlagHijackAttemptCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_FlagHijackAttemptCmd.Merge(m, src) } func (m *FlagHijackAttemptCmd) XXX_Size() int { return m.Size() } func (m *FlagHijackAttemptCmd) XXX_DiscardUnknown() { xxx_messageInfo_FlagHijackAttemptCmd.DiscardUnknown(m) } var xxx_messageInfo_FlagHijackAttemptCmd proto.InternalMessageInfo func (m *FlagHijackAttemptCmd) GetEventId() uint64 { if m != nil { return m.EventId } return 0 } type FlagHijackAttemptCmdResult struct { Event *AmendmentEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` } func (m *FlagHijackAttemptCmdResult) Reset() { *m = FlagHijackAttemptCmdResult{} } func (m *FlagHijackAttemptCmdResult) String() string { return proto.CompactTextString(m) } func (*FlagHijackAttemptCmdResult) ProtoMessage() {} func (*FlagHijackAttemptCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{9} } func (m *FlagHijackAttemptCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FlagHijackAttemptCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FlagHijackAttemptCmdResult.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 *FlagHijackAttemptCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_FlagHijackAttemptCmdResult.Merge(m, src) } func (m *FlagHijackAttemptCmdResult) XXX_Size() int { return m.Size() } func (m *FlagHijackAttemptCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_FlagHijackAttemptCmdResult.DiscardUnknown(m) } var xxx_messageInfo_FlagHijackAttemptCmdResult proto.InternalMessageInfo func (m *FlagHijackAttemptCmdResult) GetEvent() *AmendmentEvent { if m != nil { return m.Event } return nil } type UnarchiveObjectCmd struct { Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` } func (m *UnarchiveObjectCmd) Reset() { *m = UnarchiveObjectCmd{} } func (m *UnarchiveObjectCmd) String() string { return proto.CompactTextString(m) } func (*UnarchiveObjectCmd) ProtoMessage() {} func (*UnarchiveObjectCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{10} } func (m *UnarchiveObjectCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnarchiveObjectCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnarchiveObjectCmd.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 *UnarchiveObjectCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_UnarchiveObjectCmd.Merge(m, src) } func (m *UnarchiveObjectCmd) XXX_Size() int { return m.Size() } func (m *UnarchiveObjectCmd) XXX_DiscardUnknown() { xxx_messageInfo_UnarchiveObjectCmd.DiscardUnknown(m) } var xxx_messageInfo_UnarchiveObjectCmd proto.InternalMessageInfo func (m *UnarchiveObjectCmd) GetObject() *types.Object { if m != nil { return m.Object } return nil } type UnarchiveObjectCmdResult struct { Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` RelationshipModified bool `protobuf:"varint,2,opt,name=relationship_modified,json=relationshipModified,proto3" json:"relationship_modified,omitempty"` } func (m *UnarchiveObjectCmdResult) Reset() { *m = UnarchiveObjectCmdResult{} } func (m *UnarchiveObjectCmdResult) String() string { return proto.CompactTextString(m) } func (*UnarchiveObjectCmdResult) ProtoMessage() {} func (*UnarchiveObjectCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{11} } func (m *UnarchiveObjectCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnarchiveObjectCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnarchiveObjectCmdResult.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 *UnarchiveObjectCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_UnarchiveObjectCmdResult.Merge(m, src) } func (m *UnarchiveObjectCmdResult) XXX_Size() int { return m.Size() } func (m *UnarchiveObjectCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_UnarchiveObjectCmdResult.DiscardUnknown(m) } var xxx_messageInfo_UnarchiveObjectCmdResult proto.InternalMessageInfo func (m *UnarchiveObjectCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } return nil } func (m *UnarchiveObjectCmdResult) GetRelationshipModified() bool { if m != nil { return m.RelationshipModified } return false } // ArchiveObject let's an Object's Owner effectively "unshare" their Object. // This method wipes all Relationships referencing the given Object. // // A caveat is that after removing the Relationships, a record of the original Object owner // is maintained to prevent an "ownership hijack" attack. // // Suppose Bob owns object Foo, which is shared with Bob but not Eve. // Eve wants to access Foo but was not given permission to, they could "hijack" Bob's object by waiting for Bob to Archive Foo, // then submitting a RegisterObject Msg, effectively becoming Foo's new owner. // If Charlie has a copy of the object, Eve could convince Charlie to share his copy, granting Eve access to Foo. // The previous scenario where an unauthorized user is able to claim ownership to data previously unaccessible to them // is an "ownership hijack". type ArchiveObjectCmd struct { Object *types.Object `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` } func (m *ArchiveObjectCmd) Reset() { *m = ArchiveObjectCmd{} } func (m *ArchiveObjectCmd) String() string { return proto.CompactTextString(m) } func (*ArchiveObjectCmd) ProtoMessage() {} func (*ArchiveObjectCmd) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{12} } func (m *ArchiveObjectCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ArchiveObjectCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ArchiveObjectCmd.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 *ArchiveObjectCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_ArchiveObjectCmd.Merge(m, src) } func (m *ArchiveObjectCmd) XXX_Size() int { return m.Size() } func (m *ArchiveObjectCmd) XXX_DiscardUnknown() { xxx_messageInfo_ArchiveObjectCmd.DiscardUnknown(m) } var xxx_messageInfo_ArchiveObjectCmd proto.InternalMessageInfo func (m *ArchiveObjectCmd) GetObject() *types.Object { if m != nil { return m.Object } return nil } // SetRelationshipCmd sets a Relationship in a Policy type SetRelationshipCmdResult struct { // Indicates whether the given Relationship previously existed, ie the Tx was a no op RecordExisted bool `protobuf:"varint,1,opt,name=record_existed,json=recordExisted,proto3" json:"record_existed,omitempty"` Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (m *SetRelationshipCmdResult) Reset() { *m = SetRelationshipCmdResult{} } func (m *SetRelationshipCmdResult) String() string { return proto.CompactTextString(m) } func (*SetRelationshipCmdResult) ProtoMessage() {} func (*SetRelationshipCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{13} } func (m *SetRelationshipCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SetRelationshipCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SetRelationshipCmdResult.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 *SetRelationshipCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_SetRelationshipCmdResult.Merge(m, src) } func (m *SetRelationshipCmdResult) XXX_Size() int { return m.Size() } func (m *SetRelationshipCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_SetRelationshipCmdResult.DiscardUnknown(m) } var xxx_messageInfo_SetRelationshipCmdResult proto.InternalMessageInfo func (m *SetRelationshipCmdResult) GetRecordExisted() bool { if m != nil { return m.RecordExisted } return false } func (m *SetRelationshipCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } return nil } // DeleteRelationshipCmdResult removes a Relationship in a Policy type DeleteRelationshipCmdResult struct { RecordFound bool `protobuf:"varint,1,opt,name=record_found,json=recordFound,proto3" json:"record_found,omitempty"` } func (m *DeleteRelationshipCmdResult) Reset() { *m = DeleteRelationshipCmdResult{} } func (m *DeleteRelationshipCmdResult) String() string { return proto.CompactTextString(m) } func (*DeleteRelationshipCmdResult) ProtoMessage() {} func (*DeleteRelationshipCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{14} } func (m *DeleteRelationshipCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DeleteRelationshipCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DeleteRelationshipCmdResult.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 *DeleteRelationshipCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_DeleteRelationshipCmdResult.Merge(m, src) } func (m *DeleteRelationshipCmdResult) XXX_Size() int { return m.Size() } func (m *DeleteRelationshipCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_DeleteRelationshipCmdResult.DiscardUnknown(m) } var xxx_messageInfo_DeleteRelationshipCmdResult proto.InternalMessageInfo func (m *DeleteRelationshipCmdResult) GetRecordFound() bool { if m != nil { return m.RecordFound } return false } // RegisterObjectCmdResult registers an Object in a Policy type RegisterObjectCmdResult struct { Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (m *RegisterObjectCmdResult) Reset() { *m = RegisterObjectCmdResult{} } func (m *RegisterObjectCmdResult) String() string { return proto.CompactTextString(m) } func (*RegisterObjectCmdResult) ProtoMessage() {} func (*RegisterObjectCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{15} } func (m *RegisterObjectCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RegisterObjectCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RegisterObjectCmdResult.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 *RegisterObjectCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_RegisterObjectCmdResult.Merge(m, src) } func (m *RegisterObjectCmdResult) XXX_Size() int { return m.Size() } func (m *RegisterObjectCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_RegisterObjectCmdResult.DiscardUnknown(m) } var xxx_messageInfo_RegisterObjectCmdResult proto.InternalMessageInfo func (m *RegisterObjectCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } return nil } // ArchiveObjectCmdResult unregisters an Object in a Policy type ArchiveObjectCmdResult struct { Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` RelationshipsRemoved uint64 `protobuf:"varint,2,opt,name=relationships_removed,json=relationshipsRemoved,proto3" json:"relationships_removed,omitempty"` } func (m *ArchiveObjectCmdResult) Reset() { *m = ArchiveObjectCmdResult{} } func (m *ArchiveObjectCmdResult) String() string { return proto.CompactTextString(m) } func (*ArchiveObjectCmdResult) ProtoMessage() {} func (*ArchiveObjectCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{16} } func (m *ArchiveObjectCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ArchiveObjectCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ArchiveObjectCmdResult.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 *ArchiveObjectCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_ArchiveObjectCmdResult.Merge(m, src) } func (m *ArchiveObjectCmdResult) XXX_Size() int { return m.Size() } func (m *ArchiveObjectCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_ArchiveObjectCmdResult.DiscardUnknown(m) } var xxx_messageInfo_ArchiveObjectCmdResult proto.InternalMessageInfo func (m *ArchiveObjectCmdResult) GetFound() bool { if m != nil { return m.Found } return false } func (m *ArchiveObjectCmdResult) GetRelationshipsRemoved() uint64 { if m != nil { return m.RelationshipsRemoved } return 0 } type PolicyCmdResult struct { // Types that are valid to be assigned to Result: // // *PolicyCmdResult_SetRelationshipResult // *PolicyCmdResult_DeleteRelationshipResult // *PolicyCmdResult_RegisterObjectResult // *PolicyCmdResult_ArchiveObjectResult // *PolicyCmdResult_CommitRegistrationsResult // *PolicyCmdResult_RevealRegistrationResult // *PolicyCmdResult_FlagHijackAttemptResult // *PolicyCmdResult_UnarchiveObjectResult Result isPolicyCmdResult_Result `protobuf_oneof:"result"` } func (m *PolicyCmdResult) Reset() { *m = PolicyCmdResult{} } func (m *PolicyCmdResult) String() string { return proto.CompactTextString(m) } func (*PolicyCmdResult) ProtoMessage() {} func (*PolicyCmdResult) Descriptor() ([]byte, []int) { return fileDescriptor_1de5e9736122d1ff, []int{17} } func (m *PolicyCmdResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PolicyCmdResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PolicyCmdResult.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 *PolicyCmdResult) XXX_Merge(src proto.Message) { xxx_messageInfo_PolicyCmdResult.Merge(m, src) } func (m *PolicyCmdResult) XXX_Size() int { return m.Size() } func (m *PolicyCmdResult) XXX_DiscardUnknown() { xxx_messageInfo_PolicyCmdResult.DiscardUnknown(m) } var xxx_messageInfo_PolicyCmdResult proto.InternalMessageInfo type isPolicyCmdResult_Result interface { isPolicyCmdResult_Result() MarshalTo([]byte) (int, error) Size() int } type PolicyCmdResult_SetRelationshipResult struct { SetRelationshipResult *SetRelationshipCmdResult `protobuf:"bytes,1,opt,name=set_relationship_result,json=setRelationshipResult,proto3,oneof" json:"set_relationship_result,omitempty"` } type PolicyCmdResult_DeleteRelationshipResult struct { DeleteRelationshipResult *DeleteRelationshipCmdResult `protobuf:"bytes,2,opt,name=delete_relationship_result,json=deleteRelationshipResult,proto3,oneof" json:"delete_relationship_result,omitempty"` } type PolicyCmdResult_RegisterObjectResult struct { RegisterObjectResult *RegisterObjectCmdResult `protobuf:"bytes,3,opt,name=register_object_result,json=registerObjectResult,proto3,oneof" json:"register_object_result,omitempty"` } type PolicyCmdResult_ArchiveObjectResult struct { ArchiveObjectResult *ArchiveObjectCmdResult `protobuf:"bytes,4,opt,name=archive_object_result,json=archiveObjectResult,proto3,oneof" json:"archive_object_result,omitempty"` } type PolicyCmdResult_CommitRegistrationsResult struct { CommitRegistrationsResult *CommitRegistrationsCmdResult `protobuf:"bytes,5,opt,name=commit_registrations_result,json=commitRegistrationsResult,proto3,oneof" json:"commit_registrations_result,omitempty"` } type PolicyCmdResult_RevealRegistrationResult struct { RevealRegistrationResult *RevealRegistrationCmdResult `protobuf:"bytes,6,opt,name=reveal_registration_result,json=revealRegistrationResult,proto3,oneof" json:"reveal_registration_result,omitempty"` } type PolicyCmdResult_FlagHijackAttemptResult struct { FlagHijackAttemptResult *FlagHijackAttemptCmdResult `protobuf:"bytes,7,opt,name=flag_hijack_attempt_result,json=flagHijackAttemptResult,proto3,oneof" json:"flag_hijack_attempt_result,omitempty"` } type PolicyCmdResult_UnarchiveObjectResult struct { UnarchiveObjectResult *UnarchiveObjectCmdResult `protobuf:"bytes,8,opt,name=unarchive_object_result,json=unarchiveObjectResult,proto3,oneof" json:"unarchive_object_result,omitempty"` } func (*PolicyCmdResult_SetRelationshipResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_DeleteRelationshipResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_RegisterObjectResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_ArchiveObjectResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_CommitRegistrationsResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_RevealRegistrationResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_FlagHijackAttemptResult) isPolicyCmdResult_Result() {} func (*PolicyCmdResult_UnarchiveObjectResult) isPolicyCmdResult_Result() {} func (m *PolicyCmdResult) GetResult() isPolicyCmdResult_Result { if m != nil { return m.Result } return nil } func (m *PolicyCmdResult) GetSetRelationshipResult() *SetRelationshipCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_SetRelationshipResult); ok { return x.SetRelationshipResult } return nil } func (m *PolicyCmdResult) GetDeleteRelationshipResult() *DeleteRelationshipCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_DeleteRelationshipResult); ok { return x.DeleteRelationshipResult } return nil } func (m *PolicyCmdResult) GetRegisterObjectResult() *RegisterObjectCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_RegisterObjectResult); ok { return x.RegisterObjectResult } return nil } func (m *PolicyCmdResult) GetArchiveObjectResult() *ArchiveObjectCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_ArchiveObjectResult); ok { return x.ArchiveObjectResult } return nil } func (m *PolicyCmdResult) GetCommitRegistrationsResult() *CommitRegistrationsCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_CommitRegistrationsResult); ok { return x.CommitRegistrationsResult } return nil } func (m *PolicyCmdResult) GetRevealRegistrationResult() *RevealRegistrationCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_RevealRegistrationResult); ok { return x.RevealRegistrationResult } return nil } func (m *PolicyCmdResult) GetFlagHijackAttemptResult() *FlagHijackAttemptCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_FlagHijackAttemptResult); ok { return x.FlagHijackAttemptResult } return nil } func (m *PolicyCmdResult) GetUnarchiveObjectResult() *UnarchiveObjectCmdResult { if x, ok := m.GetResult().(*PolicyCmdResult_UnarchiveObjectResult); ok { return x.UnarchiveObjectResult } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*PolicyCmdResult) XXX_OneofWrappers() []interface{} { return []interface{}{ (*PolicyCmdResult_SetRelationshipResult)(nil), (*PolicyCmdResult_DeleteRelationshipResult)(nil), (*PolicyCmdResult_RegisterObjectResult)(nil), (*PolicyCmdResult_ArchiveObjectResult)(nil), (*PolicyCmdResult_CommitRegistrationsResult)(nil), (*PolicyCmdResult_RevealRegistrationResult)(nil), (*PolicyCmdResult_FlagHijackAttemptResult)(nil), (*PolicyCmdResult_UnarchiveObjectResult)(nil), } } func init() { proto.RegisterType((*PolicyCmd)(nil), "sourcehub.acp.PolicyCmd") proto.RegisterType((*SetRelationshipCmd)(nil), "sourcehub.acp.SetRelationshipCmd") proto.RegisterType((*DeleteRelationshipCmd)(nil), "sourcehub.acp.DeleteRelationshipCmd") proto.RegisterType((*RegisterObjectCmd)(nil), "sourcehub.acp.RegisterObjectCmd") proto.RegisterType((*CommitRegistrationsCmd)(nil), "sourcehub.acp.CommitRegistrationsCmd") proto.RegisterType((*CommitRegistrationsCmdResult)(nil), "sourcehub.acp.CommitRegistrationsCmdResult") proto.RegisterType((*RevealRegistrationCmd)(nil), "sourcehub.acp.RevealRegistrationCmd") proto.RegisterType((*RevealRegistrationCmdResult)(nil), "sourcehub.acp.RevealRegistrationCmdResult") proto.RegisterType((*FlagHijackAttemptCmd)(nil), "sourcehub.acp.FlagHijackAttemptCmd") proto.RegisterType((*FlagHijackAttemptCmdResult)(nil), "sourcehub.acp.FlagHijackAttemptCmdResult") proto.RegisterType((*UnarchiveObjectCmd)(nil), "sourcehub.acp.UnarchiveObjectCmd") proto.RegisterType((*UnarchiveObjectCmdResult)(nil), "sourcehub.acp.UnarchiveObjectCmdResult") proto.RegisterType((*ArchiveObjectCmd)(nil), "sourcehub.acp.ArchiveObjectCmd") proto.RegisterType((*SetRelationshipCmdResult)(nil), "sourcehub.acp.SetRelationshipCmdResult") proto.RegisterType((*DeleteRelationshipCmdResult)(nil), "sourcehub.acp.DeleteRelationshipCmdResult") proto.RegisterType((*RegisterObjectCmdResult)(nil), "sourcehub.acp.RegisterObjectCmdResult") proto.RegisterType((*ArchiveObjectCmdResult)(nil), "sourcehub.acp.ArchiveObjectCmdResult") proto.RegisterType((*PolicyCmdResult)(nil), "sourcehub.acp.PolicyCmdResult") } func init() { proto.RegisterFile("sourcehub/acp/policy_cmd.proto", fileDescriptor_1de5e9736122d1ff) } var fileDescriptor_1de5e9736122d1ff = []byte{ // 1009 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0x45, 0x14, 0xf6, 0x36, 0xb1, 0x6b, 0x5e, 0x5a, 0x68, 0xa7, 0x76, 0xec, 0x38, 0xb0, 0x4d, 0x17, 0x0a, 0x14, 0x24, 0x5b, 0xb4, 0x12, 0x82, 0x0b, 0x22, 0x0d, 0xad, 0x5c, 0x7e, 0xa8, 0x65, 0xa0, 0x17, 0x40, 0x59, 0x6d, 0x76, 0xc7, 0xf6, 0xa6, 0x5e, 0x8f, 0x35, 0x3b, 0x0e, 0xad, 0xc4, 0x85, 0x2b, 0x12, 0x82, 0x3f, 0x8b, 0x1b, 0x3d, 0x72, 0x44, 0x89, 0xc4, 0xdf, 0x81, 0xe6, 0x87, 0xed, 0xdd, 0x99, 0x71, 0x48, 0x69, 0x6e, 0xf6, 0xbc, 0x6f, 0xbe, 0xf7, 0xe6, 0xbd, 0x37, 0x6f, 0xbe, 0x05, 0x3f, 0xa7, 0x33, 0x16, 0x93, 0xd1, 0xec, 0xa0, 0x17, 0xc5, 0xd3, 0xde, 0x94, 0x8e, 0xd3, 0xf8, 0x59, 0x18, 0x67, 0x49, 0x77, 0xca, 0x28, 0xa7, 0xe8, 0xf2, 0xc2, 0xde, 0x8d, 0xe2, 0x69, 0xe7, 0xfa, 0x90, 0xd2, 0xe1, 0x98, 0xf4, 0xa4, 0xf1, 0x60, 0x36, 0xe8, 0xf1, 0x34, 0x23, 0x39, 0x8f, 0xb2, 0xa9, 0xc2, 0x77, 0x0c, 0xbe, 0x98, 0x66, 0x59, 0xca, 0x33, 0x32, 0xe1, 0xda, 0xde, 0x29, 0xdb, 0x19, 0x89, 0x29, 0xd3, 0xbe, 0x3a, 0x3b, 0xa6, 0x6d, 0x98, 0xe6, 0x9c, 0x45, 0x3c, 0xa5, 0x13, 0x8d, 0xb8, 0xa5, 0x10, 0x13, 0xc2, 0x7f, 0xa4, 0xec, 0x89, 0x40, 0x85, 0x31, 0x65, 0xa4, 0xc7, 0xc8, 0x58, 0xc2, 0xf2, 0x51, 0xaa, 0x03, 0x09, 0xfe, 0xa9, 0xc2, 0x2b, 0x8f, 0xe4, 0x69, 0xf6, 0xb2, 0x04, 0x3d, 0x86, 0x46, 0x4e, 0x78, 0x58, 0xc4, 0x89, 0x43, 0xb6, 0xbd, 0x1d, 0xef, 0xdd, 0x8d, 0xdb, 0x37, 0xba, 0xa5, 0x53, 0x76, 0xbf, 0x21, 0x1c, 0x17, 0x90, 0x7b, 0x59, 0xd2, 0xaf, 0x60, 0x94, 0x5b, 0xab, 0x68, 0x1f, 0x5a, 0x09, 0x19, 0x13, 0x4e, 0x6c, 0xe6, 0x0b, 0x92, 0xf9, 0x2d, 0x83, 0xf9, 0x33, 0x89, 0xb6, 0xc9, 0x9b, 0x89, 0xcb, 0x80, 0x30, 0x5c, 0x53, 0x59, 0x20, 0x2c, 0xa4, 0x07, 0x87, 0x24, 0xe6, 0x92, 0x7b, 0x4d, 0x72, 0xef, 0x18, 0xdc, 0x58, 0x23, 0x1f, 0x4a, 0xa0, 0xe2, 0xbd, 0xca, 0xcc, 0x45, 0xf4, 0x10, 0x50, 0xc4, 0xe2, 0x51, 0x7a, 0x44, 0x8a, 0x94, 0xeb, 0x92, 0xf2, 0xba, 0x41, 0xb9, 0xab, 0x80, 0x45, 0xc6, 0x2b, 0x91, 0xb1, 0x86, 0x22, 0x68, 0xab, 0x32, 0x87, 0xc5, 0x8a, 0xe5, 0x92, 0xb6, 0x2a, 0x69, 0x6f, 0x1a, 0xb4, 0x7b, 0x12, 0x8e, 0x8b, 0x68, 0x45, 0xbe, 0x19, 0x3b, 0x2d, 0x22, 0xcf, 0x8c, 0x1c, 0x91, 0x68, 0x5c, 0x72, 0x21, 0x3d, 0xd4, 0x9c, 0x79, 0xc6, 0x12, 0x5d, 0xe4, 0xd1, 0x79, 0x66, 0x2e, 0x03, 0xfa, 0x01, 0x5a, 0x83, 0x71, 0x34, 0x0c, 0x47, 0xe9, 0x61, 0x14, 0x3f, 0x09, 0x23, 0xce, 0x49, 0x36, 0x55, 0x89, 0xb9, 0x28, 0xf9, 0xdf, 0x34, 0xf8, 0xef, 0x8f, 0xa3, 0x61, 0x5f, 0x82, 0x77, 0x15, 0x56, 0xd1, 0x37, 0x06, 0x8e, 0x75, 0xd1, 0x7c, 0xb3, 0x89, 0x23, 0xe7, 0x75, 0x67, 0xf3, 0x3d, 0x9e, 0x44, 0x76, 0xd6, 0xd1, 0xcc, 0x5a, 0xbd, 0x5b, 0x85, 0xb5, 0x38, 0x4b, 0x82, 0x7d, 0x40, 0x76, 0xbf, 0xa2, 0x3e, 0x5c, 0x2a, 0xb6, 0xa4, 0x6e, 0xf4, 0x79, 0x9a, 0xf4, 0x05, 0xea, 0xce, 0x2f, 0x50, 0xb7, 0xb8, 0x1d, 0x97, 0x76, 0x06, 0x11, 0x34, 0x9d, 0x5d, 0x7b, 0x8e, 0x2e, 0xbe, 0x80, 0xab, 0x56, 0xf3, 0xa2, 0x0f, 0xa1, 0xa6, 0x72, 0xa5, 0x89, 0xfd, 0x55, 0xc4, 0x6a, 0x0b, 0xd6, 0xe8, 0xe0, 0x23, 0xd8, 0x74, 0xf7, 0x17, 0xf2, 0x01, 0x96, 0xf3, 0x48, 0xb2, 0x5e, 0xc2, 0x85, 0x95, 0xe0, 0x67, 0x0f, 0x5e, 0x77, 0x6f, 0xc5, 0x24, 0x9f, 0x8d, 0xb9, 0xe8, 0x74, 0xa3, 0xc5, 0xcb, 0x74, 0x1b, 0xb7, 0xdf, 0x76, 0xde, 0xc9, 0x39, 0xd1, 0x02, 0x8d, 0x5b, 0xcc, 0x6d, 0x08, 0x7e, 0xf3, 0xa0, 0xe9, 0x6c, 0x5e, 0xf4, 0x09, 0x6c, 0xaf, 0x72, 0x1e, 0xa6, 0x6a, 0x92, 0xad, 0xe3, 0xad, 0x15, 0xbc, 0x0f, 0x44, 0x3e, 0xab, 0x53, 0x46, 0xe9, 0x40, 0x4f, 0xa6, 0x9d, 0x53, 0x22, 0x7d, 0x24, 0x70, 0x58, 0xc1, 0x83, 0x5f, 0x3d, 0xd8, 0x76, 0x46, 0xa4, 0x93, 0xf2, 0x31, 0xd4, 0xd4, 0x14, 0x5f, 0x31, 0x4c, 0x4b, 0x75, 0x97, 0x40, 0xac, 0x37, 0xa0, 0x3b, 0x50, 0x25, 0x47, 0x22, 0x79, 0x2a, 0xa4, 0x37, 0xcc, 0xe9, 0x93, 0x91, 0x49, 0x22, 0xa2, 0xbf, 0x27, 0x40, 0x58, 0x61, 0x83, 0x0f, 0xa0, 0xe1, 0xba, 0x7d, 0x68, 0x0b, 0xea, 0x12, 0xb0, 0x4c, 0xc6, 0x45, 0xf9, 0xff, 0x41, 0x12, 0x7c, 0x0d, 0x1d, 0xd7, 0x16, 0x7d, 0x80, 0x45, 0x14, 0xde, 0x0b, 0x44, 0xf1, 0x25, 0x20, 0xfb, 0xa2, 0xfe, 0xef, 0x9e, 0xfd, 0xc5, 0x83, 0xb6, 0x4d, 0x77, 0x1e, 0x09, 0x6e, 0x96, 0x1e, 0xa6, 0x8c, 0x26, 0xe9, 0x20, 0x25, 0xea, 0x75, 0xaa, 0xe3, 0x46, 0xd1, 0xf8, 0x95, 0xb6, 0x05, 0x9f, 0xc3, 0x95, 0xdd, 0xf3, 0x3a, 0xd8, 0x4f, 0xd0, 0xb6, 0x87, 0x93, 0x3e, 0xd7, 0x4d, 0x78, 0x55, 0x85, 0x19, 0x92, 0xa7, 0xe2, 0xee, 0xab, 0xf3, 0xd5, 0xf1, 0x65, 0xb5, 0x7a, 0x4f, 0x2d, 0x16, 0x8e, 0x7f, 0xe1, 0x05, 0x8f, 0x1f, 0x7c, 0x0a, 0xdb, 0xce, 0xd1, 0xa5, 0x03, 0xb8, 0x21, 0x06, 0x98, 0x0c, 0x60, 0x40, 0x67, 0x93, 0xb9, 0xfb, 0x0d, 0xb5, 0x76, 0x5f, 0x2c, 0x05, 0xdf, 0x42, 0xcb, 0x9a, 0x4c, 0x2f, 0x5d, 0x96, 0x20, 0x86, 0xcd, 0x5d, 0x77, 0xad, 0x1b, 0x50, 0x2d, 0xc6, 0xa2, 0xfe, 0x98, 0x65, 0xcc, 0x43, 0x46, 0x32, 0x7a, 0xa4, 0xcb, 0xb8, 0x5e, 0x2e, 0x63, 0x8e, 0x95, 0x2d, 0xf8, 0xb3, 0x06, 0xaf, 0x2d, 0x04, 0xd0, 0x62, 0x80, 0xb5, 0x2c, 0x19, 0xc4, 0xa4, 0x49, 0x1f, 0xe2, 0x9d, 0xff, 0x54, 0x42, 0x8a, 0x49, 0x3c, 0xa5, 0x86, 0x1e, 0xd2, 0x2e, 0x0e, 0xa1, 0xe3, 0x92, 0x44, 0xda, 0x8b, 0x2a, 0xe1, 0x7b, 0x67, 0x51, 0x45, 0x0b, 0x47, 0x6d, 0x5b, 0x1b, 0x69, 0x5f, 0xfb, 0xb0, 0x69, 0xca, 0x23, 0xed, 0x67, 0xed, 0x94, 0x69, 0x6c, 0x95, 0x52, 0x3c, 0xdc, 0x65, 0x9d, 0xa4, 0xf9, 0xbf, 0x87, 0xa6, 0xf1, 0x6c, 0x6b, 0xfa, 0x75, 0xa7, 0xac, 0x71, 0xd7, 0xb4, 0x5f, 0xc1, 0xd7, 0x4a, 0x37, 0x5b, 0x93, 0x67, 0xb0, 0xed, 0x94, 0x4d, 0xda, 0x85, 0x52, 0x4e, 0xef, 0x9f, 0x49, 0x39, 0x2d, 0x1c, 0x6d, 0x39, 0xf4, 0xd3, 0xb2, 0x2e, 0x2e, 0x09, 0xa5, 0xbd, 0xd5, 0x9c, 0x75, 0x39, 0x65, 0xec, 0x8b, 0xba, 0xd8, 0x5a, 0x4a, 0xfb, 0x1a, 0x41, 0xc7, 0x25, 0xa7, 0xb4, 0x2f, 0xa5, 0xa8, 0x6e, 0x9d, 0x41, 0x51, 0x2d, 0x5c, 0xb5, 0x2c, 0x5d, 0xb5, 0x6c, 0x68, 0x4b, 0x5a, 0x69, 0x37, 0x75, 0x67, 0x43, 0xaf, 0x9a, 0xb2, 0xa2, 0xa1, 0x0d, 0x8d, 0xa5, 0x0c, 0x77, 0xeb, 0xe2, 0x9e, 0xcb, 0x5f, 0xfd, 0x3f, 0x8e, 0x7d, 0xef, 0xf9, 0xb1, 0xef, 0xfd, 0x7d, 0xec, 0x7b, 0xbf, 0x9f, 0xf8, 0x95, 0xe7, 0x27, 0x7e, 0xe5, 0xaf, 0x13, 0xbf, 0xf2, 0x5d, 0x77, 0x98, 0x72, 0xe1, 0x21, 0xa6, 0x59, 0xaf, 0xfc, 0x89, 0xb2, 0xfc, 0xa4, 0x79, 0x2a, 0x3f, 0x6a, 0xf8, 0xb3, 0x29, 0xc9, 0x0f, 0x6a, 0xf2, 0x1b, 0xe5, 0xce, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x61, 0x04, 0x36, 0x0d, 0x7e, 0x0d, 0x00, 0x00, } func (m *PolicyCmd) 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 *PolicyCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Cmd != nil { { size := m.Cmd.Size() i -= size if _, err := m.Cmd.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *PolicyCmd_SetRelationshipCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_SetRelationshipCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.SetRelationshipCmd != nil { { size, err := m.SetRelationshipCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PolicyCmd_DeleteRelationshipCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_DeleteRelationshipCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.DeleteRelationshipCmd != nil { { size, err := m.DeleteRelationshipCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *PolicyCmd_RegisterObjectCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_RegisterObjectCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.RegisterObjectCmd != nil { { size, err := m.RegisterObjectCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *PolicyCmd_ArchiveObjectCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_ArchiveObjectCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.ArchiveObjectCmd != nil { { size, err := m.ArchiveObjectCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } return len(dAtA) - i, nil } func (m *PolicyCmd_CommitRegistrationsCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_CommitRegistrationsCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.CommitRegistrationsCmd != nil { { size, err := m.CommitRegistrationsCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *PolicyCmd_RevealRegistrationCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_RevealRegistrationCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.RevealRegistrationCmd != nil { { size, err := m.RevealRegistrationCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } return len(dAtA) - i, nil } func (m *PolicyCmd_FlagHijackAttemptCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_FlagHijackAttemptCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.FlagHijackAttemptCmd != nil { { size, err := m.FlagHijackAttemptCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } return len(dAtA) - i, nil } func (m *PolicyCmd_UnarchiveObjectCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmd_UnarchiveObjectCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UnarchiveObjectCmd != nil { { size, err := m.UnarchiveObjectCmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 } return len(dAtA) - i, nil } func (m *SetRelationshipCmd) 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 *SetRelationshipCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SetRelationshipCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Relationship != nil { { size, err := m.Relationship.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *DeleteRelationshipCmd) 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 *DeleteRelationshipCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DeleteRelationshipCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Relationship != nil { { size, err := m.Relationship.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *RegisterObjectCmd) 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 *RegisterObjectCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RegisterObjectCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Object != nil { { size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *CommitRegistrationsCmd) 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 *CommitRegistrationsCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *CommitRegistrationsCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Commitment) > 0 { i -= len(m.Commitment) copy(dAtA[i:], m.Commitment) i = encodeVarintPolicyCmd(dAtA, i, uint64(len(m.Commitment))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *CommitRegistrationsCmdResult) 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 *CommitRegistrationsCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *CommitRegistrationsCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.RegistrationsCommitment != nil { { size, err := m.RegistrationsCommitment.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *RevealRegistrationCmd) 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 *RevealRegistrationCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RevealRegistrationCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Proof != nil { { size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.RegistrationsCommitmentId != 0 { i = encodeVarintPolicyCmd(dAtA, i, uint64(m.RegistrationsCommitmentId)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *RevealRegistrationCmdResult) 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 *RevealRegistrationCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RevealRegistrationCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Event != nil { { size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.Record != nil { { size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *FlagHijackAttemptCmd) 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 *FlagHijackAttemptCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FlagHijackAttemptCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.EventId != 0 { i = encodeVarintPolicyCmd(dAtA, i, uint64(m.EventId)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *FlagHijackAttemptCmdResult) 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 *FlagHijackAttemptCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FlagHijackAttemptCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Event != nil { { size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnarchiveObjectCmd) 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 *UnarchiveObjectCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UnarchiveObjectCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Object != nil { { size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnarchiveObjectCmdResult) 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 *UnarchiveObjectCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UnarchiveObjectCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.RelationshipModified { i-- if m.RelationshipModified { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if m.Record != nil { { size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ArchiveObjectCmd) 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 *ArchiveObjectCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ArchiveObjectCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Object != nil { { size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *SetRelationshipCmdResult) 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 *SetRelationshipCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SetRelationshipCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Record != nil { { size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.RecordExisted { i-- if m.RecordExisted { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *DeleteRelationshipCmdResult) 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 *DeleteRelationshipCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DeleteRelationshipCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.RecordFound { i-- if m.RecordFound { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *RegisterObjectCmdResult) 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 *RegisterObjectCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RegisterObjectCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Record != nil { { size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ArchiveObjectCmdResult) 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 *ArchiveObjectCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ArchiveObjectCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.RelationshipsRemoved != 0 { i = encodeVarintPolicyCmd(dAtA, i, uint64(m.RelationshipsRemoved)) i-- dAtA[i] = 0x10 } if m.Found { i-- if m.Found { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *PolicyCmdResult) 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 *PolicyCmdResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Result != nil { { size := m.Result.Size() i -= size if _, err := m.Result.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *PolicyCmdResult_SetRelationshipResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_SetRelationshipResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.SetRelationshipResult != nil { { size, err := m.SetRelationshipResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PolicyCmdResult_DeleteRelationshipResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_DeleteRelationshipResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.DeleteRelationshipResult != nil { { size, err := m.DeleteRelationshipResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *PolicyCmdResult_RegisterObjectResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_RegisterObjectResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.RegisterObjectResult != nil { { size, err := m.RegisterObjectResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *PolicyCmdResult_ArchiveObjectResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_ArchiveObjectResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.ArchiveObjectResult != nil { { size, err := m.ArchiveObjectResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } return len(dAtA) - i, nil } func (m *PolicyCmdResult_CommitRegistrationsResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_CommitRegistrationsResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.CommitRegistrationsResult != nil { { size, err := m.CommitRegistrationsResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *PolicyCmdResult_RevealRegistrationResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_RevealRegistrationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.RevealRegistrationResult != nil { { size, err := m.RevealRegistrationResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } return len(dAtA) - i, nil } func (m *PolicyCmdResult_FlagHijackAttemptResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_FlagHijackAttemptResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.FlagHijackAttemptResult != nil { { size, err := m.FlagHijackAttemptResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } return len(dAtA) - i, nil } func (m *PolicyCmdResult_UnarchiveObjectResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyCmdResult_UnarchiveObjectResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UnarchiveObjectResult != nil { { size, err := m.UnarchiveObjectResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 } return len(dAtA) - i, nil } func encodeVarintPolicyCmd(dAtA []byte, offset int, v uint64) int { offset -= sovPolicyCmd(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *PolicyCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Cmd != nil { n += m.Cmd.Size() } return n } func (m *PolicyCmd_SetRelationshipCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.SetRelationshipCmd != nil { l = m.SetRelationshipCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmd_DeleteRelationshipCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.DeleteRelationshipCmd != nil { l = m.DeleteRelationshipCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmd_RegisterObjectCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RegisterObjectCmd != nil { l = m.RegisterObjectCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmd_ArchiveObjectCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ArchiveObjectCmd != nil { l = m.ArchiveObjectCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmd_CommitRegistrationsCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.CommitRegistrationsCmd != nil { l = m.CommitRegistrationsCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmd_RevealRegistrationCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RevealRegistrationCmd != nil { l = m.RevealRegistrationCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmd_FlagHijackAttemptCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.FlagHijackAttemptCmd != nil { l = m.FlagHijackAttemptCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmd_UnarchiveObjectCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UnarchiveObjectCmd != nil { l = m.UnarchiveObjectCmd.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *SetRelationshipCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Relationship != nil { l = m.Relationship.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *DeleteRelationshipCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Relationship != nil { l = m.Relationship.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *RegisterObjectCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Object != nil { l = m.Object.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *CommitRegistrationsCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Commitment) if l > 0 { n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *CommitRegistrationsCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RegistrationsCommitment != nil { l = m.RegistrationsCommitment.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *RevealRegistrationCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RegistrationsCommitmentId != 0 { n += 1 + sovPolicyCmd(uint64(m.RegistrationsCommitmentId)) } if m.Proof != nil { l = m.Proof.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *RevealRegistrationCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Record != nil { l = m.Record.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } if m.Event != nil { l = m.Event.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *FlagHijackAttemptCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.EventId != 0 { n += 1 + sovPolicyCmd(uint64(m.EventId)) } return n } func (m *FlagHijackAttemptCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Event != nil { l = m.Event.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *UnarchiveObjectCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Object != nil { l = m.Object.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *UnarchiveObjectCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Record != nil { l = m.Record.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } if m.RelationshipModified { n += 2 } return n } func (m *ArchiveObjectCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Object != nil { l = m.Object.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *SetRelationshipCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RecordExisted { n += 2 } if m.Record != nil { l = m.Record.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *DeleteRelationshipCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RecordFound { n += 2 } return n } func (m *RegisterObjectCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Record != nil { l = m.Record.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *ArchiveObjectCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Found { n += 2 } if m.RelationshipsRemoved != 0 { n += 1 + sovPolicyCmd(uint64(m.RelationshipsRemoved)) } return n } func (m *PolicyCmdResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Result != nil { n += m.Result.Size() } return n } func (m *PolicyCmdResult_SetRelationshipResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.SetRelationshipResult != nil { l = m.SetRelationshipResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmdResult_DeleteRelationshipResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.DeleteRelationshipResult != nil { l = m.DeleteRelationshipResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmdResult_RegisterObjectResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RegisterObjectResult != nil { l = m.RegisterObjectResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmdResult_ArchiveObjectResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ArchiveObjectResult != nil { l = m.ArchiveObjectResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmdResult_CommitRegistrationsResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.CommitRegistrationsResult != nil { l = m.CommitRegistrationsResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmdResult_RevealRegistrationResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RevealRegistrationResult != nil { l = m.RevealRegistrationResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmdResult_FlagHijackAttemptResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.FlagHijackAttemptResult != nil { l = m.FlagHijackAttemptResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func (m *PolicyCmdResult_UnarchiveObjectResult) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UnarchiveObjectResult != nil { l = m.UnarchiveObjectResult.Size() n += 1 + l + sovPolicyCmd(uint64(l)) } return n } func sovPolicyCmd(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozPolicyCmd(x uint64) (n int) { return sovPolicyCmd(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *PolicyCmd) 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 ErrIntOverflowPolicyCmd } 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: PolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PolicyCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SetRelationshipCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &SetRelationshipCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_SetRelationshipCmd{v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DeleteRelationshipCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &DeleteRelationshipCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_DeleteRelationshipCmd{v} iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RegisterObjectCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &RegisterObjectCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_RegisterObjectCmd{v} iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ArchiveObjectCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &ArchiveObjectCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_ArchiveObjectCmd{v} iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CommitRegistrationsCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &CommitRegistrationsCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_CommitRegistrationsCmd{v} iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RevealRegistrationCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &RevealRegistrationCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_RevealRegistrationCmd{v} iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FlagHijackAttemptCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &FlagHijackAttemptCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_FlagHijackAttemptCmd{v} iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnarchiveObjectCmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &UnarchiveObjectCmd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Cmd = &PolicyCmd_UnarchiveObjectCmd{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SetRelationshipCmd) 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 ErrIntOverflowPolicyCmd } 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: SetRelationshipCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SetRelationshipCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Relationship == nil { m.Relationship = &types.Relationship{} } if err := m.Relationship.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteRelationshipCmd) 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 ErrIntOverflowPolicyCmd } 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: DeleteRelationshipCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteRelationshipCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Relationship == nil { m.Relationship = &types.Relationship{} } if err := m.Relationship.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RegisterObjectCmd) 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 ErrIntOverflowPolicyCmd } 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: RegisterObjectCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RegisterObjectCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Object == nil { m.Object = &types.Object{} } if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CommitRegistrationsCmd) 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 ErrIntOverflowPolicyCmd } 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: CommitRegistrationsCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CommitRegistrationsCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } m.Commitment = append(m.Commitment[:0], dAtA[iNdEx:postIndex]...) if m.Commitment == nil { m.Commitment = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CommitRegistrationsCmdResult) 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 ErrIntOverflowPolicyCmd } 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: CommitRegistrationsCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CommitRegistrationsCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitment", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.RegistrationsCommitment == nil { m.RegistrationsCommitment = &RegistrationsCommitment{} } if err := m.RegistrationsCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RevealRegistrationCmd) 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 ErrIntOverflowPolicyCmd } 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: RevealRegistrationCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RevealRegistrationCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitmentId", wireType) } m.RegistrationsCommitmentId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RegistrationsCommitmentId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Proof == nil { m.Proof = &RegistrationProof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RevealRegistrationCmdResult) 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 ErrIntOverflowPolicyCmd } 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: RevealRegistrationCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RevealRegistrationCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Record == nil { m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Event == nil { m.Event = &AmendmentEvent{} } if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FlagHijackAttemptCmd) 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 ErrIntOverflowPolicyCmd } 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: FlagHijackAttemptCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FlagHijackAttemptCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EventId", wireType) } m.EventId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.EventId |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FlagHijackAttemptCmdResult) 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 ErrIntOverflowPolicyCmd } 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: FlagHijackAttemptCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FlagHijackAttemptCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Event == nil { m.Event = &AmendmentEvent{} } if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnarchiveObjectCmd) 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 ErrIntOverflowPolicyCmd } 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: UnarchiveObjectCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnarchiveObjectCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Object == nil { m.Object = &types.Object{} } if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnarchiveObjectCmdResult) 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 ErrIntOverflowPolicyCmd } 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: UnarchiveObjectCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnarchiveObjectCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Record == nil { m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RelationshipModified", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RelationshipModified = bool(v != 0) default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ArchiveObjectCmd) 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 ErrIntOverflowPolicyCmd } 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: ArchiveObjectCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ArchiveObjectCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Object == nil { m.Object = &types.Object{} } if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SetRelationshipCmdResult) 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 ErrIntOverflowPolicyCmd } 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: SetRelationshipCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SetRelationshipCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RecordExisted", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RecordExisted = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Record == nil { m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteRelationshipCmdResult) 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 ErrIntOverflowPolicyCmd } 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: DeleteRelationshipCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteRelationshipCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RecordFound", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RecordFound = bool(v != 0) default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RegisterObjectCmdResult) 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 ErrIntOverflowPolicyCmd } 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: RegisterObjectCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RegisterObjectCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Record == nil { m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ArchiveObjectCmdResult) 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 ErrIntOverflowPolicyCmd } 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: ArchiveObjectCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ArchiveObjectCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Found", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Found = bool(v != 0) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RelationshipsRemoved", wireType) } m.RelationshipsRemoved = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RelationshipsRemoved |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PolicyCmdResult) 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 ErrIntOverflowPolicyCmd } 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: PolicyCmdResult: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PolicyCmdResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SetRelationshipResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &SetRelationshipCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_SetRelationshipResult{v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DeleteRelationshipResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &DeleteRelationshipCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_DeleteRelationshipResult{v} iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RegisterObjectResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &RegisterObjectCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_RegisterObjectResult{v} iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ArchiveObjectResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &ArchiveObjectCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_ArchiveObjectResult{v} iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CommitRegistrationsResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &CommitRegistrationsCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_CommitRegistrationsResult{v} iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RevealRegistrationResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &RevealRegistrationCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_RevealRegistrationResult{v} iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FlagHijackAttemptResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &FlagHijackAttemptCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_FlagHijackAttemptResult{v} iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnarchiveObjectResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } v := &UnarchiveObjectCmdResult{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Result = &PolicyCmdResult_UnarchiveObjectResult{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipPolicyCmd(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, ErrIntOverflowPolicyCmd } 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, ErrIntOverflowPolicyCmd } 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, ErrIntOverflowPolicyCmd } 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, ErrInvalidLengthPolicyCmd } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupPolicyCmd } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthPolicyCmd } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthPolicyCmd = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPolicyCmd = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPolicyCmd = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/query.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/query.proto package types import ( context "context" fmt "fmt" 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" proto "github.com/cosmos/gogoproto/proto" types "github.com/sourcenetwork/acp_core/pkg/types" _ "google.golang.org/genproto/googleapis/api/annotations" 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. 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_0e48f8debbc27977, []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_0e48f8debbc27977, []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{} } type QueryPolicyRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *QueryPolicyRequest) Reset() { *m = QueryPolicyRequest{} } func (m *QueryPolicyRequest) String() string { return proto.CompactTextString(m) } func (*QueryPolicyRequest) ProtoMessage() {} func (*QueryPolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{2} } func (m *QueryPolicyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPolicyRequest.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 *QueryPolicyRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPolicyRequest.Merge(m, src) } func (m *QueryPolicyRequest) XXX_Size() int { return m.Size() } func (m *QueryPolicyRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryPolicyRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryPolicyRequest proto.InternalMessageInfo func (m *QueryPolicyRequest) GetId() string { if m != nil { return m.Id } return "" } type QueryPolicyResponse struct { Record *PolicyRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (m *QueryPolicyResponse) Reset() { *m = QueryPolicyResponse{} } func (m *QueryPolicyResponse) String() string { return proto.CompactTextString(m) } func (*QueryPolicyResponse) ProtoMessage() {} func (*QueryPolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{3} } func (m *QueryPolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPolicyResponse.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 *QueryPolicyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPolicyResponse.Merge(m, src) } func (m *QueryPolicyResponse) XXX_Size() int { return m.Size() } func (m *QueryPolicyResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryPolicyResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryPolicyResponse proto.InternalMessageInfo func (m *QueryPolicyResponse) GetRecord() *PolicyRecord { if m != nil { return m.Record } return nil } type QueryPolicyIdsRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryPolicyIdsRequest) Reset() { *m = QueryPolicyIdsRequest{} } func (m *QueryPolicyIdsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPolicyIdsRequest) ProtoMessage() {} func (*QueryPolicyIdsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{4} } func (m *QueryPolicyIdsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPolicyIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPolicyIdsRequest.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 *QueryPolicyIdsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPolicyIdsRequest.Merge(m, src) } func (m *QueryPolicyIdsRequest) XXX_Size() int { return m.Size() } func (m *QueryPolicyIdsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryPolicyIdsRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryPolicyIdsRequest proto.InternalMessageInfo func (m *QueryPolicyIdsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } type QueryPolicyIdsResponse struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryPolicyIdsResponse) Reset() { *m = QueryPolicyIdsResponse{} } func (m *QueryPolicyIdsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPolicyIdsResponse) ProtoMessage() {} func (*QueryPolicyIdsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{5} } func (m *QueryPolicyIdsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPolicyIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPolicyIdsResponse.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 *QueryPolicyIdsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPolicyIdsResponse.Merge(m, src) } func (m *QueryPolicyIdsResponse) XXX_Size() int { return m.Size() } func (m *QueryPolicyIdsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryPolicyIdsResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryPolicyIdsResponse proto.InternalMessageInfo func (m *QueryPolicyIdsResponse) GetIds() []string { if m != nil { return m.Ids } return nil } func (m *QueryPolicyIdsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } type QueryFilterRelationshipsRequest struct { PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Selector *types.RelationshipSelector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` } func (m *QueryFilterRelationshipsRequest) Reset() { *m = QueryFilterRelationshipsRequest{} } func (m *QueryFilterRelationshipsRequest) String() string { return proto.CompactTextString(m) } func (*QueryFilterRelationshipsRequest) ProtoMessage() {} func (*QueryFilterRelationshipsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{6} } func (m *QueryFilterRelationshipsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryFilterRelationshipsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryFilterRelationshipsRequest.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 *QueryFilterRelationshipsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryFilterRelationshipsRequest.Merge(m, src) } func (m *QueryFilterRelationshipsRequest) XXX_Size() int { return m.Size() } func (m *QueryFilterRelationshipsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryFilterRelationshipsRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryFilterRelationshipsRequest proto.InternalMessageInfo func (m *QueryFilterRelationshipsRequest) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *QueryFilterRelationshipsRequest) GetSelector() *types.RelationshipSelector { if m != nil { return m.Selector } return nil } type QueryFilterRelationshipsResponse struct { Records []*RelationshipRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` } func (m *QueryFilterRelationshipsResponse) Reset() { *m = QueryFilterRelationshipsResponse{} } func (m *QueryFilterRelationshipsResponse) String() string { return proto.CompactTextString(m) } func (*QueryFilterRelationshipsResponse) ProtoMessage() {} func (*QueryFilterRelationshipsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{7} } func (m *QueryFilterRelationshipsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryFilterRelationshipsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryFilterRelationshipsResponse.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 *QueryFilterRelationshipsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryFilterRelationshipsResponse.Merge(m, src) } func (m *QueryFilterRelationshipsResponse) XXX_Size() int { return m.Size() } func (m *QueryFilterRelationshipsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryFilterRelationshipsResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryFilterRelationshipsResponse proto.InternalMessageInfo func (m *QueryFilterRelationshipsResponse) GetRecords() []*RelationshipRecord { if m != nil { return m.Records } return nil } type QueryVerifyAccessRequestRequest struct { PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` AccessRequest *types.AccessRequest `protobuf:"bytes,2,opt,name=access_request,json=accessRequest,proto3" json:"access_request,omitempty"` } func (m *QueryVerifyAccessRequestRequest) Reset() { *m = QueryVerifyAccessRequestRequest{} } func (m *QueryVerifyAccessRequestRequest) String() string { return proto.CompactTextString(m) } func (*QueryVerifyAccessRequestRequest) ProtoMessage() {} func (*QueryVerifyAccessRequestRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{8} } func (m *QueryVerifyAccessRequestRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryVerifyAccessRequestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVerifyAccessRequestRequest.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 *QueryVerifyAccessRequestRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVerifyAccessRequestRequest.Merge(m, src) } func (m *QueryVerifyAccessRequestRequest) XXX_Size() int { return m.Size() } func (m *QueryVerifyAccessRequestRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryVerifyAccessRequestRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryVerifyAccessRequestRequest proto.InternalMessageInfo func (m *QueryVerifyAccessRequestRequest) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *QueryVerifyAccessRequestRequest) GetAccessRequest() *types.AccessRequest { if m != nil { return m.AccessRequest } return nil } type QueryVerifyAccessRequestResponse struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` } func (m *QueryVerifyAccessRequestResponse) Reset() { *m = QueryVerifyAccessRequestResponse{} } func (m *QueryVerifyAccessRequestResponse) String() string { return proto.CompactTextString(m) } func (*QueryVerifyAccessRequestResponse) ProtoMessage() {} func (*QueryVerifyAccessRequestResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{9} } func (m *QueryVerifyAccessRequestResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryVerifyAccessRequestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVerifyAccessRequestResponse.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 *QueryVerifyAccessRequestResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVerifyAccessRequestResponse.Merge(m, src) } func (m *QueryVerifyAccessRequestResponse) XXX_Size() int { return m.Size() } func (m *QueryVerifyAccessRequestResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryVerifyAccessRequestResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryVerifyAccessRequestResponse proto.InternalMessageInfo func (m *QueryVerifyAccessRequestResponse) GetValid() bool { if m != nil { return m.Valid } return false } type QueryValidatePolicyRequest struct { Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType types.PolicyMarshalingType `protobuf:"varint,3,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (m *QueryValidatePolicyRequest) Reset() { *m = QueryValidatePolicyRequest{} } func (m *QueryValidatePolicyRequest) String() string { return proto.CompactTextString(m) } func (*QueryValidatePolicyRequest) ProtoMessage() {} func (*QueryValidatePolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{10} } func (m *QueryValidatePolicyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryValidatePolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryValidatePolicyRequest.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 *QueryValidatePolicyRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryValidatePolicyRequest.Merge(m, src) } func (m *QueryValidatePolicyRequest) XXX_Size() int { return m.Size() } func (m *QueryValidatePolicyRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryValidatePolicyRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryValidatePolicyRequest proto.InternalMessageInfo func (m *QueryValidatePolicyRequest) GetPolicy() string { if m != nil { return m.Policy } return "" } func (m *QueryValidatePolicyRequest) GetMarshalType() types.PolicyMarshalingType { if m != nil { return m.MarshalType } return types.PolicyMarshalingType_UNKNOWN } type QueryValidatePolicyResponse struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` Policy *types.Policy `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"` } func (m *QueryValidatePolicyResponse) Reset() { *m = QueryValidatePolicyResponse{} } func (m *QueryValidatePolicyResponse) String() string { return proto.CompactTextString(m) } func (*QueryValidatePolicyResponse) ProtoMessage() {} func (*QueryValidatePolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{11} } func (m *QueryValidatePolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryValidatePolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryValidatePolicyResponse.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 *QueryValidatePolicyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryValidatePolicyResponse.Merge(m, src) } func (m *QueryValidatePolicyResponse) XXX_Size() int { return m.Size() } func (m *QueryValidatePolicyResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryValidatePolicyResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryValidatePolicyResponse proto.InternalMessageInfo func (m *QueryValidatePolicyResponse) GetValid() bool { if m != nil { return m.Valid } return false } func (m *QueryValidatePolicyResponse) GetErrorMsg() string { if m != nil { return m.ErrorMsg } return "" } func (m *QueryValidatePolicyResponse) GetPolicy() *types.Policy { if m != nil { return m.Policy } return nil } type QueryAccessDecisionRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *QueryAccessDecisionRequest) Reset() { *m = QueryAccessDecisionRequest{} } func (m *QueryAccessDecisionRequest) String() string { return proto.CompactTextString(m) } func (*QueryAccessDecisionRequest) ProtoMessage() {} func (*QueryAccessDecisionRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{12} } func (m *QueryAccessDecisionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAccessDecisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAccessDecisionRequest.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 *QueryAccessDecisionRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAccessDecisionRequest.Merge(m, src) } func (m *QueryAccessDecisionRequest) XXX_Size() int { return m.Size() } func (m *QueryAccessDecisionRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryAccessDecisionRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryAccessDecisionRequest proto.InternalMessageInfo func (m *QueryAccessDecisionRequest) GetId() string { if m != nil { return m.Id } return "" } type QueryAccessDecisionResponse struct { Decision *AccessDecision `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` } func (m *QueryAccessDecisionResponse) Reset() { *m = QueryAccessDecisionResponse{} } func (m *QueryAccessDecisionResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccessDecisionResponse) ProtoMessage() {} func (*QueryAccessDecisionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{13} } func (m *QueryAccessDecisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAccessDecisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAccessDecisionResponse.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 *QueryAccessDecisionResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAccessDecisionResponse.Merge(m, src) } func (m *QueryAccessDecisionResponse) XXX_Size() int { return m.Size() } func (m *QueryAccessDecisionResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryAccessDecisionResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryAccessDecisionResponse proto.InternalMessageInfo func (m *QueryAccessDecisionResponse) GetDecision() *AccessDecision { if m != nil { return m.Decision } return nil } type QueryObjectOwnerRequest struct { PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Object *types.Object `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` } func (m *QueryObjectOwnerRequest) Reset() { *m = QueryObjectOwnerRequest{} } func (m *QueryObjectOwnerRequest) String() string { return proto.CompactTextString(m) } func (*QueryObjectOwnerRequest) ProtoMessage() {} func (*QueryObjectOwnerRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{14} } func (m *QueryObjectOwnerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryObjectOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryObjectOwnerRequest.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 *QueryObjectOwnerRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryObjectOwnerRequest.Merge(m, src) } func (m *QueryObjectOwnerRequest) XXX_Size() int { return m.Size() } func (m *QueryObjectOwnerRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryObjectOwnerRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryObjectOwnerRequest proto.InternalMessageInfo func (m *QueryObjectOwnerRequest) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *QueryObjectOwnerRequest) GetObject() *types.Object { if m != nil { return m.Object } return nil } type QueryObjectOwnerResponse struct { IsRegistered bool `protobuf:"varint,1,opt,name=is_registered,json=isRegistered,proto3" json:"is_registered,omitempty"` Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (m *QueryObjectOwnerResponse) Reset() { *m = QueryObjectOwnerResponse{} } func (m *QueryObjectOwnerResponse) String() string { return proto.CompactTextString(m) } func (*QueryObjectOwnerResponse) ProtoMessage() {} func (*QueryObjectOwnerResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{15} } func (m *QueryObjectOwnerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryObjectOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryObjectOwnerResponse.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 *QueryObjectOwnerResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryObjectOwnerResponse.Merge(m, src) } func (m *QueryObjectOwnerResponse) XXX_Size() int { return m.Size() } func (m *QueryObjectOwnerResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryObjectOwnerResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryObjectOwnerResponse proto.InternalMessageInfo func (m *QueryObjectOwnerResponse) GetIsRegistered() bool { if m != nil { return m.IsRegistered } return false } func (m *QueryObjectOwnerResponse) GetRecord() *RelationshipRecord { if m != nil { return m.Record } return nil } type QueryRegistrationsCommitmentRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *QueryRegistrationsCommitmentRequest) Reset() { *m = QueryRegistrationsCommitmentRequest{} } func (m *QueryRegistrationsCommitmentRequest) String() string { return proto.CompactTextString(m) } func (*QueryRegistrationsCommitmentRequest) ProtoMessage() {} func (*QueryRegistrationsCommitmentRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{16} } func (m *QueryRegistrationsCommitmentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryRegistrationsCommitmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRegistrationsCommitmentRequest.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 *QueryRegistrationsCommitmentRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRegistrationsCommitmentRequest.Merge(m, src) } func (m *QueryRegistrationsCommitmentRequest) XXX_Size() int { return m.Size() } func (m *QueryRegistrationsCommitmentRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryRegistrationsCommitmentRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryRegistrationsCommitmentRequest proto.InternalMessageInfo func (m *QueryRegistrationsCommitmentRequest) GetId() uint64 { if m != nil { return m.Id } return 0 } type QueryRegistrationsCommitmentResponse struct { RegistrationsCommitment *RegistrationsCommitment `protobuf:"bytes,1,opt,name=registrations_commitment,json=registrationsCommitment,proto3" json:"registrations_commitment,omitempty"` } func (m *QueryRegistrationsCommitmentResponse) Reset() { *m = QueryRegistrationsCommitmentResponse{} } func (m *QueryRegistrationsCommitmentResponse) String() string { return proto.CompactTextString(m) } func (*QueryRegistrationsCommitmentResponse) ProtoMessage() {} func (*QueryRegistrationsCommitmentResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{17} } func (m *QueryRegistrationsCommitmentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryRegistrationsCommitmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRegistrationsCommitmentResponse.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 *QueryRegistrationsCommitmentResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRegistrationsCommitmentResponse.Merge(m, src) } func (m *QueryRegistrationsCommitmentResponse) XXX_Size() int { return m.Size() } func (m *QueryRegistrationsCommitmentResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryRegistrationsCommitmentResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryRegistrationsCommitmentResponse proto.InternalMessageInfo func (m *QueryRegistrationsCommitmentResponse) GetRegistrationsCommitment() *RegistrationsCommitment { if m != nil { return m.RegistrationsCommitment } return nil } type QueryRegistrationsCommitmentByCommitmentRequest struct { Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` } func (m *QueryRegistrationsCommitmentByCommitmentRequest) Reset() { *m = QueryRegistrationsCommitmentByCommitmentRequest{} } func (m *QueryRegistrationsCommitmentByCommitmentRequest) String() string { return proto.CompactTextString(m) } func (*QueryRegistrationsCommitmentByCommitmentRequest) ProtoMessage() {} func (*QueryRegistrationsCommitmentByCommitmentRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{18} } func (m *QueryRegistrationsCommitmentByCommitmentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryRegistrationsCommitmentByCommitmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentRequest.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 *QueryRegistrationsCommitmentByCommitmentRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentRequest.Merge(m, src) } func (m *QueryRegistrationsCommitmentByCommitmentRequest) XXX_Size() int { return m.Size() } func (m *QueryRegistrationsCommitmentByCommitmentRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentRequest proto.InternalMessageInfo func (m *QueryRegistrationsCommitmentByCommitmentRequest) GetCommitment() []byte { if m != nil { return m.Commitment } return nil } type QueryRegistrationsCommitmentByCommitmentResponse struct { RegistrationsCommitments []*RegistrationsCommitment `protobuf:"bytes,1,rep,name=registrations_commitments,json=registrationsCommitments,proto3" json:"registrations_commitments,omitempty"` } func (m *QueryRegistrationsCommitmentByCommitmentResponse) Reset() { *m = QueryRegistrationsCommitmentByCommitmentResponse{} } func (m *QueryRegistrationsCommitmentByCommitmentResponse) String() string { return proto.CompactTextString(m) } func (*QueryRegistrationsCommitmentByCommitmentResponse) ProtoMessage() {} func (*QueryRegistrationsCommitmentByCommitmentResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{19} } func (m *QueryRegistrationsCommitmentByCommitmentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryRegistrationsCommitmentByCommitmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentResponse.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 *QueryRegistrationsCommitmentByCommitmentResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentResponse.Merge(m, src) } func (m *QueryRegistrationsCommitmentByCommitmentResponse) XXX_Size() int { return m.Size() } func (m *QueryRegistrationsCommitmentByCommitmentResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryRegistrationsCommitmentByCommitmentResponse proto.InternalMessageInfo func (m *QueryRegistrationsCommitmentByCommitmentResponse) GetRegistrationsCommitments() []*RegistrationsCommitment { if m != nil { return m.RegistrationsCommitments } return nil } type QueryGenerateCommitmentRequest struct { PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Objects []*types.Object `protobuf:"bytes,2,rep,name=objects,proto3" json:"objects,omitempty"` Actor *types.Actor `protobuf:"bytes,3,opt,name=actor,proto3" json:"actor,omitempty"` } func (m *QueryGenerateCommitmentRequest) Reset() { *m = QueryGenerateCommitmentRequest{} } func (m *QueryGenerateCommitmentRequest) String() string { return proto.CompactTextString(m) } func (*QueryGenerateCommitmentRequest) ProtoMessage() {} func (*QueryGenerateCommitmentRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{20} } func (m *QueryGenerateCommitmentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryGenerateCommitmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryGenerateCommitmentRequest.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 *QueryGenerateCommitmentRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryGenerateCommitmentRequest.Merge(m, src) } func (m *QueryGenerateCommitmentRequest) XXX_Size() int { return m.Size() } func (m *QueryGenerateCommitmentRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryGenerateCommitmentRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryGenerateCommitmentRequest proto.InternalMessageInfo func (m *QueryGenerateCommitmentRequest) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *QueryGenerateCommitmentRequest) GetObjects() []*types.Object { if m != nil { return m.Objects } return nil } func (m *QueryGenerateCommitmentRequest) GetActor() *types.Actor { if m != nil { return m.Actor } return nil } type QueryGenerateCommitmentResponse struct { Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` HexCommitment string `protobuf:"bytes,2,opt,name=hex_commitment,json=hexCommitment,proto3" json:"hex_commitment,omitempty"` Proofs []*RegistrationProof `protobuf:"bytes,3,rep,name=proofs,proto3" json:"proofs,omitempty"` ProofsJson []string `protobuf:"bytes,4,rep,name=proofs_json,json=proofsJson,proto3" json:"proofs_json,omitempty"` } func (m *QueryGenerateCommitmentResponse) Reset() { *m = QueryGenerateCommitmentResponse{} } func (m *QueryGenerateCommitmentResponse) String() string { return proto.CompactTextString(m) } func (*QueryGenerateCommitmentResponse) ProtoMessage() {} func (*QueryGenerateCommitmentResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{21} } func (m *QueryGenerateCommitmentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryGenerateCommitmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryGenerateCommitmentResponse.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 *QueryGenerateCommitmentResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryGenerateCommitmentResponse.Merge(m, src) } func (m *QueryGenerateCommitmentResponse) XXX_Size() int { return m.Size() } func (m *QueryGenerateCommitmentResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryGenerateCommitmentResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryGenerateCommitmentResponse proto.InternalMessageInfo func (m *QueryGenerateCommitmentResponse) GetCommitment() []byte { if m != nil { return m.Commitment } return nil } func (m *QueryGenerateCommitmentResponse) GetHexCommitment() string { if m != nil { return m.HexCommitment } return "" } func (m *QueryGenerateCommitmentResponse) GetProofs() []*RegistrationProof { if m != nil { return m.Proofs } return nil } func (m *QueryGenerateCommitmentResponse) GetProofsJson() []string { if m != nil { return m.ProofsJson } return nil } type QueryHijackAttemptsByPolicyRequest struct { PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` } func (m *QueryHijackAttemptsByPolicyRequest) Reset() { *m = QueryHijackAttemptsByPolicyRequest{} } func (m *QueryHijackAttemptsByPolicyRequest) String() string { return proto.CompactTextString(m) } func (*QueryHijackAttemptsByPolicyRequest) ProtoMessage() {} func (*QueryHijackAttemptsByPolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{22} } func (m *QueryHijackAttemptsByPolicyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryHijackAttemptsByPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryHijackAttemptsByPolicyRequest.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 *QueryHijackAttemptsByPolicyRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryHijackAttemptsByPolicyRequest.Merge(m, src) } func (m *QueryHijackAttemptsByPolicyRequest) XXX_Size() int { return m.Size() } func (m *QueryHijackAttemptsByPolicyRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryHijackAttemptsByPolicyRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryHijackAttemptsByPolicyRequest proto.InternalMessageInfo func (m *QueryHijackAttemptsByPolicyRequest) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } type QueryHijackAttemptsByPolicyResponse struct { Events []*AmendmentEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` } func (m *QueryHijackAttemptsByPolicyResponse) Reset() { *m = QueryHijackAttemptsByPolicyResponse{} } func (m *QueryHijackAttemptsByPolicyResponse) String() string { return proto.CompactTextString(m) } func (*QueryHijackAttemptsByPolicyResponse) ProtoMessage() {} func (*QueryHijackAttemptsByPolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0e48f8debbc27977, []int{23} } func (m *QueryHijackAttemptsByPolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryHijackAttemptsByPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryHijackAttemptsByPolicyResponse.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 *QueryHijackAttemptsByPolicyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryHijackAttemptsByPolicyResponse.Merge(m, src) } func (m *QueryHijackAttemptsByPolicyResponse) XXX_Size() int { return m.Size() } func (m *QueryHijackAttemptsByPolicyResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryHijackAttemptsByPolicyResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryHijackAttemptsByPolicyResponse proto.InternalMessageInfo func (m *QueryHijackAttemptsByPolicyResponse) GetEvents() []*AmendmentEvent { if m != nil { return m.Events } return nil } func init() { proto.RegisterType((*QueryParamsRequest)(nil), "sourcehub.acp.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "sourcehub.acp.QueryParamsResponse") proto.RegisterType((*QueryPolicyRequest)(nil), "sourcehub.acp.QueryPolicyRequest") proto.RegisterType((*QueryPolicyResponse)(nil), "sourcehub.acp.QueryPolicyResponse") proto.RegisterType((*QueryPolicyIdsRequest)(nil), "sourcehub.acp.QueryPolicyIdsRequest") proto.RegisterType((*QueryPolicyIdsResponse)(nil), "sourcehub.acp.QueryPolicyIdsResponse") proto.RegisterType((*QueryFilterRelationshipsRequest)(nil), "sourcehub.acp.QueryFilterRelationshipsRequest") proto.RegisterType((*QueryFilterRelationshipsResponse)(nil), "sourcehub.acp.QueryFilterRelationshipsResponse") proto.RegisterType((*QueryVerifyAccessRequestRequest)(nil), "sourcehub.acp.QueryVerifyAccessRequestRequest") proto.RegisterType((*QueryVerifyAccessRequestResponse)(nil), "sourcehub.acp.QueryVerifyAccessRequestResponse") proto.RegisterType((*QueryValidatePolicyRequest)(nil), "sourcehub.acp.QueryValidatePolicyRequest") proto.RegisterType((*QueryValidatePolicyResponse)(nil), "sourcehub.acp.QueryValidatePolicyResponse") proto.RegisterType((*QueryAccessDecisionRequest)(nil), "sourcehub.acp.QueryAccessDecisionRequest") proto.RegisterType((*QueryAccessDecisionResponse)(nil), "sourcehub.acp.QueryAccessDecisionResponse") proto.RegisterType((*QueryObjectOwnerRequest)(nil), "sourcehub.acp.QueryObjectOwnerRequest") proto.RegisterType((*QueryObjectOwnerResponse)(nil), "sourcehub.acp.QueryObjectOwnerResponse") proto.RegisterType((*QueryRegistrationsCommitmentRequest)(nil), "sourcehub.acp.QueryRegistrationsCommitmentRequest") proto.RegisterType((*QueryRegistrationsCommitmentResponse)(nil), "sourcehub.acp.QueryRegistrationsCommitmentResponse") proto.RegisterType((*QueryRegistrationsCommitmentByCommitmentRequest)(nil), "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentRequest") proto.RegisterType((*QueryRegistrationsCommitmentByCommitmentResponse)(nil), "sourcehub.acp.QueryRegistrationsCommitmentByCommitmentResponse") proto.RegisterType((*QueryGenerateCommitmentRequest)(nil), "sourcehub.acp.QueryGenerateCommitmentRequest") proto.RegisterType((*QueryGenerateCommitmentResponse)(nil), "sourcehub.acp.QueryGenerateCommitmentResponse") proto.RegisterType((*QueryHijackAttemptsByPolicyRequest)(nil), "sourcehub.acp.QueryHijackAttemptsByPolicyRequest") proto.RegisterType((*QueryHijackAttemptsByPolicyResponse)(nil), "sourcehub.acp.QueryHijackAttemptsByPolicyResponse") } func init() { proto.RegisterFile("sourcehub/acp/query.proto", fileDescriptor_0e48f8debbc27977) } var fileDescriptor_0e48f8debbc27977 = []byte{ // 1497 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xcf, 0x6f, 0xdc, 0xc4, 0x17, 0x8f, 0x93, 0x76, 0x9b, 0xbc, 0x34, 0x51, 0xbf, 0xd3, 0x5f, 0x5b, 0xf7, 0xcb, 0x36, 0x38, 0x49, 0x9b, 0x86, 0x62, 0x37, 0x89, 0x5a, 0x52, 0xa1, 0xb6, 0x34, 0xa5, 0x3f, 0x28, 0x54, 0x69, 0x5d, 0x40, 0x08, 0x90, 0x2c, 0xc7, 0x3b, 0xdd, 0x75, 0xbb, 0xeb, 0x71, 0x3d, 0x4e, 0xda, 0x50, 0x7a, 0x00, 0x09, 0x89, 0x4a, 0x1c, 0x90, 0x38, 0x70, 0xe7, 0x80, 0x38, 0x80, 0xc4, 0x1d, 0x01, 0x42, 0x5c, 0x7a, 0x42, 0x95, 0xb8, 0x70, 0x42, 0xa8, 0x45, 0xe2, 0x0f, 0xe0, 0x1f, 0x40, 0x9e, 0x79, 0xde, 0xd8, 0xbb, 0x63, 0x67, 0xd3, 0x4b, 0x6b, 0x7b, 0xde, 0x8f, 0xcf, 0xe7, 0xcd, 0x9b, 0x37, 0x9f, 0x0d, 0x1c, 0xe0, 0x6c, 0x35, 0xf2, 0x68, 0x73, 0x75, 0xc5, 0x72, 0xbd, 0xd0, 0xba, 0xb3, 0x4a, 0xa3, 0x75, 0x33, 0x8c, 0x58, 0xcc, 0xc8, 0x58, 0x67, 0xc9, 0x74, 0xbd, 0x50, 0xff, 0x9f, 0xdb, 0xf6, 0x03, 0x66, 0x89, 0x7f, 0xa5, 0x85, 0x3e, 0xeb, 0x31, 0xde, 0x66, 0xdc, 0x5a, 0x71, 0x39, 0x95, 0xae, 0xd6, 0xda, 0xdc, 0x0a, 0x8d, 0xdd, 0x39, 0x2b, 0x74, 0x1b, 0x7e, 0xe0, 0xc6, 0x3e, 0x0b, 0xd0, 0x76, 0x4f, 0x83, 0x35, 0x98, 0x78, 0xb4, 0x92, 0x27, 0xfc, 0xfa, 0xff, 0x06, 0x63, 0x8d, 0x16, 0xb5, 0xdc, 0xd0, 0xb7, 0xdc, 0x20, 0x60, 0xb1, 0x70, 0xe1, 0xb8, 0x3a, 0x99, 0x07, 0xe7, 0x7a, 0x1e, 0xe5, 0xdc, 0xa9, 0x53, 0xcf, 0xe7, 0x1b, 0x81, 0x6b, 0x79, 0x23, 0x8f, 0xb5, 0xdb, 0x7e, 0xdc, 0xa6, 0x41, 0x8c, 0xeb, 0x7a, 0x7e, 0x3d, 0x74, 0x23, 0xb7, 0xcd, 0xd5, 0x6b, 0x11, 0xf5, 0x58, 0x54, 0xc7, 0xb5, 0x89, 0xee, 0xb5, 0x86, 0xcf, 0xe3, 0x28, 0x4b, 0x09, 0xe1, 0x05, 0x34, 0xbe, 0xcb, 0xa2, 0xdb, 0x89, 0x95, 0xe3, 0xb1, 0x88, 0x5a, 0x21, 0x6b, 0xf9, 0x1e, 0x56, 0x51, 0x3f, 0x5a, 0x6a, 0xe4, 0xf0, 0x26, 0x8b, 0xe2, 0x4d, 0x4c, 0x23, 0xda, 0x92, 0x65, 0x69, 0xfa, 0x21, 0x9a, 0xce, 0xf7, 0x61, 0xea, 0x70, 0xda, 0xa2, 0x5e, 0xcc, 0x22, 0xf4, 0x99, 0x2a, 0xf4, 0xb9, 0xb3, 0x4a, 0x39, 0x82, 0x30, 0xf6, 0x00, 0xb9, 0x9e, 0xec, 0xe4, 0x35, 0x51, 0x27, 0x5b, 0xae, 0x19, 0xcb, 0xb0, 0x3b, 0xf7, 0x95, 0x87, 0x2c, 0xe0, 0x94, 0x2c, 0x42, 0x45, 0xd6, 0xb3, 0xaa, 0x4d, 0x68, 0x33, 0xa3, 0xf3, 0x7b, 0xcd, 0x5c, 0xcf, 0x98, 0xd2, 0x7c, 0x69, 0xe4, 0xd1, 0x9f, 0x87, 0x06, 0xbe, 0xf9, 0xe7, 0xfb, 0x59, 0xcd, 0x46, 0x7b, 0x63, 0x2a, 0x4d, 0x23, 0xca, 0x80, 0x69, 0xc8, 0x38, 0x0c, 0xfa, 0x75, 0x11, 0x6b, 0xc4, 0x1e, 0xf4, 0xeb, 0xc6, 0x95, 0x34, 0x2d, 0x5a, 0x61, 0xda, 0x05, 0xa8, 0xc8, 0xad, 0xc2, 0xb4, 0x07, 0xbb, 0xd3, 0xa2, 0x79, 0x62, 0x62, 0xa3, 0xa9, 0xe1, 0xc0, 0xde, 0x4c, 0xac, 0xd7, 0xea, 0x29, 0x37, 0x72, 0x11, 0x60, 0xa3, 0x5b, 0x31, 0xe2, 0x61, 0x53, 0xb6, 0xb6, 0x99, 0xb4, 0xb6, 0x29, 0x4f, 0x05, 0xb6, 0xb6, 0x79, 0xcd, 0x6d, 0x50, 0xf4, 0xb5, 0x33, 0x9e, 0x06, 0x87, 0x7d, 0xdd, 0x09, 0x10, 0xef, 0x2e, 0x18, 0xf2, 0xeb, 0x49, 0x8d, 0x86, 0x66, 0x46, 0xec, 0xe4, 0x91, 0x5c, 0xca, 0xe5, 0x1c, 0x14, 0x39, 0x8f, 0x6c, 0x9a, 0x53, 0x86, 0xcb, 0x25, 0xfd, 0x54, 0x83, 0x43, 0x22, 0xeb, 0x45, 0xbf, 0x15, 0xd3, 0xc8, 0xce, 0xec, 0x7f, 0x87, 0xe0, 0x41, 0x18, 0xc1, 0x6e, 0xeb, 0x14, 0x77, 0x38, 0x44, 0x90, 0xe4, 0x32, 0x0c, 0xa7, 0x7d, 0x82, 0x38, 0x8e, 0x99, 0xb9, 0x46, 0x31, 0xd3, 0x46, 0x31, 0xb3, 0xc1, 0x6f, 0xa0, 0x8f, 0xdd, 0xf1, 0x36, 0x1c, 0x98, 0x28, 0x46, 0x82, 0x95, 0x78, 0x19, 0x76, 0xc8, 0xed, 0x90, 0xd5, 0x18, 0x9d, 0x7f, 0xbe, 0x6b, 0xeb, 0xb2, 0x6e, 0xb8, 0x81, 0xa9, 0x87, 0xf1, 0x59, 0xca, 0xf5, 0x6d, 0x1a, 0xf9, 0x37, 0xd7, 0xcf, 0x89, 0x71, 0x90, 0xee, 0x44, 0x3f, 0x5c, 0xdf, 0x80, 0x71, 0x9c, 0x21, 0xd8, 0xf3, 0xc8, 0x78, 0xba, 0x88, 0x71, 0x3e, 0xc5, 0x98, 0x9b, 0x7d, 0x35, 0x16, 0x91, 0xaf, 0x12, 0x0d, 0xf2, 0xdd, 0x03, 0xdb, 0xd7, 0xdc, 0x16, 0x42, 0x19, 0xb6, 0xe5, 0x8b, 0xf1, 0x89, 0x06, 0xba, 0x74, 0x4d, 0x5e, 0xdd, 0x98, 0xe6, 0x4f, 0xc1, 0x3e, 0xa8, 0x48, 0xc8, 0x48, 0x00, 0xdf, 0xc8, 0x32, 0xec, 0x6c, 0xbb, 0x11, 0x6f, 0xba, 0x2d, 0x27, 0x5e, 0x0f, 0x69, 0x75, 0x68, 0x42, 0x9b, 0x19, 0x2f, 0xde, 0x2e, 0x19, 0xf4, 0xaa, 0xf4, 0xf0, 0x83, 0xc6, 0x9b, 0xeb, 0x21, 0xb5, 0x47, 0x31, 0x42, 0xf2, 0x92, 0x34, 0xcf, 0x41, 0x25, 0x8e, 0x32, 0xf4, 0x49, 0x89, 0x69, 0x14, 0xb1, 0xc8, 0x69, 0xf3, 0x86, 0x28, 0xe0, 0x88, 0x3d, 0x2c, 0x3e, 0x5c, 0xe5, 0x0d, 0x72, 0xb2, 0x83, 0x7d, 0x48, 0x94, 0xb6, 0x56, 0x8e, 0x2e, 0xe5, 0x66, 0x1c, 0xc3, 0x8a, 0xc8, 0x32, 0xbe, 0x8a, 0x23, 0xbe, 0x68, 0x2e, 0xbc, 0x83, 0xb8, 0xbb, 0xad, 0x11, 0xf7, 0x29, 0x18, 0x4e, 0x2f, 0x09, 0x3c, 0xcf, 0xcf, 0x75, 0xb5, 0x59, 0x97, 0x63, 0xc7, 0xdc, 0x08, 0x60, 0xbf, 0x88, 0xbc, 0xbc, 0x72, 0x8b, 0x7a, 0xf1, 0xf2, 0xdd, 0x20, 0xe9, 0xe4, 0x3e, 0x5a, 0xeb, 0x24, 0x54, 0x98, 0x70, 0xc1, 0x96, 0x2a, 0xe4, 0x2d, 0x03, 0xdb, 0x68, 0x6d, 0x7c, 0x00, 0xd5, 0xde, 0x7c, 0x48, 0x63, 0x12, 0xc6, 0xfc, 0xa4, 0x55, 0x93, 0x8b, 0x87, 0x46, 0x34, 0xdd, 0x86, 0x9d, 0x3e, 0xb7, 0x3b, 0xdf, 0xc8, 0xa9, 0xce, 0x2c, 0x94, 0x89, 0xfb, 0x38, 0x50, 0xe9, 0x44, 0x3c, 0x01, 0x93, 0x22, 0xb7, 0x9d, 0xb9, 0xda, 0xf8, 0xf9, 0xce, 0xfd, 0xd9, 0x5b, 0xfc, 0x6d, 0xa2, 0xf8, 0x0f, 0x35, 0x98, 0x2a, 0xf7, 0x43, 0xfc, 0x2e, 0x54, 0xb3, 0xb7, 0x26, 0x77, 0x36, 0xee, 0xe6, 0xce, 0x98, 0xed, 0x06, 0xab, 0x8e, 0xb8, 0x3f, 0x52, 0x2f, 0x18, 0xd7, 0xc1, 0x2a, 0x83, 0xb2, 0xb4, 0xde, 0x4b, 0xa7, 0x06, 0xd0, 0x85, 0x63, 0xa7, 0x9d, 0xf9, 0x62, 0x7c, 0xa9, 0xc1, 0xf1, 0xfe, 0x63, 0x22, 0x55, 0x0f, 0x0e, 0x14, 0x51, 0x4d, 0x27, 0x5d, 0xbf, 0x5c, 0xab, 0x05, 0x5c, 0xb9, 0xf1, 0xad, 0x06, 0x35, 0x81, 0xec, 0x12, 0x0d, 0x68, 0xe4, 0xc6, 0xb4, 0x97, 0x5c, 0x69, 0x8f, 0x2e, 0xc2, 0x0e, 0xd9, 0x75, 0xbc, 0x3a, 0x28, 0x20, 0x6d, 0xd6, 0xa4, 0xa9, 0x39, 0x59, 0x80, 0xed, 0xae, 0xb8, 0x21, 0x86, 0x72, 0xa7, 0x49, 0x31, 0x2f, 0x93, 0x2b, 0x41, 0xda, 0x1a, 0xbf, 0xa6, 0xe3, 0x5a, 0x05, 0x17, 0xeb, 0xb6, 0xc9, 0x66, 0x90, 0x69, 0x18, 0x6f, 0xd2, 0x7b, 0xd9, 0xc6, 0x91, 0x03, 0x67, 0xac, 0x49, 0xef, 0x6d, 0x84, 0x13, 0x3a, 0x24, 0x62, 0xec, 0x26, 0xaf, 0x0e, 0x09, 0x62, 0x13, 0x25, 0xb5, 0xbe, 0x96, 0x18, 0xda, 0x68, 0x4f, 0x0e, 0xc1, 0xa8, 0x7c, 0x72, 0x6e, 0x71, 0x16, 0x54, 0xb7, 0x89, 0x2b, 0x1a, 0xe4, 0xa7, 0x2b, 0x9c, 0x05, 0xc6, 0x39, 0x30, 0x04, 0x89, 0xcb, 0xfe, 0x2d, 0xd7, 0xbb, 0x7d, 0x2e, 0x8e, 0x69, 0x3b, 0x8c, 0xf9, 0x52, 0x97, 0x70, 0x29, 0xab, 0xbb, 0xf1, 0x3e, 0x9e, 0xb3, 0xa2, 0x10, 0x58, 0x8b, 0x13, 0x50, 0xa1, 0x6b, 0x99, 0x86, 0xe9, 0x99, 0x59, 0x6d, 0x1a, 0xd4, 0x13, 0xba, 0x17, 0x12, 0x2b, 0x1b, 0x8d, 0xe7, 0x7f, 0xdb, 0x05, 0xdb, 0x45, 0x78, 0xf2, 0x21, 0x54, 0xa4, 0xe0, 0x22, 0xdd, 0x43, 0xa0, 0x57, 0xd1, 0xe9, 0x46, 0x99, 0x89, 0x44, 0x64, 0xbc, 0xf0, 0xf1, 0xef, 0x7f, 0x7f, 0x31, 0x38, 0x4d, 0x26, 0xad, 0xbc, 0x74, 0x54, 0x29, 0x6a, 0xf2, 0x91, 0x06, 0x15, 0xc9, 0xa8, 0x20, 0x7d, 0xb6, 0x60, 0x05, 0xe9, 0x73, 0x05, 0x31, 0x8e, 0x8b, 0xf4, 0xb3, 0x64, 0xa6, 0x3c, 0xbd, 0x70, 0xb2, 0xee, 0xfb, 0xf5, 0x07, 0xe4, 0xa1, 0x06, 0x23, 0x1d, 0xf9, 0x45, 0xa6, 0x8a, 0x73, 0x6c, 0xc8, 0x3f, 0x7d, 0x7a, 0x13, 0x2b, 0x04, 0x63, 0x09, 0x30, 0x47, 0xc9, 0x91, 0x3e, 0xc0, 0x38, 0x89, 0xc4, 0xfb, 0x51, 0x83, 0xdd, 0x0a, 0x29, 0x44, 0x4c, 0x55, 0xbe, 0x62, 0xf5, 0xa6, 0x5b, 0x7d, 0xdb, 0x23, 0xd2, 0x0b, 0x02, 0xe9, 0x59, 0x72, 0xba, 0x14, 0xe9, 0x4d, 0x11, 0xc1, 0xc9, 0xfe, 0x60, 0xe0, 0xd6, 0xfd, 0x0e, 0xfe, 0x07, 0xe4, 0x27, 0x0d, 0x76, 0x2b, 0xa4, 0x8d, 0x1a, 0x7f, 0xb1, 0x22, 0x53, 0xe3, 0x2f, 0xd1, 0x4c, 0xc6, 0x45, 0x81, 0xff, 0x15, 0x72, 0xa6, 0x14, 0xff, 0x9a, 0x88, 0xe0, 0xe4, 0xf5, 0x5c, 0x8e, 0xc0, 0xd7, 0x1a, 0x8c, 0xe7, 0x85, 0x0d, 0x39, 0xaa, 0xc4, 0xa2, 0x12, 0x61, 0xfa, 0x6c, 0x3f, 0xa6, 0x88, 0xf8, 0xb4, 0x40, 0xfc, 0x12, 0x39, 0x51, 0x8e, 0x18, 0x9d, 0x9d, 0xb4, 0x63, 0xe5, 0xff, 0x0f, 0xc8, 0x57, 0x1a, 0x8c, 0xe7, 0x05, 0x89, 0x1a, 0xa8, 0x52, 0x1b, 0xa9, 0x81, 0xaa, 0x85, 0x91, 0x71, 0x4a, 0x00, 0x5d, 0x20, 0x73, 0xa5, 0x40, 0xbb, 0x7e, 0x67, 0xcb, 0xa3, 0xf5, 0x83, 0x06, 0xa3, 0x19, 0x91, 0x42, 0x0e, 0xab, 0xd2, 0xf6, 0xaa, 0x26, 0xfd, 0xc8, 0xa6, 0x76, 0x88, 0xed, 0x3d, 0x81, 0xed, 0x2d, 0x72, 0xa3, 0x14, 0x9b, 0xbc, 0x91, 0x1c, 0x96, 0xb8, 0x66, 0x77, 0xdb, 0xba, 0x2f, 0x57, 0xcc, 0x88, 0x4a, 0x87, 0x8d, 0x2f, 0x09, 0xfa, 0x5f, 0x34, 0xd8, 0x5f, 0x70, 0xe1, 0x92, 0x79, 0x15, 0xc2, 0x72, 0x4d, 0xa4, 0x2f, 0x6c, 0xc9, 0x67, 0x4b, 0x6d, 0x52, 0xa4, 0x23, 0xc8, 0xbf, 0x1a, 0x4c, 0xf6, 0xa1, 0x49, 0xc8, 0x99, 0x2d, 0x60, 0x53, 0x08, 0x24, 0xfd, 0xec, 0x33, 0xfb, 0x23, 0xcf, 0xd7, 0x05, 0xcf, 0x0b, 0xe4, 0xfc, 0x33, 0xf1, 0x74, 0x56, 0xd6, 0xb3, 0xac, 0xbf, 0xd3, 0x80, 0xf4, 0x0a, 0x08, 0xf2, 0xa2, 0x0a, 0x64, 0xa1, 0x2e, 0xd2, 0xcd, 0x7e, 0xcd, 0x91, 0xc2, 0xa2, 0xa0, 0x30, 0x4f, 0x8e, 0x97, 0x52, 0x68, 0x60, 0x80, 0x2c, 0xde, 0x9f, 0x35, 0xd8, 0xa7, 0xbe, 0xe8, 0xc9, 0x9c, 0x0a, 0x44, 0xa9, 0xae, 0xd0, 0xe7, 0xb7, 0xe2, 0x82, 0xd8, 0xcf, 0x08, 0xec, 0x8b, 0xe4, 0x64, 0x29, 0xf6, 0xa6, 0x08, 0xe2, 0xb8, 0x18, 0x25, 0xa9, 0xba, 0x3c, 0x4d, 0x4b, 0x97, 0x1f, 0x3d, 0xa9, 0x69, 0x8f, 0x9f, 0xd4, 0xb4, 0xbf, 0x9e, 0xd4, 0xb4, 0xcf, 0x9f, 0xd6, 0x06, 0x1e, 0x3f, 0xad, 0x0d, 0xfc, 0xf1, 0xb4, 0x36, 0xf0, 0xae, 0xd9, 0xf0, 0xe3, 0x04, 0x89, 0xc7, 0xda, 0x85, 0xb1, 0xef, 0x89, 0xe8, 0xc9, 0xef, 0x53, 0xbe, 0x52, 0x11, 0x7f, 0x52, 0x5a, 0xf8, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xea, 0x53, 0x0b, 0x65, 0x14, 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) // Policy returns a Policy with the given ID. Policy(ctx context.Context, in *QueryPolicyRequest, opts ...grpc.CallOption) (*QueryPolicyResponse, error) // PolicyIds returns list of Ids for Policies registered in the system. PolicyIds(ctx context.Context, in *QueryPolicyIdsRequest, opts ...grpc.CallOption) (*QueryPolicyIdsResponse, error) // FilterRelationships returns filtered set of Relationships in a Policy. FilterRelationships(ctx context.Context, in *QueryFilterRelationshipsRequest, opts ...grpc.CallOption) (*QueryFilterRelationshipsResponse, error) // VerifyAccessRequest verifies whether an Access Request is accepted with respect to the given Policy's Relation Graph. VerifyAccessRequest(ctx context.Context, in *QueryVerifyAccessRequestRequest, opts ...grpc.CallOption) (*QueryVerifyAccessRequestResponse, error) // ValidatePolicy verifies whether the given Policy definition is properly formatted ValidatePolicy(ctx context.Context, in *QueryValidatePolicyRequest, opts ...grpc.CallOption) (*QueryValidatePolicyResponse, error) // AccessDecision queries the system for an AccessDecision with the given ID. AccessDecision(ctx context.Context, in *QueryAccessDecisionRequest, opts ...grpc.CallOption) (*QueryAccessDecisionResponse, error) // ObjectOwner returns the Actor ID of the the given Object's owner ObjectOwner(ctx context.Context, in *QueryObjectOwnerRequest, opts ...grpc.CallOption) (*QueryObjectOwnerResponse, error) // RegistrationsCommitment returns a specific RegistrationsCommitment record RegistrationsCommitment(ctx context.Context, in *QueryRegistrationsCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentResponse, error) // RegistrationsCommitmentByCommitment returns all RegistrationCommitment records with a given commitment RegistrationsCommitmentByCommitment(ctx context.Context, in *QueryRegistrationsCommitmentByCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentByCommitmentResponse, error) // GenerateCommitment generates a Object registration commitment for the given objects // // Note: this operation assures the commitment is valid (no object is registered and the policy exists) // but exposes the Object Ids to the RPC node. // ONLY use this method if the node is trusted GenerateCommitment(ctx context.Context, in *QueryGenerateCommitmentRequest, opts ...grpc.CallOption) (*QueryGenerateCommitmentResponse, error) // HijackAttemptsByPolicy returns, for a given policy, all AmendmentEvent whose hijack flag is true HijackAttemptsByPolicy(ctx context.Context, in *QueryHijackAttemptsByPolicyRequest, opts ...grpc.CallOption) (*QueryHijackAttemptsByPolicyResponse, 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, "/sourcehub.acp.Query/Params", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Policy(ctx context.Context, in *QueryPolicyRequest, opts ...grpc.CallOption) (*QueryPolicyResponse, error) { out := new(QueryPolicyResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/Policy", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) PolicyIds(ctx context.Context, in *QueryPolicyIdsRequest, opts ...grpc.CallOption) (*QueryPolicyIdsResponse, error) { out := new(QueryPolicyIdsResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/PolicyIds", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) FilterRelationships(ctx context.Context, in *QueryFilterRelationshipsRequest, opts ...grpc.CallOption) (*QueryFilterRelationshipsResponse, error) { out := new(QueryFilterRelationshipsResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/FilterRelationships", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) VerifyAccessRequest(ctx context.Context, in *QueryVerifyAccessRequestRequest, opts ...grpc.CallOption) (*QueryVerifyAccessRequestResponse, error) { out := new(QueryVerifyAccessRequestResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/VerifyAccessRequest", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) ValidatePolicy(ctx context.Context, in *QueryValidatePolicyRequest, opts ...grpc.CallOption) (*QueryValidatePolicyResponse, error) { out := new(QueryValidatePolicyResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/ValidatePolicy", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) AccessDecision(ctx context.Context, in *QueryAccessDecisionRequest, opts ...grpc.CallOption) (*QueryAccessDecisionResponse, error) { out := new(QueryAccessDecisionResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/AccessDecision", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) ObjectOwner(ctx context.Context, in *QueryObjectOwnerRequest, opts ...grpc.CallOption) (*QueryObjectOwnerResponse, error) { out := new(QueryObjectOwnerResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/ObjectOwner", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) RegistrationsCommitment(ctx context.Context, in *QueryRegistrationsCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentResponse, error) { out := new(QueryRegistrationsCommitmentResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/RegistrationsCommitment", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) RegistrationsCommitmentByCommitment(ctx context.Context, in *QueryRegistrationsCommitmentByCommitmentRequest, opts ...grpc.CallOption) (*QueryRegistrationsCommitmentByCommitmentResponse, error) { out := new(QueryRegistrationsCommitmentByCommitmentResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/RegistrationsCommitmentByCommitment", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) GenerateCommitment(ctx context.Context, in *QueryGenerateCommitmentRequest, opts ...grpc.CallOption) (*QueryGenerateCommitmentResponse, error) { out := new(QueryGenerateCommitmentResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/GenerateCommitment", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) HijackAttemptsByPolicy(ctx context.Context, in *QueryHijackAttemptsByPolicyRequest, opts ...grpc.CallOption) (*QueryHijackAttemptsByPolicyResponse, error) { out := new(QueryHijackAttemptsByPolicyResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Query/HijackAttemptsByPolicy", 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) // Policy returns a Policy with the given ID. Policy(context.Context, *QueryPolicyRequest) (*QueryPolicyResponse, error) // PolicyIds returns list of Ids for Policies registered in the system. PolicyIds(context.Context, *QueryPolicyIdsRequest) (*QueryPolicyIdsResponse, error) // FilterRelationships returns filtered set of Relationships in a Policy. FilterRelationships(context.Context, *QueryFilterRelationshipsRequest) (*QueryFilterRelationshipsResponse, error) // VerifyAccessRequest verifies whether an Access Request is accepted with respect to the given Policy's Relation Graph. VerifyAccessRequest(context.Context, *QueryVerifyAccessRequestRequest) (*QueryVerifyAccessRequestResponse, error) // ValidatePolicy verifies whether the given Policy definition is properly formatted ValidatePolicy(context.Context, *QueryValidatePolicyRequest) (*QueryValidatePolicyResponse, error) // AccessDecision queries the system for an AccessDecision with the given ID. AccessDecision(context.Context, *QueryAccessDecisionRequest) (*QueryAccessDecisionResponse, error) // ObjectOwner returns the Actor ID of the the given Object's owner ObjectOwner(context.Context, *QueryObjectOwnerRequest) (*QueryObjectOwnerResponse, error) // RegistrationsCommitment returns a specific RegistrationsCommitment record RegistrationsCommitment(context.Context, *QueryRegistrationsCommitmentRequest) (*QueryRegistrationsCommitmentResponse, error) // RegistrationsCommitmentByCommitment returns all RegistrationCommitment records with a given commitment RegistrationsCommitmentByCommitment(context.Context, *QueryRegistrationsCommitmentByCommitmentRequest) (*QueryRegistrationsCommitmentByCommitmentResponse, error) // GenerateCommitment generates a Object registration commitment for the given objects // // Note: this operation assures the commitment is valid (no object is registered and the policy exists) // but exposes the Object Ids to the RPC node. // ONLY use this method if the node is trusted GenerateCommitment(context.Context, *QueryGenerateCommitmentRequest) (*QueryGenerateCommitmentResponse, error) // HijackAttemptsByPolicy returns, for a given policy, all AmendmentEvent whose hijack flag is true HijackAttemptsByPolicy(context.Context, *QueryHijackAttemptsByPolicyRequest) (*QueryHijackAttemptsByPolicyResponse, 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 (*UnimplementedQueryServer) Policy(ctx context.Context, req *QueryPolicyRequest) (*QueryPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Policy not implemented") } func (*UnimplementedQueryServer) PolicyIds(ctx context.Context, req *QueryPolicyIdsRequest) (*QueryPolicyIdsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PolicyIds not implemented") } func (*UnimplementedQueryServer) FilterRelationships(ctx context.Context, req *QueryFilterRelationshipsRequest) (*QueryFilterRelationshipsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FilterRelationships not implemented") } func (*UnimplementedQueryServer) VerifyAccessRequest(ctx context.Context, req *QueryVerifyAccessRequestRequest) (*QueryVerifyAccessRequestResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VerifyAccessRequest not implemented") } func (*UnimplementedQueryServer) ValidatePolicy(ctx context.Context, req *QueryValidatePolicyRequest) (*QueryValidatePolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidatePolicy not implemented") } func (*UnimplementedQueryServer) AccessDecision(ctx context.Context, req *QueryAccessDecisionRequest) (*QueryAccessDecisionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AccessDecision not implemented") } func (*UnimplementedQueryServer) ObjectOwner(ctx context.Context, req *QueryObjectOwnerRequest) (*QueryObjectOwnerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ObjectOwner not implemented") } func (*UnimplementedQueryServer) RegistrationsCommitment(ctx context.Context, req *QueryRegistrationsCommitmentRequest) (*QueryRegistrationsCommitmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegistrationsCommitment not implemented") } func (*UnimplementedQueryServer) RegistrationsCommitmentByCommitment(ctx context.Context, req *QueryRegistrationsCommitmentByCommitmentRequest) (*QueryRegistrationsCommitmentByCommitmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegistrationsCommitmentByCommitment not implemented") } func (*UnimplementedQueryServer) GenerateCommitment(ctx context.Context, req *QueryGenerateCommitmentRequest) (*QueryGenerateCommitmentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateCommitment not implemented") } func (*UnimplementedQueryServer) HijackAttemptsByPolicy(ctx context.Context, req *QueryHijackAttemptsByPolicyRequest) (*QueryHijackAttemptsByPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HijackAttemptsByPolicy 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: "/sourcehub.acp.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Policy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Policy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/Policy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Policy(ctx, req.(*QueryPolicyRequest)) } return interceptor(ctx, in, info, handler) } func _Query_PolicyIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPolicyIdsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).PolicyIds(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/PolicyIds", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).PolicyIds(ctx, req.(*QueryPolicyIdsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_FilterRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryFilterRelationshipsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).FilterRelationships(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/FilterRelationships", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).FilterRelationships(ctx, req.(*QueryFilterRelationshipsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_VerifyAccessRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryVerifyAccessRequestRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).VerifyAccessRequest(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/VerifyAccessRequest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).VerifyAccessRequest(ctx, req.(*QueryVerifyAccessRequestRequest)) } return interceptor(ctx, in, info, handler) } func _Query_ValidatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryValidatePolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).ValidatePolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/ValidatePolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValidatePolicy(ctx, req.(*QueryValidatePolicyRequest)) } return interceptor(ctx, in, info, handler) } func _Query_AccessDecision_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAccessDecisionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).AccessDecision(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/AccessDecision", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AccessDecision(ctx, req.(*QueryAccessDecisionRequest)) } return interceptor(ctx, in, info, handler) } func _Query_ObjectOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryObjectOwnerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).ObjectOwner(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/ObjectOwner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ObjectOwner(ctx, req.(*QueryObjectOwnerRequest)) } return interceptor(ctx, in, info, handler) } func _Query_RegistrationsCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRegistrationsCommitmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).RegistrationsCommitment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/RegistrationsCommitment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).RegistrationsCommitment(ctx, req.(*QueryRegistrationsCommitmentRequest)) } return interceptor(ctx, in, info, handler) } func _Query_RegistrationsCommitmentByCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRegistrationsCommitmentByCommitmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).RegistrationsCommitmentByCommitment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/RegistrationsCommitmentByCommitment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).RegistrationsCommitmentByCommitment(ctx, req.(*QueryRegistrationsCommitmentByCommitmentRequest)) } return interceptor(ctx, in, info, handler) } func _Query_GenerateCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGenerateCommitmentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).GenerateCommitment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/GenerateCommitment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).GenerateCommitment(ctx, req.(*QueryGenerateCommitmentRequest)) } return interceptor(ctx, in, info, handler) } func _Query_HijackAttemptsByPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryHijackAttemptsByPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).HijackAttemptsByPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Query/HijackAttemptsByPolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).HijackAttemptsByPolicy(ctx, req.(*QueryHijackAttemptsByPolicyRequest)) } return interceptor(ctx, in, info, handler) } var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.acp.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, { MethodName: "Policy", Handler: _Query_Policy_Handler, }, { MethodName: "PolicyIds", Handler: _Query_PolicyIds_Handler, }, { MethodName: "FilterRelationships", Handler: _Query_FilterRelationships_Handler, }, { MethodName: "VerifyAccessRequest", Handler: _Query_VerifyAccessRequest_Handler, }, { MethodName: "ValidatePolicy", Handler: _Query_ValidatePolicy_Handler, }, { MethodName: "AccessDecision", Handler: _Query_AccessDecision_Handler, }, { MethodName: "ObjectOwner", Handler: _Query_ObjectOwner_Handler, }, { MethodName: "RegistrationsCommitment", Handler: _Query_RegistrationsCommitment_Handler, }, { MethodName: "RegistrationsCommitmentByCommitment", Handler: _Query_RegistrationsCommitmentByCommitment_Handler, }, { MethodName: "GenerateCommitment", Handler: _Query_GenerateCommitment_Handler, }, { MethodName: "HijackAttemptsByPolicy", Handler: _Query_HijackAttemptsByPolicy_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/acp/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 (m *QueryPolicyRequest) 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 *QueryPolicyRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryPolicyResponse) 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 *QueryPolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Record != nil { { size, err := m.Record.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 (m *QueryPolicyIdsRequest) 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 *QueryPolicyIdsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPolicyIdsRequest) 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] = 0xa } return len(dAtA) - i, nil } func (m *QueryPolicyIdsResponse) 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 *QueryPolicyIdsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPolicyIdsResponse) 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.Ids) > 0 { for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Ids[iNdEx]) copy(dAtA[i:], m.Ids[iNdEx]) i = encodeVarintQuery(dAtA, i, uint64(len(m.Ids[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *QueryFilterRelationshipsRequest) 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 *QueryFilterRelationshipsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryFilterRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Selector != nil { { size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintQuery(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryFilterRelationshipsResponse) 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 *QueryFilterRelationshipsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryFilterRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Records) > 0 { for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Records[iNdEx].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 (m *QueryVerifyAccessRequestRequest) 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 *QueryVerifyAccessRequestRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryVerifyAccessRequestRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.AccessRequest != nil { { size, err := m.AccessRequest.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintQuery(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryVerifyAccessRequestResponse) 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 *QueryVerifyAccessRequestResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryVerifyAccessRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Valid { i-- if m.Valid { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *QueryValidatePolicyRequest) 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 *QueryValidatePolicyRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryValidatePolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.MarshalType != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.MarshalType)) i-- dAtA[i] = 0x18 } if len(m.Policy) > 0 { i -= len(m.Policy) copy(dAtA[i:], m.Policy) i = encodeVarintQuery(dAtA, i, uint64(len(m.Policy))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryValidatePolicyResponse) 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 *QueryValidatePolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryValidatePolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Policy != nil { { size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.ErrorMsg) > 0 { i -= len(m.ErrorMsg) copy(dAtA[i:], m.ErrorMsg) i = encodeVarintQuery(dAtA, i, uint64(len(m.ErrorMsg))) i-- dAtA[i] = 0x12 } if m.Valid { i-- if m.Valid { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *QueryAccessDecisionRequest) 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 *QueryAccessDecisionRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAccessDecisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryAccessDecisionResponse) 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 *QueryAccessDecisionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAccessDecisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Decision != nil { { size, err := m.Decision.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 (m *QueryObjectOwnerRequest) 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 *QueryObjectOwnerRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryObjectOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Object != nil { { size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintQuery(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryObjectOwnerResponse) 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 *QueryObjectOwnerResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryObjectOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Record != nil { { size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.IsRegistered { i-- if m.IsRegistered { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *QueryRegistrationsCommitmentRequest) 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 *QueryRegistrationsCommitmentRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryRegistrationsCommitmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Id != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Id)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *QueryRegistrationsCommitmentResponse) 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 *QueryRegistrationsCommitmentResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryRegistrationsCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.RegistrationsCommitment != nil { { size, err := m.RegistrationsCommitment.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 (m *QueryRegistrationsCommitmentByCommitmentRequest) 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 *QueryRegistrationsCommitmentByCommitmentRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryRegistrationsCommitmentByCommitmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Commitment) > 0 { i -= len(m.Commitment) copy(dAtA[i:], m.Commitment) i = encodeVarintQuery(dAtA, i, uint64(len(m.Commitment))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryRegistrationsCommitmentByCommitmentResponse) 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 *QueryRegistrationsCommitmentByCommitmentResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryRegistrationsCommitmentByCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.RegistrationsCommitments) > 0 { for iNdEx := len(m.RegistrationsCommitments) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.RegistrationsCommitments[iNdEx].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 (m *QueryGenerateCommitmentRequest) 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 *QueryGenerateCommitmentRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryGenerateCommitmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Actor != nil { { size, err := m.Actor.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.Objects) > 0 { for iNdEx := len(m.Objects) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Objects[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.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintQuery(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryGenerateCommitmentResponse) 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 *QueryGenerateCommitmentResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryGenerateCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ProofsJson) > 0 { for iNdEx := len(m.ProofsJson) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ProofsJson[iNdEx]) copy(dAtA[i:], m.ProofsJson[iNdEx]) i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofsJson[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(m.Proofs) > 0 { for iNdEx := len(m.Proofs) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Proofs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if len(m.HexCommitment) > 0 { i -= len(m.HexCommitment) copy(dAtA[i:], m.HexCommitment) i = encodeVarintQuery(dAtA, i, uint64(len(m.HexCommitment))) i-- dAtA[i] = 0x12 } if len(m.Commitment) > 0 { i -= len(m.Commitment) copy(dAtA[i:], m.Commitment) i = encodeVarintQuery(dAtA, i, uint64(len(m.Commitment))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryHijackAttemptsByPolicyRequest) 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 *QueryHijackAttemptsByPolicyRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryHijackAttemptsByPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintQuery(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryHijackAttemptsByPolicyResponse) 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 *QueryHijackAttemptsByPolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryHijackAttemptsByPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Events) > 0 { for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Events[iNdEx].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 (m *QueryPolicyRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Id) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryPolicyResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Record != nil { l = m.Record.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryPolicyIdsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryPolicyIdsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Ids) > 0 { for _, s := range m.Ids { l = len(s) n += 1 + l + sovQuery(uint64(l)) } } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryFilterRelationshipsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PolicyId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if m.Selector != nil { l = m.Selector.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryFilterRelationshipsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Records) > 0 { for _, e := range m.Records { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } return n } func (m *QueryVerifyAccessRequestRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PolicyId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if m.AccessRequest != nil { l = m.AccessRequest.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryVerifyAccessRequestResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Valid { n += 2 } return n } func (m *QueryValidatePolicyRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Policy) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if m.MarshalType != 0 { n += 1 + sovQuery(uint64(m.MarshalType)) } return n } func (m *QueryValidatePolicyResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Valid { n += 2 } l = len(m.ErrorMsg) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if m.Policy != nil { l = m.Policy.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryAccessDecisionRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Id) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryAccessDecisionResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Decision != nil { l = m.Decision.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryObjectOwnerRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PolicyId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if m.Object != nil { l = m.Object.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryObjectOwnerResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.IsRegistered { n += 2 } if m.Record != nil { l = m.Record.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryRegistrationsCommitmentRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { n += 1 + sovQuery(uint64(m.Id)) } return n } func (m *QueryRegistrationsCommitmentResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RegistrationsCommitment != nil { l = m.RegistrationsCommitment.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryRegistrationsCommitmentByCommitmentRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Commitment) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryRegistrationsCommitmentByCommitmentResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.RegistrationsCommitments) > 0 { for _, e := range m.RegistrationsCommitments { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } return n } func (m *QueryGenerateCommitmentRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PolicyId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if len(m.Objects) > 0 { for _, e := range m.Objects { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } if m.Actor != nil { l = m.Actor.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryGenerateCommitmentResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Commitment) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } l = len(m.HexCommitment) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if len(m.Proofs) > 0 { for _, e := range m.Proofs { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } if len(m.ProofsJson) > 0 { for _, s := range m.ProofsJson { l = len(s) n += 1 + l + sovQuery(uint64(l)) } } return n } func (m *QueryHijackAttemptsByPolicyRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PolicyId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryHijackAttemptsByPolicyResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Events) > 0 { for _, e := range m.Events { l = e.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 (m *QueryPolicyRequest) 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: QueryPolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) 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 *QueryPolicyResponse) 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: QueryPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", 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.Record == nil { m.Record = &PolicyRecord{} } if err := m.Record.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 *QueryPolicyIdsRequest) 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: QueryPolicyIdsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPolicyIdsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: 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 *QueryPolicyIdsResponse) 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: QueryPolicyIdsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPolicyIdsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) 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.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 (m *QueryFilterRelationshipsRequest) 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: QueryFilterRelationshipsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryFilterRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Selector", 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.Selector == nil { m.Selector = &types.RelationshipSelector{} } if err := m.Selector.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 *QueryFilterRelationshipsResponse) 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: QueryFilterRelationshipsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryFilterRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Records", 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.Records = append(m.Records, &RelationshipRecord{}) if err := m.Records[len(m.Records)-1].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 *QueryVerifyAccessRequestRequest) 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: QueryVerifyAccessRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryVerifyAccessRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AccessRequest", 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.AccessRequest == nil { m.AccessRequest = &types.AccessRequest{} } if err := m.AccessRequest.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 *QueryVerifyAccessRequestResponse) 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: QueryVerifyAccessRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryVerifyAccessRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Valid = bool(v != 0) 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 *QueryValidatePolicyRequest) 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: QueryValidatePolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryValidatePolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } m.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } 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 *QueryValidatePolicyResponse) 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: QueryValidatePolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryValidatePolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Valid = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.ErrorMsg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Policy", 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.Policy == nil { m.Policy = &types.Policy{} } if err := m.Policy.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 *QueryAccessDecisionRequest) 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: QueryAccessDecisionRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAccessDecisionRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) 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 *QueryAccessDecisionResponse) 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: QueryAccessDecisionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAccessDecisionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Decision", 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.Decision == nil { m.Decision = &AccessDecision{} } if err := m.Decision.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 *QueryObjectOwnerRequest) 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: QueryObjectOwnerRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryObjectOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Object", 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.Object == nil { m.Object = &types.Object{} } if err := m.Object.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 *QueryObjectOwnerResponse) 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: QueryObjectOwnerResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryObjectOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsRegistered", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.IsRegistered = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", 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.Record == nil { m.Record = &RelationshipRecord{} } if err := m.Record.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 *QueryRegistrationsCommitmentRequest) 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: QueryRegistrationsCommitmentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryRegistrationsCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } 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 *QueryRegistrationsCommitmentResponse) 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: QueryRegistrationsCommitmentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryRegistrationsCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitment", 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.RegistrationsCommitment == nil { m.RegistrationsCommitment = &RegistrationsCommitment{} } if err := m.RegistrationsCommitment.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 *QueryRegistrationsCommitmentByCommitmentRequest) 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: QueryRegistrationsCommitmentByCommitmentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryRegistrationsCommitmentByCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Commitment", 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.Commitment = append(m.Commitment[:0], dAtA[iNdEx:postIndex]...) if m.Commitment == nil { m.Commitment = []byte{} } 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 *QueryRegistrationsCommitmentByCommitmentResponse) 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: QueryRegistrationsCommitmentByCommitmentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryRegistrationsCommitmentByCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RegistrationsCommitments", 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.RegistrationsCommitments = append(m.RegistrationsCommitments, &RegistrationsCommitment{}) if err := m.RegistrationsCommitments[len(m.RegistrationsCommitments)-1].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 *QueryGenerateCommitmentRequest) 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: QueryGenerateCommitmentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryGenerateCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Objects", 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.Objects = append(m.Objects, &types.Object{}) if err := m.Objects[len(m.Objects)-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 Actor", 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.Actor == nil { m.Actor = &types.Actor{} } if err := m.Actor.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 *QueryGenerateCommitmentResponse) 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: QueryGenerateCommitmentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryGenerateCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Commitment", 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.Commitment = append(m.Commitment[:0], dAtA[iNdEx:postIndex]...) if m.Commitment == nil { m.Commitment = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HexCommitment", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.HexCommitment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Proofs", 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.Proofs = append(m.Proofs, &RegistrationProof{}) if err := m.Proofs[len(m.Proofs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofsJson", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.ProofsJson = append(m.ProofsJson, string(dAtA[iNdEx:postIndex])) 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 *QueryHijackAttemptsByPolicyRequest) 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: QueryHijackAttemptsByPolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryHijackAttemptsByPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) 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 *QueryHijackAttemptsByPolicyResponse) 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: QueryHijackAttemptsByPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryHijackAttemptsByPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Events", 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.Events = append(m.Events, &AmendmentEvent{}) if err := m.Events[len(m.Events)-1].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") ) ================================================ FILE: x/acp/types/query.pb.gw.go ================================================ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // source: sourcehub/acp/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 } func request_Query_Policy_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPolicyRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } msg, err := client.Policy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Policy_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPolicyRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } msg, err := server.Policy(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_PolicyIds_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_PolicyIds_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPolicyIdsRequest 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_PolicyIds_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.PolicyIds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_PolicyIds_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPolicyIdsRequest 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_PolicyIds_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.PolicyIds(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_FilterRelationships_0 = &utilities.DoubleArray{Encoding: map[string]int{"policy_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_FilterRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryFilterRelationshipsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy_id") } protoReq.PolicyId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy_id", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_FilterRelationships_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.FilterRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_FilterRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryFilterRelationshipsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy_id") } protoReq.PolicyId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy_id", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_FilterRelationships_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.FilterRelationships(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_VerifyAccessRequest_0 = &utilities.DoubleArray{Encoding: map[string]int{"policy_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_VerifyAccessRequest_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryVerifyAccessRequestRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy_id") } protoReq.PolicyId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy_id", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_VerifyAccessRequest_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.VerifyAccessRequest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_VerifyAccessRequest_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryVerifyAccessRequestRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy_id") } protoReq.PolicyId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy_id", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_VerifyAccessRequest_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.VerifyAccessRequest(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_ValidatePolicy_0 = &utilities.DoubleArray{Encoding: map[string]int{"policy": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_ValidatePolicy_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryValidatePolicyRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy") } protoReq.Policy, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValidatePolicy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.ValidatePolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_ValidatePolicy_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryValidatePolicyRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy") } protoReq.Policy, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValidatePolicy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.ValidatePolicy(ctx, &protoReq) return msg, metadata, err } func request_Query_AccessDecision_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAccessDecisionRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } msg, err := client.AccessDecision(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_AccessDecision_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAccessDecisionRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } msg, err := server.AccessDecision(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_ObjectOwner_0 = &utilities.DoubleArray{Encoding: map[string]int{"policy_id": 0, "object": 1, "resource": 2, "id": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 3, 3, 2, 4, 5}} ) func request_Query_ObjectOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryObjectOwnerRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy_id") } protoReq.PolicyId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy_id", err) } val, ok = pathParams["object.resource"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "object.resource") } err = runtime.PopulateFieldFromPath(&protoReq, "object.resource", val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "object.resource", err) } val, ok = pathParams["object.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "object.id") } err = runtime.PopulateFieldFromPath(&protoReq, "object.id", val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "object.id", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ObjectOwner_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.ObjectOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_ObjectOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryObjectOwnerRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["policy_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "policy_id") } protoReq.PolicyId, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "policy_id", err) } val, ok = pathParams["object.resource"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "object.resource") } err = runtime.PopulateFieldFromPath(&protoReq, "object.resource", val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "object.resource", err) } val, ok = pathParams["object.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "object.id") } err = runtime.PopulateFieldFromPath(&protoReq, "object.id", val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "object.id", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ObjectOwner_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.ObjectOwner(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_RegistrationsCommitment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_RegistrationsCommitment_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryRegistrationsCommitmentRequest 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_RegistrationsCommitment_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.RegistrationsCommitment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_RegistrationsCommitment_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryRegistrationsCommitmentRequest 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_RegistrationsCommitment_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.RegistrationsCommitment(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_RegistrationsCommitmentByCommitment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_RegistrationsCommitmentByCommitment_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryRegistrationsCommitmentByCommitmentRequest 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_RegistrationsCommitmentByCommitment_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.RegistrationsCommitmentByCommitment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_RegistrationsCommitmentByCommitment_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryRegistrationsCommitmentByCommitmentRequest 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_RegistrationsCommitmentByCommitment_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.RegistrationsCommitmentByCommitment(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_GenerateCommitment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_GenerateCommitment_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGenerateCommitmentRequest 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_GenerateCommitment_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.GenerateCommitment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_GenerateCommitment_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGenerateCommitmentRequest 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_GenerateCommitment_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.GenerateCommitment(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_HijackAttemptsByPolicy_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_HijackAttemptsByPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryHijackAttemptsByPolicyRequest 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_HijackAttemptsByPolicy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.HijackAttemptsByPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_HijackAttemptsByPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryHijackAttemptsByPolicyRequest 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_HijackAttemptsByPolicy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.HijackAttemptsByPolicy(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()...) }) mux.Handle("GET", pattern_Query_Policy_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_Policy_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_Policy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_PolicyIds_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_PolicyIds_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_PolicyIds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_FilterRelationships_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_FilterRelationships_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_FilterRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_VerifyAccessRequest_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_VerifyAccessRequest_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_VerifyAccessRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_ValidatePolicy_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_ValidatePolicy_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_ValidatePolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_AccessDecision_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_AccessDecision_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_AccessDecision_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_ObjectOwner_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_ObjectOwner_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_ObjectOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_RegistrationsCommitment_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_RegistrationsCommitment_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_RegistrationsCommitment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_RegistrationsCommitmentByCommitment_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_RegistrationsCommitmentByCommitment_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_RegistrationsCommitmentByCommitment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_GenerateCommitment_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_GenerateCommitment_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_GenerateCommitment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_HijackAttemptsByPolicy_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_HijackAttemptsByPolicy_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_HijackAttemptsByPolicy_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()...) }) mux.Handle("GET", pattern_Query_Policy_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_Policy_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_Policy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_PolicyIds_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_PolicyIds_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_PolicyIds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_FilterRelationships_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_FilterRelationships_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_FilterRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_VerifyAccessRequest_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_VerifyAccessRequest_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_VerifyAccessRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_ValidatePolicy_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_ValidatePolicy_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_ValidatePolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_AccessDecision_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_AccessDecision_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_AccessDecision_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_ObjectOwner_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_ObjectOwner_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_ObjectOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_RegistrationsCommitment_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_RegistrationsCommitment_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_RegistrationsCommitment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_RegistrationsCommitmentByCommitment_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_RegistrationsCommitmentByCommitment_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_RegistrationsCommitmentByCommitment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_GenerateCommitment_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_GenerateCommitment_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_GenerateCommitment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_HijackAttemptsByPolicy_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_HijackAttemptsByPolicy_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_HijackAttemptsByPolicy_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}, []string{"sourcenetwork", "sourcehub", "acp", "params"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Policy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "acp", "policy", "id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_PolicyIds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "acp", "policy_ids"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_FilterRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "acp", "filter_relationships", "policy_id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_VerifyAccessRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "acp", "verify_access_request", "policy_id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_ValidatePolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "acp", "validate_policy", "policy"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_AccessDecision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "acp", "access_decision", "id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_ObjectOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"sourcenetwork", "sourcehub", "acp", "object_owner", "policy_id", "object.resource", "object.id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_RegistrationsCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "acp", "registrations_commitment"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_RegistrationsCommitmentByCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "acp", "registrations_commitment_by_commitment"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_GenerateCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "acp", "generate_commitment"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_HijackAttemptsByPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "acp", "hijack_attempts_by_policy"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_Policy_0 = runtime.ForwardResponseMessage forward_Query_PolicyIds_0 = runtime.ForwardResponseMessage forward_Query_FilterRelationships_0 = runtime.ForwardResponseMessage forward_Query_VerifyAccessRequest_0 = runtime.ForwardResponseMessage forward_Query_ValidatePolicy_0 = runtime.ForwardResponseMessage forward_Query_AccessDecision_0 = runtime.ForwardResponseMessage forward_Query_ObjectOwner_0 = runtime.ForwardResponseMessage forward_Query_RegistrationsCommitment_0 = runtime.ForwardResponseMessage forward_Query_RegistrationsCommitmentByCommitment_0 = runtime.ForwardResponseMessage forward_Query_GenerateCommitment_0 = runtime.ForwardResponseMessage forward_Query_HijackAttemptsByPolicy_0 = runtime.ForwardResponseMessage ) ================================================ FILE: x/acp/types/record.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/record.proto package types import ( fmt "fmt" _ "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" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" types "github.com/sourcenetwork/acp_core/pkg/types" 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 // RecordMetadata models metadata which is stored alongside acp records type RecordMetadata struct { // creation_ts is the timestamp of record creation CreationTs *Timestamp `protobuf:"bytes,1,opt,name=creation_ts,json=creationTs,proto3" json:"creation_ts,omitempty"` // tx_hash is the hash256 of the tx bytes which produced the record TxHash []byte `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // tx_signer is the SourceHub bech32 address of the account that signed the Tx TxSigner string `protobuf:"bytes,3,opt,name=tx_signer,json=txSigner,proto3" json:"tx_signer,omitempty"` // owner_did is the DID of the PolicyCmd actor OwnerDid string `protobuf:"bytes,4,opt,name=owner_did,json=ownerDid,proto3" json:"owner_did,omitempty"` } func (m *RecordMetadata) Reset() { *m = RecordMetadata{} } func (m *RecordMetadata) String() string { return proto.CompactTextString(m) } func (*RecordMetadata) ProtoMessage() {} func (*RecordMetadata) Descriptor() ([]byte, []int) { return fileDescriptor_5977940639fee4f6, []int{0} } func (m *RecordMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RecordMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RecordMetadata.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 *RecordMetadata) XXX_Merge(src proto.Message) { xxx_messageInfo_RecordMetadata.Merge(m, src) } func (m *RecordMetadata) XXX_Size() int { return m.Size() } func (m *RecordMetadata) XXX_DiscardUnknown() { xxx_messageInfo_RecordMetadata.DiscardUnknown(m) } var xxx_messageInfo_RecordMetadata proto.InternalMessageInfo func (m *RecordMetadata) GetCreationTs() *Timestamp { if m != nil { return m.CreationTs } return nil } func (m *RecordMetadata) GetTxHash() []byte { if m != nil { return m.TxHash } return nil } func (m *RecordMetadata) GetTxSigner() string { if m != nil { return m.TxSigner } return "" } func (m *RecordMetadata) GetOwnerDid() string { if m != nil { return m.OwnerDid } return "" } type PolicyRecord struct { Policy *types.Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` RawPolicy string `protobuf:"bytes,3,opt,name=raw_policy,json=rawPolicy,proto3" json:"raw_policy,omitempty"` // marshal_type flags the format of policy_raw MarshalType types.PolicyMarshalingType `protobuf:"varint,4,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (m *PolicyRecord) Reset() { *m = PolicyRecord{} } func (m *PolicyRecord) String() string { return proto.CompactTextString(m) } func (*PolicyRecord) ProtoMessage() {} func (*PolicyRecord) Descriptor() ([]byte, []int) { return fileDescriptor_5977940639fee4f6, []int{1} } func (m *PolicyRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PolicyRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PolicyRecord.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 *PolicyRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_PolicyRecord.Merge(m, src) } func (m *PolicyRecord) XXX_Size() int { return m.Size() } func (m *PolicyRecord) XXX_DiscardUnknown() { xxx_messageInfo_PolicyRecord.DiscardUnknown(m) } var xxx_messageInfo_PolicyRecord proto.InternalMessageInfo func (m *PolicyRecord) GetPolicy() *types.Policy { if m != nil { return m.Policy } return nil } func (m *PolicyRecord) GetMetadata() *RecordMetadata { if m != nil { return m.Metadata } return nil } func (m *PolicyRecord) GetRawPolicy() string { if m != nil { return m.RawPolicy } return "" } func (m *PolicyRecord) GetMarshalType() types.PolicyMarshalingType { if m != nil { return m.MarshalType } return types.PolicyMarshalingType_UNKNOWN } type RelationshipRecord struct { PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Relationship *types.Relationship `protobuf:"bytes,2,opt,name=relationship,proto3" json:"relationship,omitempty"` Archived bool `protobuf:"varint,3,opt,name=archived,proto3" json:"archived,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *RelationshipRecord) Reset() { *m = RelationshipRecord{} } func (m *RelationshipRecord) String() string { return proto.CompactTextString(m) } func (*RelationshipRecord) ProtoMessage() {} func (*RelationshipRecord) Descriptor() ([]byte, []int) { return fileDescriptor_5977940639fee4f6, []int{2} } func (m *RelationshipRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RelationshipRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RelationshipRecord.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 *RelationshipRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_RelationshipRecord.Merge(m, src) } func (m *RelationshipRecord) XXX_Size() int { return m.Size() } func (m *RelationshipRecord) XXX_DiscardUnknown() { xxx_messageInfo_RelationshipRecord.DiscardUnknown(m) } var xxx_messageInfo_RelationshipRecord proto.InternalMessageInfo func (m *RelationshipRecord) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *RelationshipRecord) GetRelationship() *types.Relationship { if m != nil { return m.Relationship } return nil } func (m *RelationshipRecord) GetArchived() bool { if m != nil { return m.Archived } return false } func (m *RelationshipRecord) GetMetadata() *RecordMetadata { if m != nil { return m.Metadata } return nil } func init() { proto.RegisterType((*RecordMetadata)(nil), "sourcehub.acp.RecordMetadata") proto.RegisterType((*PolicyRecord)(nil), "sourcehub.acp.PolicyRecord") proto.RegisterType((*RelationshipRecord)(nil), "sourcehub.acp.RelationshipRecord") } func init() { proto.RegisterFile("sourcehub/acp/record.proto", fileDescriptor_5977940639fee4f6) } var fileDescriptor_5977940639fee4f6 = []byte{ // 522 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x8a, 0x13, 0x31, 0x18, 0x6e, 0x74, 0xa9, 0x6d, 0x5a, 0x17, 0x0c, 0xc2, 0x8e, 0x5d, 0x76, 0x2c, 0xd5, 0x43, 0x05, 0x99, 0x60, 0x05, 0x61, 0xaf, 0xe2, 0xa1, 0x1e, 0x16, 0x65, 0xec, 0xc9, 0x4b, 0x48, 0x33, 0x71, 0x26, 0xd8, 0x99, 0x0c, 0x49, 0xba, 0x6d, 0xdf, 0xc2, 0x27, 0xf0, 0x79, 0x3c, 0x2e, 0x9e, 0x3c, 0x4a, 0xfb, 0x04, 0xbe, 0x81, 0x4c, 0x92, 0xd6, 0x8d, 0xe0, 0xca, 0x5e, 0xda, 0xf9, 0xff, 0xef, 0xfb, 0x93, 0xef, 0xfb, 0x92, 0xc0, 0x81, 0x96, 0x4b, 0xc5, 0x78, 0xb1, 0x9c, 0x63, 0xca, 0x6a, 0xac, 0x38, 0x93, 0x2a, 0x4b, 0x6a, 0x25, 0x8d, 0x44, 0xf7, 0x0f, 0x58, 0x42, 0x59, 0x3d, 0x78, 0x40, 0x4b, 0x51, 0x49, 0x6c, 0x7f, 0x1d, 0x63, 0x70, 0xc2, 0xa4, 0x2e, 0xa5, 0xc6, 0xa5, 0xce, 0xf1, 0xe5, 0x8b, 0xe6, 0xcf, 0x03, 0x8f, 0x1c, 0x40, 0x6c, 0x85, 0x5d, 0xe1, 0xa1, 0x87, 0xb9, 0xcc, 0xa5, 0xeb, 0x37, 0x5f, 0xbe, 0xfb, 0x38, 0x97, 0x32, 0x5f, 0x70, 0x6c, 0xab, 0xf9, 0xf2, 0x13, 0x36, 0xa2, 0xe4, 0xda, 0xd0, 0xb2, 0xf6, 0x84, 0x27, 0xa1, 0x50, 0xca, 0x18, 0xd7, 0x9a, 0x64, 0x9c, 0x09, 0x2d, 0x64, 0xe5, 0x49, 0x51, 0x48, 0x6a, 0xd6, 0x08, 0xc7, 0x2b, 0x6e, 0x56, 0x52, 0x7d, 0x6e, 0x50, 0xc2, 0xa4, 0xe2, 0xb8, 0x96, 0x0b, 0xc1, 0x36, 0x9e, 0xf4, 0xec, 0x46, 0x12, 0xd1, 0x85, 0x54, 0xe6, 0x3f, 0x54, 0xc5, 0x17, 0xd4, 0x08, 0x59, 0xe9, 0x42, 0x78, 0xe5, 0xa3, 0xaf, 0x00, 0x1e, 0xa7, 0x36, 0xd7, 0x0b, 0x6e, 0x68, 0x46, 0x0d, 0x45, 0xe7, 0xb0, 0xc7, 0x14, 0xb7, 0x44, 0x62, 0x74, 0x04, 0x86, 0x60, 0xdc, 0x9b, 0x44, 0x49, 0x90, 0x77, 0x32, 0xdb, 0x27, 0x90, 0xc2, 0x3d, 0x79, 0xa6, 0xd1, 0x09, 0xbc, 0x67, 0xd6, 0xa4, 0xa0, 0xba, 0x88, 0xee, 0x0c, 0xc1, 0xb8, 0x9f, 0xb6, 0xcd, 0x7a, 0x4a, 0x75, 0x81, 0x4e, 0x61, 0xd7, 0xac, 0x89, 0x16, 0x79, 0xc5, 0x55, 0x74, 0x77, 0x08, 0xc6, 0xdd, 0xb4, 0x63, 0xd6, 0x1f, 0x6c, 0xdd, 0x80, 0x72, 0x55, 0x71, 0x45, 0x32, 0x91, 0x45, 0x47, 0x0e, 0xb4, 0x8d, 0x37, 0x22, 0x1b, 0xfd, 0x02, 0xb0, 0xff, 0xde, 0x5a, 0x74, 0x32, 0xd1, 0x2b, 0xd8, 0x76, 0x96, 0xbd, 0xb2, 0x38, 0x09, 0xdc, 0x26, 0x7b, 0xb7, 0x89, 0x9f, 0xf2, 0x6c, 0x74, 0x0e, 0x3b, 0xa5, 0xb7, 0x68, 0xc5, 0xf5, 0x26, 0x67, 0x7f, 0x79, 0x0a, 0x73, 0x48, 0x0f, 0x74, 0x74, 0x06, 0xa1, 0xa2, 0x2b, 0xe2, 0xb7, 0x75, 0xf2, 0xbb, 0x8a, 0xae, 0xdc, 0x0e, 0xe8, 0x1d, 0xec, 0x97, 0x54, 0xe9, 0x82, 0x2e, 0x88, 0xd9, 0xd4, 0xdc, 0x5a, 0x38, 0x9e, 0x3c, 0xbf, 0x59, 0xd7, 0x85, 0x9b, 0x10, 0x55, 0x3e, 0xdb, 0xd4, 0x3c, 0xed, 0xf9, 0x15, 0x9a, 0x62, 0xf4, 0x1d, 0x40, 0x94, 0x5e, 0x3b, 0x2b, 0xef, 0xfc, 0x14, 0x76, 0xfd, 0x61, 0x8b, 0xcc, 0x9a, 0xef, 0xa6, 0x1d, 0xd7, 0x78, 0x9b, 0xa1, 0x29, 0xec, 0x5f, 0x3f, 0x5e, 0x6f, 0xf1, 0xe9, 0xbf, 0x44, 0x04, 0xcb, 0x07, 0x93, 0x68, 0x00, 0x3b, 0x54, 0xb1, 0x42, 0x5c, 0xf2, 0xcc, 0x7a, 0xed, 0xa4, 0x87, 0x3a, 0x08, 0xf1, 0xe8, 0x56, 0x21, 0xbe, 0x9e, 0x7e, 0xdb, 0xc6, 0xe0, 0x6a, 0x1b, 0x83, 0x9f, 0xdb, 0x18, 0x7c, 0xd9, 0xc5, 0xad, 0xab, 0x5d, 0xdc, 0xfa, 0xb1, 0x8b, 0x5b, 0x1f, 0x93, 0x5c, 0x98, 0x66, 0x9c, 0xc9, 0x12, 0x87, 0x37, 0xf7, 0xcf, 0x8b, 0x59, 0xbb, 0x37, 0xb3, 0xa9, 0xb9, 0x9e, 0xb7, 0xed, 0xd5, 0x7d, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x16, 0xf1, 0xa1, 0x1f, 0x04, 0x00, 0x00, } func (m *RecordMetadata) 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 *RecordMetadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RecordMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.OwnerDid) > 0 { i -= len(m.OwnerDid) copy(dAtA[i:], m.OwnerDid) i = encodeVarintRecord(dAtA, i, uint64(len(m.OwnerDid))) i-- dAtA[i] = 0x22 } if len(m.TxSigner) > 0 { i -= len(m.TxSigner) copy(dAtA[i:], m.TxSigner) i = encodeVarintRecord(dAtA, i, uint64(len(m.TxSigner))) i-- dAtA[i] = 0x1a } if len(m.TxHash) > 0 { i -= len(m.TxHash) copy(dAtA[i:], m.TxHash) i = encodeVarintRecord(dAtA, i, uint64(len(m.TxHash))) i-- dAtA[i] = 0x12 } if m.CreationTs != nil { { size, err := m.CreationTs.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PolicyRecord) 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 *PolicyRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PolicyRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.MarshalType != 0 { i = encodeVarintRecord(dAtA, i, uint64(m.MarshalType)) i-- dAtA[i] = 0x20 } if len(m.RawPolicy) > 0 { i -= len(m.RawPolicy) copy(dAtA[i:], m.RawPolicy) i = encodeVarintRecord(dAtA, i, uint64(len(m.RawPolicy))) i-- dAtA[i] = 0x1a } if m.Metadata != nil { { size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.Policy != nil { { size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *RelationshipRecord) 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 *RelationshipRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RelationshipRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Metadata != nil { { size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } if m.Archived { i-- if m.Archived { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x18 } if m.Relationship != nil { { size, err := m.Relationship.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintRecord(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintRecord(dAtA []byte, offset int, v uint64) int { offset -= sovRecord(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *RecordMetadata) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.CreationTs != nil { l = m.CreationTs.Size() n += 1 + l + sovRecord(uint64(l)) } l = len(m.TxHash) if l > 0 { n += 1 + l + sovRecord(uint64(l)) } l = len(m.TxSigner) if l > 0 { n += 1 + l + sovRecord(uint64(l)) } l = len(m.OwnerDid) if l > 0 { n += 1 + l + sovRecord(uint64(l)) } return n } func (m *PolicyRecord) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Policy != nil { l = m.Policy.Size() n += 1 + l + sovRecord(uint64(l)) } if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovRecord(uint64(l)) } l = len(m.RawPolicy) if l > 0 { n += 1 + l + sovRecord(uint64(l)) } if m.MarshalType != 0 { n += 1 + sovRecord(uint64(m.MarshalType)) } return n } func (m *RelationshipRecord) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PolicyId) if l > 0 { n += 1 + l + sovRecord(uint64(l)) } if m.Relationship != nil { l = m.Relationship.Size() n += 1 + l + sovRecord(uint64(l)) } if m.Archived { n += 2 } if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovRecord(uint64(l)) } return n } func sovRecord(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozRecord(x uint64) (n int) { return sovRecord(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *RecordMetadata) 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 ErrIntOverflowRecord } 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: RecordMetadata: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RecordMetadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreationTs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } if m.CreationTs == nil { m.CreationTs = &Timestamp{} } if err := m.CreationTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthRecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } m.TxHash = append(m.TxHash[:0], dAtA[iNdEx:postIndex]...) if m.TxHash == nil { m.TxHash = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TxSigner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } 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 ErrInvalidLengthRecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } m.TxSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } 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 ErrInvalidLengthRecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } m.OwnerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PolicyRecord) 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 ErrIntOverflowRecord } 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: PolicyRecord: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PolicyRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } if m.Policy == nil { m.Policy = &types.Policy{} } if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } if m.Metadata == nil { m.Metadata = &RecordMetadata{} } if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RawPolicy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } 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 ErrInvalidLengthRecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } m.RawPolicy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } m.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipRecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RelationshipRecord) 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 ErrIntOverflowRecord } 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: RelationshipRecord: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RelationshipRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } 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 ErrInvalidLengthRecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } if m.Relationship == nil { m.Relationship = &types.Relationship{} } if err := m.Relationship.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Archived", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Archived = bool(v != 0) case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRecord } if postIndex > l { return io.ErrUnexpectedEOF } if m.Metadata == nil { m.Metadata = &RecordMetadata{} } if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipRecord(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, ErrIntOverflowRecord } 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, ErrIntOverflowRecord } 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, ErrIntOverflowRecord } 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, ErrInvalidLengthRecord } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupRecord } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthRecord } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupRecord = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/registration.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/registration.proto package types import ( fmt "fmt" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" types "github.com/sourcenetwork/acp_core/pkg/types" 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 // AmendmentEvent is a record which tracks executions of the Registration Amendment rule in SourceHub ACP type AmendmentEvent struct { // event id Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // id of affected policy PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` // object whose registration was amended Object *types.Object `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"` // new_owner is the new object owner NewOwner *types.Actor `protobuf:"bytes,4,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` // previous_owner is the previous object owner PreviousOwner *types.Actor `protobuf:"bytes,5,opt,name=previous_owner,json=previousOwner,proto3" json:"previous_owner,omitempty"` // commitment_id is the id of the commitment which generated the amendment CommitmentId uint64 `protobuf:"varint,6,opt,name=commitment_id,json=commitmentId,proto3" json:"commitment_id,omitempty"` // hijack_flag is true if the amendment rule was executed and the new_owner chose to flag // the previous_owner as a potential object hijacker HijackFlag bool `protobuf:"varint,7,opt,name=hijack_flag,json=hijackFlag,proto3" json:"hijack_flag,omitempty"` Metadata *RecordMetadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *AmendmentEvent) Reset() { *m = AmendmentEvent{} } func (m *AmendmentEvent) String() string { return proto.CompactTextString(m) } func (*AmendmentEvent) ProtoMessage() {} func (*AmendmentEvent) Descriptor() ([]byte, []int) { return fileDescriptor_1356cd7eda5c526d, []int{0} } func (m *AmendmentEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AmendmentEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AmendmentEvent.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 *AmendmentEvent) XXX_Merge(src proto.Message) { xxx_messageInfo_AmendmentEvent.Merge(m, src) } func (m *AmendmentEvent) XXX_Size() int { return m.Size() } func (m *AmendmentEvent) XXX_DiscardUnknown() { xxx_messageInfo_AmendmentEvent.DiscardUnknown(m) } var xxx_messageInfo_AmendmentEvent proto.InternalMessageInfo func (m *AmendmentEvent) GetId() uint64 { if m != nil { return m.Id } return 0 } func (m *AmendmentEvent) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *AmendmentEvent) GetObject() *types.Object { if m != nil { return m.Object } return nil } func (m *AmendmentEvent) GetNewOwner() *types.Actor { if m != nil { return m.NewOwner } return nil } func (m *AmendmentEvent) GetPreviousOwner() *types.Actor { if m != nil { return m.PreviousOwner } return nil } func (m *AmendmentEvent) GetCommitmentId() uint64 { if m != nil { return m.CommitmentId } return 0 } func (m *AmendmentEvent) GetHijackFlag() bool { if m != nil { return m.HijackFlag } return false } func (m *AmendmentEvent) GetMetadata() *RecordMetadata { if m != nil { return m.Metadata } return nil } func init() { proto.RegisterType((*AmendmentEvent)(nil), "sourcehub.acp.AmendmentEvent") } func init() { proto.RegisterFile("sourcehub/acp/registration.proto", fileDescriptor_1356cd7eda5c526d) } var fileDescriptor_1356cd7eda5c526d = []byte{ // 397 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3f, 0x6f, 0xd4, 0x40, 0x10, 0xc5, 0x6f, 0x8f, 0x70, 0xf8, 0x36, 0xdc, 0x15, 0x5b, 0x59, 0x87, 0x70, 0x2c, 0x68, 0x4c, 0x63, 0x4b, 0x20, 0x21, 0x41, 0x17, 0x04, 0x88, 0x14, 0x28, 0x92, 0x4b, 0x1a, 0x6b, 0xbd, 0x3b, 0xf1, 0x6d, 0xe2, 0xdd, 0xb1, 0xd6, 0xeb, 0x98, 0x7c, 0x0b, 0x3e, 0x16, 0x65, 0x4a, 0x4a, 0x74, 0xf7, 0x25, 0x28, 0x91, 0xff, 0x24, 0x27, 0x23, 0x21, 0xa5, 0x9d, 0xf7, 0x7b, 0x6f, 0x66, 0xf4, 0x68, 0x58, 0x63, 0x63, 0x05, 0x6c, 0x9b, 0x3c, 0xe1, 0xa2, 0x4a, 0x2c, 0x14, 0xaa, 0x76, 0x96, 0x3b, 0x85, 0x26, 0xae, 0x2c, 0x3a, 0x64, 0xab, 0x7b, 0x22, 0xe6, 0xa2, 0xda, 0x9c, 0x14, 0x88, 0x45, 0x09, 0x49, 0x2f, 0xe6, 0xcd, 0x45, 0xe2, 0x94, 0x86, 0xda, 0x71, 0x5d, 0x0d, 0xfc, 0x66, 0xf3, 0x6f, 0xa2, 0x40, 0x2b, 0x47, 0xcd, 0x9f, 0x6a, 0x9d, 0x75, 0x54, 0x5e, 0x0d, 0x8a, 0x01, 0xd7, 0xa2, 0xbd, 0xea, 0xd4, 0x4c, 0xa0, 0x85, 0xc4, 0x42, 0xd9, 0x1f, 0x53, 0x6f, 0xd5, 0xb8, 0xe0, 0xc5, 0x9f, 0x39, 0x5d, 0x9f, 0x6a, 0x30, 0x52, 0x83, 0x71, 0x9f, 0xae, 0xc1, 0x38, 0xb6, 0xa6, 0x73, 0x25, 0x7d, 0x12, 0x92, 0xe8, 0x28, 0x9d, 0x2b, 0xc9, 0x9e, 0xd1, 0x65, 0x85, 0xa5, 0x12, 0x37, 0x99, 0x92, 0xfe, 0x3c, 0x24, 0xd1, 0x32, 0xf5, 0x86, 0xc1, 0x99, 0x64, 0x6f, 0xe9, 0x02, 0xf3, 0x4b, 0x10, 0xce, 0x7f, 0x14, 0x92, 0xe8, 0xf8, 0x75, 0x10, 0x4f, 0x76, 0xc7, 0x77, 0xbb, 0xe3, 0xf3, 0x9e, 0x4a, 0x47, 0x9a, 0xbd, 0xa7, 0x4b, 0x03, 0x6d, 0x86, 0xad, 0x01, 0xeb, 0x1f, 0xf5, 0xd6, 0xe7, 0xff, 0xb3, 0x9e, 0x0a, 0x87, 0x36, 0xf5, 0x0c, 0xb4, 0xe7, 0x1d, 0xce, 0x3e, 0xd2, 0x75, 0x65, 0xe1, 0x5a, 0x61, 0x53, 0x8f, 0x01, 0x8f, 0x1f, 0x12, 0xb0, 0xba, 0x33, 0x0d, 0x29, 0x2f, 0xe9, 0x4a, 0xa0, 0xd6, 0xca, 0x75, 0x9f, 0x77, 0xaf, 0x2d, 0xfa, 0x8f, 0x9f, 0x1e, 0x86, 0x67, 0x92, 0x9d, 0xd0, 0xe3, 0xad, 0xba, 0xe4, 0xe2, 0x2a, 0xbb, 0x28, 0x79, 0xe1, 0x3f, 0x09, 0x49, 0xe4, 0xa5, 0x74, 0x18, 0x7d, 0x2e, 0x79, 0xc1, 0xde, 0x51, 0x4f, 0x83, 0xe3, 0x92, 0x3b, 0xee, 0x7b, 0x93, 0x2b, 0xc6, 0x8e, 0xe3, 0xb4, 0xef, 0xec, 0xeb, 0x08, 0xa5, 0xf7, 0xf8, 0x87, 0x2f, 0x3f, 0x77, 0x01, 0xb9, 0xdd, 0x05, 0xe4, 0xf7, 0x2e, 0x20, 0x3f, 0xf6, 0xc1, 0xec, 0x76, 0x1f, 0xcc, 0x7e, 0xed, 0x83, 0xd9, 0xb7, 0xb8, 0x50, 0xae, 0xb3, 0x0b, 0xd4, 0xc9, 0xb4, 0xca, 0x43, 0xe5, 0xdf, 0x87, 0xd2, 0x6f, 0x2a, 0xa8, 0xf3, 0x45, 0xdf, 0xe5, 0x9b, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x31, 0x44, 0x1c, 0x59, 0x80, 0x02, 0x00, 0x00, } func (m *AmendmentEvent) 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 *AmendmentEvent) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *AmendmentEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Metadata != nil { { size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRegistration(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 } if m.HijackFlag { i-- if m.HijackFlag { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x38 } if m.CommitmentId != 0 { i = encodeVarintRegistration(dAtA, i, uint64(m.CommitmentId)) i-- dAtA[i] = 0x30 } if m.PreviousOwner != nil { { size, err := m.PreviousOwner.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRegistration(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } if m.NewOwner != nil { { size, err := m.NewOwner.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRegistration(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } if m.Object != nil { { size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintRegistration(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintRegistration(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0x12 } if m.Id != 0 { i = encodeVarintRegistration(dAtA, i, uint64(m.Id)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintRegistration(dAtA []byte, offset int, v uint64) int { offset -= sovRegistration(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *AmendmentEvent) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { n += 1 + sovRegistration(uint64(m.Id)) } l = len(m.PolicyId) if l > 0 { n += 1 + l + sovRegistration(uint64(l)) } if m.Object != nil { l = m.Object.Size() n += 1 + l + sovRegistration(uint64(l)) } if m.NewOwner != nil { l = m.NewOwner.Size() n += 1 + l + sovRegistration(uint64(l)) } if m.PreviousOwner != nil { l = m.PreviousOwner.Size() n += 1 + l + sovRegistration(uint64(l)) } if m.CommitmentId != 0 { n += 1 + sovRegistration(uint64(m.CommitmentId)) } if m.HijackFlag { n += 2 } if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovRegistration(uint64(l)) } return n } func sovRegistration(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozRegistration(x uint64) (n int) { return sovRegistration(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *AmendmentEvent) 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 ErrIntOverflowRegistration } 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: AmendmentEvent: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: AmendmentEvent: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } 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 ErrInvalidLengthRegistration } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegistration } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRegistration } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegistration } if postIndex > l { return io.ErrUnexpectedEOF } if m.Object == nil { m.Object = &types.Object{} } if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRegistration } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegistration } if postIndex > l { return io.ErrUnexpectedEOF } if m.NewOwner == nil { m.NewOwner = &types.Actor{} } if err := m.NewOwner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PreviousOwner", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRegistration } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegistration } if postIndex > l { return io.ErrUnexpectedEOF } if m.PreviousOwner == nil { m.PreviousOwner = &types.Actor{} } if err := m.PreviousOwner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CommitmentId", wireType) } m.CommitmentId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CommitmentId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HijackFlag", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.HijackFlag = bool(v != 0) case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistration } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRegistration } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegistration } if postIndex > l { return io.ErrUnexpectedEOF } if m.Metadata == nil { m.Metadata = &RecordMetadata{} } if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRegistration(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRegistration } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipRegistration(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, ErrIntOverflowRegistration } 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, ErrIntOverflowRegistration } 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, ErrIntOverflowRegistration } 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, ErrInvalidLengthRegistration } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupRegistration } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthRegistration } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthRegistration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRegistration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupRegistration = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/signed_policy_cmd.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/signed_policy_cmd.proto package types import ( fmt "fmt" proto "github.com/cosmos/gogoproto/proto" types "github.com/cosmos/gogoproto/types" _ "github.com/sourcenetwork/acp_core/pkg/types" 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 // SignedPolicyCmd represents a Command issued by an Actor in the context of a Policy // The command represents an instruction to be executed // The message type contains a signature which is used to authenticate the Command's Actor type SignedPolicyCmd struct { // payload contains the command context Payload *SignedPolicyCmdPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // signature is a signature of the payload. // The signature is generated using the VerificationMethod / Authorization fields // specificied by the DID document of the Actor. Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *SignedPolicyCmd) Reset() { *m = SignedPolicyCmd{} } func (m *SignedPolicyCmd) String() string { return proto.CompactTextString(m) } func (*SignedPolicyCmd) ProtoMessage() {} func (*SignedPolicyCmd) Descriptor() ([]byte, []int) { return fileDescriptor_8eb2671203f09829, []int{0} } func (m *SignedPolicyCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SignedPolicyCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SignedPolicyCmd.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 *SignedPolicyCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_SignedPolicyCmd.Merge(m, src) } func (m *SignedPolicyCmd) XXX_Size() int { return m.Size() } func (m *SignedPolicyCmd) XXX_DiscardUnknown() { xxx_messageInfo_SignedPolicyCmd.DiscardUnknown(m) } var xxx_messageInfo_SignedPolicyCmd proto.InternalMessageInfo func (m *SignedPolicyCmd) GetPayload() *SignedPolicyCmdPayload { if m != nil { return m.Payload } return nil } func (m *SignedPolicyCmd) GetSignature() []byte { if m != nil { return m.Signature } return nil } // SignedPolicyCmdPayload represents the payload containing the context of the issued command type SignedPolicyCmdPayload struct { // actor is a did string representing the actor which issued the command Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` // issued_height is the SourceHub block height of when the Payload was created IssuedHeight uint64 `protobuf:"varint,2,opt,name=issued_height,json=issuedHeight,proto3" json:"issued_height,omitempty"` // issued_at contains a client generated timestamp for the creation of the command. // This is used only as metadata and isn't trusted IssuedAt *types.Timestamp `protobuf:"bytes,3,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"` // expiration_delta specifies the maximum number of blocks from the issued height during which the Command Payload will be accepted. // This field is mandatory and is used to prevent replay attacks ExpirationDelta uint64 `protobuf:"varint,4,opt,name=expiration_delta,json=expirationDelta,proto3" json:"expiration_delta,omitempty"` // policy_id is the ID of the policy under which the Command will be executed PolicyId string `protobuf:"bytes,5,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Cmd *PolicyCmd `protobuf:"bytes,6,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (m *SignedPolicyCmdPayload) Reset() { *m = SignedPolicyCmdPayload{} } func (m *SignedPolicyCmdPayload) String() string { return proto.CompactTextString(m) } func (*SignedPolicyCmdPayload) ProtoMessage() {} func (*SignedPolicyCmdPayload) Descriptor() ([]byte, []int) { return fileDescriptor_8eb2671203f09829, []int{1} } func (m *SignedPolicyCmdPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SignedPolicyCmdPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SignedPolicyCmdPayload.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 *SignedPolicyCmdPayload) XXX_Merge(src proto.Message) { xxx_messageInfo_SignedPolicyCmdPayload.Merge(m, src) } func (m *SignedPolicyCmdPayload) XXX_Size() int { return m.Size() } func (m *SignedPolicyCmdPayload) XXX_DiscardUnknown() { xxx_messageInfo_SignedPolicyCmdPayload.DiscardUnknown(m) } var xxx_messageInfo_SignedPolicyCmdPayload proto.InternalMessageInfo func (m *SignedPolicyCmdPayload) GetActor() string { if m != nil { return m.Actor } return "" } func (m *SignedPolicyCmdPayload) GetIssuedHeight() uint64 { if m != nil { return m.IssuedHeight } return 0 } func (m *SignedPolicyCmdPayload) GetIssuedAt() *types.Timestamp { if m != nil { return m.IssuedAt } return nil } func (m *SignedPolicyCmdPayload) GetExpirationDelta() uint64 { if m != nil { return m.ExpirationDelta } return 0 } func (m *SignedPolicyCmdPayload) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *SignedPolicyCmdPayload) GetCmd() *PolicyCmd { if m != nil { return m.Cmd } return nil } func init() { proto.RegisterType((*SignedPolicyCmd)(nil), "sourcehub.acp.SignedPolicyCmd") proto.RegisterType((*SignedPolicyCmdPayload)(nil), "sourcehub.acp.SignedPolicyCmdPayload") } func init() { proto.RegisterFile("sourcehub/acp/signed_policy_cmd.proto", fileDescriptor_8eb2671203f09829) } var fileDescriptor_8eb2671203f09829 = []byte{ // 409 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x3d, 0x6f, 0xd4, 0x30, 0x1c, 0xc6, 0x2f, 0x7d, 0xa3, 0x67, 0x5a, 0x15, 0x59, 0x08, 0x45, 0x01, 0x85, 0x53, 0x51, 0xa5, 0x96, 0xc1, 0x91, 0x60, 0x60, 0x44, 0xbc, 0x0c, 0x65, 0xab, 0x02, 0x13, 0x4b, 0xe4, 0xb3, 0x4d, 0x62, 0x11, 0xc7, 0x96, 0xfd, 0x8f, 0xe8, 0x6d, 0x7c, 0x04, 0x3e, 0x16, 0x63, 0x47, 0x46, 0x74, 0xf7, 0x45, 0xaa, 0xd8, 0x49, 0x4f, 0x89, 0x6e, 0xf4, 0xf3, 0xfc, 0xfc, 0x7f, 0x7b, 0xd0, 0x85, 0xd3, 0xad, 0x65, 0xa2, 0x6a, 0x97, 0x19, 0x65, 0x26, 0x73, 0xb2, 0x6c, 0x04, 0x2f, 0x8c, 0xae, 0x25, 0x5b, 0x15, 0x4c, 0x71, 0x62, 0xac, 0x06, 0x8d, 0x4f, 0x1f, 0x30, 0x42, 0x99, 0x49, 0x5e, 0x96, 0x5a, 0x97, 0xb5, 0xc8, 0xbc, 0xb9, 0x6c, 0x7f, 0x64, 0x20, 0x95, 0x70, 0x40, 0x95, 0x09, 0x7c, 0x92, 0x8e, 0xcb, 0x32, 0xad, 0x94, 0x04, 0x25, 0x1a, 0xd8, 0xed, 0x4f, 0xfb, 0x25, 0xc9, 0xd8, 0xb7, 0x82, 0x69, 0x3b, 0x78, 0x8b, 0xa9, 0x57, 0x4a, 0x07, 0x96, 0x82, 0xd4, 0x4d, 0x4f, 0x5c, 0x05, 0xa2, 0x11, 0xf0, 0x4b, 0xdb, 0x9f, 0x1d, 0x55, 0x30, 0x6d, 0x45, 0x66, 0x45, 0xed, 0x31, 0x57, 0xc9, 0x7e, 0xd0, 0x73, 0x83, 0xce, 0xbe, 0xfa, 0x9d, 0x6f, 0xfc, 0x08, 0x9f, 0x14, 0xc7, 0xef, 0xd1, 0x23, 0x43, 0x57, 0xb5, 0xa6, 0x3c, 0x8e, 0x16, 0xd1, 0xe5, 0xe3, 0x37, 0x17, 0x64, 0xb4, 0x3d, 0x99, 0x7c, 0xb8, 0x09, 0x70, 0x3e, 0xfc, 0xc2, 0x2f, 0xd0, 0xbc, 0xbb, 0x23, 0x85, 0xd6, 0x8a, 0x78, 0x6f, 0x11, 0x5d, 0x9e, 0xe4, 0x5b, 0xe1, 0xfc, 0xf7, 0x1e, 0x7a, 0xb6, 0xbb, 0x02, 0x7e, 0x8a, 0x0e, 0x29, 0x03, 0x6d, 0x7d, 0xdf, 0x79, 0x1e, 0x1e, 0xf8, 0x15, 0x3a, 0x95, 0xce, 0xb5, 0x82, 0x17, 0x95, 0x90, 0x65, 0x05, 0xbe, 0xe4, 0x41, 0x7e, 0x12, 0xc4, 0x6b, 0xaf, 0xe1, 0x77, 0x68, 0xde, 0x43, 0x14, 0xe2, 0x7d, 0x3f, 0x76, 0x42, 0x42, 0x4a, 0x64, 0x48, 0x89, 0x7c, 0x1b, 0x52, 0xca, 0x8f, 0x03, 0xfc, 0x01, 0xf0, 0x15, 0x7a, 0x22, 0x6e, 0x8d, 0x0c, 0xf7, 0x2b, 0xb8, 0xa8, 0x81, 0xc6, 0x07, 0xbe, 0xc1, 0xd9, 0x56, 0xff, 0xdc, 0xc9, 0xf8, 0x39, 0x9a, 0xf7, 0x41, 0x49, 0x1e, 0x1f, 0xfa, 0x11, 0x8f, 0x83, 0xf0, 0x85, 0xe3, 0xd7, 0x68, 0x9f, 0x29, 0x1e, 0x1f, 0xf9, 0xd6, 0xf1, 0xe4, 0x62, 0x0f, 0x9b, 0xe6, 0x1d, 0xf4, 0xf1, 0xfa, 0xef, 0x3a, 0x8d, 0xee, 0xd6, 0x69, 0xf4, 0x7f, 0x9d, 0x46, 0x7f, 0x36, 0xe9, 0xec, 0x6e, 0x93, 0xce, 0xfe, 0x6d, 0xd2, 0xd9, 0x77, 0x52, 0x4a, 0xe8, 0x3e, 0x31, 0xad, 0xb2, 0x71, 0x88, 0xdb, 0xd0, 0x6f, 0x7d, 0xec, 0xb0, 0x32, 0xc2, 0x2d, 0x8f, 0xfc, 0x6e, 0x6f, 0xef, 0x03, 0x00, 0x00, 0xff, 0xff, 0x10, 0x6d, 0x0f, 0xb3, 0xc7, 0x02, 0x00, 0x00, } func (m *SignedPolicyCmd) 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 *SignedPolicyCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SignedPolicyCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(len(m.Signature))) i-- dAtA[i] = 0x12 } if m.Payload != nil { { size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *SignedPolicyCmdPayload) 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 *SignedPolicyCmdPayload) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SignedPolicyCmdPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Cmd != nil { { size, err := m.Cmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0x2a } if m.ExpirationDelta != 0 { i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(m.ExpirationDelta)) i-- dAtA[i] = 0x20 } if m.IssuedAt != nil { { size, err := m.IssuedAt.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.IssuedHeight != 0 { i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(m.IssuedHeight)) i-- dAtA[i] = 0x10 } if len(m.Actor) > 0 { i -= len(m.Actor) copy(dAtA[i:], m.Actor) i = encodeVarintSignedPolicyCmd(dAtA, i, uint64(len(m.Actor))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintSignedPolicyCmd(dAtA []byte, offset int, v uint64) int { offset -= sovSignedPolicyCmd(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *SignedPolicyCmd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Payload != nil { l = m.Payload.Size() n += 1 + l + sovSignedPolicyCmd(uint64(l)) } l = len(m.Signature) if l > 0 { n += 1 + l + sovSignedPolicyCmd(uint64(l)) } return n } func (m *SignedPolicyCmdPayload) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Actor) if l > 0 { n += 1 + l + sovSignedPolicyCmd(uint64(l)) } if m.IssuedHeight != 0 { n += 1 + sovSignedPolicyCmd(uint64(m.IssuedHeight)) } if m.IssuedAt != nil { l = m.IssuedAt.Size() n += 1 + l + sovSignedPolicyCmd(uint64(l)) } if m.ExpirationDelta != 0 { n += 1 + sovSignedPolicyCmd(uint64(m.ExpirationDelta)) } l = len(m.PolicyId) if l > 0 { n += 1 + l + sovSignedPolicyCmd(uint64(l)) } if m.Cmd != nil { l = m.Cmd.Size() n += 1 + l + sovSignedPolicyCmd(uint64(l)) } return n } func sovSignedPolicyCmd(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozSignedPolicyCmd(x uint64) (n int) { return sovSignedPolicyCmd(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *SignedPolicyCmd) 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 ErrIntOverflowSignedPolicyCmd } 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: SignedPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SignedPolicyCmd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSignedPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSignedPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Payload == nil { m.Payload = &SignedPolicyCmdPayload{} } if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthSignedPolicyCmd } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthSignedPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSignedPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSignedPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SignedPolicyCmdPayload) 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 ErrIntOverflowSignedPolicyCmd } 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: SignedPolicyCmdPayload: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SignedPolicyCmdPayload: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } 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 ErrInvalidLengthSignedPolicyCmd } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSignedPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } m.Actor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IssuedHeight", wireType) } m.IssuedHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.IssuedHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IssuedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSignedPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSignedPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.IssuedAt == nil { m.IssuedAt = &types.Timestamp{} } if err := m.IssuedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExpirationDelta", wireType) } m.ExpirationDelta = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ExpirationDelta |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } 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 ErrInvalidLengthSignedPolicyCmd } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSignedPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSignedPolicyCmd } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSignedPolicyCmd } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSignedPolicyCmd } if postIndex > l { return io.ErrUnexpectedEOF } if m.Cmd == nil { m.Cmd = &PolicyCmd{} } if err := m.Cmd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSignedPolicyCmd(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSignedPolicyCmd } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipSignedPolicyCmd(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, ErrIntOverflowSignedPolicyCmd } 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, ErrIntOverflowSignedPolicyCmd } 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, ErrIntOverflowSignedPolicyCmd } 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, ErrInvalidLengthSignedPolicyCmd } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupSignedPolicyCmd } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthSignedPolicyCmd } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthSignedPolicyCmd = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSignedPolicyCmd = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSignedPolicyCmd = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/time.go ================================================ package types import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" prototypes "github.com/cosmos/gogoproto/types" ) // NewBlockCountDuration returns a Duration object // based on number of blocks func NewBlockCountDuration(blocks uint64) *Duration { return &Duration{ Duration: &Duration_BlockCount{ BlockCount: blocks, }, } } // NewDurationFromTimeDuration returns a new Duration object // based on wall time func NewDurationFromTimeDuration(duration time.Duration) *Duration { return &Duration{ Duration: &Duration_ProtoDuration{ ProtoDuration: prototypes.DurationProto(duration), }, } } // ToISOString returns an ISO8601 timestamp func (ts *Timestamp) ToISOString() (string, error) { t, err := prototypes.TimestampFromProto(ts.ProtoTs) if err != nil { return "", err } return t.Format(time.RFC3339), nil } // IsAfter returns whether now is after ts + duration func (ts *Timestamp) IsAfter(duration *Duration, now *Timestamp) (bool, error) { switch d := duration.Duration.(type) { case *Duration_BlockCount: return ts.BlockHeight+d.BlockCount < now.BlockHeight, nil case *Duration_ProtoDuration: goTs, err := prototypes.TimestampFromProto(ts.ProtoTs) if err != nil { return false, err } goNow, err := prototypes.TimestampFromProto(now.ProtoTs) if err != nil { return false, err } goDuration, err := prototypes.DurationFromProto(d.ProtoDuration) if err != nil { return false, err } return goNow.After(goTs.Add(goDuration)), nil default: panic("invalid duration") } } // TimestampFromCtx returns a new Timestamp // from a Cosmos Ctx func TimestampFromCtx(ctx sdk.Context) (*Timestamp, error) { ts, err := prototypes.TimestampProto(ctx.BlockTime()) if err != nil { return nil, err } return NewTimestamp(ts, uint64(ctx.BlockHeight())), nil } // NewTimestamp returns a Timestamp from a protobuff timestamp and block height func NewTimestamp(time *prototypes.Timestamp, height uint64) *Timestamp { return &Timestamp{ BlockHeight: height, ProtoTs: time, } } ================================================ FILE: x/acp/types/time.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/time.proto package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" proto "github.com/cosmos/gogoproto/proto" types "github.com/cosmos/gogoproto/types" 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 // Duration models a time interval expressed either as a wallclock // Duration interval or a number of blocks type Duration struct { // Types that are valid to be assigned to Duration: // *Duration_ProtoDuration // *Duration_BlockCount Duration isDuration_Duration `protobuf_oneof:"duration"` } func (m *Duration) Reset() { *m = Duration{} } func (m *Duration) String() string { return proto.CompactTextString(m) } func (*Duration) ProtoMessage() {} func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor_1a759fd028b3acfe, []int{0} } func (m *Duration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Duration.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 *Duration) XXX_Merge(src proto.Message) { xxx_messageInfo_Duration.Merge(m, src) } func (m *Duration) XXX_Size() int { return m.Size() } func (m *Duration) XXX_DiscardUnknown() { xxx_messageInfo_Duration.DiscardUnknown(m) } var xxx_messageInfo_Duration proto.InternalMessageInfo type isDuration_Duration interface { isDuration_Duration() MarshalTo([]byte) (int, error) Size() int } type Duration_ProtoDuration struct { ProtoDuration *types.Duration `protobuf:"bytes,1,opt,name=proto_duration,json=protoDuration,proto3,oneof" json:"proto_duration,omitempty"` } type Duration_BlockCount struct { BlockCount uint64 `protobuf:"varint,2,opt,name=block_count,json=blockCount,proto3,oneof" json:"block_count,omitempty"` } func (*Duration_ProtoDuration) isDuration_Duration() {} func (*Duration_BlockCount) isDuration_Duration() {} func (m *Duration) GetDuration() isDuration_Duration { if m != nil { return m.Duration } return nil } func (m *Duration) GetProtoDuration() *types.Duration { if x, ok := m.GetDuration().(*Duration_ProtoDuration); ok { return x.ProtoDuration } return nil } func (m *Duration) GetBlockCount() uint64 { if x, ok := m.GetDuration().(*Duration_BlockCount); ok { return x.BlockCount } return 0 } // XXX_OneofWrappers is for the internal use of the proto package. func (*Duration) XXX_OneofWrappers() []interface{} { return []interface{}{ (*Duration_ProtoDuration)(nil), (*Duration_BlockCount)(nil), } } // Timestamp models an instant in time expressed as a wallclock // Timestamp and a block height type Timestamp struct { ProtoTs *types.Timestamp `protobuf:"bytes,1,opt,name=proto_ts,json=protoTs,proto3" json:"proto_ts,omitempty"` BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` } func (m *Timestamp) Reset() { *m = Timestamp{} } func (m *Timestamp) String() string { return proto.CompactTextString(m) } func (*Timestamp) ProtoMessage() {} func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor_1a759fd028b3acfe, []int{1} } func (m *Timestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Timestamp.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 *Timestamp) XXX_Merge(src proto.Message) { xxx_messageInfo_Timestamp.Merge(m, src) } func (m *Timestamp) XXX_Size() int { return m.Size() } func (m *Timestamp) XXX_DiscardUnknown() { xxx_messageInfo_Timestamp.DiscardUnknown(m) } var xxx_messageInfo_Timestamp proto.InternalMessageInfo func (m *Timestamp) GetProtoTs() *types.Timestamp { if m != nil { return m.ProtoTs } return nil } func (m *Timestamp) GetBlockHeight() uint64 { if m != nil { return m.BlockHeight } return 0 } func init() { proto.RegisterType((*Duration)(nil), "sourcehub.acp.Duration") proto.RegisterType((*Timestamp)(nil), "sourcehub.acp.Timestamp") } func init() { proto.RegisterFile("sourcehub/acp/time.proto", fileDescriptor_1a759fd028b3acfe) } var fileDescriptor_1a759fd028b3acfe = []byte{ // 310 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x4f, 0x4c, 0x2e, 0xd0, 0x2f, 0xc9, 0xcc, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x85, 0xcb, 0xe8, 0x25, 0x26, 0x17, 0x48, 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x0a, 0x29, 0xb9, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x7d, 0x30, 0x2f, 0xa9, 0x34, 0x4d, 0x3f, 0xa5, 0xb4, 0x28, 0xb1, 0x24, 0x33, 0x3f, 0x0f, 0x2a, 0x2f, 0x8f, 0x2e, 0x0f, 0x32, 0xbd, 0xb8, 0x24, 0x31, 0xb7, 0x00, 0xa2, 0x40, 0x69, 0x09, 0x23, 0x17, 0x87, 0x0b, 0x54, 0x8f, 0x50, 0x38, 0x17, 0x1f, 0x58, 0x34, 0x1e, 0x66, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xa4, 0x1e, 0xc4, 0x18, 0x3d, 0x98, 0x31, 0x7a, 0x30, 0x2d, 0x4e, 0xc2, 0x9b, 0x9e, 0x6f, 0xd0, 0x42, 0xd3, 0xe5, 0xc1, 0x10, 0xc4, 0x0b, 0x16, 0x81, 0x1b, 0x6c, 0xcc, 0xc5, 0x9d, 0x94, 0x93, 0x9f, 0x9c, 0x1d, 0x9f, 0x9c, 0x5f, 0x9a, 0x57, 0x22, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe2, 0x24, 0x00, 0xd2, 0x8a, 0x2c, 0xee, 0xc1, 0x10, 0xc4, 0x05, 0xe6, 0x3a, 0x83, 0x78, 0x4e, 0x5c, 0x5c, 0x1c, 0x30, 0x13, 0x95, 0x52, 0xb9, 0x38, 0x43, 0x60, 0x2e, 0x17, 0x32, 0xe5, 0xe2, 0x80, 0x58, 0x58, 0x52, 0x0c, 0x75, 0xa0, 0x14, 0x86, 0x03, 0xe1, 0xaa, 0x83, 0xd8, 0xc1, 0x62, 0x21, 0xc5, 0x42, 0x8a, 0x5c, 0x3c, 0x10, 0xcb, 0x32, 0x52, 0x33, 0xd3, 0x33, 0xa0, 0xae, 0x08, 0x82, 0x38, 0xc0, 0x03, 0x2c, 0xe4, 0xe4, 0x71, 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, 0x7a, 0xe9, 0x99, 0x25, 0xa0, 0x78, 0x48, 0xce, 0xcf, 0xd5, 0x87, 0xc4, 0x4a, 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0xb6, 0x3e, 0x22, 0xf6, 0x2a, 0x20, 0xf1, 0x57, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xb6, 0xd5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xe9, 0xd1, 0x91, 0xdd, 0x01, 0x00, 0x00, } func (m *Duration) 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 *Duration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Duration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Duration != nil { { size := m.Duration.Size() i -= size if _, err := m.Duration.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *Duration_ProtoDuration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Duration_ProtoDuration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.ProtoDuration != nil { { size, err := m.ProtoDuration.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTime(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Duration_BlockCount) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Duration_BlockCount) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) i = encodeVarintTime(dAtA, i, uint64(m.BlockCount)) i-- dAtA[i] = 0x10 return len(dAtA) - i, nil } func (m *Timestamp) 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 *Timestamp) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.BlockHeight != 0 { i = encodeVarintTime(dAtA, i, uint64(m.BlockHeight)) i-- dAtA[i] = 0x10 } if m.ProtoTs != nil { { size, err := m.ProtoTs.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTime(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintTime(dAtA []byte, offset int, v uint64) int { offset -= sovTime(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Duration) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Duration != nil { n += m.Duration.Size() } return n } func (m *Duration_ProtoDuration) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProtoDuration != nil { l = m.ProtoDuration.Size() n += 1 + l + sovTime(uint64(l)) } return n } func (m *Duration_BlockCount) Size() (n int) { if m == nil { return 0 } var l int _ = l n += 1 + sovTime(uint64(m.BlockCount)) return n } func (m *Timestamp) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProtoTs != nil { l = m.ProtoTs.Size() n += 1 + l + sovTime(uint64(l)) } if m.BlockHeight != 0 { n += 1 + sovTime(uint64(m.BlockHeight)) } return n } func sovTime(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozTime(x uint64) (n int) { return sovTime(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Duration) 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 ErrIntOverflowTime } 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: Duration: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtoDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTime } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTime } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTime } if postIndex > l { return io.ErrUnexpectedEOF } v := &types.Duration{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Duration = &Duration_ProtoDuration{v} iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockCount", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTime } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.Duration = &Duration_BlockCount{v} default: iNdEx = preIndex skippy, err := skipTime(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTime } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Timestamp) 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 ErrIntOverflowTime } 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: Timestamp: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtoTs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTime } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTime } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTime } if postIndex > l { return io.ErrUnexpectedEOF } if m.ProtoTs == nil { m.ProtoTs = &types.Timestamp{} } if err := m.ProtoTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTime } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.BlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTime(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTime } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipTime(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, ErrIntOverflowTime } 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, ErrIntOverflowTime } 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, ErrIntOverflowTime } 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, ErrInvalidLengthTime } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupTime } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthTime } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthTime = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTime = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTime = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/acp/types/tx.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/acp/tx.proto package types import ( context "context" fmt "fmt" _ "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" _ "github.com/cosmos/gogoproto/types" types "github.com/sourcenetwork/acp_core/pkg/types" 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. 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 MsgSignedPolicyCmd_ContentType int32 const ( MsgSignedPolicyCmd_UNKNOWN MsgSignedPolicyCmd_ContentType = 0 MsgSignedPolicyCmd_JWS MsgSignedPolicyCmd_ContentType = 1 ) var MsgSignedPolicyCmd_ContentType_name = map[int32]string{ 0: "UNKNOWN", 1: "JWS", } var MsgSignedPolicyCmd_ContentType_value = map[string]int32{ "UNKNOWN": 0, "JWS": 1, } func (x MsgSignedPolicyCmd_ContentType) String() string { return proto.EnumName(MsgSignedPolicyCmd_ContentType_name, int32(x)) } func (MsgSignedPolicyCmd_ContentType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{8, 0} } // 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"` // 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_5bb2974ac27b9ccc, []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_5bb2974ac27b9ccc, []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 type MsgCreatePolicy struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Policy string `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType types.PolicyMarshalingType `protobuf:"varint,3,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (m *MsgCreatePolicy) Reset() { *m = MsgCreatePolicy{} } func (m *MsgCreatePolicy) String() string { return proto.CompactTextString(m) } func (*MsgCreatePolicy) ProtoMessage() {} func (*MsgCreatePolicy) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{2} } func (m *MsgCreatePolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCreatePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCreatePolicy.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 *MsgCreatePolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCreatePolicy.Merge(m, src) } func (m *MsgCreatePolicy) XXX_Size() int { return m.Size() } func (m *MsgCreatePolicy) XXX_DiscardUnknown() { xxx_messageInfo_MsgCreatePolicy.DiscardUnknown(m) } var xxx_messageInfo_MsgCreatePolicy proto.InternalMessageInfo func (m *MsgCreatePolicy) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgCreatePolicy) GetPolicy() string { if m != nil { return m.Policy } return "" } func (m *MsgCreatePolicy) GetMarshalType() types.PolicyMarshalingType { if m != nil { return m.MarshalType } return types.PolicyMarshalingType_UNKNOWN } type MsgCreatePolicyResponse struct { Record *PolicyRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (m *MsgCreatePolicyResponse) Reset() { *m = MsgCreatePolicyResponse{} } func (m *MsgCreatePolicyResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreatePolicyResponse) ProtoMessage() {} func (*MsgCreatePolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{3} } func (m *MsgCreatePolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCreatePolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCreatePolicyResponse.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 *MsgCreatePolicyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCreatePolicyResponse.Merge(m, src) } func (m *MsgCreatePolicyResponse) XXX_Size() int { return m.Size() } func (m *MsgCreatePolicyResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgCreatePolicyResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgCreatePolicyResponse proto.InternalMessageInfo func (m *MsgCreatePolicyResponse) GetRecord() *PolicyRecord { if m != nil { return m.Record } return nil } type MsgEditPolicy struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Policy string `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"` MarshalType types.PolicyMarshalingType `protobuf:"varint,4,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` } func (m *MsgEditPolicy) Reset() { *m = MsgEditPolicy{} } func (m *MsgEditPolicy) String() string { return proto.CompactTextString(m) } func (*MsgEditPolicy) ProtoMessage() {} func (*MsgEditPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{4} } func (m *MsgEditPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgEditPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgEditPolicy.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 *MsgEditPolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgEditPolicy.Merge(m, src) } func (m *MsgEditPolicy) XXX_Size() int { return m.Size() } func (m *MsgEditPolicy) XXX_DiscardUnknown() { xxx_messageInfo_MsgEditPolicy.DiscardUnknown(m) } var xxx_messageInfo_MsgEditPolicy proto.InternalMessageInfo func (m *MsgEditPolicy) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgEditPolicy) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *MsgEditPolicy) GetPolicy() string { if m != nil { return m.Policy } return "" } func (m *MsgEditPolicy) GetMarshalType() types.PolicyMarshalingType { if m != nil { return m.MarshalType } return types.PolicyMarshalingType_UNKNOWN } type MsgEditPolicyResponse struct { RelationshipsRemoved uint64 `protobuf:"varint,1,opt,name=relationships_removed,json=relationshipsRemoved,proto3" json:"relationships_removed,omitempty"` Record *PolicyRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (m *MsgEditPolicyResponse) Reset() { *m = MsgEditPolicyResponse{} } func (m *MsgEditPolicyResponse) String() string { return proto.CompactTextString(m) } func (*MsgEditPolicyResponse) ProtoMessage() {} func (*MsgEditPolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{5} } func (m *MsgEditPolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgEditPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgEditPolicyResponse.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 *MsgEditPolicyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgEditPolicyResponse.Merge(m, src) } func (m *MsgEditPolicyResponse) XXX_Size() int { return m.Size() } func (m *MsgEditPolicyResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgEditPolicyResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgEditPolicyResponse proto.InternalMessageInfo func (m *MsgEditPolicyResponse) GetRelationshipsRemoved() uint64 { if m != nil { return m.RelationshipsRemoved } return 0 } func (m *MsgEditPolicyResponse) GetRecord() *PolicyRecord { if m != nil { return m.Record } return nil } type MsgCheckAccess struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` AccessRequest *types.AccessRequest `protobuf:"bytes,3,opt,name=access_request,json=accessRequest,proto3" json:"access_request,omitempty"` } func (m *MsgCheckAccess) Reset() { *m = MsgCheckAccess{} } func (m *MsgCheckAccess) String() string { return proto.CompactTextString(m) } func (*MsgCheckAccess) ProtoMessage() {} func (*MsgCheckAccess) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{6} } func (m *MsgCheckAccess) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCheckAccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCheckAccess.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 *MsgCheckAccess) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCheckAccess.Merge(m, src) } func (m *MsgCheckAccess) XXX_Size() int { return m.Size() } func (m *MsgCheckAccess) XXX_DiscardUnknown() { xxx_messageInfo_MsgCheckAccess.DiscardUnknown(m) } var xxx_messageInfo_MsgCheckAccess proto.InternalMessageInfo func (m *MsgCheckAccess) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgCheckAccess) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *MsgCheckAccess) GetAccessRequest() *types.AccessRequest { if m != nil { return m.AccessRequest } return nil } type MsgCheckAccessResponse struct { Decision *AccessDecision `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` } func (m *MsgCheckAccessResponse) Reset() { *m = MsgCheckAccessResponse{} } func (m *MsgCheckAccessResponse) String() string { return proto.CompactTextString(m) } func (*MsgCheckAccessResponse) ProtoMessage() {} func (*MsgCheckAccessResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{7} } func (m *MsgCheckAccessResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCheckAccessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCheckAccessResponse.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 *MsgCheckAccessResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCheckAccessResponse.Merge(m, src) } func (m *MsgCheckAccessResponse) XXX_Size() int { return m.Size() } func (m *MsgCheckAccessResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgCheckAccessResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgCheckAccessResponse proto.InternalMessageInfo func (m *MsgCheckAccessResponse) GetDecision() *AccessDecision { if m != nil { return m.Decision } return nil } type MsgSignedPolicyCmd struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Type MsgSignedPolicyCmd_ContentType `protobuf:"varint,3,opt,name=type,proto3,enum=sourcehub.acp.MsgSignedPolicyCmd_ContentType" json:"type,omitempty"` } func (m *MsgSignedPolicyCmd) Reset() { *m = MsgSignedPolicyCmd{} } func (m *MsgSignedPolicyCmd) String() string { return proto.CompactTextString(m) } func (*MsgSignedPolicyCmd) ProtoMessage() {} func (*MsgSignedPolicyCmd) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{8} } func (m *MsgSignedPolicyCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgSignedPolicyCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSignedPolicyCmd.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 *MsgSignedPolicyCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSignedPolicyCmd.Merge(m, src) } func (m *MsgSignedPolicyCmd) XXX_Size() int { return m.Size() } func (m *MsgSignedPolicyCmd) XXX_DiscardUnknown() { xxx_messageInfo_MsgSignedPolicyCmd.DiscardUnknown(m) } var xxx_messageInfo_MsgSignedPolicyCmd proto.InternalMessageInfo func (m *MsgSignedPolicyCmd) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgSignedPolicyCmd) GetPayload() string { if m != nil { return m.Payload } return "" } func (m *MsgSignedPolicyCmd) GetType() MsgSignedPolicyCmd_ContentType { if m != nil { return m.Type } return MsgSignedPolicyCmd_UNKNOWN } type MsgSignedPolicyCmdResponse struct { Result *PolicyCmdResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (m *MsgSignedPolicyCmdResponse) Reset() { *m = MsgSignedPolicyCmdResponse{} } func (m *MsgSignedPolicyCmdResponse) String() string { return proto.CompactTextString(m) } func (*MsgSignedPolicyCmdResponse) ProtoMessage() {} func (*MsgSignedPolicyCmdResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{9} } func (m *MsgSignedPolicyCmdResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgSignedPolicyCmdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSignedPolicyCmdResponse.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 *MsgSignedPolicyCmdResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSignedPolicyCmdResponse.Merge(m, src) } func (m *MsgSignedPolicyCmdResponse) XXX_Size() int { return m.Size() } func (m *MsgSignedPolicyCmdResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgSignedPolicyCmdResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgSignedPolicyCmdResponse proto.InternalMessageInfo func (m *MsgSignedPolicyCmdResponse) GetResult() *PolicyCmdResult { if m != nil { return m.Result } return nil } type MsgBearerPolicyCmd struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` BearerToken string `protobuf:"bytes,2,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` PolicyId string `protobuf:"bytes,3,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Cmd *PolicyCmd `protobuf:"bytes,4,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (m *MsgBearerPolicyCmd) Reset() { *m = MsgBearerPolicyCmd{} } func (m *MsgBearerPolicyCmd) String() string { return proto.CompactTextString(m) } func (*MsgBearerPolicyCmd) ProtoMessage() {} func (*MsgBearerPolicyCmd) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{10} } func (m *MsgBearerPolicyCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgBearerPolicyCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgBearerPolicyCmd.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 *MsgBearerPolicyCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgBearerPolicyCmd.Merge(m, src) } func (m *MsgBearerPolicyCmd) XXX_Size() int { return m.Size() } func (m *MsgBearerPolicyCmd) XXX_DiscardUnknown() { xxx_messageInfo_MsgBearerPolicyCmd.DiscardUnknown(m) } var xxx_messageInfo_MsgBearerPolicyCmd proto.InternalMessageInfo func (m *MsgBearerPolicyCmd) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgBearerPolicyCmd) GetBearerToken() string { if m != nil { return m.BearerToken } return "" } func (m *MsgBearerPolicyCmd) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *MsgBearerPolicyCmd) GetCmd() *PolicyCmd { if m != nil { return m.Cmd } return nil } type MsgBearerPolicyCmdResponse struct { Result *PolicyCmdResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (m *MsgBearerPolicyCmdResponse) Reset() { *m = MsgBearerPolicyCmdResponse{} } func (m *MsgBearerPolicyCmdResponse) String() string { return proto.CompactTextString(m) } func (*MsgBearerPolicyCmdResponse) ProtoMessage() {} func (*MsgBearerPolicyCmdResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{11} } func (m *MsgBearerPolicyCmdResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgBearerPolicyCmdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgBearerPolicyCmdResponse.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 *MsgBearerPolicyCmdResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgBearerPolicyCmdResponse.Merge(m, src) } func (m *MsgBearerPolicyCmdResponse) XXX_Size() int { return m.Size() } func (m *MsgBearerPolicyCmdResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgBearerPolicyCmdResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgBearerPolicyCmdResponse proto.InternalMessageInfo func (m *MsgBearerPolicyCmdResponse) GetResult() *PolicyCmdResult { if m != nil { return m.Result } return nil } type MsgDirectPolicyCmd struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Cmd *PolicyCmd `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (m *MsgDirectPolicyCmd) Reset() { *m = MsgDirectPolicyCmd{} } func (m *MsgDirectPolicyCmd) String() string { return proto.CompactTextString(m) } func (*MsgDirectPolicyCmd) ProtoMessage() {} func (*MsgDirectPolicyCmd) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{12} } func (m *MsgDirectPolicyCmd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgDirectPolicyCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgDirectPolicyCmd.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 *MsgDirectPolicyCmd) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgDirectPolicyCmd.Merge(m, src) } func (m *MsgDirectPolicyCmd) XXX_Size() int { return m.Size() } func (m *MsgDirectPolicyCmd) XXX_DiscardUnknown() { xxx_messageInfo_MsgDirectPolicyCmd.DiscardUnknown(m) } var xxx_messageInfo_MsgDirectPolicyCmd proto.InternalMessageInfo func (m *MsgDirectPolicyCmd) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgDirectPolicyCmd) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *MsgDirectPolicyCmd) GetCmd() *PolicyCmd { if m != nil { return m.Cmd } return nil } type MsgDirectPolicyCmdResponse struct { Result *PolicyCmdResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (m *MsgDirectPolicyCmdResponse) Reset() { *m = MsgDirectPolicyCmdResponse{} } func (m *MsgDirectPolicyCmdResponse) String() string { return proto.CompactTextString(m) } func (*MsgDirectPolicyCmdResponse) ProtoMessage() {} func (*MsgDirectPolicyCmdResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5bb2974ac27b9ccc, []int{13} } func (m *MsgDirectPolicyCmdResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgDirectPolicyCmdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgDirectPolicyCmdResponse.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 *MsgDirectPolicyCmdResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgDirectPolicyCmdResponse.Merge(m, src) } func (m *MsgDirectPolicyCmdResponse) XXX_Size() int { return m.Size() } func (m *MsgDirectPolicyCmdResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgDirectPolicyCmdResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgDirectPolicyCmdResponse proto.InternalMessageInfo func (m *MsgDirectPolicyCmdResponse) GetResult() *PolicyCmdResult { if m != nil { return m.Result } return nil } func init() { proto.RegisterEnum("sourcehub.acp.MsgSignedPolicyCmd_ContentType", MsgSignedPolicyCmd_ContentType_name, MsgSignedPolicyCmd_ContentType_value) proto.RegisterType((*MsgUpdateParams)(nil), "sourcehub.acp.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.acp.MsgUpdateParamsResponse") proto.RegisterType((*MsgCreatePolicy)(nil), "sourcehub.acp.MsgCreatePolicy") proto.RegisterType((*MsgCreatePolicyResponse)(nil), "sourcehub.acp.MsgCreatePolicyResponse") proto.RegisterType((*MsgEditPolicy)(nil), "sourcehub.acp.MsgEditPolicy") proto.RegisterType((*MsgEditPolicyResponse)(nil), "sourcehub.acp.MsgEditPolicyResponse") proto.RegisterType((*MsgCheckAccess)(nil), "sourcehub.acp.MsgCheckAccess") proto.RegisterType((*MsgCheckAccessResponse)(nil), "sourcehub.acp.MsgCheckAccessResponse") proto.RegisterType((*MsgSignedPolicyCmd)(nil), "sourcehub.acp.MsgSignedPolicyCmd") proto.RegisterType((*MsgSignedPolicyCmdResponse)(nil), "sourcehub.acp.MsgSignedPolicyCmdResponse") proto.RegisterType((*MsgBearerPolicyCmd)(nil), "sourcehub.acp.MsgBearerPolicyCmd") proto.RegisterType((*MsgBearerPolicyCmdResponse)(nil), "sourcehub.acp.MsgBearerPolicyCmdResponse") proto.RegisterType((*MsgDirectPolicyCmd)(nil), "sourcehub.acp.MsgDirectPolicyCmd") proto.RegisterType((*MsgDirectPolicyCmdResponse)(nil), "sourcehub.acp.MsgDirectPolicyCmdResponse") } func init() { proto.RegisterFile("sourcehub/acp/tx.proto", fileDescriptor_5bb2974ac27b9ccc) } var fileDescriptor_5bb2974ac27b9ccc = []byte{ // 967 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xbf, 0x6f, 0xdb, 0x46, 0x14, 0xc7, 0xc5, 0xc8, 0xb1, 0xa3, 0x47, 0xd9, 0x4e, 0x09, 0xdb, 0x51, 0x98, 0x86, 0x76, 0x94, 0xa4, 0x70, 0x8c, 0x86, 0x44, 0x15, 0x20, 0x68, 0xb3, 0xd9, 0x4e, 0x81, 0xfe, 0x92, 0x13, 0x50, 0x4e, 0x02, 0x74, 0x21, 0x68, 0xf2, 0x4a, 0x11, 0x16, 0x79, 0xec, 0xdd, 0x29, 0x8d, 0xb6, 0xb6, 0x40, 0x3b, 0x74, 0xea, 0xdf, 0xd0, 0x2e, 0x19, 0x3d, 0x14, 0xe8, 0xd4, 0xce, 0x19, 0x83, 0x4e, 0x9d, 0x8a, 0xc2, 0x1e, 0xfc, 0x6f, 0x14, 0xe4, 0x9d, 0x24, 0xf2, 0x44, 0xc9, 0x46, 0xd2, 0xc5, 0xd6, 0xbb, 0xf7, 0xbd, 0xf7, 0xe3, 0xc3, 0x77, 0x47, 0xc2, 0x1a, 0xc5, 0x7d, 0xe2, 0xa1, 0x6e, 0xff, 0xc0, 0x72, 0xbd, 0xc4, 0x62, 0x2f, 0xcc, 0x84, 0x60, 0x86, 0xb5, 0xc5, 0xd1, 0xba, 0xe9, 0x7a, 0x89, 0xfe, 0x8e, 0x1b, 0x85, 0x31, 0xb6, 0xb2, 0xbf, 0x5c, 0xa1, 0x5f, 0xf1, 0x30, 0x8d, 0x30, 0xb5, 0x22, 0x1a, 0x58, 0xcf, 0x3f, 0x48, 0xff, 0x09, 0xc7, 0x55, 0xee, 0x70, 0x32, 0xcb, 0xe2, 0x86, 0x70, 0xad, 0x04, 0x38, 0xc0, 0x7c, 0x3d, 0xfd, 0x25, 0x56, 0xd7, 0x03, 0x8c, 0x83, 0x1e, 0xb2, 0x32, 0xeb, 0xa0, 0xff, 0x95, 0xc5, 0xc2, 0x08, 0x51, 0xe6, 0x46, 0x89, 0x10, 0xdc, 0x2c, 0x16, 0xe9, 0x7a, 0x1e, 0xa2, 0xd4, 0xf1, 0x91, 0x17, 0xd2, 0x10, 0xc7, 0x42, 0xa4, 0x17, 0x45, 0x89, 0x4b, 0xdc, 0x68, 0x98, 0xd7, 0x90, 0x7c, 0xb8, 0x17, 0x7a, 0x03, 0xc7, 0x8b, 0xfc, 0xf2, 0xbd, 0x04, 0x79, 0x98, 0xf8, 0xc5, 0xe4, 0x31, 0x62, 0xdf, 0x60, 0x72, 0x98, 0xfa, 0x1d, 0x0f, 0x13, 0x24, 0x82, 0x08, 0xd1, 0x9d, 0x99, 0x22, 0x87, 0x76, 0x31, 0x61, 0x42, 0x7a, 0x6b, 0x8a, 0x94, 0xa0, 0xaf, 0xfb, 0x88, 0x0a, 0x55, 0xf3, 0x77, 0x05, 0x96, 0xdb, 0x34, 0x78, 0x92, 0xf8, 0x2e, 0x43, 0x8f, 0xb3, 0x5e, 0xb4, 0xfb, 0x50, 0x73, 0xfb, 0xac, 0x8b, 0x49, 0xc8, 0x06, 0x0d, 0x65, 0x43, 0xd9, 0xac, 0xed, 0x34, 0xfe, 0xfa, 0xed, 0xee, 0x8a, 0x40, 0xbc, 0xed, 0xfb, 0x04, 0x51, 0xda, 0x61, 0x24, 0x8c, 0x03, 0x7b, 0x2c, 0xd5, 0x3e, 0x84, 0x79, 0x4e, 0xa3, 0x71, 0x61, 0x43, 0xd9, 0x54, 0x5b, 0xab, 0x66, 0xe1, 0xe1, 0x9a, 0x3c, 0xfc, 0x4e, 0xed, 0xd5, 0x3f, 0xeb, 0x95, 0x97, 0xa7, 0x47, 0x5b, 0x8a, 0x2d, 0xf4, 0x0f, 0x5a, 0xdf, 0x9f, 0x1e, 0x6d, 0x8d, 0x23, 0xfd, 0x74, 0x7a, 0xb4, 0xb5, 0x3e, 0x46, 0xf5, 0x22, 0x83, 0x25, 0x55, 0xd9, 0xbc, 0x0a, 0x57, 0xa4, 0x25, 0x1b, 0xd1, 0x04, 0xc7, 0x14, 0x35, 0x7f, 0xe1, 0x4d, 0xed, 0x12, 0x94, 0xfa, 0x32, 0x34, 0x5a, 0x03, 0x16, 0xbc, 0xd4, 0xc6, 0x84, 0xb7, 0x64, 0x0f, 0x4d, 0x6d, 0x0d, 0xe6, 0x39, 0xbe, 0xac, 0xec, 0x9a, 0x2d, 0x2c, 0xed, 0x11, 0xd4, 0x23, 0x97, 0xd0, 0xae, 0xdb, 0x73, 0xd8, 0x20, 0x41, 0x8d, 0xea, 0x86, 0xb2, 0xb9, 0xd4, 0x7a, 0xdf, 0x2c, 0x70, 0x35, 0x87, 0x5c, 0x4d, 0x9e, 0xa7, 0xcd, 0x77, 0x84, 0x71, 0xb0, 0x3f, 0x48, 0x90, 0xad, 0x8a, 0x08, 0xa9, 0xf1, 0xa0, 0x9e, 0x76, 0x39, 0x4c, 0xdb, 0xdc, 0xcb, 0xea, 0xcf, 0xd7, 0x38, 0xac, 0x5f, 0xbb, 0x07, 0xf3, 0x7c, 0x34, 0xb2, 0x52, 0xd5, 0xd6, 0x35, 0x19, 0xa4, 0x90, 0xa7, 0x12, 0x5b, 0x48, 0x9b, 0x7f, 0x28, 0xb0, 0xd8, 0xa6, 0xc1, 0xc7, 0x7e, 0xc8, 0xce, 0x6c, 0xf9, 0x1a, 0xd4, 0xc4, 0xc4, 0x84, 0xbe, 0xe8, 0xfa, 0x12, 0x5f, 0xf8, 0xd4, 0xcf, 0xf1, 0xa8, 0xce, 0xe4, 0x31, 0xf7, 0xff, 0xf2, 0xf8, 0x4e, 0x81, 0xd5, 0x42, 0xfd, 0x39, 0x1c, 0xab, 0x04, 0xf5, 0x5c, 0x16, 0xe2, 0x98, 0x76, 0xc3, 0x84, 0x3a, 0x04, 0x45, 0xf8, 0x39, 0xe2, 0x74, 0xe6, 0xec, 0x95, 0x82, 0xd3, 0xe6, 0xbe, 0x1c, 0xc3, 0x0b, 0xe7, 0x67, 0xf8, 0xab, 0x02, 0x4b, 0xe9, 0x43, 0xe9, 0x22, 0xef, 0x70, 0x3b, 0x3b, 0xfd, 0x6f, 0x0a, 0xf1, 0x0b, 0x58, 0x12, 0xd7, 0x87, 0x38, 0x6f, 0x19, 0x4c, 0xb5, 0x75, 0x7b, 0x1a, 0x2e, 0x9e, 0xce, 0xe6, 0x62, 0x7b, 0xd1, 0xcd, 0x9b, 0x12, 0xa9, 0x0e, 0xac, 0x15, 0x8b, 0x1c, 0x91, 0xfa, 0x08, 0x2e, 0x0d, 0x6f, 0x2b, 0x31, 0x3a, 0xd7, 0xa5, 0xb6, 0xf9, 0x86, 0x87, 0x42, 0x64, 0x8f, 0xe4, 0xcd, 0x3f, 0x15, 0xd0, 0xda, 0x34, 0xe8, 0x84, 0x41, 0x8c, 0x7c, 0x0e, 0x67, 0x37, 0xf2, 0x67, 0xb4, 0xdf, 0x80, 0x85, 0xc4, 0x1d, 0xf4, 0xb0, 0x3b, 0x6c, 0x7e, 0x68, 0x6a, 0xdb, 0x30, 0x97, 0x3b, 0x30, 0x77, 0xa5, 0x0a, 0x26, 0x93, 0x98, 0xbb, 0x38, 0x66, 0x28, 0x66, 0xd9, 0x84, 0x64, 0x5b, 0x9b, 0x37, 0x41, 0xcd, 0x2d, 0x6a, 0x2a, 0x2c, 0x3c, 0xd9, 0xfb, 0x7c, 0xef, 0xd1, 0xb3, 0xbd, 0xcb, 0x15, 0x6d, 0x01, 0xaa, 0x9f, 0x3d, 0xeb, 0x5c, 0x56, 0x24, 0x2a, 0xfb, 0xa0, 0x4f, 0x86, 0x1e, 0x91, 0xb9, 0x9f, 0x8e, 0x03, 0xed, 0xf7, 0x98, 0xe0, 0x62, 0x94, 0x8e, 0x03, 0xdf, 0xd1, 0xef, 0x31, 0x5b, 0xa8, 0x9b, 0x2f, 0x39, 0x96, 0x1d, 0xe4, 0x12, 0x44, 0xce, 0x83, 0xe5, 0x06, 0xd4, 0x0f, 0x32, 0xb1, 0xc3, 0xf0, 0x21, 0x8a, 0x05, 0x1b, 0x95, 0xaf, 0xed, 0xa7, 0x4b, 0xc5, 0xc1, 0xa9, 0x4a, 0x83, 0xb3, 0x05, 0x55, 0x2f, 0xf2, 0xb3, 0xc3, 0xa5, 0xb6, 0x1a, 0x53, 0xab, 0x4c, 0x45, 0xa5, 0x00, 0xa4, 0x4a, 0xdf, 0x1a, 0xc0, 0x0f, 0x1c, 0xc0, 0xc3, 0x90, 0x20, 0x8f, 0x9d, 0x07, 0xc0, 0xcc, 0x63, 0x21, 0xba, 0xab, 0xbe, 0x69, 0x77, 0x52, 0x19, 0x6f, 0xdb, 0x5d, 0xeb, 0xc7, 0x8b, 0x50, 0x6d, 0xd3, 0x40, 0x7b, 0x0a, 0xf5, 0xc2, 0x2b, 0xd0, 0x98, 0x1c, 0xda, 0xbc, 0x5f, 0x7f, 0x6f, 0xb6, 0x7f, 0x54, 0xd7, 0x53, 0xa8, 0x17, 0xde, 0x42, 0x25, 0x71, 0xf3, 0xfe, 0xb2, 0xb8, 0xa5, 0x6f, 0x88, 0xc7, 0x00, 0xb9, 0x8b, 0xfe, 0xdd, 0xc9, 0x5d, 0x63, 0xaf, 0x7e, 0x6b, 0x96, 0x77, 0x14, 0xb1, 0x03, 0x6a, 0xfe, 0xda, 0xbb, 0x5e, 0x52, 0xc8, 0xd8, 0xad, 0xdf, 0x9e, 0xe9, 0x1e, 0x05, 0x75, 0x60, 0x59, 0xbe, 0x50, 0x6e, 0x9c, 0x79, 0x1d, 0xe8, 0x77, 0xce, 0x94, 0xe4, 0x13, 0xc8, 0x47, 0xb3, 0x24, 0x81, 0x24, 0x29, 0x4b, 0x30, 0xed, 0xd8, 0x38, 0xb0, 0x2c, 0x8f, 0x7e, 0x49, 0x02, 0x49, 0x52, 0x96, 0x60, 0xca, 0xe4, 0xea, 0x17, 0xbf, 0x4d, 0xbf, 0x84, 0x76, 0x3e, 0x79, 0x75, 0x6c, 0x28, 0xaf, 0x8f, 0x0d, 0xe5, 0xdf, 0x63, 0x43, 0xf9, 0xf9, 0xc4, 0xa8, 0xbc, 0x3e, 0x31, 0x2a, 0x7f, 0x9f, 0x18, 0x95, 0x2f, 0xcd, 0x20, 0x64, 0x69, 0x1c, 0x0f, 0x47, 0x56, 0xf1, 0x93, 0x4e, 0xfe, 0x42, 0x4a, 0x6f, 0x4e, 0x7a, 0x30, 0x9f, 0x7d, 0xd8, 0xdd, 0xfb, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xab, 0x65, 0x68, 0xbc, 0x72, 0x0b, 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) // CreatePolicy adds a new Policy to SourceHub. // The Policy models an aplication's high level access control rules. CreatePolicy(ctx context.Context, in *MsgCreatePolicy, opts ...grpc.CallOption) (*MsgCreatePolicyResponse, error) // EditPolicy mutates the rules defined by a Policy. // // Relations may be added and removed to resources (if they are not required), // new resources may be added, but resources may not be removed. // // # Removing a relation removes all relationships that reference the removed relation // // A few other invariants are enforced such as: // - the name of the actor resource may not be mutated // - resources cannot be removed // - the specification of a policy cannot be mutated // Violations of these constraints will return an error. EditPolicy(ctx context.Context, in *MsgEditPolicy, opts ...grpc.CallOption) (*MsgEditPolicyResponse, error) // CheckAccess executes an Access Request for an User and stores the result of the evaluation in SourceHub. // The resulting evaluation is used to generate a cryptographic proof that the given Access Request // was valid at a particular block height. CheckAccess(ctx context.Context, in *MsgCheckAccess, opts ...grpc.CallOption) (*MsgCheckAccessResponse, error) // SignedPolicyCmd is a wrapper for a Command which is executed within the Context of a Policy. // The Command is signed by the Actor issuing it. SignedPolicyCmd(ctx context.Context, in *MsgSignedPolicyCmd, opts ...grpc.CallOption) (*MsgSignedPolicyCmdResponse, error) // The Msg authenticates the actor initiating the command through a Bearer token. // This token MUST be issued and signed by some DID Actor, the verification of the signature // is used as authentication proof. // Lastly, the Bearer token MUST be bound to some SourceHub account. BearerPolicyCmd(ctx context.Context, in *MsgBearerPolicyCmd, opts ...grpc.CallOption) (*MsgBearerPolicyCmdResponse, error) DirectPolicyCmd(ctx context.Context, in *MsgDirectPolicyCmd, opts ...grpc.CallOption) (*MsgDirectPolicyCmdResponse, 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, "/sourcehub.acp.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CreatePolicy(ctx context.Context, in *MsgCreatePolicy, opts ...grpc.CallOption) (*MsgCreatePolicyResponse, error) { out := new(MsgCreatePolicyResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Msg/CreatePolicy", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) EditPolicy(ctx context.Context, in *MsgEditPolicy, opts ...grpc.CallOption) (*MsgEditPolicyResponse, error) { out := new(MsgEditPolicyResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Msg/EditPolicy", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CheckAccess(ctx context.Context, in *MsgCheckAccess, opts ...grpc.CallOption) (*MsgCheckAccessResponse, error) { out := new(MsgCheckAccessResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Msg/CheckAccess", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) SignedPolicyCmd(ctx context.Context, in *MsgSignedPolicyCmd, opts ...grpc.CallOption) (*MsgSignedPolicyCmdResponse, error) { out := new(MsgSignedPolicyCmdResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Msg/SignedPolicyCmd", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) BearerPolicyCmd(ctx context.Context, in *MsgBearerPolicyCmd, opts ...grpc.CallOption) (*MsgBearerPolicyCmdResponse, error) { out := new(MsgBearerPolicyCmdResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Msg/BearerPolicyCmd", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) DirectPolicyCmd(ctx context.Context, in *MsgDirectPolicyCmd, opts ...grpc.CallOption) (*MsgDirectPolicyCmdResponse, error) { out := new(MsgDirectPolicyCmdResponse) err := c.cc.Invoke(ctx, "/sourcehub.acp.Msg/DirectPolicyCmd", 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) // CreatePolicy adds a new Policy to SourceHub. // The Policy models an aplication's high level access control rules. CreatePolicy(context.Context, *MsgCreatePolicy) (*MsgCreatePolicyResponse, error) // EditPolicy mutates the rules defined by a Policy. // // Relations may be added and removed to resources (if they are not required), // new resources may be added, but resources may not be removed. // // # Removing a relation removes all relationships that reference the removed relation // // A few other invariants are enforced such as: // - the name of the actor resource may not be mutated // - resources cannot be removed // - the specification of a policy cannot be mutated // Violations of these constraints will return an error. EditPolicy(context.Context, *MsgEditPolicy) (*MsgEditPolicyResponse, error) // CheckAccess executes an Access Request for an User and stores the result of the evaluation in SourceHub. // The resulting evaluation is used to generate a cryptographic proof that the given Access Request // was valid at a particular block height. CheckAccess(context.Context, *MsgCheckAccess) (*MsgCheckAccessResponse, error) // SignedPolicyCmd is a wrapper for a Command which is executed within the Context of a Policy. // The Command is signed by the Actor issuing it. SignedPolicyCmd(context.Context, *MsgSignedPolicyCmd) (*MsgSignedPolicyCmdResponse, error) // The Msg authenticates the actor initiating the command through a Bearer token. // This token MUST be issued and signed by some DID Actor, the verification of the signature // is used as authentication proof. // Lastly, the Bearer token MUST be bound to some SourceHub account. BearerPolicyCmd(context.Context, *MsgBearerPolicyCmd) (*MsgBearerPolicyCmdResponse, error) DirectPolicyCmd(context.Context, *MsgDirectPolicyCmd) (*MsgDirectPolicyCmdResponse, 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 (*UnimplementedMsgServer) CreatePolicy(ctx context.Context, req *MsgCreatePolicy) (*MsgCreatePolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePolicy not implemented") } func (*UnimplementedMsgServer) EditPolicy(ctx context.Context, req *MsgEditPolicy) (*MsgEditPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EditPolicy not implemented") } func (*UnimplementedMsgServer) CheckAccess(ctx context.Context, req *MsgCheckAccess) (*MsgCheckAccessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckAccess not implemented") } func (*UnimplementedMsgServer) SignedPolicyCmd(ctx context.Context, req *MsgSignedPolicyCmd) (*MsgSignedPolicyCmdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SignedPolicyCmd not implemented") } func (*UnimplementedMsgServer) BearerPolicyCmd(ctx context.Context, req *MsgBearerPolicyCmd) (*MsgBearerPolicyCmdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BearerPolicyCmd not implemented") } func (*UnimplementedMsgServer) DirectPolicyCmd(ctx context.Context, req *MsgDirectPolicyCmd) (*MsgDirectPolicyCmdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DirectPolicyCmd 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: "/sourcehub.acp.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_CreatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreatePolicy) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CreatePolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Msg/CreatePolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreatePolicy(ctx, req.(*MsgCreatePolicy)) } return interceptor(ctx, in, info, handler) } func _Msg_EditPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgEditPolicy) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).EditPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Msg/EditPolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).EditPolicy(ctx, req.(*MsgEditPolicy)) } return interceptor(ctx, in, info, handler) } func _Msg_CheckAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCheckAccess) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CheckAccess(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Msg/CheckAccess", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CheckAccess(ctx, req.(*MsgCheckAccess)) } return interceptor(ctx, in, info, handler) } func _Msg_SignedPolicyCmd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgSignedPolicyCmd) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).SignedPolicyCmd(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Msg/SignedPolicyCmd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SignedPolicyCmd(ctx, req.(*MsgSignedPolicyCmd)) } return interceptor(ctx, in, info, handler) } func _Msg_BearerPolicyCmd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgBearerPolicyCmd) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).BearerPolicyCmd(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Msg/BearerPolicyCmd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).BearerPolicyCmd(ctx, req.(*MsgBearerPolicyCmd)) } return interceptor(ctx, in, info, handler) } func _Msg_DirectPolicyCmd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgDirectPolicyCmd) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).DirectPolicyCmd(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.acp.Msg/DirectPolicyCmd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).DirectPolicyCmd(ctx, req.(*MsgDirectPolicyCmd)) } return interceptor(ctx, in, info, handler) } var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.acp.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "CreatePolicy", Handler: _Msg_CreatePolicy_Handler, }, { MethodName: "EditPolicy", Handler: _Msg_EditPolicy_Handler, }, { MethodName: "CheckAccess", Handler: _Msg_CheckAccess_Handler, }, { MethodName: "SignedPolicyCmd", Handler: _Msg_SignedPolicyCmd_Handler, }, { MethodName: "BearerPolicyCmd", Handler: _Msg_BearerPolicyCmd_Handler, }, { MethodName: "DirectPolicyCmd", Handler: _Msg_DirectPolicyCmd_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/acp/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 (m *MsgCreatePolicy) 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 *MsgCreatePolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCreatePolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.MarshalType != 0 { i = encodeVarintTx(dAtA, i, uint64(m.MarshalType)) i-- dAtA[i] = 0x18 } if len(m.Policy) > 0 { i -= len(m.Policy) copy(dAtA[i:], m.Policy) i = encodeVarintTx(dAtA, i, uint64(len(m.Policy))) 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 *MsgCreatePolicyResponse) 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 *MsgCreatePolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCreatePolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Record != nil { { size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgEditPolicy) 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 *MsgEditPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgEditPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.MarshalType != 0 { i = encodeVarintTx(dAtA, i, uint64(m.MarshalType)) i-- dAtA[i] = 0x20 } if len(m.Policy) > 0 { i -= len(m.Policy) copy(dAtA[i:], m.Policy) i = encodeVarintTx(dAtA, i, uint64(len(m.Policy))) i-- dAtA[i] = 0x1a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) 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 *MsgEditPolicyResponse) 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 *MsgEditPolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgEditPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Record != nil { { size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.RelationshipsRemoved != 0 { i = encodeVarintTx(dAtA, i, uint64(m.RelationshipsRemoved)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MsgCheckAccess) 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 *MsgCheckAccess) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCheckAccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.AccessRequest != nil { { size, err := m.AccessRequest.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) 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 *MsgCheckAccessResponse) 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 *MsgCheckAccessResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCheckAccessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Decision != nil { { size, err := m.Decision.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgSignedPolicyCmd) 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 *MsgSignedPolicyCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgSignedPolicyCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Type != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x18 } if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) i = encodeVarintTx(dAtA, i, uint64(len(m.Payload))) 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 *MsgSignedPolicyCmdResponse) 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 *MsgSignedPolicyCmdResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgSignedPolicyCmdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Result != nil { { size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgBearerPolicyCmd) 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 *MsgBearerPolicyCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgBearerPolicyCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Cmd != nil { { size, err := m.Cmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0x1a } if len(m.BearerToken) > 0 { i -= len(m.BearerToken) copy(dAtA[i:], m.BearerToken) i = encodeVarintTx(dAtA, i, uint64(len(m.BearerToken))) 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 *MsgBearerPolicyCmdResponse) 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 *MsgBearerPolicyCmdResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgBearerPolicyCmdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Result != nil { { size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgDirectPolicyCmd) 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 *MsgDirectPolicyCmd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgDirectPolicyCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Cmd != nil { { size, err := m.Cmd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyId))) 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 *MsgDirectPolicyCmdResponse) 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 *MsgDirectPolicyCmdResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgDirectPolicyCmdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Result != nil { { size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } 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 (m *MsgCreatePolicy) 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.Policy) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.MarshalType != 0 { n += 1 + sovTx(uint64(m.MarshalType)) } return n } func (m *MsgCreatePolicyResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Record != nil { l = m.Record.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgEditPolicy) 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.PolicyId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Policy) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.MarshalType != 0 { n += 1 + sovTx(uint64(m.MarshalType)) } return n } func (m *MsgEditPolicyResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.RelationshipsRemoved != 0 { n += 1 + sovTx(uint64(m.RelationshipsRemoved)) } if m.Record != nil { l = m.Record.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgCheckAccess) 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.PolicyId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.AccessRequest != nil { l = m.AccessRequest.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgCheckAccessResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Decision != nil { l = m.Decision.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgSignedPolicyCmd) 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.Payload) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.Type != 0 { n += 1 + sovTx(uint64(m.Type)) } return n } func (m *MsgSignedPolicyCmdResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Result != nil { l = m.Result.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgBearerPolicyCmd) 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.BearerToken) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.PolicyId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.Cmd != nil { l = m.Cmd.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgBearerPolicyCmdResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Result != nil { l = m.Result.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgDirectPolicyCmd) 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.PolicyId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.Cmd != nil { l = m.Cmd.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgDirectPolicyCmdResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Result != nil { l = m.Result.Size() n += 1 + l + sovTx(uint64(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 (m *MsgCreatePolicy) 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: MsgCreatePolicy: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCreatePolicy: 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 Policy", 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.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } m.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } 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 *MsgCreatePolicyResponse) 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: MsgCreatePolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCreatePolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", 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.Record == nil { m.Record = &PolicyRecord{} } if err := m.Record.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 *MsgEditPolicy) 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: MsgEditPolicy: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgEditPolicy: 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 PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Policy", 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.Policy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) } m.MarshalType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift if b < 0x80 { break } } 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 *MsgEditPolicyResponse) 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: MsgEditPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgEditPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RelationshipsRemoved", wireType) } m.RelationshipsRemoved = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RelationshipsRemoved |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Record", 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.Record == nil { m.Record = &PolicyRecord{} } if err := m.Record.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 *MsgCheckAccess) 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: MsgCheckAccess: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCheckAccess: 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 PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AccessRequest", 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.AccessRequest == nil { m.AccessRequest = &types.AccessRequest{} } if err := m.AccessRequest.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 *MsgCheckAccessResponse) 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: MsgCheckAccessResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCheckAccessResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Decision", 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.Decision == nil { m.Decision = &AccessDecision{} } if err := m.Decision.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 *MsgSignedPolicyCmd) 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: MsgSignedPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgSignedPolicyCmd: 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 Payload", 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.Payload = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Type |= MsgSignedPolicyCmd_ContentType(b&0x7F) << shift if b < 0x80 { break } } 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 *MsgSignedPolicyCmdResponse) 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: MsgSignedPolicyCmdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgSignedPolicyCmdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { m.Result = &PolicyCmdResult{} } if err := m.Result.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 *MsgBearerPolicyCmd) 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: MsgBearerPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgBearerPolicyCmd: 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 BearerToken", 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.BearerToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cmd", 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.Cmd == nil { m.Cmd = &PolicyCmd{} } if err := m.Cmd.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 *MsgBearerPolicyCmdResponse) 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: MsgBearerPolicyCmdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgBearerPolicyCmdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { m.Result = &PolicyCmdResult{} } if err := m.Result.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 *MsgDirectPolicyCmd) 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: MsgDirectPolicyCmd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgDirectPolicyCmd: 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 PolicyId", 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.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cmd", 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.Cmd == nil { m.Cmd = &PolicyCmd{} } if err := m.Cmd.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 *MsgDirectPolicyCmdResponse) 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: MsgDirectPolicyCmdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgDirectPolicyCmdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { m.Result = &PolicyCmdResult{} } if err := m.Result.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 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") ) ================================================ FILE: x/acp/types/types.go ================================================ package types ================================================ FILE: x/acp/utils/utils.go ================================================ package utils import ( "crypto/sha256" "encoding/binary" "hash" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/acp_core/pkg/auth" coretypes "github.com/sourcenetwork/acp_core/pkg/types" ) // HashTx produces a sha256 of a Tx bytes. func HashTx(txBytes []byte) []byte { hasher := sha256.New() hasher.Write(txBytes) return hasher.Sum(nil) } // InjectPrincipal injects an acp core did principal in ctx and returns the new context. func InjectPrincipal(ctx sdk.Context, actorDID string) (sdk.Context, error) { principal, err := coretypes.NewDIDPrincipal(actorDID) if err != nil { return sdk.Context{}, err } goCtx := auth.InjectPrincipal(ctx, principal) ctx = ctx.WithContext(goCtx) return ctx, nil } // WriteBytes writes a length-prefixed byte slice into the given hasher. func WriteBytes(h hash.Hash, bz []byte) { var lenBuf [8]byte binary.BigEndian.PutUint64(lenBuf[:], uint64(len(bz))) h.Write(lenBuf[:]) if len(bz) > 0 { h.Write(bz) } } ================================================ FILE: x/bulletin/keeper/acp_utils.go ================================================ package keeper import ( "context" "strings" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/capability" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) // getNamespaceId adds a prefix to the namespace and returns final namespace id. func getNamespaceId(namespace string) string { if strings.HasPrefix(namespace, types.NamespaceIdPrefix) { return namespace // Already prefixed, return as is } return types.NamespaceIdPrefix + namespace } // AddCollaborator adds new namespace collaborator. func AddCollaborator(ctx context.Context, k *Keeper, policyId, namespaceId, collaboratorDID, ownerDID, signer string) error { if k.getCollaborator(ctx, namespaceId, collaboratorDID) != nil { return types.ErrCollaboratorAlreadyExists } rel := coretypes.NewActorRelationship(types.NamespaceResource, namespaceId, types.CollaboratorRelation, collaboratorDID) return addRelationship(ctx, k, rel, policyId, namespaceId, ownerDID, signer) } // deleteCollaborator deletes existing namespace collaborator. func deleteCollaborator(ctx context.Context, k *Keeper, policyId, namespaceId, collaboratorDID, ownerDID, signer string) error { if k.getCollaborator(ctx, namespaceId, collaboratorDID) == nil { return types.ErrCollaboratorNotFound } rel := coretypes.NewActorRelationship(types.NamespaceResource, namespaceId, types.CollaboratorRelation, collaboratorDID) return deleteRelationship(ctx, k, rel, policyId, namespaceId, ownerDID, signer) } // addRelationship adds new actor relationship for the specified namespace object. func addRelationship( goCtx context.Context, k *Keeper, relation *coretypes.Relationship, policyId, namespaceId, ownerDID, signer string, ) error { ctx := sdk.UnwrapSDKContext(goCtx) manager := capability.NewPolicyCapabilityManager(k.GetScopedKeeper()) polCap, err := manager.Fetch(ctx, policyId) if err != nil { return err } policyCmd := acptypes.NewSetRelationshipCmd(relation) _, err = k.GetAcpKeeper().ModulePolicyCmdForActorDID(ctx, polCap, policyCmd, ownerDID, signer) return err } // deleteRelationship deletes existing actor relationship for the specified namespace object. func deleteRelationship( goCtx context.Context, k *Keeper, relation *coretypes.Relationship, policyId, namespaceId, ownerDID, signer string, ) error { ctx := sdk.UnwrapSDKContext(goCtx) manager := capability.NewPolicyCapabilityManager(k.GetScopedKeeper()) polCap, err := manager.Fetch(ctx, policyId) if err != nil { return err } policyCmd := acptypes.NewDeleteRelationshipCmd(relation) _, err = k.GetAcpKeeper().ModulePolicyCmdForActorDID(ctx, polCap, policyCmd, ownerDID, signer) return err } // RegisterNamespace registers a new namespace object under the namespace resource. func RegisterNamespace(ctx sdk.Context, k *Keeper, policyId, namespaceId, ownerDID, signer string) error { manager := capability.NewPolicyCapabilityManager(k.GetScopedKeeper()) polCap, err := manager.Fetch(ctx, policyId) if err != nil { return err } policyCmd := acptypes.NewRegisterObjectCmd(coretypes.NewObject(types.NamespaceResource, namespaceId)) _, err = k.GetAcpKeeper().ModulePolicyCmdForActorDID(ctx, polCap, policyCmd, ownerDID, signer) return err } // hasPermission checks if an actor has required permission for the specified namespace object. func hasPermission(goCtx context.Context, k *Keeper, policyId, namespaceId, permission, actorDID, signer string) (bool, error) { req := &acptypes.QueryVerifyAccessRequestRequest{ PolicyId: policyId, AccessRequest: &coretypes.AccessRequest{ Operations: []*coretypes.Operation{ { Object: coretypes.NewObject(types.NamespaceResource, namespaceId), Permission: permission, }, }, Actor: &coretypes.Actor{ Id: actorDID, }, }, } result, err := k.GetAcpKeeper().VerifyAccessRequest(goCtx, req) if err != nil { return false, err } return result.Valid, nil } ================================================ FILE: x/bulletin/keeper/bulletin.go ================================================ package keeper import ( "context" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/capability" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) // hasPolicy checks if the bulletin module policy exists. func (k *Keeper) hasPolicy(ctx context.Context) bool { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get([]byte(types.PolicyIdKey)) return bz != nil } // EnsurePolicy creates new module policy and claims the related capability if the policy does not exist. // Otherwise returns existing policy id. func (k Keeper) EnsurePolicy(ctx sdk.Context) (string, error) { if k.hasPolicy(ctx) { return k.GetPolicyId(ctx), nil } _, polCap, err := k.GetAcpKeeper().CreateModulePolicy( ctx, types.BasePolicy(), coretypes.PolicyMarshalingType_YAML, types.ModuleName, ) if err != nil { return "", err } manager := capability.NewPolicyCapabilityManager(k.GetScopedKeeper()) if err := manager.Claim(ctx, polCap); err != nil { return "", err } policyId := polCap.GetPolicyId() k.SetPolicyId(ctx, policyId) return policyId, nil } // hasNamespace checks if namespace with specified namespaceId exists. func (k *Keeper) hasNamespace(ctx context.Context, namespaceId string) bool { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NamespaceKeyPrefix)) b := store.Get([]byte(namespaceId)) return b != nil } // getPost retrieves a post based on existing namespaceId and postId. func (k *Keeper) getPost(ctx context.Context, namespaceId string, postId string) *types.Post { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.PostKeyPrefix)) key := types.PostKey(namespaceId, postId) b := store.Get(key) if b == nil { return nil } var post types.Post k.cdc.MustUnmarshal(b, &post) return &post } // getCollaborator retrieves a namespace collaborator based on existing namespaceId and collaboratorDID. func (k *Keeper) getCollaborator(ctx context.Context, namespaceId string, collaboratorDID string) *types.Collaborator { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.CollaboratorKeyPrefix)) key := types.CollaboratorKey(namespaceId, collaboratorDID) b := store.Get(key) if b == nil { return nil } var collaborator types.Collaborator k.cdc.MustUnmarshal(b, &collaborator) return &collaborator } // mustIterateNamespaces iterates over all namespaces and performs the provided callback function. func (k *Keeper) mustIterateNamespaces(ctx sdk.Context, cb func(namespace types.Namespace)) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NamespaceKeyPrefix)) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var namespace types.Namespace k.cdc.MustUnmarshal(iterator.Value(), &namespace) cb(namespace) } } // mustIterateCollaborators iterates over all collaborators and performs the provided callback function. func (k *Keeper) mustIterateCollaborators(ctx context.Context, cb func(collaborator types.Collaborator)) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.CollaboratorKeyPrefix)) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var collaborator types.Collaborator k.cdc.MustUnmarshal(iterator.Value(), &collaborator) cb(collaborator) } } // mustIteratePosts iterates over all posts and performs the provided callback function. func (k *Keeper) mustIteratePosts(ctx context.Context, cb func(post types.Post)) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.PostKeyPrefix)) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var post types.Post k.cdc.MustUnmarshal(iterator.Value(), &post) cb(post) } } // mustIterateNamespacePosts iterates over namespace posts and performs the provided callback function. func (k *Keeper) mustIterateNamespacePosts(ctx context.Context, namespaceId string, cb func(namespaceId string, post types.Post)) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.PostKeyPrefix)) sanitizedPrefix := types.SanitizeKeyPart(namespaceId) + "/" iterator := storetypes.KVStorePrefixIterator(store, []byte(sanitizedPrefix)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var post types.Post k.cdc.MustUnmarshal(iterator.Value(), &post) cb(namespaceId, post) } } ================================================ FILE: x/bulletin/keeper/bulletin_test.go ================================================ package keeper import ( "testing" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) func TestGetNamespaceId(t *testing.T) { id1 := "ns1" id2 := "ns2" id3 := "bulletin/ns1" require.Equal(t, "bulletin/ns1", getNamespaceId(id1)) require.Equal(t, "bulletin/ns2", getNamespaceId(id2)) require.Equal(t, "bulletin/ns1", getNamespaceId(id3)) require.Equal(t, getNamespaceId(id1), getNamespaceId(id3)) } func TestHasPolicy(t *testing.T) { k, ctx := setupKeeper(t) require.False(t, k.hasPolicy(ctx)) k.SetPolicyId(ctx, "policy1") require.True(t, k.hasPolicy(ctx)) } func TestEnsurePolicy(t *testing.T) { k, ctx := setupKeeper(t) require.False(t, k.hasPolicy(ctx)) k.EnsurePolicy(ctx) require.True(t, k.hasPolicy(ctx)) } func TestHasNamespace(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") did := "did:key:bob" require.False(t, k.hasNamespace(ctx, namespaceId)) namespace := types.Namespace{ Id: namespaceId, OwnerDid: did, Creator: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", CreatedAt: ctx.BlockTime(), } k.SetNamespace(ctx, namespace) require.True(t, k.hasNamespace(ctx, namespaceId)) } func TestGetPost(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") postId := "post1" did := "did:key:bob" gotPost := k.getPost(ctx, namespaceId, postId) require.Nil(t, gotPost) post := types.Post{ Id: postId, Namespace: namespaceId, CreatorDid: did, Payload: []byte("payload123"), } k.SetPost(ctx, post) gotPost = k.getPost(ctx, namespaceId, postId) require.NotNil(t, gotPost) require.Equal(t, post.Id, gotPost.Id) require.Equal(t, post.Namespace, gotPost.Namespace) require.Equal(t, post.CreatorDid, gotPost.CreatorDid) require.Equal(t, post.Payload, gotPost.Payload) } func TestGetCollaborator(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") did := "did:key:bob" gotCollagorator := k.getCollaborator(ctx, namespaceId, did) require.Nil(t, gotCollagorator) collaborator := types.Collaborator{ Address: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", Did: did, Namespace: namespaceId, } k.SetCollaborator(ctx, collaborator) gotCollagorator = k.getCollaborator(ctx, namespaceId, did) require.NotNil(t, gotCollagorator) require.Equal(t, collaborator.Address, gotCollagorator.Address) require.Equal(t, collaborator.Did, gotCollagorator.Did) require.Equal(t, collaborator.Namespace, gotCollagorator.Namespace) } func TestMustIterateNamespaces(t *testing.T) { k, ctx := setupKeeper(t) namespaceId1 := getNamespaceId("ns1") namespaceId2 := getNamespaceId("ns2") did := "did:key:bob" ns1 := types.Namespace{ Id: namespaceId1, OwnerDid: did, Creator: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", CreatedAt: ctx.BlockTime(), } k.SetNamespace(ctx, ns1) ns2 := types.Namespace{ Id: namespaceId2, OwnerDid: did, Creator: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", CreatedAt: ctx.BlockTime(), } k.SetNamespace(ctx, ns2) var namespaces []types.Namespace k.mustIterateNamespaces(ctx, func(ns types.Namespace) { namespaces = append(namespaces, ns) }) require.ElementsMatch(t, []types.Namespace{ns1, ns2}, namespaces) require.Equal(t, 2, len(namespaces)) } func TestMustIterateCollaborators(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") c1 := types.Collaborator{ Address: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", Did: "did:key:bob", Namespace: namespaceId, } k.SetCollaborator(ctx, c1) c2 := types.Collaborator{ Address: "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", Did: "did:key:sam", Namespace: namespaceId, } k.SetCollaborator(ctx, c2) var collaborators []types.Collaborator k.mustIterateCollaborators(ctx, func(c types.Collaborator) { collaborators = append(collaborators, c) }) require.ElementsMatch(t, []types.Collaborator{c1, c2}, collaborators) require.Equal(t, 2, len(collaborators)) } func TestMustIteratePosts(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") did := "did:key:bob" post1 := types.Post{ Id: "post1", Namespace: namespaceId, CreatorDid: did, Payload: []byte("payload123"), } k.SetPost(ctx, post1) post2 := types.Post{ Id: "post2", Namespace: namespaceId, CreatorDid: did, Payload: []byte("payload456"), } k.SetPost(ctx, post2) var posts []types.Post k.mustIteratePosts(ctx, func(p types.Post) { posts = append(posts, p) }) require.ElementsMatch(t, []types.Post{post1, post2}, posts) require.Equal(t, 2, len(posts)) } func TestMustIterateNamespacePosts(t *testing.T) { k, ctx := setupKeeper(t) namespaceId1 := getNamespaceId("ns1") namespaceId2 := getNamespaceId("ns2") did := "did:key:bob" post1 := types.Post{ Id: "post1", Namespace: namespaceId1, CreatorDid: did, Payload: []byte("payload123"), } k.SetPost(ctx, post1) post2 := types.Post{ Id: "post2", Namespace: namespaceId1, CreatorDid: did, Payload: []byte("payload456"), } k.SetPost(ctx, post2) post3 := types.Post{ Id: "post3", Namespace: namespaceId2, CreatorDid: did, Payload: []byte("payload789"), } k.SetPost(ctx, post3) var ns1Posts []types.Post k.mustIterateNamespacePosts(ctx, namespaceId1, func(namespaceId string, p types.Post) { require.Equal(t, namespaceId1, namespaceId) ns1Posts = append(ns1Posts, p) }) require.ElementsMatch(t, []types.Post{post1, post2}, ns1Posts) require.Equal(t, 2, len(ns1Posts)) var ns2Posts []types.Post k.mustIterateNamespacePosts(ctx, namespaceId2, func(namespaceId string, p types.Post) { require.Equal(t, namespaceId2, namespaceId) ns2Posts = append(ns2Posts, p) }) require.ElementsMatch(t, []types.Post{post3}, ns2Posts) require.Equal(t, 1, len(ns2Posts)) } ================================================ FILE: x/bulletin/keeper/grpc_query.go ================================================ package keeper import ( "context" "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/query" "github.com/sourcenetwork/sourcehub/utils" "github.com/sourcenetwork/sourcehub/x/bulletin/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) var _ types.QueryServer = &Keeper{} // Params query returns bulletin module params. func (k *Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil } // Namespaces query returns all namespaces with pagination. func (k *Keeper) Namespaces(ctx context.Context, req *types.QueryNamespacesRequest) (*types.QueryNamespacesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } namespaces, pageRes, err := k.getNamespacesPaginated(ctx, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.QueryNamespacesResponse{Namespaces: namespaces, Pagination: pageRes}, nil } // Namespace query returns a namespace based on the specified namespace id. func (k *Keeper) Namespace(ctx context.Context, req *types.QueryNamespaceRequest) (*types.QueryNamespaceResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } namespaceId := getNamespaceId(req.Namespace) namespace := k.GetNamespace(ctx, namespaceId) if namespace == nil { return nil, status.Error(codes.NotFound, types.ErrNamespaceNotFound.Error()) } return &types.QueryNamespaceResponse{Namespace: namespace}, nil } // NamespaceCollaborators query returns all namespace collaborators with pagination. func (k *Keeper) NamespaceCollaborators(ctx context.Context, req *types.QueryNamespaceCollaboratorsRequest) ( *types.QueryNamespaceCollaboratorsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } namespaceId := getNamespaceId(req.Namespace) if !k.hasNamespace(ctx, namespaceId) { return nil, status.Error(codes.NotFound, types.ErrNamespaceNotFound.Error()) } namespaces, pageRes, err := k.getNamespaceCollaboratorsPaginated(ctx, namespaceId, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.QueryNamespaceCollaboratorsResponse{Collaborators: namespaces, Pagination: pageRes}, nil } // NamespacePosts query returns all namespace posts with pagination. func (k *Keeper) NamespacePosts(ctx context.Context, req *types.QueryNamespacePostsRequest) ( *types.QueryNamespacePostsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } namespaceId := getNamespaceId(req.Namespace) if !k.hasNamespace(ctx, namespaceId) { return nil, status.Error(codes.NotFound, types.ErrNamespaceNotFound.Error()) } posts, pageRes, err := k.getNamespacePostsPaginated(ctx, namespaceId, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.QueryNamespacePostsResponse{Posts: posts, Pagination: pageRes}, nil } // Post query returns a post based on the specified namespace and id. func (k *Keeper) Post(ctx context.Context, req *types.QueryPostRequest) (*types.QueryPostResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } namespaceId := getNamespaceId(req.Namespace) if !k.hasNamespace(ctx, namespaceId) { return nil, status.Error(codes.NotFound, types.ErrNamespaceNotFound.Error()) } post := k.getPost(ctx, namespaceId, req.Id) if post == nil { return nil, status.Error(codes.NotFound, types.ErrPostNotFound.Error()) } return &types.QueryPostResponse{Post: post}, nil } // Posts query returns all posts with pagination. func (k *Keeper) Posts(ctx context.Context, req *types.QueryPostsRequest) (*types.QueryPostsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } posts, pageRes, err := k.getAllPostsPaginated(ctx, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.QueryPostsResponse{Posts: posts, Pagination: pageRes}, nil } // IterateGlob returns posts matching the glob pattern within the specified namespace. func (k *Keeper) IterateGlob(goCtx context.Context, req *types.QueryIterateGlobRequest) (*types.QueryIterateGlobResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } if len(req.Namespace) == 0 { return nil, status.Error(codes.InvalidArgument, "invalid namespace") } // Use the sanitized namespace as prefix without trailing slash to match all keys that start with it sanitizedNamespaceId := types.SanitizeKeyPart(getNamespaceId(req.Namespace)) storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(goCtx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.PostKeyPrefix+sanitizedNamespaceId)) var posts []*types.Post // Use the Paginate function to handle the pagination logic. pageRes, err := query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { keyStr := string(key) // Strip leading separator: // "|" appears when matching sub-paths within the namespace // "/" appears when matching exactly at namespace boundary with non-empty postId if len(keyStr) > 0 && (keyStr[0] == '|' || keyStr[0] == '/') { keyStr = keyStr[1:] } // Strip trailing "/" before glob matching if len(keyStr) > 0 && keyStr[len(keyStr)-1] == '/' { keyStr = keyStr[:len(keyStr)-1] } // Unsanitize the key to restore original "/" characters for glob matching keyStr = types.UnsanitizeKeyPart(keyStr) matched := utils.Glob(req.Glob, keyStr) if matched { var post types.Post k.cdc.MustUnmarshal(value, &post) posts = append(posts, &post) } return nil }) if err != nil { return nil, err } resp := &types.QueryIterateGlobResponse{ Posts: posts, Pagination: pageRes, } return resp, nil } // getNamespacesPaginated returns all namespaces with pagination. func (k *Keeper) getNamespacesPaginated(ctx context.Context, pageReq *query.PageRequest) ( []types.Namespace, *query.PageResponse, error) { var namespaces []types.Namespace storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NamespaceKeyPrefix)) onResult := func(key []byte, value []byte) error { var namespace types.Namespace k.cdc.MustUnmarshal(value, &namespace) namespaces = append(namespaces, namespace) return nil } pageRes, err := query.Paginate(store, pageReq, onResult) if err != nil { return nil, nil, err } return namespaces, pageRes, nil } // getNamespaceCollaboratorsPaginated returns namespace collaborators with pagination. func (k *Keeper) getNamespaceCollaboratorsPaginated(ctx context.Context, namespaceId string, pageReq *query.PageRequest) ( []types.Collaborator, *query.PageResponse, error) { var collaborators []types.Collaborator storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) nsPrefix := append(types.KeyPrefix(types.CollaboratorKeyPrefix), []byte(types.SanitizeKeyPart(namespaceId)+"/")...) store := prefix.NewStore(storeAdapter, nsPrefix) onResult := func(key []byte, value []byte) error { var collaborator types.Collaborator k.cdc.MustUnmarshal(value, &collaborator) collaborators = append(collaborators, collaborator) return nil } pageRes, err := query.Paginate(store, pageReq, onResult) if err != nil { return nil, nil, err } return collaborators, pageRes, nil } // getNamespacePostsPaginated returns namespace posts with pagination. func (k *Keeper) getNamespacePostsPaginated(ctx context.Context, namespaceId string, pageReq *query.PageRequest) ( []types.Post, *query.PageResponse, error) { var posts []types.Post storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) nsPrefix := append(types.KeyPrefix(types.PostKeyPrefix), []byte(types.SanitizeKeyPart(namespaceId)+"/")...) store := prefix.NewStore(storeAdapter, nsPrefix) onResult := func(key []byte, value []byte) error { var post types.Post k.cdc.MustUnmarshal(value, &post) posts = append(posts, post) return nil } pageRes, err := query.Paginate(store, pageReq, onResult) if err != nil { return nil, nil, err } return posts, pageRes, nil } // getAllPostsPaginated returns all posts with pagination. func (k *Keeper) getAllPostsPaginated(ctx context.Context, pageReq *query.PageRequest) ( []types.Post, *query.PageResponse, error) { var posts []types.Post storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.PostKeyPrefix)) onResult := func(key []byte, value []byte) error { var post types.Post k.cdc.MustUnmarshal(value, &post) posts = append(posts, post) return nil } pageRes, err := query.Paginate(store, pageReq, onResult) if err != nil { return nil, nil, err } return posts, pageRes, nil } // BulletinPolicyId returns the bulletin module policy id. func (k *Keeper) BulletinPolicyId(ctx context.Context, req *types.QueryBulletinPolicyIdRequest) (*types.QueryBulletinPolicyIdResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } policyId := k.GetPolicyId(ctx) if policyId == "" { return nil, status.Error(codes.NotFound, types.ErrInvalidPolicyId.Error()) } return &types.QueryBulletinPolicyIdResponse{PolicyId: policyId}, nil } ================================================ FILE: x/bulletin/keeper/grpc_query_test.go ================================================ package keeper import ( "testing" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) func TestParamsQuery(t *testing.T) { k, ctx := setupKeeper(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) response, err := k.Params(ctx, &types.QueryParamsRequest{}) require.NoError(t, err) require.Equal(t, &types.QueryParamsResponse{Params: params}, response) } func TestParamsQuery_InvalidRequest(t *testing.T) { k, ctx := setupKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) response, err := k.Params(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, response) } func TestNamespacesQuery(t *testing.T) { k, ctx := setupKeeper(t) setupTestPolicy(t, ctx, k) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) namespace1 := "ns1" namespace2 := "ns2" ownerDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, baseAcc.Address) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace1, }) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace2, }) require.NoError(t, err) response, err := k.Namespaces(ctx, &types.QueryNamespacesRequest{}) require.NoError(t, err) require.Equal(t, &types.QueryNamespacesResponse{ Namespaces: []types.Namespace{ { Id: getNamespaceId(namespace1), Creator: baseAcc.Address, OwnerDid: ownerDID, }, { Id: getNamespaceId(namespace2), Creator: baseAcc.Address, OwnerDid: ownerDID, }, }, Pagination: &query.PageResponse{ NextKey: nil, Total: 2, }, }, response) } func TestNamespaceQuery(t *testing.T) { k, ctx := setupKeeper(t) setupTestPolicy(t, ctx, k) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) namespace := "ns1" ownerDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, baseAcc.Address) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }) require.NoError(t, err) response, err := k.Namespace(ctx, &types.QueryNamespaceRequest{ Namespace: namespace, }) require.NoError(t, err) require.Equal(t, &types.QueryNamespaceResponse{ Namespace: &types.Namespace{ Id: getNamespaceId(namespace), Creator: baseAcc.Address, OwnerDid: ownerDID, }, }, response) } func TestNamespaceCollaboratorsQuery(t *testing.T) { k, ctx := setupKeeper(t) setupTestPolicy(t, ctx, k) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) pubKey2 := secp256k1.GenPrivKey().PubKey() addr2 := sdk.AccAddress(pubKey2.Address()) baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) k.accountKeeper.SetAccount(ctx, baseAcc2) pubKey3 := secp256k1.GenPrivKey().PubKey() addr3 := sdk.AccAddress(pubKey3.Address()) baseAcc3 := authtypes.NewBaseAccount(addr3, pubKey3, 3, 1) k.accountKeeper.SetAccount(ctx, baseAcc3) namespace := "ns1" firstCollaboratorDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, baseAcc2.Address) require.NoError(t, err) secondCollaboratorDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, baseAcc3.Address) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }) require.NoError(t, err) _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ Creator: baseAcc.Address, Namespace: namespace, Collaborator: baseAcc2.Address, }) require.NoError(t, err) _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ Creator: baseAcc.Address, Namespace: namespace, Collaborator: baseAcc3.Address, }) require.NoError(t, err) response, err := k.NamespaceCollaborators(ctx, &types.QueryNamespaceCollaboratorsRequest{ Namespace: namespace, }) require.NoError(t, err) require.ElementsMatch(t, []types.Collaborator{ { Address: baseAcc2.Address, Did: firstCollaboratorDID, Namespace: getNamespaceId(namespace), }, { Address: baseAcc3.Address, Did: secondCollaboratorDID, Namespace: getNamespaceId(namespace), }, }, response.Collaborators) } func TestNamespacePostsQuery(t *testing.T) { k, ctx := setupKeeper(t) setupTestPolicy(t, ctx, k) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) namespace := "ns1" payload1 := []byte("post123") payload2 := []byte("post321") postId1 := types.GeneratePostId(getNamespaceId(namespace), payload1) postId2 := types.GeneratePostId(getNamespaceId(namespace), payload2) ownerDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, baseAcc.Address) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }) require.NoError(t, err) _, err = k.CreatePost(ctx, &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, Payload: payload1, }) require.NoError(t, err) _, err = k.CreatePost(ctx, &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, Payload: payload2, }) require.NoError(t, err) response, err := k.NamespacePosts(ctx, &types.QueryNamespacePostsRequest{ Namespace: namespace, }) require.NoError(t, err) require.Equal(t, &types.QueryNamespacePostsResponse{ Posts: []types.Post{ { Id: postId1, Namespace: getNamespaceId(namespace), CreatorDid: ownerDID, Payload: payload1, }, { Id: postId2, Namespace: getNamespaceId(namespace), CreatorDid: ownerDID, Payload: payload2, }, }, Pagination: &query.PageResponse{ NextKey: nil, Total: 2, }, }, response) } func TestPostsQuery(t *testing.T) { k, ctx := setupKeeper(t) setupTestPolicy(t, ctx, k) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) namespace1 := "ns1" namespace2 := "ns2" payload1 := []byte("post123") payload2 := []byte("post321") postId1 := types.GeneratePostId(getNamespaceId(namespace1), payload1) postId2 := types.GeneratePostId(getNamespaceId(namespace2), payload2) ownerDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, baseAcc.Address) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace1, }) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace2, }) require.NoError(t, err) _, err = k.CreatePost(ctx, &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace1, Payload: payload1, }) require.NoError(t, err) _, err = k.CreatePost(ctx, &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace2, Payload: payload2, }) require.NoError(t, err) response, err := k.Posts(ctx, &types.QueryPostsRequest{}) require.NoError(t, err) require.Equal(t, &types.QueryPostsResponse{ Posts: []types.Post{ { Id: postId1, Namespace: getNamespaceId(namespace1), CreatorDid: ownerDID, Payload: payload1, }, { Id: postId2, Namespace: getNamespaceId(namespace2), CreatorDid: ownerDID, Payload: payload2, }, }, Pagination: &query.PageResponse{ NextKey: nil, Total: 2, }, }, response) } func TestPostQuery(t *testing.T) { k, ctx := setupKeeper(t) setupTestPolicy(t, ctx, k) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) namespace := "ns1" payload1 := []byte("post123") artifact := "artifact" postId1 := types.GeneratePostId(getNamespaceId(namespace), payload1) ownerDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, baseAcc.Address) require.NoError(t, err) _, err = k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }) require.NoError(t, err) _, err = k.CreatePost(ctx, &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, Payload: payload1, Artifact: artifact, }) require.NoError(t, err) response, err := k.Post(ctx, &types.QueryPostRequest{ Namespace: namespace, Id: postId1, }) require.NoError(t, err) require.Equal(t, &types.QueryPostResponse{ Post: &types.Post{ Id: postId1, Namespace: getNamespaceId(namespace), CreatorDid: ownerDID, Payload: payload1, }, }, response) } func TestBulletinPolicyIdQuery(t *testing.T) { k, ctx := setupKeeper(t) setupTestPolicy(t, ctx, k) response, err := k.BulletinPolicyId(ctx, &types.QueryBulletinPolicyIdRequest{}) require.NoError(t, err) require.Equal(t, k.GetPolicyId(ctx), response.PolicyId) } func TestBulletinPolicyIdQuery_InvalidRequest(t *testing.T) { k, ctx := setupKeeper(t) response, err := k.BulletinPolicyId(ctx, nil) require.Error(t, err) require.Equal(t, codes.InvalidArgument, status.Code(err)) require.Nil(t, response) } func TestBulletinPolicyIdQuery_PolicyNotSet(t *testing.T) { k, ctx := setupKeeper(t) response, err := k.BulletinPolicyId(ctx, &types.QueryBulletinPolicyIdRequest{}) require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) require.Nil(t, response) } func TestIterateGlob(t *testing.T) { keeper, ctx := setupKeeper(t) posts := []*types.Post{ // sub1 set { Namespace: "bulletin/test1/foo/bar/key1", Payload: []byte("val1"), }, { Namespace: "bulletin/test1/foo/bar/key2", Payload: []byte("val2"), }, { Namespace: "bulletin/test1/foo/baz/key1", Payload: []byte("val3"), }, // base set { Namespace: "bulletin/test1/key1", Payload: []byte("val1"), }, { Namespace: "bulletin/test1/key2", Payload: []byte("val2"), }, { Namespace: "bulletin/test1/key3", Payload: []byte("val3"), }, // sub1 set { Namespace: "bulletin/test1/sub1/key1", Payload: []byte("val1"), }, { Namespace: "bulletin/test1/sub1/key2", Payload: []byte("val2"), }, { Namespace: "bulletin/test1/sub1/key3", Payload: []byte("val3"), }, } // add posts for _, post := range posts { keeper.SetPost(ctx, *post) } // iterate all resp1, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test1", Glob: "*", }) require.NoError(t, err) require.Equal(t, posts, resp1.Posts) // iterate sub1 resp2, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test1", Glob: "sub1*", }) require.NoError(t, err) require.Equal(t, posts[6:9], resp2.Posts) // iterate no subset resp3, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test1", Glob: "k*", }) require.NoError(t, err) require.Equal(t, posts[3:6], resp3.Posts) // empty glob will return the empty set resp4, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test1", Glob: "", }) require.NoError(t, err) require.Zero(t, resp4.Posts) // mid selector resp5, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test1", Glob: "foo/*/key1", }) require.NoError(t, err) require.Equal(t, []*types.Post{ { Namespace: "bulletin/test1/foo/bar/key1", Payload: []byte("val1"), }, { Namespace: "bulletin/test1/foo/baz/key1", Payload: []byte("val3"), }, }, resp5.Posts) // pagination resp6, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test1", Glob: "*", Pagination: &query.PageRequest{ Limit: 3, }, }) require.NoError(t, err) require.Equal(t, posts[:3], resp6.Posts) // continuation pagination resp7, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test1", Glob: "*", Pagination: &query.PageRequest{ Key: resp6.Pagination.NextKey, }, }) require.NoError(t, err) require.Equal(t, posts[3:], resp7.Posts) } func TestIterateGlobWithPostIds(t *testing.T) { keeper, ctx := setupKeeper(t) posts := []*types.Post{ // posts with exact namespace match and non-empty postIds { Id: "post1", Namespace: "bulletin/test2", Payload: []byte("val1"), }, { Id: "post2", Namespace: "bulletin/test2", Payload: []byte("val2"), }, { Id: "post3", Namespace: "bulletin/test2", Payload: []byte("val3"), }, // posts with sub-paths in namespace { Id: "post1", Namespace: "bulletin/test2/sub1", Payload: []byte("val4"), }, { Id: "post2", Namespace: "bulletin/test2/sub1", Payload: []byte("val5"), }, } // add posts for _, post := range posts { keeper.SetPost(ctx, *post) } // match all posts (both exact namespace and sub-paths) resp1, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test2", Glob: "*", }) require.NoError(t, err) require.Equal(t, posts, resp1.Posts) // match only posts with exact namespace (non-empty postIds, "/" separator case) resp2, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test2", Glob: "post*", }) require.NoError(t, err) require.Equal(t, posts[0:3], resp2.Posts) // match only posts in sub1 namespace resp3, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test2", Glob: "sub1/*", }) require.NoError(t, err) require.Equal(t, posts[3:5], resp3.Posts) // match specific postId at exact namespace boundary resp4, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test2", Glob: "post1", }) require.NoError(t, err) require.Equal(t, []*types.Post{posts[0]}, resp4.Posts) } func TestIterateGlobEdgeCases(t *testing.T) { keeper, ctx := setupKeeper(t) posts := []*types.Post{ { Id: "", Namespace: "bulletin/test3/mixed/post1", Payload: []byte("val1"), }, { Id: "actualId", Namespace: "bulletin/test3/mixed", Payload: []byte("val2"), }, { Id: "my/nested/id", Namespace: "bulletin/test3", Payload: []byte("val3"), }, { Id: "", Namespace: "bulletin/test3/a/b/c/d/key", Payload: []byte("val4"), }, } // add posts for _, post := range posts { keeper.SetPost(ctx, *post) } // match all posts in test3 namespace resp1, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test3", Glob: "*", }) require.NoError(t, err) require.ElementsMatch(t, posts, resp1.Posts) // postId with "/" characters should match after unsanitization resp2, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test3", Glob: "my/nested/id", }) require.NoError(t, err) require.Equal(t, []*types.Post{posts[2]}, resp2.Posts) // match with wildcard in postId path resp3, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test3", Glob: "my/*/id", }) require.NoError(t, err) require.Equal(t, []*types.Post{posts[2]}, resp3.Posts) // deep nesting with multiple wildcards resp4, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test3", Glob: "a/*/*/d/key", }) require.NoError(t, err) require.Equal(t, []*types.Post{posts[3]}, resp4.Posts) // non-matching pattern should return empty resp5, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test3", Glob: "nonexistent/*", }) require.NoError(t, err) require.Empty(t, resp5.Posts) // exact match for namespace path with no wildcards resp6, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test3", Glob: "mixed/post1", }) require.NoError(t, err) require.Equal(t, []*types.Post{posts[0]}, resp6.Posts) // match mixed posts with empty and non-empty postIds resp7, err := keeper.IterateGlob(ctx, &types.QueryIterateGlobRequest{ Namespace: "bulletin/test3", Glob: "mixed*", }) require.NoError(t, err) require.ElementsMatch(t, []*types.Post{posts[0], posts[1]}, resp7.Posts) } ================================================ FILE: x/bulletin/keeper/keeper.go ================================================ package keeper import ( "context" "fmt" "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) type ( Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService logger log.Logger // the address capable of executing a MsgUpdateParams message. Typically, this // should be the x/gov module account. authority string accountKeeper types.AccountKeeper acpKeeper *acpkeeper.Keeper capKeeper *capabilitykeeper.ScopedKeeper } ) func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, accountKeeper types.AccountKeeper, acpKeeper *acpkeeper.Keeper, capKeeper *capabilitykeeper.ScopedKeeper, ) Keeper { if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic(fmt.Sprintf("invalid authority address: %s", authority)) } return Keeper{ cdc: cdc, storeService: storeService, logger: logger, authority: authority, accountKeeper: accountKeeper, acpKeeper: acpKeeper, capKeeper: capKeeper, } } // GetAuthority returns the module's authority. func (k *Keeper) GetAuthority() string { return k.authority } // GetAcpKeeper returns the module's AcpKeeper. func (k *Keeper) GetAcpKeeper() *acpkeeper.Keeper { return k.acpKeeper } func (k *Keeper) GetScopedKeeper() *capabilitykeeper.ScopedKeeper { return k.capKeeper } // Logger returns a module-specific logger. func (k *Keeper) Logger() log.Logger { return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) } // SetPolicyId stores id of the genesis bulletin policy. func (k *Keeper) SetPolicyId(ctx context.Context, policyId string) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Set([]byte(types.PolicyIdKey), []byte(policyId)) } // GetPolicyId returns genesis bulletin policy id. func (k *Keeper) GetPolicyId(ctx context.Context) string { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get([]byte(types.PolicyIdKey)) if bz == nil { return "" } return string(bz) } // SetNamespace adds new namespace to the store. func (k *Keeper) SetNamespace(ctx context.Context, namespace types.Namespace) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NamespaceKeyPrefix)) bz := k.cdc.MustMarshal(&namespace) store.Set([]byte(namespace.Id), bz) } // GetNamespace retrieves existing namespace based on the namespaceId. func (k *Keeper) GetNamespace(ctx context.Context, namespaceId string) *types.Namespace { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.NamespaceKeyPrefix)) b := store.Get([]byte(namespaceId)) if b == nil { return nil } var namespace types.Namespace k.cdc.MustUnmarshal(b, &namespace) return &namespace } // GetAllNamespaces returns all namespaces. func (k *Keeper) GetAllNamespaces(ctx sdk.Context) []types.Namespace { var namespaces []types.Namespace namespacesCallback := func(namespace types.Namespace) { namespaces = append(namespaces, namespace) } k.mustIterateNamespaces(ctx, namespacesCallback) return namespaces } // SetCollaborator adds new collaborator to the store. func (k *Keeper) SetCollaborator(ctx context.Context, collaborator types.Collaborator) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.CollaboratorKeyPrefix)) bz := k.cdc.MustMarshal(&collaborator) key := types.CollaboratorKey(collaborator.Namespace, collaborator.Did) store.Set(key, bz) } // DeleteCollaborator removes a collaborator from the store. func (k *Keeper) DeleteCollaborator(ctx context.Context, namespaceId string, collaboratorDID string) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.CollaboratorKeyPrefix)) key := types.CollaboratorKey(namespaceId, collaboratorDID) store.Delete(key) } // GetAllCollaborators returns all collaborators. func (k *Keeper) GetAllCollaborators(ctx context.Context) []types.Collaborator { var collaborators []types.Collaborator collaboratorsCallback := func(collaborator types.Collaborator) { collaborators = append(collaborators, collaborator) } k.mustIterateCollaborators(ctx, collaboratorsCallback) return collaborators } // SetPost adds new post to the store. func (k *Keeper) SetPost(ctx context.Context, post types.Post) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.PostKeyPrefix)) bz := k.cdc.MustMarshal(&post) key := types.PostKey(post.Namespace, post.Id) store.Set(key, bz) } // GetNamespacePosts returns namespace posts. func (k *Keeper) GetNamespacePosts(ctx context.Context, namespaceId string) []types.Post { var posts []types.Post postsCallback := func(namespaceId string, post types.Post) { posts = append(posts, post) } k.mustIterateNamespacePosts(ctx, namespaceId, postsCallback) return posts } // GetAllPosts returns all posts. func (k *Keeper) GetAllPosts(ctx context.Context) []types.Post { var posts []types.Post postsCallback := func(post types.Post) { posts = append(posts, post) } k.mustIteratePosts(ctx, postsCallback) return posts } // InitializeCapabilityKeeper allows app to set the capability keeper after the moment of creation. // // This is supported since currently the capability module // does not integrate with the new module dependency injection system. // // Panics if the keeper was previously initialized (ie inner pointer != nil). func (k *Keeper) InitializeCapabilityKeeper(keeper *capabilitykeeper.ScopedKeeper) { if k.capKeeper != nil { panic("capability keeper already initialized") } k.capKeeper = keeper } ================================================ FILE: x/bulletin/keeper/keeper_common_test.go ================================================ package keeper import ( "testing" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" "github.com/stretchr/testify/require" coretypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/sourcehub/x/acp/capability" acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" acptypes "github.com/sourcenetwork/sourcehub/x/acp/types" "github.com/sourcenetwork/sourcehub/x/bulletin/types" hubtestutil "github.com/sourcenetwork/sourcehub/x/hub/testutil" ) func setupKeeper(t testing.TB) (Keeper, sdk.Context) { storeKey := storetypes.NewKVStoreKey(types.StoreKey) authStoreKey := storetypes.NewKVStoreKey(authtypes.StoreKey) capabilityStoreKey := storetypes.NewKVStoreKey("capkeeper") capabilityMemStoreKey := storetypes.NewKVStoreKey("capkeepermem") db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(authStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(capabilityMemStoreKey, storetypes.StoreTypeDB, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() authtypes.RegisterInterfaces(registry) cryptocodec.RegisterInterfaces(registry) cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) bech32Prefix := "source" addressCodec := authcodec.NewBech32Codec(bech32Prefix) maccPerms := map[string][]string{ authtypes.FeeCollectorName: nil, types.ModuleName: nil, } accountKeeper := authkeeper.NewAccountKeeper( cdc, runtime.NewKVStoreService(authStoreKey), authtypes.ProtoBaseAccount, maccPerms, addressCodec, bech32Prefix, authority.String(), ) capKeeper := capabilitykeeper.NewKeeper(cdc, capabilityStoreKey, capabilityMemStoreKey) acpCapKeeper := capKeeper.ScopeToModule(acptypes.ModuleName) bulletinCapKeeper := capKeeper.ScopeToModule(types.ModuleName) acpKeeper := acpkeeper.NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), accountKeeper, &acpCapKeeper, hubtestutil.NewHubKeeperStub(), ) k := NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), accountKeeper, &acpKeeper, &bulletinCapKeeper, ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) k.SetParams(ctx, types.DefaultParams()) return k, ctx } func setupTestPolicy(t *testing.T, ctx sdk.Context, k Keeper) { _, polCap, err := k.GetAcpKeeper().CreateModulePolicy( ctx, types.BasePolicy(), coretypes.PolicyMarshalingType_YAML, types.ModuleName, ) require.NoError(t, err) policyId := polCap.GetPolicyId() k.SetPolicyId(ctx, policyId) manager := capability.NewPolicyCapabilityManager(k.GetScopedKeeper()) err = manager.Claim(ctx, polCap) require.NoError(t, err) } ================================================ FILE: x/bulletin/keeper/keeper_test.go ================================================ package keeper import ( "testing" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) func TestGetPolicyId(t *testing.T) { k, ctx := setupKeeper(t) policyId := k.GetPolicyId(ctx) require.Equal(t, "", policyId) k.SetPolicyId(ctx, "test-policy") policyId = k.GetPolicyId(ctx) require.Equal(t, "test-policy", policyId) } func TestGetNamespace(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") did := "did:key:bob" namespace := types.Namespace{ Id: namespaceId, OwnerDid: did, Creator: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", CreatedAt: ctx.BlockTime(), } k.SetNamespace(ctx, namespace) gotNamespace := k.GetNamespace(ctx, namespaceId) require.NotNil(t, gotNamespace) require.Equal(t, namespace.Id, gotNamespace.Id) require.Equal(t, namespace.OwnerDid, gotNamespace.OwnerDid) require.Equal(t, namespace.Creator, gotNamespace.Creator) require.Equal(t, namespace.CreatedAt, gotNamespace.CreatedAt) } func TestGetAllNamespaces(t *testing.T) { k, ctx := setupKeeper(t) namespaceId1 := getNamespaceId("ns1") namespaceId2 := getNamespaceId("ns2") did := "did:key:bob" ns1 := types.Namespace{ Id: namespaceId1, OwnerDid: did, Creator: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", CreatedAt: ctx.BlockTime(), } k.SetNamespace(ctx, ns1) ns2 := types.Namespace{ Id: namespaceId2, OwnerDid: did, Creator: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", CreatedAt: ctx.BlockTime(), } k.SetNamespace(ctx, ns2) namespaces := k.GetAllNamespaces(ctx) require.Len(t, namespaces, 2) } func TestDeleteCollaborator(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") did := "did:key:bob" gotCollagorator := k.getCollaborator(ctx, namespaceId, did) require.Nil(t, gotCollagorator) collaborator := types.Collaborator{ Address: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", Did: did, Namespace: namespaceId, } k.SetCollaborator(ctx, collaborator) gotCollagorator = k.getCollaborator(ctx, namespaceId, did) require.NotNil(t, gotCollagorator) k.DeleteCollaborator(ctx, namespaceId, did) gotCollagorator = k.getCollaborator(ctx, namespaceId, did) require.Nil(t, gotCollagorator) } func TestGetAllCollaborators(t *testing.T) { k, ctx := setupKeeper(t) namespaceId := getNamespaceId("ns1") c1 := types.Collaborator{ Address: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", Did: "did:key:bob", Namespace: namespaceId, } k.SetCollaborator(ctx, c1) c2 := types.Collaborator{ Address: "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", Did: "did:key:sam", Namespace: namespaceId, } k.SetCollaborator(ctx, c2) collaborators := k.GetAllCollaborators(ctx) require.Len(t, collaborators, 2) } func TestGetNamespacePosts(t *testing.T) { k, ctx := setupKeeper(t) namespaceId1 := getNamespaceId("ns1") namespaceId2 := getNamespaceId("ns2") did := "did:key:bob" post1 := types.Post{ Id: "post1", Namespace: namespaceId1, CreatorDid: did, Payload: []byte("payload123"), } k.SetPost(ctx, post1) post2 := types.Post{ Id: "post2", Namespace: namespaceId1, CreatorDid: did, Payload: []byte("payload456"), } k.SetPost(ctx, post2) post3 := types.Post{ Id: "post3", Namespace: namespaceId2, CreatorDid: did, Payload: []byte("payload789"), } k.SetPost(ctx, post3) ns1Posts := k.GetNamespacePosts(ctx, namespaceId1) require.Len(t, ns1Posts, 2) for _, p := range ns1Posts { require.Equal(t, namespaceId1, p.Namespace) } ns2Posts := k.GetNamespacePosts(ctx, namespaceId2) require.Len(t, ns2Posts, 1) require.Equal(t, namespaceId2, ns2Posts[0].Namespace) } func TestGetAllPosts(t *testing.T) { k, ctx := setupKeeper(t) namespaceId1 := getNamespaceId("ns1") namespaceId2 := getNamespaceId("ns2") did := "did:key:bob" post1 := types.Post{ Id: "post1", Namespace: namespaceId1, CreatorDid: did, Payload: []byte("payload123"), } k.SetPost(ctx, post1) post2 := types.Post{ Id: "post2", Namespace: namespaceId1, CreatorDid: did, Payload: []byte("payload456"), } k.SetPost(ctx, post2) post3 := types.Post{ Id: "post3", Namespace: namespaceId2, CreatorDid: did, Payload: []byte("payload789"), } k.SetPost(ctx, post3) posts := k.GetAllPosts(ctx) require.Len(t, posts, 3) } ================================================ FILE: x/bulletin/keeper/main_test.go ================================================ package keeper_test import ( "os" "testing" "github.com/sourcenetwork/sourcehub/app" ) func TestMain(m *testing.M) { app.SetConfig(true) os.Exit(m.Run()) } ================================================ FILE: x/bulletin/keeper/msg_server.go ================================================ package keeper import ( "context" "encoding/base64" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) var _ types.MsgServer = &Keeper{} // UpdateParams updates bulletin module params. // Request authority must match module authority. func (k *Keeper) UpdateParams(ctx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if k.GetAuthority() != req.Authority { return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), req.Authority) } if err := k.SetParams(ctx, req.Params); err != nil { return nil, err } return &types.MsgUpdateParamsResponse{}, nil } // RegisterNamespace registers a new namespace resource under the genesis bulletin policy. // The namespace must have a unique, non-existent namespaceId. func (k *Keeper) RegisterNamespace(goCtx context.Context, msg *types.MsgRegisterNamespace) (*types.MsgRegisterNamespaceResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Create module policy and claim capability if it does not exist yet policyId, err := k.EnsurePolicy(ctx) if err != nil { return nil, types.ErrCouldNotEnsurePolicy } namespaceId := getNamespaceId(msg.Namespace) if k.hasNamespace(goCtx, namespaceId) { return nil, types.ErrNamespaceAlreadyExists } ownerDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { return nil, err } err = RegisterNamespace(ctx, k, policyId, namespaceId, ownerDID, msg.Creator) if err != nil { return nil, err } namespace := types.Namespace{ Id: namespaceId, OwnerDid: ownerDID, Creator: msg.Creator, CreatedAt: ctx.BlockTime(), } k.SetNamespace(goCtx, namespace) if err := ctx.EventManager().EmitTypedEvent(&types.EventNamespaceRegistered{ NamespaceId: namespaceId, OwnerDid: ownerDID, CreatedAt: namespace.CreatedAt, }); err != nil { return nil, err } return &types.MsgRegisterNamespaceResponse{Namespace: &namespace}, nil } // CreatePost adds a new post to the specified (existing) namespace. // The signer must have permission to create posts in that namespace. func (k *Keeper) CreatePost(goCtx context.Context, msg *types.MsgCreatePost) (*types.MsgCreatePostResponse, error) { policyId := k.GetPolicyId(goCtx) if policyId == "" { return nil, types.ErrInvalidPolicyId } ctx := sdk.UnwrapSDKContext(goCtx) namespaceId := getNamespaceId(msg.Namespace) if !k.hasNamespace(goCtx, namespaceId) { return nil, types.ErrNamespaceNotFound } creatorDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { return nil, err } hasPermission, err := hasPermission(goCtx, k, policyId, namespaceId, types.CreatePostPermission, creatorDID, msg.Creator) if err != nil { return nil, err } if !hasPermission { return nil, types.ErrInvalidPostCreator } postId := types.GeneratePostId(namespaceId, msg.Payload) existingPost := k.getPost(goCtx, namespaceId, postId) if existingPost != nil { return nil, types.ErrPostAlreadyExists } post := types.Post{ Id: postId, Namespace: namespaceId, CreatorDid: creatorDID, Payload: msg.Payload, } k.SetPost(goCtx, post) b64Payload := base64.StdEncoding.EncodeToString(post.Payload) if err := ctx.EventManager().EmitTypedEvent(&types.EventPostCreated{ NamespaceId: namespaceId, PostId: postId, CreatorDid: creatorDID, Payload: b64Payload, Artifact: msg.Artifact, }); err != nil { return nil, err } return &types.MsgCreatePostResponse{}, nil } // AddCollaborator adds a new collaborator to the specified namespace. // The signer must have permission to manage collaborators of that namespace object. func (k *Keeper) AddCollaborator(goCtx context.Context, msg *types.MsgAddCollaborator) (*types.MsgAddCollaboratorResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) policyId := k.GetPolicyId(goCtx) if policyId == "" { return nil, types.ErrInvalidPolicyId } namespaceId := getNamespaceId(msg.Namespace) if !k.hasNamespace(goCtx, namespaceId) { return nil, types.ErrNamespaceNotFound } ownerDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { return nil, err } collaboratorDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, msg.Collaborator) if err != nil { return nil, err } err = AddCollaborator(goCtx, k, policyId, namespaceId, collaboratorDID, ownerDID, msg.Creator) if err != nil { return nil, err } collaborator := types.Collaborator{ Address: msg.Collaborator, Did: collaboratorDID, Namespace: namespaceId, } k.SetCollaborator(goCtx, collaborator) if err := ctx.EventManager().EmitTypedEvent(&types.EventCollaboratorAdded{ NamespaceId: namespaceId, CollaboratorDid: collaboratorDID, AddedBy: ownerDID, }); err != nil { return nil, err } return &types.MsgAddCollaboratorResponse{}, nil } // RemoveCollaborator removes existing collaborator from the specified namespace. // The signer must have permission to manage collaborators of that namespace object. func (k *Keeper) RemoveCollaborator(goCtx context.Context, msg *types.MsgRemoveCollaborator) (*types.MsgRemoveCollaboratorResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) policyId := k.GetPolicyId(goCtx) if policyId == "" { return nil, types.ErrInvalidPolicyId } namespaceId := getNamespaceId(msg.Namespace) if !k.hasNamespace(goCtx, namespaceId) { return nil, types.ErrNamespaceNotFound } ownerDID, err := k.GetAcpKeeper().GetActorDID(ctx, msg.Creator) if err != nil { return nil, err } collaboratorDID, err := k.GetAcpKeeper().IssueDIDFromAccountAddr(ctx, msg.Collaborator) if err != nil { return nil, err } err = deleteCollaborator(goCtx, k, policyId, namespaceId, collaboratorDID, ownerDID, msg.Creator) if err != nil { return nil, err } k.DeleteCollaborator(goCtx, namespaceId, collaboratorDID) if err := ctx.EventManager().EmitTypedEvent(&types.EventCollaboratorRemoved{ NamespaceId: namespaceId, CollaboratorDid: collaboratorDID, }); err != nil { return nil, err } return &types.MsgRemoveCollaboratorResponse{}, nil } ================================================ FILE: x/bulletin/keeper/msg_server_test.go ================================================ package keeper import ( "testing" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) func TestMsgServer(t *testing.T) { k, ctx := setupKeeper(t) require.NotNil(t, ctx) require.NotEmpty(t, k) } func TestMsgUpdateParams(t *testing.T) { k, ctx := setupKeeper(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) wctx := sdk.UnwrapSDKContext(ctx) // 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: k.GetAuthority(), Params: types.Params{}, }, expErr: false, }, { name: "all good", input: &types.MsgUpdateParams{ Authority: k.GetAuthority(), Params: params, }, expErr: false, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { _, err := k.UpdateParams(wctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } func TestMsgRegisterNamespace(t *testing.T) { k, ctx := setupKeeper(t) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) namespace := "ns1" testCases := []struct { name string input *types.MsgRegisterNamespace setup func() expErr bool expErrMsg string }{ { name: "register namespace (error: invalid creator address)", input: &types.MsgRegisterNamespace{}, setup: func() {}, expErr: true, expErrMsg: "invalid creator address", }, { name: "register namespace (error: invalid namespace id)", input: &types.MsgRegisterNamespace{ Creator: baseAcc.Address, }, setup: func() {}, expErr: true, expErrMsg: "invalid namespace id", }, { name: "register namespace (error: fetching capability for policy)", input: &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }, setup: func() { k.SetPolicyId(ctx, "policy1") }, expErr: true, expErrMsg: "fetching capability for policy", }, { name: "register namespace (error: fetching capability for invalid policy)", input: &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }, setup: func() { k.SetPolicyId(ctx, "invalidPolicy1") }, expErr: true, expErrMsg: "fetching capability for policy invalidPolicy1", }, { name: "register namespace (no error)", input: &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }, setup: func() { setupTestPolicy(t, ctx, k) }, expErr: false, }, { name: "register namespace (error: namespace exists)", input: &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "namespace already exists", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } tc.setup() _, err = k.RegisterNamespace(ctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } func TestMsgCreatePost(t *testing.T) { k, ctx := setupKeeper(t) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) pubKey2 := secp256k1.GenPrivKey().PubKey() addr2 := sdk.AccAddress(pubKey2.Address()) baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) k.accountKeeper.SetAccount(ctx, baseAcc2) namespace := "ns1" testCases := []struct { name string input *types.MsgCreatePost setup func() expErr bool expErrMsg string }{ { name: "create post (error: invalid creator address)", input: &types.MsgCreatePost{}, setup: func() {}, expErr: true, expErrMsg: "nvalid creator address", }, { name: "create post (error: invalid namespace id)", input: &types.MsgCreatePost{ Creator: baseAcc.Address, Payload: []byte("post123"), }, setup: func() {}, expErr: true, expErrMsg: "invalid namespace id", }, { name: "create post (error: no payload)", input: &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "invalid post payload", }, { name: "create post (error: no policy)", input: &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, Payload: []byte("post123"), }, setup: func() {}, expErr: true, expErrMsg: "invalid policy id", }, { name: "create post (error: no namespace)", input: &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, Payload: []byte("post123"), }, setup: func() { k.SetPolicyId(ctx, "policy1") }, expErr: true, expErrMsg: "namespace not found", }, { name: "create post (no error)", input: &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, Payload: []byte("post123"), }, setup: func() { setupTestPolicy(t, ctx, k) _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }) require.NoError(t, err) }, expErr: false, }, { name: "create post (error: post already exists)", input: &types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: namespace, Payload: []byte("post123"), }, setup: func() {}, expErr: true, expErrMsg: "post already exists", }, { name: "create post (error: unauthorized)", input: &types.MsgCreatePost{ Creator: baseAcc2.Address, Namespace: namespace, Payload: []byte("post1234"), }, setup: func() {}, expErr: true, expErrMsg: "expected authorized account as a post creator", }, { name: "create post from collaborator (no error)", input: &types.MsgCreatePost{ Creator: baseAcc2.Address, Namespace: namespace, Payload: []byte("post1234"), }, setup: func() { _, err := k.AddCollaborator(ctx, &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }) require.NoError(t, err) }, expErr: false, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } tc.setup() _, err = k.CreatePost(ctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } func TestMsgCreatePost_EmitsArtifactInEvent(t *testing.T) { k, ctx := setupKeeper(t) // given test policy and namespace pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) setupTestPolicy(t, ctx, k) _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: "ns1", }) require.NoError(t, err) // reset event manager ctx = ctx.WithEventManager(sdk.NewEventManager()) // when i create post post := types.MsgCreatePost{ Creator: baseAcc.Address, Namespace: "ns1", Payload: []byte("some payload"), Artifact: "session-id", } _, err = k.CreatePost(ctx, &post) // then post emit event with artifact require.NoError(t, err) evs := ctx.EventManager().Events() require.Len(t, evs, 1) creatorDid, err := k.acpKeeper.GetActorDID(ctx, baseAcc.Address) require.NoError(t, err) eventDid := "\"" + creatorDid + "\"" ev := evs[0] require.Equal(t, `"session-id"`, ev.Attributes[0].Value) require.Equal(t, eventDid, ev.Attributes[1].Value) require.Equal(t, `"bulletin/ns1"`, ev.Attributes[2].Value) } func TestMsgAddCollaborator(t *testing.T) { k, ctx := setupKeeper(t) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) pubKey2 := secp256k1.GenPrivKey().PubKey() addr2 := sdk.AccAddress(pubKey2.Address()) baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) k.accountKeeper.SetAccount(ctx, baseAcc2) pubKey3 := secp256k1.GenPrivKey().PubKey() addr3 := sdk.AccAddress(pubKey3.Address()) baseAcc3 := authtypes.NewBaseAccount(addr3, pubKey3, 3, 1) k.accountKeeper.SetAccount(ctx, baseAcc3) namespace := "ns1" testCases := []struct { name string input *types.MsgAddCollaborator setup func() expErr bool expErrMsg string }{ { name: "add collaborator (error: invalid creator address)", input: &types.MsgAddCollaborator{}, setup: func() {}, expErr: true, expErrMsg: "invalid creator address", }, { name: "add collaborator (error: invalid namespace id)", input: &types.MsgAddCollaborator{ Creator: baseAcc.Address, }, setup: func() {}, expErr: true, expErrMsg: "invalid namespace id", }, { name: "add collaborator (error: invalid collaborator address)", input: &types.MsgAddCollaborator{ Creator: baseAcc.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "invalid collaborator address", }, { name: "add collaborator (error: invalid policy id)", input: &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "invalid policy id", }, { name: "add collaborator (error: namespace not found)", input: &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() { k.SetPolicyId(ctx, "policy1") }, expErr: true, expErrMsg: "namespace not found", }, { name: "add collaborator (no error)", input: &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() { setupTestPolicy(t, ctx, k) _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }) require.NoError(t, err) }, expErr: false, }, { name: "add collaborator (error: collaborator already exists)", input: &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "collaborator already exists", }, { name: "add collaborator (error: unauthorized)", input: &types.MsgAddCollaborator{ Creator: baseAcc2.Address, Collaborator: baseAcc3.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "actor is not a manager of relation", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } tc.setup() _, err = k.AddCollaborator(ctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } func TestMsgRemoveCollaborator(t *testing.T) { k, ctx := setupKeeper(t) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) pubKey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubKey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubKey, 1, 1) k.accountKeeper.SetAccount(ctx, baseAcc) pubKey2 := secp256k1.GenPrivKey().PubKey() addr2 := sdk.AccAddress(pubKey2.Address()) baseAcc2 := authtypes.NewBaseAccount(addr2, pubKey2, 2, 1) k.accountKeeper.SetAccount(ctx, baseAcc2) pubKey3 := secp256k1.GenPrivKey().PubKey() addr3 := sdk.AccAddress(pubKey3.Address()) baseAcc3 := authtypes.NewBaseAccount(addr3, pubKey3, 3, 1) k.accountKeeper.SetAccount(ctx, baseAcc3) namespace := "ns1" testCases := []struct { name string input *types.MsgRemoveCollaborator setup func() expErr bool expErrMsg string }{ { name: "remove collaborator (error: invalid creator address)", input: &types.MsgRemoveCollaborator{}, setup: func() {}, expErr: true, expErrMsg: "invalid creator address", }, { name: "remove collaborator (error: invalid namespace id)", input: &types.MsgRemoveCollaborator{ Creator: baseAcc.Address, }, setup: func() {}, expErr: true, expErrMsg: "invalid namespace id", }, { name: "remove collaborator (error: invalid collaborator address)", input: &types.MsgRemoveCollaborator{ Creator: baseAcc.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "invalid collaborator address", }, { name: "remove collaborator (error: invalid policy id)", input: &types.MsgRemoveCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "invalid policy id", }, { name: "remove collaborator (error: namespace not found)", input: &types.MsgRemoveCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() { k.SetPolicyId(ctx, "policy1") }, expErr: true, expErrMsg: "namespace not found", }, { name: "remove collaborator (no error)", input: &types.MsgRemoveCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() { setupTestPolicy(t, ctx, k) _, err := k.RegisterNamespace(ctx, &types.MsgRegisterNamespace{ Creator: baseAcc.Address, Namespace: namespace, }) require.NoError(t, err) _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }) require.NoError(t, err) }, expErr: false, }, { name: "remove collaborator (error: collaborator not found)", input: &types.MsgRemoveCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }, setup: func() {}, expErr: true, expErrMsg: "collaborator not found", }, { name: "remove collaborator (error: unauthorized)", input: &types.MsgRemoveCollaborator{ Creator: baseAcc2.Address, Collaborator: baseAcc3.Address, Namespace: namespace, }, setup: func() { _, err := k.AddCollaborator(ctx, &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc2.Address, Namespace: namespace, }) require.NoError(t, err) _, err = k.AddCollaborator(ctx, &types.MsgAddCollaborator{ Creator: baseAcc.Address, Collaborator: baseAcc3.Address, Namespace: namespace, }) require.NoError(t, err) }, expErr: true, expErrMsg: "actor is not a manager of relation", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } tc.setup() _, err = k.RemoveCollaborator(ctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } ================================================ FILE: x/bulletin/keeper/params.go ================================================ package keeper import ( "context" "github.com/cosmos/cosmos-sdk/runtime" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) // GetParams get all parameters as types.Params func (k *Keeper) GetParams(ctx context.Context) (params types.Params) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.ParamsKey) if bz == nil { return params } k.cdc.MustUnmarshal(bz, ¶ms) return params } // SetParams set the params func (k *Keeper) SetParams(ctx context.Context, params types.Params) error { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz, err := k.cdc.Marshal(¶ms) if err != nil { return err } store.Set(types.ParamsKey, bz) return nil } ================================================ FILE: x/bulletin/keeper/params_test.go ================================================ package keeper import ( "testing" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) func TestGetParams(t *testing.T) { k, ctx := setupKeeper(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) require.EqualValues(t, params, k.GetParams(ctx)) } ================================================ FILE: x/bulletin/module/autocli.go ================================================ package bulletin import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/bulletin" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Params", Use: "params", Short: "Shows the parameters of the module", }, { RpcMethod: "Namespaces", Use: "namespaces", Short: "Query all namespaces", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, { RpcMethod: "Namespace", Use: "namespace [namespace]", Short: "Query namespace by name", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, }, { RpcMethod: "NamespaceCollaborators", Use: "namespace-collaborators [namespace]", Short: "Query all namespace collaborators", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, }, { RpcMethod: "NamespacePosts", Use: "namespace-posts [namespace]", Short: "Query all posts within the namespace", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, }, { RpcMethod: "Post", Use: "post [namespace] [id]", Short: "Query post by namespace and id", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "id"}}, }, { RpcMethod: "Posts", Use: "posts", Short: "Query all posts", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, { RpcMethod: "BulletinPolicyId", Use: "policy-id", Short: "Query the bulletin module policy id", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, // this line is used by ignite scaffolding # autocli/query }, }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.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 }, { RpcMethod: "CreatePost", Use: "create-post [namespace] [payload]", Short: "Add a new post to the specified namespace", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "payload"}}, }, { RpcMethod: "RegisterNamespace", Use: "register-namespace [namespace]", Short: "Register a new namespace", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}}, }, { RpcMethod: "AddCollaborator", Use: "add-collaborator [namespace] [collaborator]", Short: "Add a new collaborator to the specified namespace", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "collaborator"}}, }, { RpcMethod: "RemoveCollaborator", Use: "remove-collaborator [namespace] [collaborator]", Short: "Remove existing collaborator from the specified namespace", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "namespace"}, {ProtoField: "collaborator"}}, }, // this line is used by ignite scaffolding # autocli/tx }, }, } } ================================================ FILE: x/bulletin/module/genesis.go ================================================ package bulletin import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/bulletin/keeper" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState) { if err := k.SetParams(ctx, genState.Params); err != nil { panic(err) } policyId := genState.PolicyId if policyId != "" { // Reset the policy if initializing from the exported state policyId, err := k.EnsurePolicy(ctx) if err != nil { panic(err) } k.SetPolicyId(ctx, policyId) for _, namespace := range genState.Namespaces { err := keeper.RegisterNamespace(ctx, k, policyId, namespace.Id, namespace.OwnerDid, namespace.Creator) if err != nil { panic(err) } k.SetNamespace(ctx, namespace) } for _, collaborator := range genState.Collaborators { namespace := k.GetNamespace(ctx, collaborator.Namespace) err := keeper.AddCollaborator(ctx, k, policyId, collaborator.Namespace, collaborator.Did, namespace.OwnerDid, collaborator.Address) if err != nil { panic(err) } k.SetCollaborator(ctx, collaborator) } for _, post := range genState.Posts { k.SetPost(ctx, post) } } } // ExportGenesis returns the module's exported genesis. func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) if policyId := k.GetPolicyId(ctx); policyId != "" { genesis.PolicyId = policyId } genesis.Namespaces = k.GetAllNamespaces(ctx) genesis.Collaborators = k.GetAllCollaborators(ctx) genesis.Posts = k.GetAllPosts(ctx) return genesis } ================================================ FILE: x/bulletin/module/genesis_test.go ================================================ package bulletin import ( "testing" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/testutil/nullify" "github.com/sourcenetwork/sourcehub/x/bulletin/types" "github.com/stretchr/testify/require" ) func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), } k, ctx := keepertest.BulletinKeeper(t) InitGenesis(ctx, &k, genesisState) got := ExportGenesis(ctx, &k) require.NotNil(t, got) nullify.Fill(&genesisState) nullify.Fill(got) } ================================================ FILE: x/bulletin/module/module.go ================================================ package bulletin import ( "context" "encoding/json" "fmt" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" // this line is used by starport scaffolding # 1 modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/bulletin/module" "github.com/sourcenetwork/sourcehub/app/metrics" acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" "github.com/sourcenetwork/sourcehub/x/bulletin/keeper" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) var ( _ module.AppModuleBasic = (*AppModule)(nil) _ module.AppModuleSimulation = (*AppModule)(nil) _ module.HasGenesis = (*AppModule)(nil) _ module.HasInvariants = (*AppModule)(nil) _ module.HasConsensusVersion = (*AppModule)(nil) _ appmodule.AppModule = (*AppModule)(nil) _ appmodule.HasBeginBlocker = (*AppModule)(nil) _ appmodule.HasEndBlocker = (*AppModule)(nil) ) // ---------------------------------------------------------------------------- // AppModuleBasic // ---------------------------------------------------------------------------- // AppModuleBasic implements the AppModuleBasic interface that defines the // independent methods a Cosmos SDK module needs to implement. type AppModuleBasic struct { cdc codec.BinaryCodec } func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } // Name returns the name of the module as a string. func (AppModuleBasic) Name() string { return types.ModuleName } // RegisterLegacyAminoCodec registers the amino codec for the module, which is used // to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } // 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 (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesis()) } // ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } return genState.Validate() } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { panic(err) } } // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- // AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement type AppModule struct { AppModuleBasic keeper *keeper.Keeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper } func NewAppModule( cdc codec.Codec, keeper *keeper.Keeper, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, accountKeeper: accountKeeper, bankKeeper: bankKeeper, } } // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { // Inject instrumentation into msg service handler descriptor := metrics.WrapMsgServerServiceDescriptor(types.ModuleName, types.Msg_serviceDesc) cfg.MsgServer().RegisterService(&descriptor, am.keeper) // Inject instrumentation into query service handler descriptor = metrics.WrapQueryServiceDescriptor(types.ModuleName, types.Query_serviceDesc) cfg.QueryServer().RegisterService(&descriptor, am.keeper) } // RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the module's genesis initialization. It returns no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { var genState types.GenesisState // Initialize global index to index in genesis state cdc.MustUnmarshalJSON(gs, &genState) InitGenesis(ctx, am.keeper, genState) } // ExportGenesis returns the module's exported genesis state as raw JSON bytes. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { genState := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(genState) } // 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 } // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} // ---------------------------------------------------------------------------- // App Wiring Setup // ---------------------------------------------------------------------------- func init() { appmodule.Register( &modulev1.Module{}, appmodule.Provide(ProvideModule), ) } type ModuleInputs struct { depinject.In StoreService store.KVStoreService Cdc codec.Codec Config *modulev1.Module Logger log.Logger AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper AcpKeeper *acpkeeper.Keeper } type ModuleOutputs struct { depinject.Out BulletinKeeper *keeper.Keeper Module appmodule.AppModule } func ProvideModule(in ModuleInputs) ModuleOutputs { // default to governance authority if not provided authority := authtypes.NewModuleAddress(govtypes.ModuleName) if in.Config.Authority != "" { authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) } k := keeper.NewKeeper( in.Cdc, in.StoreService, in.Logger, authority.String(), in.AccountKeeper, in.AcpKeeper, nil, ) m := NewAppModule( in.Cdc, &k, in.AccountKeeper, in.BankKeeper, ) return ModuleOutputs{BulletinKeeper: &k, Module: m} } ================================================ FILE: x/bulletin/module/simulation.go ================================================ package bulletin import ( "math/rand" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/sourcenetwork/sourcehub/testutil/sample" bulletinsimulation "github.com/sourcenetwork/sourcehub/x/bulletin/simulation" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) // avoid unused import issue var ( _ = bulletinsimulation.FindAccount _ = rand.Rand{} _ = sample.AccAddress _ = sdk.AccAddress{} _ = simulation.MsgEntryKind ) const ( opWeightMsgCreatePost = "op_weight_msg_create_post" // TODO: Determine the simulation weight value defaultWeightMsgCreatePost int = 100 // this line is used by starport scaffolding # simapp/module/const ) // 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() } bulletinGenesis := types.GenesisState{ Params: types.DefaultParams(), // this line is used by starport scaffolding # simapp/module/genesisState } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&bulletinGenesis) } // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} // ProposalContents doesn't return any content functions for governance proposals. func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // 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) var weightMsgCreatePost int simState.AppParams.GetOrGenerate(opWeightMsgCreatePost, &weightMsgCreatePost, nil, func(_ *rand.Rand) { weightMsgCreatePost = defaultWeightMsgCreatePost }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgCreatePost, bulletinsimulation.SimulateMsgCreatePost(am.accountKeeper, am.bankKeeper, am.keeper), )) // this line is used by starport scaffolding # simapp/module/operation return operations } // ProposalMsgs returns msgs used for governance proposals for simulations. func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { return []simtypes.WeightedProposalMsg{ simulation.NewWeightedProposalMsg( opWeightMsgCreatePost, defaultWeightMsgCreatePost, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { bulletinsimulation.SimulateMsgCreatePost(am.accountKeeper, am.bankKeeper, am.keeper) return nil }, ), // this line is used by starport scaffolding # simapp/module/OpMsg } } ================================================ FILE: x/bulletin/simulation/create_post.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/bulletin/keeper" "github.com/sourcenetwork/sourcehub/x/bulletin/types" ) func SimulateMsgCreatePost( ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgCreatePost{ Creator: simAccount.Address.String(), } // TODO: Handling the CreatePost simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "CreatePost simulation not implemented"), nil, nil } } ================================================ FILE: x/bulletin/simulation/helpers.go ================================================ package simulation import ( sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) // FindAccount find a specific address from an account list func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { creator, err := sdk.AccAddressFromBech32(address) if err != nil { panic(err) } return simtypes.FindAccount(accs, creator) } ================================================ FILE: x/bulletin/types/codec.go ================================================ package types import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreatePost{}, &MsgRegisterNamespace{}, &MsgAddCollaborator{}, &MsgRemoveCollaborator{}, &MsgUpdateParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } ================================================ FILE: x/bulletin/types/collaborator.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/collaborator.proto package types import ( fmt "fmt" 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 // Collaborator represents an actor with collaborator permissions in a namespace. type Collaborator struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (m *Collaborator) Reset() { *m = Collaborator{} } func (m *Collaborator) String() string { return proto.CompactTextString(m) } func (*Collaborator) ProtoMessage() {} func (*Collaborator) Descriptor() ([]byte, []int) { return fileDescriptor_9513c8db419a6c7e, []int{0} } func (m *Collaborator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Collaborator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Collaborator.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 *Collaborator) XXX_Merge(src proto.Message) { xxx_messageInfo_Collaborator.Merge(m, src) } func (m *Collaborator) XXX_Size() int { return m.Size() } func (m *Collaborator) XXX_DiscardUnknown() { xxx_messageInfo_Collaborator.DiscardUnknown(m) } var xxx_messageInfo_Collaborator proto.InternalMessageInfo func (m *Collaborator) GetAddress() string { if m != nil { return m.Address } return "" } func (m *Collaborator) GetDid() string { if m != nil { return m.Did } return "" } func (m *Collaborator) GetNamespace() string { if m != nil { return m.Namespace } return "" } func init() { proto.RegisterType((*Collaborator)(nil), "sourcehub.bulletin.Collaborator") } func init() { proto.RegisterFile("sourcehub/bulletin/collaborator.proto", fileDescriptor_9513c8db419a6c7e) } var fileDescriptor_9513c8db419a6c7e = []byte{ // 193 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x4f, 0x2a, 0xcd, 0xc9, 0x49, 0x2d, 0xc9, 0xcc, 0xd3, 0x4f, 0xce, 0xcf, 0xc9, 0x49, 0x4c, 0xca, 0x2f, 0x4a, 0x2c, 0xc9, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x2b, 0xd3, 0x83, 0x29, 0x53, 0x8a, 0xe0, 0xe2, 0x71, 0x46, 0x52, 0x29, 0x24, 0xc1, 0xc5, 0x9e, 0x98, 0x92, 0x52, 0x94, 0x5a, 0x5c, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x0a, 0x09, 0x70, 0x31, 0xa7, 0x64, 0xa6, 0x48, 0x30, 0x81, 0x45, 0x41, 0x4c, 0x21, 0x19, 0x2e, 0xce, 0xbc, 0xc4, 0xdc, 0xd4, 0xe2, 0x82, 0xc4, 0xe4, 0x54, 0x09, 0x66, 0xb0, 0x38, 0x42, 0xc0, 0xc9, 0xf7, 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, 0x8c, 0xd3, 0x33, 0x4b, 0x40, 0x8e, 0x48, 0xce, 0xcf, 0xd5, 0x87, 0x38, 0x29, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x1f, 0xe1, 0x8f, 0x0a, 0x84, 0x4f, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x7e, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xe7, 0xf5, 0xb6, 0xec, 0x00, 0x00, 0x00, } func (m *Collaborator) 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 *Collaborator) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Collaborator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintCollaborator(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0x1a } if len(m.Did) > 0 { i -= len(m.Did) copy(dAtA[i:], m.Did) i = encodeVarintCollaborator(dAtA, i, uint64(len(m.Did))) i-- dAtA[i] = 0x12 } if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintCollaborator(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintCollaborator(dAtA []byte, offset int, v uint64) int { offset -= sovCollaborator(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Collaborator) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Address) if l > 0 { n += 1 + l + sovCollaborator(uint64(l)) } l = len(m.Did) if l > 0 { n += 1 + l + sovCollaborator(uint64(l)) } l = len(m.Namespace) if l > 0 { n += 1 + l + sovCollaborator(uint64(l)) } return n } func sovCollaborator(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozCollaborator(x uint64) (n int) { return sovCollaborator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Collaborator) 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 ErrIntOverflowCollaborator } 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: Collaborator: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Collaborator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCollaborator } 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 ErrInvalidLengthCollaborator } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthCollaborator } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCollaborator } 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 ErrInvalidLengthCollaborator } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthCollaborator } if postIndex > l { return io.ErrUnexpectedEOF } m.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCollaborator } 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 ErrInvalidLengthCollaborator } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthCollaborator } if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCollaborator(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCollaborator } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipCollaborator(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, ErrIntOverflowCollaborator } 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, ErrIntOverflowCollaborator } 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, ErrIntOverflowCollaborator } 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, ErrInvalidLengthCollaborator } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupCollaborator } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthCollaborator } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthCollaborator = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCollaborator = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCollaborator = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/bulletin/types/constants.go ================================================ package types const ( // CollaboratorRelation defines relation name for a collaborator. CollaboratorRelation = "collaborator" // CreatePostPermission defines permission name for creating a post. CreatePostPermission = "create_post" // NamespaceIdPrefix is the common prefix for all bulletin module namespaces. NamespaceIdPrefix = "bulletin/" // NamespaceResource defines a resource name for the namespace. NamespaceResource = "namespace" ) ================================================ FILE: x/bulletin/types/errors.go ================================================ package types // DONTCOVER import ( sdkerrors "cosmossdk.io/errors" ) // x/bulletin module sentinel errors var ( ErrInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") ErrInvalidPolicyId = sdkerrors.Register(ModuleName, 1101, "invalid policy id") ErrNamespaceAlreadyExists = sdkerrors.Register(ModuleName, 1102, "namespace already exists") ErrNamespaceNotFound = sdkerrors.Register(ModuleName, 1103, "namespace not found") ErrInvalidNamespaceId = sdkerrors.Register(ModuleName, 1104, "invalid namespace id") ErrInvalidNamespaceOwner = sdkerrors.Register(ModuleName, 1105, "expected authorized account as a namespace owner") ErrInvalidPostCreator = sdkerrors.Register(ModuleName, 1106, "expected authorized account as a post creator") ErrPostAlreadyExists = sdkerrors.Register(ModuleName, 1107, "post already exists") ErrPostNotFound = sdkerrors.Register(ModuleName, 1108, "post not found") ErrInvalidPostPayload = sdkerrors.Register(ModuleName, 1109, "invalid post payload") ErrCollaboratorAlreadyExists = sdkerrors.Register(ModuleName, 1111, "collaborator already exists") ErrCollaboratorNotFound = sdkerrors.Register(ModuleName, 1112, "collaborator not found") ErrCouldNotEnsurePolicy = sdkerrors.Register(ModuleName, 1113, "could not ensure policy") ) ================================================ FILE: x/bulletin/types/events.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/events.proto package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // EventNamespaceRegistered is emitted when a namespace is registered. type EventNamespaceRegistered struct { // namespace_id is the unique identifier of the namespace. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // owner_did is the DID of the namespace owner. OwnerDid string `protobuf:"bytes,2,opt,name=owner_did,json=ownerDid,proto3" json:"owner_did,omitempty"` // created_at is the timestamp when the namespace was created. CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *EventNamespaceRegistered) Reset() { *m = EventNamespaceRegistered{} } func (m *EventNamespaceRegistered) String() string { return proto.CompactTextString(m) } func (*EventNamespaceRegistered) ProtoMessage() {} func (*EventNamespaceRegistered) Descriptor() ([]byte, []int) { return fileDescriptor_4702ff14c81a2bc3, []int{0} } func (m *EventNamespaceRegistered) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventNamespaceRegistered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EventNamespaceRegistered.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 *EventNamespaceRegistered) XXX_Merge(src proto.Message) { xxx_messageInfo_EventNamespaceRegistered.Merge(m, src) } func (m *EventNamespaceRegistered) XXX_Size() int { return m.Size() } func (m *EventNamespaceRegistered) XXX_DiscardUnknown() { xxx_messageInfo_EventNamespaceRegistered.DiscardUnknown(m) } var xxx_messageInfo_EventNamespaceRegistered proto.InternalMessageInfo func (m *EventNamespaceRegistered) GetNamespaceId() string { if m != nil { return m.NamespaceId } return "" } func (m *EventNamespaceRegistered) GetOwnerDid() string { if m != nil { return m.OwnerDid } return "" } func (m *EventNamespaceRegistered) GetCreatedAt() time.Time { if m != nil { return m.CreatedAt } return time.Time{} } // EventPostCreated is emitted when a post is created. type EventPostCreated struct { // namespace_id is the namespace the post belongs to. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // post_id is the unique identifier of the post. PostId string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` // creator_did is the DID of the post creator. CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` // payload is the base64-encoded content of the post. Payload string `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // artifact is sent with a post call for tracking purposes Artifact string `protobuf:"bytes,5,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *EventPostCreated) Reset() { *m = EventPostCreated{} } func (m *EventPostCreated) String() string { return proto.CompactTextString(m) } func (*EventPostCreated) ProtoMessage() {} func (*EventPostCreated) Descriptor() ([]byte, []int) { return fileDescriptor_4702ff14c81a2bc3, []int{1} } func (m *EventPostCreated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventPostCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EventPostCreated.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 *EventPostCreated) XXX_Merge(src proto.Message) { xxx_messageInfo_EventPostCreated.Merge(m, src) } func (m *EventPostCreated) XXX_Size() int { return m.Size() } func (m *EventPostCreated) XXX_DiscardUnknown() { xxx_messageInfo_EventPostCreated.DiscardUnknown(m) } var xxx_messageInfo_EventPostCreated proto.InternalMessageInfo func (m *EventPostCreated) GetNamespaceId() string { if m != nil { return m.NamespaceId } return "" } func (m *EventPostCreated) GetPostId() string { if m != nil { return m.PostId } return "" } func (m *EventPostCreated) GetCreatorDid() string { if m != nil { return m.CreatorDid } return "" } func (m *EventPostCreated) GetPayload() string { if m != nil { return m.Payload } return "" } func (m *EventPostCreated) GetArtifact() string { if m != nil { return m.Artifact } return "" } // EventCollaboratorAdded is emitted when a collaborator is added to a namespace. type EventCollaboratorAdded struct { // namespace_id is the namespace the collaborator was added to. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // collaborator_did is the DID of the collaborator. CollaboratorDid string `protobuf:"bytes,2,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` // added_by is the DID of the user who added the collaborator. AddedBy string `protobuf:"bytes,3,opt,name=added_by,json=addedBy,proto3" json:"added_by,omitempty"` } func (m *EventCollaboratorAdded) Reset() { *m = EventCollaboratorAdded{} } func (m *EventCollaboratorAdded) String() string { return proto.CompactTextString(m) } func (*EventCollaboratorAdded) ProtoMessage() {} func (*EventCollaboratorAdded) Descriptor() ([]byte, []int) { return fileDescriptor_4702ff14c81a2bc3, []int{2} } func (m *EventCollaboratorAdded) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventCollaboratorAdded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EventCollaboratorAdded.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 *EventCollaboratorAdded) XXX_Merge(src proto.Message) { xxx_messageInfo_EventCollaboratorAdded.Merge(m, src) } func (m *EventCollaboratorAdded) XXX_Size() int { return m.Size() } func (m *EventCollaboratorAdded) XXX_DiscardUnknown() { xxx_messageInfo_EventCollaboratorAdded.DiscardUnknown(m) } var xxx_messageInfo_EventCollaboratorAdded proto.InternalMessageInfo func (m *EventCollaboratorAdded) GetNamespaceId() string { if m != nil { return m.NamespaceId } return "" } func (m *EventCollaboratorAdded) GetCollaboratorDid() string { if m != nil { return m.CollaboratorDid } return "" } func (m *EventCollaboratorAdded) GetAddedBy() string { if m != nil { return m.AddedBy } return "" } // EventCollaboratorRemoved is emitted when a collaborator is removed from a namespace. type EventCollaboratorRemoved struct { // namespace_id is the namespace the collaborator was removed from. NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // collaborator_did is the DID of the collaborator. CollaboratorDid string `protobuf:"bytes,2,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` } func (m *EventCollaboratorRemoved) Reset() { *m = EventCollaboratorRemoved{} } func (m *EventCollaboratorRemoved) String() string { return proto.CompactTextString(m) } func (*EventCollaboratorRemoved) ProtoMessage() {} func (*EventCollaboratorRemoved) Descriptor() ([]byte, []int) { return fileDescriptor_4702ff14c81a2bc3, []int{3} } func (m *EventCollaboratorRemoved) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventCollaboratorRemoved) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EventCollaboratorRemoved.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 *EventCollaboratorRemoved) XXX_Merge(src proto.Message) { xxx_messageInfo_EventCollaboratorRemoved.Merge(m, src) } func (m *EventCollaboratorRemoved) XXX_Size() int { return m.Size() } func (m *EventCollaboratorRemoved) XXX_DiscardUnknown() { xxx_messageInfo_EventCollaboratorRemoved.DiscardUnknown(m) } var xxx_messageInfo_EventCollaboratorRemoved proto.InternalMessageInfo func (m *EventCollaboratorRemoved) GetNamespaceId() string { if m != nil { return m.NamespaceId } return "" } func (m *EventCollaboratorRemoved) GetCollaboratorDid() string { if m != nil { return m.CollaboratorDid } return "" } func init() { proto.RegisterType((*EventNamespaceRegistered)(nil), "sourcehub.bulletin.EventNamespaceRegistered") proto.RegisterType((*EventPostCreated)(nil), "sourcehub.bulletin.EventPostCreated") proto.RegisterType((*EventCollaboratorAdded)(nil), "sourcehub.bulletin.EventCollaboratorAdded") proto.RegisterType((*EventCollaboratorRemoved)(nil), "sourcehub.bulletin.EventCollaboratorRemoved") } func init() { proto.RegisterFile("sourcehub/bulletin/events.proto", fileDescriptor_4702ff14c81a2bc3) } var fileDescriptor_4702ff14c81a2bc3 = []byte{ // 419 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xc1, 0x6e, 0xd3, 0x40, 0x10, 0x86, 0xb3, 0x14, 0x9a, 0x64, 0x83, 0x44, 0x65, 0x21, 0x30, 0x41, 0xb2, 0x4b, 0x4e, 0xe5, 0x62, 0x4b, 0xf4, 0x09, 0x9a, 0xc0, 0xa1, 0x07, 0x10, 0x8a, 0x38, 0x71, 0xb1, 0xd6, 0xde, 0xa9, 0xbb, 0xc2, 0xf6, 0x58, 0xbb, 0x93, 0x96, 0x1c, 0x79, 0x83, 0xbe, 0x01, 0x27, 0xde, 0xa5, 0xc7, 0x1e, 0x39, 0x01, 0x4a, 0x5e, 0x04, 0xed, 0xda, 0x4e, 0x7d, 0xcc, 0xa1, 0x37, 0xff, 0xff, 0xcc, 0xfc, 0xfa, 0x6c, 0xff, 0x3c, 0x34, 0xb8, 0xd2, 0x19, 0x5c, 0xae, 0xd2, 0x38, 0x5d, 0x15, 0x05, 0x90, 0xaa, 0x62, 0xb8, 0x82, 0x8a, 0x4c, 0x54, 0x6b, 0x24, 0xf4, 0xbc, 0xdd, 0x42, 0xd4, 0x2d, 0x4c, 0x9f, 0xe7, 0x98, 0xa3, 0x1b, 0xc7, 0xf6, 0xa9, 0xd9, 0x9c, 0x86, 0x39, 0x62, 0x5e, 0x40, 0xec, 0x54, 0xba, 0xba, 0x88, 0x49, 0x95, 0x60, 0x48, 0x94, 0x75, 0xb3, 0x30, 0xfb, 0xc9, 0xb8, 0xff, 0xc1, 0x66, 0x7f, 0x12, 0x25, 0x98, 0x5a, 0x64, 0xb0, 0x84, 0x5c, 0x19, 0x02, 0x0d, 0xd2, 0x7b, 0xc3, 0x9f, 0x56, 0x9d, 0x9d, 0x28, 0xe9, 0xb3, 0x63, 0x76, 0x32, 0x5e, 0x4e, 0x76, 0xde, 0xb9, 0xf4, 0x5e, 0xf3, 0x31, 0x5e, 0x57, 0xa0, 0x13, 0xa9, 0xa4, 0xff, 0xc8, 0xcd, 0x47, 0xce, 0x78, 0xaf, 0xa4, 0xb7, 0xe0, 0x3c, 0xd3, 0x20, 0x08, 0x64, 0x22, 0xc8, 0x3f, 0x38, 0x66, 0x27, 0x93, 0x77, 0xd3, 0xa8, 0x41, 0x8a, 0x3a, 0xa4, 0xe8, 0x4b, 0x87, 0x34, 0x1f, 0xdd, 0xfe, 0x09, 0x07, 0x37, 0x7f, 0x43, 0xb6, 0x1c, 0xb7, 0x77, 0x67, 0x34, 0xfb, 0xc5, 0xf8, 0x91, 0x23, 0xfc, 0x8c, 0x86, 0x16, 0x8d, 0xbd, 0x0f, 0xd9, 0x4b, 0x3e, 0xac, 0xd1, 0x50, 0xb2, 0xe3, 0x3a, 0xb4, 0xf2, 0x5c, 0x7a, 0x21, 0x9f, 0xb8, 0x74, 0x6c, 0xa0, 0x0f, 0xdc, 0x90, 0xb7, 0x96, 0xc5, 0xf6, 0xf9, 0xb0, 0x16, 0xeb, 0x02, 0x85, 0xf4, 0x1f, 0xbb, 0x61, 0x27, 0xbd, 0x29, 0x1f, 0x09, 0x4d, 0xea, 0x42, 0x64, 0xe4, 0x3f, 0x69, 0x5e, 0xb6, 0xd3, 0xb3, 0x1f, 0x8c, 0xbf, 0x70, 0x9c, 0x0b, 0x2c, 0x0a, 0x91, 0xa2, 0xb6, 0x71, 0x67, 0x52, 0xee, 0x47, 0xfb, 0x96, 0x1f, 0x65, 0xbd, 0xbb, 0xde, 0xe7, 0x7c, 0xd6, 0xf7, 0x2d, 0xde, 0x2b, 0x3e, 0x12, 0x36, 0x36, 0x49, 0xd7, 0x2d, 0xfc, 0xd0, 0xe9, 0xf9, 0x7a, 0x76, 0xd9, 0xfe, 0xcc, 0x3e, 0xc2, 0x12, 0x4a, 0xbc, 0x7a, 0x68, 0x88, 0xf9, 0xc7, 0xdb, 0x4d, 0xc0, 0xee, 0x36, 0x01, 0xfb, 0xb7, 0x09, 0xd8, 0xcd, 0x36, 0x18, 0xdc, 0x6d, 0x83, 0xc1, 0xef, 0x6d, 0x30, 0xf8, 0x7a, 0x9a, 0x2b, 0xb2, 0xcd, 0xcc, 0xb0, 0x8c, 0x9b, 0x9e, 0x56, 0x40, 0xd7, 0xa8, 0xbf, 0xc5, 0xf7, 0xb5, 0xfe, 0x7e, 0x5f, 0x6c, 0x5a, 0xd7, 0x60, 0xd2, 0x43, 0xd7, 0x86, 0xd3, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xc8, 0x68, 0x78, 0xfb, 0x02, 0x00, 0x00, } func (m *EventNamespaceRegistered) 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 *EventNamespaceRegistered) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EventNamespaceRegistered) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintEvents(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x1a if len(m.OwnerDid) > 0 { i -= len(m.OwnerDid) copy(dAtA[i:], m.OwnerDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.OwnerDid))) i-- dAtA[i] = 0x12 } if len(m.NamespaceId) > 0 { i -= len(m.NamespaceId) copy(dAtA[i:], m.NamespaceId) i = encodeVarintEvents(dAtA, i, uint64(len(m.NamespaceId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *EventPostCreated) 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 *EventPostCreated) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EventPostCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Artifact) > 0 { i -= len(m.Artifact) copy(dAtA[i:], m.Artifact) i = encodeVarintEvents(dAtA, i, uint64(len(m.Artifact))) i-- dAtA[i] = 0x2a } if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) i = encodeVarintEvents(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x22 } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.CreatorDid))) i-- dAtA[i] = 0x1a } if len(m.PostId) > 0 { i -= len(m.PostId) copy(dAtA[i:], m.PostId) i = encodeVarintEvents(dAtA, i, uint64(len(m.PostId))) i-- dAtA[i] = 0x12 } if len(m.NamespaceId) > 0 { i -= len(m.NamespaceId) copy(dAtA[i:], m.NamespaceId) i = encodeVarintEvents(dAtA, i, uint64(len(m.NamespaceId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *EventCollaboratorAdded) 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 *EventCollaboratorAdded) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EventCollaboratorAdded) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.AddedBy) > 0 { i -= len(m.AddedBy) copy(dAtA[i:], m.AddedBy) i = encodeVarintEvents(dAtA, i, uint64(len(m.AddedBy))) i-- dAtA[i] = 0x1a } if len(m.CollaboratorDid) > 0 { i -= len(m.CollaboratorDid) copy(dAtA[i:], m.CollaboratorDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.CollaboratorDid))) i-- dAtA[i] = 0x12 } if len(m.NamespaceId) > 0 { i -= len(m.NamespaceId) copy(dAtA[i:], m.NamespaceId) i = encodeVarintEvents(dAtA, i, uint64(len(m.NamespaceId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *EventCollaboratorRemoved) 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 *EventCollaboratorRemoved) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EventCollaboratorRemoved) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.CollaboratorDid) > 0 { i -= len(m.CollaboratorDid) copy(dAtA[i:], m.CollaboratorDid) i = encodeVarintEvents(dAtA, i, uint64(len(m.CollaboratorDid))) i-- dAtA[i] = 0x12 } if len(m.NamespaceId) > 0 { i -= len(m.NamespaceId) copy(dAtA[i:], m.NamespaceId) i = encodeVarintEvents(dAtA, i, uint64(len(m.NamespaceId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *EventNamespaceRegistered) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.NamespaceId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.OwnerDid) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovEvents(uint64(l)) return n } func (m *EventPostCreated) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.NamespaceId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.PostId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.CreatorDid) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.Payload) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.Artifact) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } return n } func (m *EventCollaboratorAdded) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.NamespaceId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.CollaboratorDid) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.AddedBy) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } return n } func (m *EventCollaboratorRemoved) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.NamespaceId) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.CollaboratorDid) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } return n } func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozEvents(x uint64) (n int) { return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *EventNamespaceRegistered) 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 ErrIntOverflowEvents } 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: EventNamespaceRegistered: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EventNamespaceRegistered: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.OwnerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EventPostCreated) 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 ErrIntOverflowEvents } 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: EventPostCreated: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EventPostCreated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PostId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.PostId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.Payload = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Artifact", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.Artifact = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EventCollaboratorAdded) 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 ErrIntOverflowEvents } 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: EventCollaboratorAdded: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EventCollaboratorAdded: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.CollaboratorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AddedBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.AddedBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EventCollaboratorRemoved) 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 ErrIntOverflowEvents } 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: EventCollaboratorRemoved: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EventCollaboratorRemoved: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.NamespaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } 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 ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.CollaboratorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipEvents(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, ErrIntOverflowEvents } 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, ErrIntOverflowEvents } 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, ErrIntOverflowEvents } 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, ErrInvalidLengthEvents } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupEvents } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthEvents } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/bulletin/types/expected_keepers.go ================================================ package types import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" ) // AccountKeeper defines the expected interface for the Account module. type AccountKeeper interface { GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation GetModuleAccount(context.Context, string) sdk.ModuleAccountI SetAccount(context.Context, sdk.AccountI) // 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{}) } ================================================ FILE: x/bulletin/types/genesis.go ================================================ package types // this line is used by starport scaffolding # genesis/types/import // DefaultIndex is the default global index const DefaultIndex uint64 = 1 // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), PolicyId: "", Namespaces: []Namespace{}, Collaborators: []Collaborator{}, Posts: []Post{}, } } // Validate performs basic genesis state validation returning an error upon any // failure. func (gs GenesisState) Validate() error { // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() } ================================================ FILE: x/bulletin/types/genesis.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/genesis.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 // GenesisState defines the bulletin 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"` PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` Namespaces []Namespace `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces"` Collaborators []Collaborator `protobuf:"bytes,4,rep,name=collaborators,proto3" json:"collaborators"` Posts []Post `protobuf:"bytes,5,rep,name=posts,proto3" json:"posts"` } 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_965742a13a30694e, []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 (m *GenesisState) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } func (m *GenesisState) GetNamespaces() []Namespace { if m != nil { return m.Namespaces } return nil } func (m *GenesisState) GetCollaborators() []Collaborator { if m != nil { return m.Collaborators } return nil } func (m *GenesisState) GetPosts() []Post { if m != nil { return m.Posts } return nil } func init() { proto.RegisterType((*GenesisState)(nil), "sourcehub.bulletin.GenesisState") } func init() { proto.RegisterFile("sourcehub/bulletin/genesis.proto", fileDescriptor_965742a13a30694e) } var fileDescriptor_965742a13a30694e = []byte{ // 349 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xb1, 0x4e, 0xf3, 0x30, 0x10, 0xc7, 0xe3, 0xf6, 0x6b, 0xf5, 0xd5, 0x85, 0x01, 0x8b, 0x21, 0x0a, 0x6a, 0x1a, 0x55, 0x42, 0xaa, 0x18, 0x12, 0xa9, 0x9d, 0x18, 0x58, 0xca, 0x00, 0x0c, 0x20, 0x28, 0x1b, 0x0b, 0x72, 0x52, 0x2b, 0x44, 0x24, 0xb9, 0x28, 0x76, 0x05, 0x7d, 0x0b, 0x1e, 0x83, 0x91, 0x67, 0x60, 0xea, 0xd8, 0x91, 0x09, 0xa1, 0x76, 0xe0, 0x35, 0x50, 0xe2, 0xb4, 0x35, 0xc2, 0x4b, 0x74, 0xba, 0xfc, 0xee, 0x77, 0xf9, 0xe7, 0xb0, 0xc3, 0x61, 0x9a, 0x07, 0xec, 0x61, 0xea, 0x7b, 0xfe, 0x34, 0x8e, 0x99, 0x88, 0x52, 0x2f, 0x64, 0x29, 0xe3, 0x11, 0x77, 0xb3, 0x1c, 0x04, 0x10, 0xb2, 0x21, 0xdc, 0x35, 0x61, 0xed, 0xd1, 0x24, 0x4a, 0xc1, 0x2b, 0x9f, 0x12, 0xb3, 0xf6, 0x43, 0x08, 0xa1, 0x2c, 0xbd, 0xa2, 0xaa, 0xba, 0x5d, 0x8d, 0x3e, 0xa3, 0x39, 0x4d, 0x2a, 0xbb, 0xd5, 0xd3, 0x00, 0x29, 0x4d, 0x18, 0xcf, 0x68, 0xc0, 0x2a, 0xe6, 0x50, 0xc3, 0x04, 0x10, 0xc7, 0xd4, 0x87, 0x9c, 0x0a, 0xc8, 0x2b, 0xac, 0xa3, 0xdb, 0x05, 0x5c, 0xc8, 0xd7, 0xbd, 0xf7, 0x1a, 0xde, 0x39, 0x93, 0xc9, 0x6e, 0x05, 0x15, 0x8c, 0x9c, 0xe0, 0xa6, 0xfc, 0x14, 0x13, 0x39, 0xa8, 0xdf, 0x1e, 0x58, 0xee, 0xdf, 0xa4, 0xee, 0x75, 0x49, 0x8c, 0x5a, 0xf3, 0xcf, 0xae, 0xf1, 0xfa, 0xfd, 0x76, 0x84, 0xc6, 0xd5, 0x10, 0x39, 0xc0, 0xad, 0x0c, 0xe2, 0x28, 0x98, 0xdd, 0x47, 0x13, 0xb3, 0xe6, 0xa0, 0x7e, 0x6b, 0xfc, 0x5f, 0x36, 0x2e, 0x26, 0xe4, 0x1c, 0xe3, 0x4d, 0x0a, 0x6e, 0xd6, 0x9d, 0x7a, 0xbf, 0x3d, 0xe8, 0xe8, 0xfc, 0x57, 0x6b, 0x4a, 0x5d, 0xa1, 0xcc, 0x92, 0x1b, 0xbc, 0xab, 0x66, 0xe5, 0xe6, 0xbf, 0x52, 0xe6, 0xe8, 0x64, 0xa7, 0x0a, 0xa8, 0xfa, 0x7e, 0x1b, 0xc8, 0x31, 0x6e, 0x14, 0xff, 0x85, 0x9b, 0x8d, 0x52, 0x65, 0x6a, 0x73, 0x03, 0x17, 0xaa, 0x42, 0x4e, 0x8c, 0x2e, 0xe7, 0x4b, 0x1b, 0x2d, 0x96, 0x36, 0xfa, 0x5a, 0xda, 0xe8, 0x65, 0x65, 0x1b, 0x8b, 0x95, 0x6d, 0x7c, 0xac, 0x6c, 0xe3, 0x6e, 0x18, 0x46, 0xa2, 0x30, 0x04, 0x90, 0x78, 0xd2, 0x97, 0x32, 0xf1, 0x04, 0xf9, 0xa3, 0xb7, 0x3d, 0xcb, 0xf3, 0xf6, 0x30, 0x62, 0x96, 0x31, 0xee, 0x37, 0xcb, 0xd3, 0x0c, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x66, 0x0b, 0x6b, 0x3a, 0x86, 0x02, 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 if len(m.Posts) > 0 { for iNdEx := len(m.Posts) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Posts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } } if len(m.Collaborators) > 0 { for iNdEx := len(m.Collaborators) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Collaborators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } } if len(m.Namespaces) > 0 { for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Namespaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintGenesis(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0x12 } { 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)) l = len(m.PolicyId) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } if len(m.Namespaces) > 0 { for _, e := range m.Namespaces { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.Collaborators) > 0 { for _, e := range m.Collaborators { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.Posts) > 0 { for _, e := range m.Posts { l = e.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 case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis } 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 ErrInvalidLengthGenesis } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", 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.Namespaces = append(m.Namespaces, Namespace{}) if err := m.Namespaces[len(m.Namespaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Collaborators", 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.Collaborators = append(m.Collaborators, Collaborator{}) if err := m.Collaborators[len(m.Collaborators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Posts", 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.Posts = append(m.Posts, Post{}) if err := m.Posts[len(m.Posts)-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 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") ) ================================================ FILE: x/bulletin/types/genesis_test.go ================================================ package types_test import ( "testing" "github.com/sourcenetwork/sourcehub/x/bulletin/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{ // this line is used by starport scaffolding # types/genesis/validField }, valid: true, }, // this line is used by starport scaffolding # types/genesis/testcase } 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) } }) } } ================================================ FILE: x/bulletin/types/keys.go ================================================ package types import ( "bytes" "crypto/sha256" "encoding/hex" "strings" ) const ( // ModuleName defines the module name ModuleName = "bulletin" // StoreKey defines the primary module store key StoreKey = ModuleName PolicyIdKey = "policy_id" PostKeyPrefix = "post/" NamespaceKeyPrefix = "namespace/" CollaboratorKeyPrefix = "collaborator/" ) var ( ParamsKey = []byte("p_bulletin") ) func KeyPrefix(p string) []byte { return []byte(p) } // SanitizeKeyPart replaces "/" with "|" in key parts to prevent key collisions. func SanitizeKeyPart(part string) string { return strings.ReplaceAll(part, "/", "|") } // UnsanitizeKeyPart restores "/" from "|" in key parts. func UnsanitizeKeyPart(part string) string { return strings.ReplaceAll(part, "|", "/") } // PostKey builds and returns the store key to store/retrieve the Post. func PostKey(namespaceId string, postId string) []byte { sanitizedNamespaceId := SanitizeKeyPart(namespaceId) sanitizedPostId := SanitizeKeyPart(postId) // Precompute buffer size size := len(sanitizedNamespaceId) + 1 + len(sanitizedPostId) buf := make([]byte, 0, size) // Append bytes to the buffer buf = append(buf, sanitizedNamespaceId...) buf = append(buf, '/') buf = append(buf, sanitizedPostId...) return buf } // CollaboratorKey builds and returns the store key to store/retrieve the Actor. func CollaboratorKey(namespaceId string, collaboratorDID string) []byte { sanitizedNamespaceId := SanitizeKeyPart(namespaceId) sanitizedCollaboratorDID := SanitizeKeyPart(collaboratorDID) // Precompute buffer size size := len(sanitizedNamespaceId) + 1 + len(sanitizedCollaboratorDID) buf := make([]byte, 0, size) // Append bytes to the buffer buf = append(buf, sanitizedNamespaceId...) buf = append(buf, '/') buf = append(buf, sanitizedCollaboratorDID...) return buf } // ParsePostKey retrieves namespaceId and postId from the Post key. func ParsePostKey(key []byte) (namespaceId string, postId string) { parts := bytes.Split(key, []byte{'/'}) if len(parts) != 2 { panic("invalid post key format: expected format namespaceId/postId") } namespaceId = UnsanitizeKeyPart(string(parts[0])) postId = UnsanitizeKeyPart(string(parts[1])) return namespaceId, postId } // ParseCollaboratorKey retrieves namespaceId and actorDID from the Collaborator key. func ParseCollaboratorKey(key []byte) (namespaceId string, actorDID string) { parts := bytes.Split(key, []byte{'/'}) if len(parts) != 2 { panic("invalid collaborator key format: expected format namespaceId/actorDID") } namespaceId = UnsanitizeKeyPart(string(parts[0])) actorDID = UnsanitizeKeyPart(string(parts[1])) return namespaceId, actorDID } // GeneratePostId generates deterministic post id from namespaceId and post payload. func GeneratePostId(namespaceId string, payload []byte) string { hash := sha256.Sum256([]byte(namespaceId + string(payload))) return hex.EncodeToString(hash[:]) } ================================================ FILE: x/bulletin/types/message_add_collaborator.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ sdk.Msg = &MsgAddCollaborator{} func NewMsgAddCollaborator(creator string, namespace string, collaborator string) *MsgAddCollaborator { return &MsgAddCollaborator{ Creator: creator, Namespace: namespace, Collaborator: collaborator, } } func (msg *MsgAddCollaborator) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } if msg.Namespace == "" { return ErrInvalidNamespaceId } _, err = sdk.AccAddressFromBech32(msg.Collaborator) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid collaborator address (%s)", err) } return nil } ================================================ FILE: x/bulletin/types/message_create_post.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ sdk.Msg = &MsgCreatePost{} func NewMsgCreatePost(creator string, namespace string, payload []byte) *MsgCreatePost { return &MsgCreatePost{ Creator: creator, Namespace: namespace, Payload: payload, } } func (msg *MsgCreatePost) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } if msg.Namespace == "" { return ErrInvalidNamespaceId } if len(msg.Payload) == 0 { return ErrInvalidPostPayload } return nil } ================================================ FILE: x/bulletin/types/message_register_namespace.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ sdk.Msg = &MsgRegisterNamespace{} func NewMsgRegisterNamespace(creator string, namespace string) *MsgRegisterNamespace { return &MsgRegisterNamespace{ Creator: creator, Namespace: namespace, } } func (msg *MsgRegisterNamespace) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } if msg.Namespace == "" { return ErrInvalidNamespaceId } return nil } ================================================ FILE: x/bulletin/types/message_remove_collaborator.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ sdk.Msg = &MsgRemoveCollaborator{} func NewMsgRemoveCollaborator(creator string, namespace string, collaborator string) *MsgRemoveCollaborator { return &MsgRemoveCollaborator{ Creator: creator, Namespace: namespace, Collaborator: collaborator, } } func (msg *MsgRemoveCollaborator) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } if msg.Namespace == "" { return ErrInvalidNamespaceId } _, err = sdk.AccAddressFromBech32(msg.Collaborator) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid collaborator address (%s)", err) } return nil } ================================================ FILE: x/bulletin/types/msg_update_params.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgUpdateParams{} // ValidateBasic does a sanity check on the provided data. func (m *MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { return errorsmod.Wrap(err, "invalid authority address") } if err := m.Params.Validate(); err != nil { return err } return nil } ================================================ FILE: x/bulletin/types/namespace.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/namespace.proto package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // Namespace represents a logical bulletin space used to group posts. type Namespace struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` OwnerDid string `protobuf:"bytes,3,opt,name=owner_did,json=ownerDid,proto3" json:"owner_did,omitempty"` CreatedAt time.Time `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *Namespace) Reset() { *m = Namespace{} } func (m *Namespace) String() string { return proto.CompactTextString(m) } func (*Namespace) ProtoMessage() {} func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptor_f47a8bc38972fd19, []int{0} } func (m *Namespace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Namespace.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 *Namespace) XXX_Merge(src proto.Message) { xxx_messageInfo_Namespace.Merge(m, src) } func (m *Namespace) XXX_Size() int { return m.Size() } func (m *Namespace) XXX_DiscardUnknown() { xxx_messageInfo_Namespace.DiscardUnknown(m) } var xxx_messageInfo_Namespace proto.InternalMessageInfo func (m *Namespace) GetId() string { if m != nil { return m.Id } return "" } func (m *Namespace) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *Namespace) GetOwnerDid() string { if m != nil { return m.OwnerDid } return "" } func (m *Namespace) GetCreatedAt() time.Time { if m != nil { return m.CreatedAt } return time.Time{} } func init() { proto.RegisterType((*Namespace)(nil), "sourcehub.bulletin.Namespace") } func init() { proto.RegisterFile("sourcehub/bulletin/namespace.proto", fileDescriptor_f47a8bc38972fd19) } var fileDescriptor_f47a8bc38972fd19 = []byte{ // 284 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, 0x10, 0x86, 0xe3, 0x80, 0xa0, 0x31, 0x12, 0x83, 0xc5, 0x10, 0x05, 0xe1, 0x54, 0x9d, 0x3a, 0xc5, 0x12, 0x7d, 0x02, 0x0a, 0x2b, 0x0c, 0x15, 0x13, 0x4b, 0x95, 0xc4, 0x26, 0x58, 0x24, 0xb9, 0xc8, 0xb9, 0xa8, 0xf0, 0x16, 0xdd, 0x78, 0xa5, 0x8e, 0x1d, 0x99, 0x00, 0x25, 0x2f, 0x82, 0xea, 0x34, 0x74, 0x61, 0xf3, 0xdd, 0xff, 0x59, 0xff, 0xff, 0x1f, 0x9d, 0xd4, 0xd0, 0x98, 0x54, 0xbd, 0x34, 0x89, 0x48, 0x9a, 0x3c, 0x57, 0xa8, 0x4b, 0x51, 0xc6, 0x85, 0xaa, 0xab, 0x38, 0x55, 0x51, 0x65, 0x00, 0x81, 0xb1, 0x3f, 0x26, 0x1a, 0x98, 0xe0, 0x22, 0x83, 0x0c, 0xac, 0x2c, 0x76, 0xaf, 0x9e, 0x0c, 0xc2, 0x0c, 0x20, 0xcb, 0x95, 0xb0, 0x53, 0xd2, 0x3c, 0x0b, 0xd4, 0x85, 0xaa, 0x31, 0x2e, 0xaa, 0x3d, 0x70, 0xf5, 0x8f, 0x5d, 0x05, 0x35, 0xf6, 0xf2, 0xe4, 0x83, 0x50, 0xef, 0x61, 0x70, 0x67, 0xe7, 0xd4, 0xd5, 0xd2, 0x27, 0x63, 0x32, 0xf5, 0x16, 0xae, 0x96, 0xcc, 0xa7, 0xa7, 0xa9, 0x51, 0x31, 0x82, 0xf1, 0x5d, 0xbb, 0x1c, 0x46, 0x76, 0x49, 0x3d, 0x58, 0x95, 0xca, 0x2c, 0xa5, 0x96, 0xfe, 0x91, 0xd5, 0x46, 0x76, 0x71, 0xa7, 0x25, 0xbb, 0xa5, 0xd4, 0x72, 0x4a, 0x2e, 0x63, 0xf4, 0x8f, 0xc7, 0x64, 0x7a, 0x76, 0x1d, 0x44, 0x7d, 0xd2, 0x68, 0x48, 0x1a, 0x3d, 0x0e, 0x49, 0xe7, 0xa3, 0xcd, 0x57, 0xe8, 0xac, 0xbf, 0x43, 0xb2, 0xf0, 0xf6, 0xff, 0x6e, 0x70, 0x7e, 0xbf, 0x69, 0x39, 0xd9, 0xb6, 0x9c, 0xfc, 0xb4, 0x9c, 0xac, 0x3b, 0xee, 0x6c, 0x3b, 0xee, 0x7c, 0x76, 0xdc, 0x79, 0x9a, 0x65, 0x1a, 0x77, 0xa7, 0x49, 0xa1, 0x10, 0x7d, 0xbb, 0x52, 0xe1, 0x0a, 0xcc, 0xab, 0x38, 0x74, 0x7d, 0x3b, 0xb4, 0xc5, 0xf7, 0x4a, 0xd5, 0xc9, 0x89, 0xf5, 0x9d, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x96, 0x1a, 0x35, 0xde, 0x7f, 0x01, 0x00, 0x00, } func (m *Namespace) 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 *Namespace) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintNamespace(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x22 if len(m.OwnerDid) > 0 { i -= len(m.OwnerDid) copy(dAtA[i:], m.OwnerDid) i = encodeVarintNamespace(dAtA, i, uint64(len(m.OwnerDid))) i-- dAtA[i] = 0x1a } if len(m.Creator) > 0 { i -= len(m.Creator) copy(dAtA[i:], m.Creator) i = encodeVarintNamespace(dAtA, i, uint64(len(m.Creator))) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintNamespace(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { offset -= sovNamespace(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Namespace) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Id) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } l = len(m.Creator) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } l = len(m.OwnerDid) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovNamespace(uint64(l)) return n } func sovNamespace(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Namespace) 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 ErrIntOverflowNamespace } 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: Namespace: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } 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 ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthNamespace } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: 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 ErrIntOverflowNamespace } 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 ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthNamespace } if postIndex > l { return io.ErrUnexpectedEOF } m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } 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 ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthNamespace } if postIndex > l { return io.ErrUnexpectedEOF } m.OwnerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthNamespace } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipNamespace(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, ErrIntOverflowNamespace } 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, ErrIntOverflowNamespace } 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, ErrIntOverflowNamespace } 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, ErrInvalidLengthNamespace } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupNamespace } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthNamespace } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/bulletin/types/params.go ================================================ package types import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) var _ paramtypes.ParamSet = (*Params)(nil) // ParamKeyTable the param key table for launch module func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } // NewParams creates a new Params instance func NewParams() Params { return Params{} } // DefaultParams returns a default set of parameters func DefaultParams() Params { return NewParams() } // ParamSetPairs get the params.ParamSet func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{} } // Validate validates the set of params func (p Params) Validate() error { return nil } ================================================ FILE: x/bulletin/types/params.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/params.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 // 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_98c7f4c44449305d, []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), "sourcehub.bulletin.Params") } func init() { proto.RegisterFile("sourcehub/bulletin/params.proto", fileDescriptor_98c7f4c44449305d) } var fileDescriptor_98c7f4c44449305d = []byte{ // 175 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x4f, 0x2a, 0xcd, 0xc9, 0x49, 0x2d, 0xc9, 0xcc, 0xd3, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x2b, 0xd0, 0x83, 0x29, 0x90, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x65, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x11, 0x55, 0xd2, 0xe3, 0x62, 0x0b, 0x00, 0x1b, 0x66, 0xa5, 0xf2, 0x62, 0x81, 0x3c, 0x63, 0xd7, 0xf3, 0x0d, 0x5a, 0xd2, 0x08, 0x0b, 0x2b, 0x10, 0x56, 0x42, 0x54, 0x39, 0xf9, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x71, 0x7a, 0x66, 0x09, 0xc8, 0x0d, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0x13, 0xf2, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xf5, 0xb1, 0x9a, 0x57, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0x85, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x23, 0x1e, 0xdc, 0x69, 0xe5, 0x00, 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") ) ================================================ FILE: x/bulletin/types/policy.go ================================================ package types // BasePolicy defines base policy for the bulletin module namespaces. func BasePolicy() string { policyStr := ` description: Base policy that defines permissions for bulletin namespaces name: Bulletin Policy resources: - name: namespace permissions: - expr: collaborator name: create_post relations: - name: collaborator types: - actor ` return policyStr } ================================================ FILE: x/bulletin/types/post.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/post.proto package types import ( fmt "fmt" 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 // Post represents a bulletin entry created within a specific namespace. type Post struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` CreatorDid string `protobuf:"bytes,3,opt,name=creator_did,json=creatorDid,proto3" json:"creator_did,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` } func (m *Post) Reset() { *m = Post{} } func (m *Post) String() string { return proto.CompactTextString(m) } func (*Post) ProtoMessage() {} func (*Post) Descriptor() ([]byte, []int) { return fileDescriptor_cc9c705aa9b79fa2, []int{0} } func (m *Post) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Post.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 *Post) XXX_Merge(src proto.Message) { xxx_messageInfo_Post.Merge(m, src) } func (m *Post) XXX_Size() int { return m.Size() } func (m *Post) XXX_DiscardUnknown() { xxx_messageInfo_Post.DiscardUnknown(m) } var xxx_messageInfo_Post proto.InternalMessageInfo func (m *Post) GetId() string { if m != nil { return m.Id } return "" } func (m *Post) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *Post) GetCreatorDid() string { if m != nil { return m.CreatorDid } return "" } func (m *Post) GetPayload() []byte { if m != nil { return m.Payload } return nil } func init() { proto.RegisterType((*Post)(nil), "sourcehub.bulletin.Post") } func init() { proto.RegisterFile("sourcehub/bulletin/post.proto", fileDescriptor_cc9c705aa9b79fa2) } var fileDescriptor_cc9c705aa9b79fa2 = []byte{ // 212 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x8f, 0xb1, 0x4e, 0x86, 0x30, 0x14, 0x46, 0x29, 0xfe, 0xd1, 0x50, 0x8d, 0x43, 0xa7, 0x0e, 0x5a, 0x89, 0x13, 0x13, 0x1d, 0x78, 0x03, 0xe3, 0x6a, 0x62, 0x18, 0x5d, 0x4c, 0x69, 0x1b, 0x6d, 0x04, 0x6e, 0xd3, 0x5e, 0xa2, 0xbc, 0x85, 0x8f, 0xe5, 0xc8, 0xe8, 0x68, 0xe0, 0x45, 0x8c, 0x28, 0x32, 0x7e, 0xe7, 0x2c, 0xdf, 0xa1, 0x97, 0x11, 0x86, 0xa0, 0xed, 0xf3, 0xd0, 0xc8, 0x66, 0x68, 0x5b, 0x8b, 0xae, 0x97, 0x1e, 0x22, 0x96, 0x3e, 0x00, 0x02, 0x63, 0xff, 0xba, 0xdc, 0xf4, 0x35, 0xd0, 0xc3, 0x3d, 0x44, 0x64, 0xe7, 0x34, 0x75, 0x86, 0x93, 0x9c, 0x14, 0x59, 0x9d, 0x3a, 0xc3, 0x2e, 0x68, 0xd6, 0xab, 0xce, 0x46, 0xaf, 0xb4, 0xe5, 0xe9, 0x8a, 0x77, 0xc0, 0xae, 0xe8, 0xa9, 0x0e, 0x56, 0x21, 0x84, 0x47, 0xe3, 0x0c, 0x3f, 0x5a, 0x3d, 0xfd, 0x43, 0xb7, 0xce, 0x30, 0x4e, 0x4f, 0xbc, 0x1a, 0x5b, 0x50, 0x86, 0x1f, 0x72, 0x52, 0x9c, 0xd5, 0xdb, 0xbc, 0xb9, 0xfb, 0x98, 0x05, 0x99, 0x66, 0x41, 0xbe, 0x66, 0x41, 0xde, 0x17, 0x91, 0x4c, 0x8b, 0x48, 0x3e, 0x17, 0x91, 0x3c, 0x54, 0x4f, 0x0e, 0x7f, 0xbe, 0x69, 0xe8, 0xe4, 0xef, 0xd3, 0xde, 0xe2, 0x2b, 0x84, 0x17, 0xb9, 0x67, 0xbd, 0xed, 0x61, 0x38, 0x7a, 0x1b, 0x9b, 0xe3, 0x35, 0xad, 0xfa, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x9e, 0x0e, 0x34, 0xfb, 0x00, 0x00, 0x00, } func (m *Post) 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 *Post) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Post) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) i = encodeVarintPost(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x22 } if len(m.CreatorDid) > 0 { i -= len(m.CreatorDid) copy(dAtA[i:], m.CreatorDid) i = encodeVarintPost(dAtA, i, uint64(len(m.CreatorDid))) i-- dAtA[i] = 0x1a } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintPost(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintPost(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintPost(dAtA []byte, offset int, v uint64) int { offset -= sovPost(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Post) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Id) if l > 0 { n += 1 + l + sovPost(uint64(l)) } l = len(m.Namespace) if l > 0 { n += 1 + l + sovPost(uint64(l)) } l = len(m.CreatorDid) if l > 0 { n += 1 + l + sovPost(uint64(l)) } l = len(m.Payload) if l > 0 { n += 1 + l + sovPost(uint64(l)) } return n } func sovPost(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozPost(x uint64) (n int) { return sovPost(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Post) 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 ErrIntOverflowPost } 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: Post: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Post: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPost } 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 ErrInvalidLengthPost } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthPost } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPost } 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 ErrInvalidLengthPost } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthPost } if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatorDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPost } 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 ErrInvalidLengthPost } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthPost } if postIndex > l { return io.ErrUnexpectedEOF } m.CreatorDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPost } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthPost } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthPost } if postIndex > l { return io.ErrUnexpectedEOF } m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) if m.Payload == nil { m.Payload = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPost(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPost } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipPost(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, ErrIntOverflowPost } 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, ErrIntOverflowPost } 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, ErrIntOverflowPost } 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, ErrInvalidLengthPost } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupPost } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthPost } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthPost = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPost = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPost = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/bulletin/types/query.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/query.proto package types import ( context "context" fmt "fmt" 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" 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" 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 // 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_ba1b70df5dd0f019, []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_ba1b70df5dd0f019, []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{} } type QueryNamespaceRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (m *QueryNamespaceRequest) Reset() { *m = QueryNamespaceRequest{} } func (m *QueryNamespaceRequest) String() string { return proto.CompactTextString(m) } func (*QueryNamespaceRequest) ProtoMessage() {} func (*QueryNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{2} } func (m *QueryNamespaceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespaceRequest.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 *QueryNamespaceRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespaceRequest.Merge(m, src) } func (m *QueryNamespaceRequest) XXX_Size() int { return m.Size() } func (m *QueryNamespaceRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespaceRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespaceRequest proto.InternalMessageInfo func (m *QueryNamespaceRequest) GetNamespace() string { if m != nil { return m.Namespace } return "" } type QueryNamespaceResponse struct { Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (m *QueryNamespaceResponse) Reset() { *m = QueryNamespaceResponse{} } func (m *QueryNamespaceResponse) String() string { return proto.CompactTextString(m) } func (*QueryNamespaceResponse) ProtoMessage() {} func (*QueryNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{3} } func (m *QueryNamespaceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespaceResponse.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 *QueryNamespaceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespaceResponse.Merge(m, src) } func (m *QueryNamespaceResponse) XXX_Size() int { return m.Size() } func (m *QueryNamespaceResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespaceResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespaceResponse proto.InternalMessageInfo func (m *QueryNamespaceResponse) GetNamespace() *Namespace { if m != nil { return m.Namespace } return nil } type QueryNamespacesRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryNamespacesRequest) Reset() { *m = QueryNamespacesRequest{} } func (m *QueryNamespacesRequest) String() string { return proto.CompactTextString(m) } func (*QueryNamespacesRequest) ProtoMessage() {} func (*QueryNamespacesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{4} } func (m *QueryNamespacesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespacesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespacesRequest.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 *QueryNamespacesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespacesRequest.Merge(m, src) } func (m *QueryNamespacesRequest) XXX_Size() int { return m.Size() } func (m *QueryNamespacesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespacesRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespacesRequest proto.InternalMessageInfo func (m *QueryNamespacesRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } type QueryNamespacesResponse struct { Namespaces []Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryNamespacesResponse) Reset() { *m = QueryNamespacesResponse{} } func (m *QueryNamespacesResponse) String() string { return proto.CompactTextString(m) } func (*QueryNamespacesResponse) ProtoMessage() {} func (*QueryNamespacesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{5} } func (m *QueryNamespacesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespacesResponse.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 *QueryNamespacesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespacesResponse.Merge(m, src) } func (m *QueryNamespacesResponse) XXX_Size() int { return m.Size() } func (m *QueryNamespacesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespacesResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespacesResponse proto.InternalMessageInfo func (m *QueryNamespacesResponse) GetNamespaces() []Namespace { if m != nil { return m.Namespaces } return nil } func (m *QueryNamespacesResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } type QueryNamespaceCollaboratorsRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryNamespaceCollaboratorsRequest) Reset() { *m = QueryNamespaceCollaboratorsRequest{} } func (m *QueryNamespaceCollaboratorsRequest) String() string { return proto.CompactTextString(m) } func (*QueryNamespaceCollaboratorsRequest) ProtoMessage() {} func (*QueryNamespaceCollaboratorsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{6} } func (m *QueryNamespaceCollaboratorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespaceCollaboratorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespaceCollaboratorsRequest.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 *QueryNamespaceCollaboratorsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespaceCollaboratorsRequest.Merge(m, src) } func (m *QueryNamespaceCollaboratorsRequest) XXX_Size() int { return m.Size() } func (m *QueryNamespaceCollaboratorsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespaceCollaboratorsRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespaceCollaboratorsRequest proto.InternalMessageInfo func (m *QueryNamespaceCollaboratorsRequest) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *QueryNamespaceCollaboratorsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } type QueryNamespaceCollaboratorsResponse struct { Collaborators []Collaborator `protobuf:"bytes,1,rep,name=collaborators,proto3" json:"collaborators"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryNamespaceCollaboratorsResponse) Reset() { *m = QueryNamespaceCollaboratorsResponse{} } func (m *QueryNamespaceCollaboratorsResponse) String() string { return proto.CompactTextString(m) } func (*QueryNamespaceCollaboratorsResponse) ProtoMessage() {} func (*QueryNamespaceCollaboratorsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{7} } func (m *QueryNamespaceCollaboratorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespaceCollaboratorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespaceCollaboratorsResponse.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 *QueryNamespaceCollaboratorsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespaceCollaboratorsResponse.Merge(m, src) } func (m *QueryNamespaceCollaboratorsResponse) XXX_Size() int { return m.Size() } func (m *QueryNamespaceCollaboratorsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespaceCollaboratorsResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespaceCollaboratorsResponse proto.InternalMessageInfo func (m *QueryNamespaceCollaboratorsResponse) GetCollaborators() []Collaborator { if m != nil { return m.Collaborators } return nil } func (m *QueryNamespaceCollaboratorsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } type QueryNamespacePostsRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryNamespacePostsRequest) Reset() { *m = QueryNamespacePostsRequest{} } func (m *QueryNamespacePostsRequest) String() string { return proto.CompactTextString(m) } func (*QueryNamespacePostsRequest) ProtoMessage() {} func (*QueryNamespacePostsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{8} } func (m *QueryNamespacePostsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespacePostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespacePostsRequest.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 *QueryNamespacePostsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespacePostsRequest.Merge(m, src) } func (m *QueryNamespacePostsRequest) XXX_Size() int { return m.Size() } func (m *QueryNamespacePostsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespacePostsRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespacePostsRequest proto.InternalMessageInfo func (m *QueryNamespacePostsRequest) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *QueryNamespacePostsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } type QueryNamespacePostsResponse struct { Posts []Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryNamespacePostsResponse) Reset() { *m = QueryNamespacePostsResponse{} } func (m *QueryNamespacePostsResponse) String() string { return proto.CompactTextString(m) } func (*QueryNamespacePostsResponse) ProtoMessage() {} func (*QueryNamespacePostsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{9} } func (m *QueryNamespacePostsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryNamespacePostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryNamespacePostsResponse.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 *QueryNamespacePostsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryNamespacePostsResponse.Merge(m, src) } func (m *QueryNamespacePostsResponse) XXX_Size() int { return m.Size() } func (m *QueryNamespacePostsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryNamespacePostsResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryNamespacePostsResponse proto.InternalMessageInfo func (m *QueryNamespacePostsResponse) GetPosts() []Post { if m != nil { return m.Posts } return nil } func (m *QueryNamespacePostsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } type QueryPostRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } func (m *QueryPostRequest) Reset() { *m = QueryPostRequest{} } func (m *QueryPostRequest) String() string { return proto.CompactTextString(m) } func (*QueryPostRequest) ProtoMessage() {} func (*QueryPostRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{10} } func (m *QueryPostRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPostRequest.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 *QueryPostRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPostRequest.Merge(m, src) } func (m *QueryPostRequest) XXX_Size() int { return m.Size() } func (m *QueryPostRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryPostRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryPostRequest proto.InternalMessageInfo func (m *QueryPostRequest) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *QueryPostRequest) GetId() string { if m != nil { return m.Id } return "" } type QueryPostResponse struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` } func (m *QueryPostResponse) Reset() { *m = QueryPostResponse{} } func (m *QueryPostResponse) String() string { return proto.CompactTextString(m) } func (*QueryPostResponse) ProtoMessage() {} func (*QueryPostResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{11} } func (m *QueryPostResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPostResponse.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 *QueryPostResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPostResponse.Merge(m, src) } func (m *QueryPostResponse) XXX_Size() int { return m.Size() } func (m *QueryPostResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryPostResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryPostResponse proto.InternalMessageInfo func (m *QueryPostResponse) GetPost() *Post { if m != nil { return m.Post } return nil } type QueryPostsRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryPostsRequest) Reset() { *m = QueryPostsRequest{} } func (m *QueryPostsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPostsRequest) ProtoMessage() {} func (*QueryPostsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{12} } func (m *QueryPostsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPostsRequest.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 *QueryPostsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPostsRequest.Merge(m, src) } func (m *QueryPostsRequest) XXX_Size() int { return m.Size() } func (m *QueryPostsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryPostsRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryPostsRequest proto.InternalMessageInfo func (m *QueryPostsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } type QueryPostsResponse struct { Posts []Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryPostsResponse) Reset() { *m = QueryPostsResponse{} } func (m *QueryPostsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPostsResponse) ProtoMessage() {} func (*QueryPostsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{13} } func (m *QueryPostsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryPostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPostsResponse.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 *QueryPostsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPostsResponse.Merge(m, src) } func (m *QueryPostsResponse) XXX_Size() int { return m.Size() } func (m *QueryPostsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryPostsResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryPostsResponse proto.InternalMessageInfo func (m *QueryPostsResponse) GetPosts() []Post { if m != nil { return m.Posts } return nil } func (m *QueryPostsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } // QueryBulletinPolicyIdRequest is request type for the Query/BulletinPolicyId RPC method. type QueryBulletinPolicyIdRequest struct { } func (m *QueryBulletinPolicyIdRequest) Reset() { *m = QueryBulletinPolicyIdRequest{} } func (m *QueryBulletinPolicyIdRequest) String() string { return proto.CompactTextString(m) } func (*QueryBulletinPolicyIdRequest) ProtoMessage() {} func (*QueryBulletinPolicyIdRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{14} } func (m *QueryBulletinPolicyIdRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryBulletinPolicyIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryBulletinPolicyIdRequest.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 *QueryBulletinPolicyIdRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryBulletinPolicyIdRequest.Merge(m, src) } func (m *QueryBulletinPolicyIdRequest) XXX_Size() int { return m.Size() } func (m *QueryBulletinPolicyIdRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryBulletinPolicyIdRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryBulletinPolicyIdRequest proto.InternalMessageInfo // QueryBulletinPolicyIdResponse is response type for the Query/BulletinPolicyId RPC method. type QueryBulletinPolicyIdResponse struct { PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` } func (m *QueryBulletinPolicyIdResponse) Reset() { *m = QueryBulletinPolicyIdResponse{} } func (m *QueryBulletinPolicyIdResponse) String() string { return proto.CompactTextString(m) } func (*QueryBulletinPolicyIdResponse) ProtoMessage() {} func (*QueryBulletinPolicyIdResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{15} } func (m *QueryBulletinPolicyIdResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryBulletinPolicyIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryBulletinPolicyIdResponse.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 *QueryBulletinPolicyIdResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryBulletinPolicyIdResponse.Merge(m, src) } func (m *QueryBulletinPolicyIdResponse) XXX_Size() int { return m.Size() } func (m *QueryBulletinPolicyIdResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryBulletinPolicyIdResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryBulletinPolicyIdResponse proto.InternalMessageInfo func (m *QueryBulletinPolicyIdResponse) GetPolicyId() string { if m != nil { return m.PolicyId } return "" } // QueryIterateGlobRequest type QueryIterateGlobRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Glob string `protobuf:"bytes,2,opt,name=glob,proto3" json:"glob,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryIterateGlobRequest) Reset() { *m = QueryIterateGlobRequest{} } func (m *QueryIterateGlobRequest) String() string { return proto.CompactTextString(m) } func (*QueryIterateGlobRequest) ProtoMessage() {} func (*QueryIterateGlobRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{16} } func (m *QueryIterateGlobRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryIterateGlobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryIterateGlobRequest.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 *QueryIterateGlobRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryIterateGlobRequest.Merge(m, src) } func (m *QueryIterateGlobRequest) XXX_Size() int { return m.Size() } func (m *QueryIterateGlobRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryIterateGlobRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryIterateGlobRequest proto.InternalMessageInfo func (m *QueryIterateGlobRequest) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *QueryIterateGlobRequest) GetGlob() string { if m != nil { return m.Glob } return "" } func (m *QueryIterateGlobRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // QueryIterateGlobResponse type QueryIterateGlobResponse struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryIterateGlobResponse) Reset() { *m = QueryIterateGlobResponse{} } func (m *QueryIterateGlobResponse) String() string { return proto.CompactTextString(m) } func (*QueryIterateGlobResponse) ProtoMessage() {} func (*QueryIterateGlobResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ba1b70df5dd0f019, []int{17} } func (m *QueryIterateGlobResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryIterateGlobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryIterateGlobResponse.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 *QueryIterateGlobResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryIterateGlobResponse.Merge(m, src) } func (m *QueryIterateGlobResponse) XXX_Size() int { return m.Size() } func (m *QueryIterateGlobResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryIterateGlobResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryIterateGlobResponse proto.InternalMessageInfo func (m *QueryIterateGlobResponse) GetPosts() []*Post { if m != nil { return m.Posts } return nil } func (m *QueryIterateGlobResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } func init() { proto.RegisterType((*QueryParamsRequest)(nil), "sourcehub.bulletin.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "sourcehub.bulletin.QueryParamsResponse") proto.RegisterType((*QueryNamespaceRequest)(nil), "sourcehub.bulletin.QueryNamespaceRequest") proto.RegisterType((*QueryNamespaceResponse)(nil), "sourcehub.bulletin.QueryNamespaceResponse") proto.RegisterType((*QueryNamespacesRequest)(nil), "sourcehub.bulletin.QueryNamespacesRequest") proto.RegisterType((*QueryNamespacesResponse)(nil), "sourcehub.bulletin.QueryNamespacesResponse") proto.RegisterType((*QueryNamespaceCollaboratorsRequest)(nil), "sourcehub.bulletin.QueryNamespaceCollaboratorsRequest") proto.RegisterType((*QueryNamespaceCollaboratorsResponse)(nil), "sourcehub.bulletin.QueryNamespaceCollaboratorsResponse") proto.RegisterType((*QueryNamespacePostsRequest)(nil), "sourcehub.bulletin.QueryNamespacePostsRequest") proto.RegisterType((*QueryNamespacePostsResponse)(nil), "sourcehub.bulletin.QueryNamespacePostsResponse") proto.RegisterType((*QueryPostRequest)(nil), "sourcehub.bulletin.QueryPostRequest") proto.RegisterType((*QueryPostResponse)(nil), "sourcehub.bulletin.QueryPostResponse") proto.RegisterType((*QueryPostsRequest)(nil), "sourcehub.bulletin.QueryPostsRequest") proto.RegisterType((*QueryPostsResponse)(nil), "sourcehub.bulletin.QueryPostsResponse") proto.RegisterType((*QueryBulletinPolicyIdRequest)(nil), "sourcehub.bulletin.QueryBulletinPolicyIdRequest") proto.RegisterType((*QueryBulletinPolicyIdResponse)(nil), "sourcehub.bulletin.QueryBulletinPolicyIdResponse") proto.RegisterType((*QueryIterateGlobRequest)(nil), "sourcehub.bulletin.QueryIterateGlobRequest") proto.RegisterType((*QueryIterateGlobResponse)(nil), "sourcehub.bulletin.QueryIterateGlobResponse") } func init() { proto.RegisterFile("sourcehub/bulletin/query.proto", fileDescriptor_ba1b70df5dd0f019) } var fileDescriptor_ba1b70df5dd0f019 = []byte{ // 954 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x97, 0xcf, 0x6f, 0xdc, 0x44, 0x14, 0xc7, 0x77, 0xb6, 0x49, 0xc4, 0xbe, 0x15, 0x55, 0x3b, 0x94, 0x12, 0xb9, 0x89, 0x5b, 0x19, 0x9a, 0xb4, 0xdb, 0x60, 0x27, 0x59, 0xda, 0xaa, 0x0a, 0x15, 0x90, 0x4a, 0x84, 0x1c, 0x40, 0x9b, 0x15, 0x5c, 0xe0, 0x10, 0xec, 0x5d, 0xcb, 0x58, 0x78, 0x3d, 0x8e, 0x67, 0x16, 0x88, 0xa2, 0x5c, 0x72, 0x41, 0x82, 0x0b, 0x52, 0x38, 0x20, 0x71, 0x01, 0x71, 0xe1, 0x10, 0x21, 0xfe, 0x05, 0x6e, 0x39, 0x45, 0x91, 0xb8, 0x70, 0x42, 0x28, 0x41, 0xe2, 0xdf, 0x40, 0x1e, 0x8f, 0xbd, 0xf6, 0xae, 0x1d, 0x7b, 0xa3, 0x15, 0xe2, 0x12, 0x59, 0x9e, 0xf7, 0xe3, 0xf3, 0xbe, 0xf3, 0xfc, 0x5e, 0x16, 0x64, 0x4a, 0xfa, 0x7e, 0xc7, 0xfc, 0xa4, 0x6f, 0x68, 0x46, 0xdf, 0x71, 0x4c, 0x66, 0xbb, 0xda, 0x4e, 0xdf, 0xf4, 0x77, 0x55, 0xcf, 0x27, 0x8c, 0x60, 0x1c, 0x9f, 0xab, 0xd1, 0xb9, 0x74, 0x5d, 0xef, 0xd9, 0x2e, 0xd1, 0xf8, 0xdf, 0xd0, 0x4c, 0x6a, 0x74, 0x08, 0xed, 0x11, 0xaa, 0x19, 0x3a, 0x35, 0x43, 0x7f, 0xed, 0xb3, 0x15, 0xc3, 0x64, 0xfa, 0x8a, 0xe6, 0xe9, 0x96, 0xed, 0xea, 0xcc, 0x26, 0xae, 0xb0, 0xbd, 0x61, 0x11, 0x8b, 0xf0, 0x47, 0x2d, 0x78, 0x12, 0x6f, 0xe7, 0x2c, 0x42, 0x2c, 0xc7, 0xd4, 0x74, 0xcf, 0xd6, 0x74, 0xd7, 0x25, 0x8c, 0xbb, 0x50, 0x71, 0x7a, 0x3b, 0x03, 0xd3, 0xd3, 0x7d, 0xbd, 0x17, 0x19, 0x28, 0x19, 0x06, 0xae, 0xde, 0x33, 0xa9, 0xa7, 0x77, 0x4c, 0x61, 0x73, 0x37, 0xc3, 0xa6, 0x43, 0x1c, 0x47, 0x37, 0x88, 0xaf, 0x33, 0xe2, 0x0b, 0xb3, 0xf9, 0xac, 0x5c, 0x84, 0xb2, 0xf0, 0x58, 0xb9, 0x01, 0x78, 0x2b, 0x28, 0xb0, 0xc5, 0xd3, 0xb7, 0xcd, 0x9d, 0xbe, 0x49, 0x99, 0xf2, 0x3e, 0xbc, 0x90, 0x7a, 0x4b, 0x3d, 0xe2, 0x52, 0x13, 0x3f, 0x85, 0x99, 0x10, 0x73, 0x16, 0xdd, 0x41, 0xf7, 0xea, 0xab, 0x92, 0x3a, 0xaa, 0xa7, 0x1a, 0xfa, 0xac, 0xd7, 0x8e, 0xff, 0xbc, 0x5d, 0xf9, 0xf9, 0x9f, 0x5f, 0x1b, 0xa8, 0x2d, 0x9c, 0x94, 0x87, 0xf0, 0x22, 0x8f, 0xfa, 0x5e, 0x54, 0x89, 0x48, 0x87, 0xe7, 0xa0, 0x16, 0x57, 0xc7, 0x43, 0xd7, 0xda, 0x83, 0x17, 0xca, 0x07, 0x70, 0x73, 0xd8, 0x4d, 0xf0, 0xac, 0x0d, 0xfb, 0xd5, 0x57, 0xe7, 0xb3, 0x90, 0x06, 0x9e, 0x89, 0xb0, 0x1f, 0x0f, 0x87, 0x8d, 0xaa, 0xc7, 0x6f, 0x03, 0x0c, 0xae, 0x59, 0xc4, 0x5d, 0x50, 0xc3, 0x9e, 0x50, 0x83, 0x9e, 0x50, 0xc3, 0x9e, 0x12, 0x3d, 0xa1, 0xb6, 0x74, 0x2b, 0x2a, 0xa5, 0x9d, 0xf0, 0x54, 0x8e, 0x10, 0xbc, 0x34, 0x92, 0x42, 0xa0, 0xbf, 0x03, 0x10, 0xa3, 0x04, 0x72, 0x5e, 0x29, 0x64, 0x4f, 0x2a, 0x9a, 0xf0, 0xc5, 0x1b, 0x29, 0xda, 0x2a, 0xa7, 0x5d, 0x2c, 0xa4, 0x0d, 0x31, 0x52, 0xb8, 0x5f, 0x21, 0x50, 0xd2, 0xb8, 0xcf, 0x12, 0xed, 0x44, 0x4b, 0x5d, 0xd6, 0x90, 0x76, 0xd5, 0x4b, 0x6b, 0xf7, 0x1b, 0x82, 0x97, 0x2f, 0x84, 0x11, 0x3a, 0x6e, 0xc1, 0xf3, 0xc9, 0xa6, 0x8f, 0xa4, 0xbc, 0x93, 0x25, 0x65, 0x32, 0x42, 0x52, 0xcd, 0x74, 0x84, 0xc9, 0x09, 0x7a, 0x80, 0x40, 0x4a, 0xd7, 0xd0, 0x22, 0x94, 0xfd, 0xc7, 0x42, 0xfe, 0x88, 0xe0, 0x56, 0x26, 0x84, 0x10, 0xf0, 0x09, 0x4c, 0x07, 0xe3, 0x20, 0x12, 0x6e, 0x36, 0xf3, 0x93, 0x26, 0x94, 0x25, 0x05, 0x0b, 0x3d, 0x26, 0x27, 0xd4, 0x9b, 0x70, 0x2d, 0x1c, 0x37, 0x84, 0xb2, 0x72, 0xea, 0x5c, 0x85, 0xaa, 0xdd, 0xe5, 0x29, 0x6b, 0xed, 0xaa, 0xdd, 0x55, 0xde, 0x82, 0xeb, 0x89, 0x08, 0xa2, 0xb4, 0x25, 0x98, 0x0a, 0x40, 0xc5, 0x17, 0x9c, 0x5b, 0x59, 0x9b, 0x5b, 0x29, 0x1f, 0x25, 0x42, 0x4c, 0x7c, 0x14, 0x7c, 0x87, 0xa2, 0x39, 0xfb, 0xbf, 0x13, 0x5f, 0x86, 0x39, 0x4e, 0xb6, 0x2e, 0x12, 0xb6, 0x88, 0x63, 0x77, 0x76, 0x37, 0xbb, 0xd1, 0x2e, 0x78, 0x1d, 0xe6, 0x73, 0xce, 0x45, 0x11, 0xb7, 0xa0, 0xe6, 0xf1, 0x77, 0xdb, 0x76, 0x57, 0xdc, 0xd4, 0x73, 0x9e, 0x30, 0x52, 0x0e, 0xa3, 0x19, 0xb8, 0xc9, 0x4c, 0x5f, 0x67, 0xe6, 0x86, 0x43, 0x8c, 0x72, 0x57, 0x8c, 0x61, 0xca, 0x72, 0x88, 0x21, 0x2e, 0x99, 0x3f, 0x0f, 0x5d, 0xc7, 0x95, 0x4b, 0x5f, 0xc7, 0x21, 0x82, 0xd9, 0x51, 0x2a, 0x51, 0x8f, 0x5a, 0xf2, 0x52, 0x26, 0x7d, 0x13, 0xab, 0x27, 0x75, 0x98, 0xe6, 0x54, 0xf8, 0x6b, 0x04, 0x33, 0xe1, 0x1e, 0xc5, 0x0b, 0x59, 0xe9, 0x47, 0x57, 0xb6, 0xb4, 0x58, 0x68, 0x17, 0x66, 0x54, 0x96, 0x0f, 0x7e, 0xff, 0xfb, 0xb0, 0xda, 0xc0, 0xf7, 0xb4, 0xd0, 0xc1, 0x35, 0xd9, 0xe7, 0xc4, 0xff, 0x54, 0xcb, 0xfd, 0x9f, 0x04, 0xff, 0x84, 0xa0, 0x16, 0x4f, 0x0f, 0x7c, 0x3f, 0x37, 0xd1, 0xf0, 0x5e, 0x97, 0x1a, 0x65, 0x4c, 0x05, 0xd6, 0x1b, 0x1c, 0xeb, 0x09, 0x7e, 0x5c, 0x8c, 0x15, 0xf7, 0x88, 0xb6, 0x17, 0x3f, 0xee, 0xe3, 0xef, 0x11, 0xc0, 0x60, 0xd1, 0xe2, 0x12, 0xb9, 0x63, 0xed, 0x1e, 0x94, 0xb2, 0x15, 0xa0, 0xaf, 0x71, 0x50, 0x15, 0x2f, 0x8d, 0x01, 0x4a, 0xf1, 0x09, 0x82, 0x9b, 0xd9, 0xab, 0x0c, 0x3f, 0x2a, 0xce, 0x9e, 0xb5, 0x88, 0xa5, 0xc7, 0x63, 0xfb, 0x89, 0x0a, 0x9e, 0xf1, 0x0a, 0x9e, 0xe2, 0xb5, 0xe2, 0x0a, 0x52, 0x9b, 0x31, 0x25, 0xf7, 0x2f, 0x08, 0xae, 0xa6, 0x57, 0x0a, 0x56, 0x8b, 0x81, 0x92, 0xc3, 0x55, 0xd2, 0x4a, 0xdb, 0x0b, 0xf0, 0x35, 0x0e, 0xfe, 0x10, 0x37, 0x4b, 0xb4, 0x6e, 0xe0, 0x98, 0x02, 0xfe, 0x16, 0xc1, 0x54, 0x10, 0x0e, 0xbf, 0x92, 0xff, 0xa5, 0x0c, 0xf6, 0x8f, 0x74, 0xb7, 0xc0, 0x6a, 0xfc, 0xb6, 0x0d, 0x90, 0x92, 0x44, 0xda, 0x9e, 0xdd, 0xdd, 0xc7, 0x5f, 0x22, 0x98, 0x0e, 0xe5, 0xbb, 0x38, 0x63, 0xac, 0xda, 0x42, 0x91, 0x99, 0x20, 0xd3, 0x38, 0xd9, 0x7d, 0xbc, 0x58, 0x52, 0x2c, 0xfc, 0x03, 0x82, 0x7a, 0x62, 0x1e, 0xe2, 0xfc, 0xaf, 0x62, 0x74, 0x96, 0x4b, 0x4b, 0xe5, 0x8c, 0x05, 0xdb, 0x23, 0xce, 0xb6, 0x8c, 0xd5, 0x62, 0x36, 0x3b, 0x74, 0xdf, 0xe6, 0xf3, 0xff, 0x08, 0xc1, 0xb5, 0xe1, 0x3d, 0x84, 0x97, 0x73, 0x53, 0xe7, 0xac, 0x34, 0x69, 0x65, 0x0c, 0x0f, 0x41, 0xdc, 0xe4, 0xc4, 0xaf, 0xe2, 0x07, 0x65, 0xd4, 0x14, 0xcb, 0x70, 0xfd, 0xdd, 0xe3, 0x33, 0x19, 0x9d, 0x9e, 0xc9, 0xe8, 0xaf, 0x33, 0x19, 0x7d, 0x73, 0x2e, 0x57, 0x4e, 0xcf, 0xe5, 0xca, 0x1f, 0xe7, 0x72, 0xe5, 0xc3, 0xa6, 0x65, 0xb3, 0x20, 0x7b, 0x87, 0xf4, 0x72, 0x03, 0x7e, 0x31, 0x08, 0xc9, 0x76, 0x3d, 0x93, 0x1a, 0x33, 0xfc, 0x27, 0x5b, 0xf3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0xca, 0x46, 0xc1, 0xe6, 0x0e, 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) // Queries a namespace based on the specified namespace id. Namespace(ctx context.Context, in *QueryNamespaceRequest, opts ...grpc.CallOption) (*QueryNamespaceResponse, error) // Queries all namespaces. Namespaces(ctx context.Context, in *QueryNamespacesRequest, opts ...grpc.CallOption) (*QueryNamespacesResponse, error) // Queries all namespace collaborators. NamespaceCollaborators(ctx context.Context, in *QueryNamespaceCollaboratorsRequest, opts ...grpc.CallOption) (*QueryNamespaceCollaboratorsResponse, error) // Queries all namespace posts. NamespacePosts(ctx context.Context, in *QueryNamespacePostsRequest, opts ...grpc.CallOption) (*QueryNamespacePostsResponse, error) // Queries a post based on the specified namespace and post id. Post(ctx context.Context, in *QueryPostRequest, opts ...grpc.CallOption) (*QueryPostResponse, error) // Queries all posts. Posts(ctx context.Context, in *QueryPostsRequest, opts ...grpc.CallOption) (*QueryPostsResponse, error) // Glob iteration over a namespace IterateGlob(ctx context.Context, in *QueryIterateGlobRequest, opts ...grpc.CallOption) (*QueryIterateGlobResponse, error) // Queries the bulletin module policy id. BulletinPolicyId(ctx context.Context, in *QueryBulletinPolicyIdRequest, opts ...grpc.CallOption) (*QueryBulletinPolicyIdResponse, 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, "/sourcehub.bulletin.Query/Params", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Namespace(ctx context.Context, in *QueryNamespaceRequest, opts ...grpc.CallOption) (*QueryNamespaceResponse, error) { out := new(QueryNamespaceResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/Namespace", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Namespaces(ctx context.Context, in *QueryNamespacesRequest, opts ...grpc.CallOption) (*QueryNamespacesResponse, error) { out := new(QueryNamespacesResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/Namespaces", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) NamespaceCollaborators(ctx context.Context, in *QueryNamespaceCollaboratorsRequest, opts ...grpc.CallOption) (*QueryNamespaceCollaboratorsResponse, error) { out := new(QueryNamespaceCollaboratorsResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/NamespaceCollaborators", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) NamespacePosts(ctx context.Context, in *QueryNamespacePostsRequest, opts ...grpc.CallOption) (*QueryNamespacePostsResponse, error) { out := new(QueryNamespacePostsResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/NamespacePosts", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Post(ctx context.Context, in *QueryPostRequest, opts ...grpc.CallOption) (*QueryPostResponse, error) { out := new(QueryPostResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/Post", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Posts(ctx context.Context, in *QueryPostsRequest, opts ...grpc.CallOption) (*QueryPostsResponse, error) { out := new(QueryPostsResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/Posts", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) IterateGlob(ctx context.Context, in *QueryIterateGlobRequest, opts ...grpc.CallOption) (*QueryIterateGlobResponse, error) { out := new(QueryIterateGlobResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/IterateGlob", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) BulletinPolicyId(ctx context.Context, in *QueryBulletinPolicyIdRequest, opts ...grpc.CallOption) (*QueryBulletinPolicyIdResponse, error) { out := new(QueryBulletinPolicyIdResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Query/BulletinPolicyId", 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) // Queries a namespace based on the specified namespace id. Namespace(context.Context, *QueryNamespaceRequest) (*QueryNamespaceResponse, error) // Queries all namespaces. Namespaces(context.Context, *QueryNamespacesRequest) (*QueryNamespacesResponse, error) // Queries all namespace collaborators. NamespaceCollaborators(context.Context, *QueryNamespaceCollaboratorsRequest) (*QueryNamespaceCollaboratorsResponse, error) // Queries all namespace posts. NamespacePosts(context.Context, *QueryNamespacePostsRequest) (*QueryNamespacePostsResponse, error) // Queries a post based on the specified namespace and post id. Post(context.Context, *QueryPostRequest) (*QueryPostResponse, error) // Queries all posts. Posts(context.Context, *QueryPostsRequest) (*QueryPostsResponse, error) // Glob iteration over a namespace IterateGlob(context.Context, *QueryIterateGlobRequest) (*QueryIterateGlobResponse, error) // Queries the bulletin module policy id. BulletinPolicyId(context.Context, *QueryBulletinPolicyIdRequest) (*QueryBulletinPolicyIdResponse, 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 (*UnimplementedQueryServer) Namespace(ctx context.Context, req *QueryNamespaceRequest) (*QueryNamespaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Namespace not implemented") } func (*UnimplementedQueryServer) Namespaces(ctx context.Context, req *QueryNamespacesRequest) (*QueryNamespacesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Namespaces not implemented") } func (*UnimplementedQueryServer) NamespaceCollaborators(ctx context.Context, req *QueryNamespaceCollaboratorsRequest) (*QueryNamespaceCollaboratorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NamespaceCollaborators not implemented") } func (*UnimplementedQueryServer) NamespacePosts(ctx context.Context, req *QueryNamespacePostsRequest) (*QueryNamespacePostsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NamespacePosts not implemented") } func (*UnimplementedQueryServer) Post(ctx context.Context, req *QueryPostRequest) (*QueryPostResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Post not implemented") } func (*UnimplementedQueryServer) Posts(ctx context.Context, req *QueryPostsRequest) (*QueryPostsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Posts not implemented") } func (*UnimplementedQueryServer) IterateGlob(ctx context.Context, req *QueryIterateGlobRequest) (*QueryIterateGlobResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IterateGlob not implemented") } func (*UnimplementedQueryServer) BulletinPolicyId(ctx context.Context, req *QueryBulletinPolicyIdRequest) (*QueryBulletinPolicyIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BulletinPolicyId 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: "/sourcehub.bulletin.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Namespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespaceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Namespace(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/Namespace", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Namespace(ctx, req.(*QueryNamespaceRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Namespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespacesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Namespaces(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/Namespaces", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Namespaces(ctx, req.(*QueryNamespacesRequest)) } return interceptor(ctx, in, info, handler) } func _Query_NamespaceCollaborators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespaceCollaboratorsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).NamespaceCollaborators(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/NamespaceCollaborators", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).NamespaceCollaborators(ctx, req.(*QueryNamespaceCollaboratorsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_NamespacePosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNamespacePostsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).NamespacePosts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/NamespacePosts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).NamespacePosts(ctx, req.(*QueryNamespacePostsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Post_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPostRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Post(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/Post", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Post(ctx, req.(*QueryPostRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Posts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPostsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Posts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/Posts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Posts(ctx, req.(*QueryPostsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_IterateGlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryIterateGlobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).IterateGlob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/IterateGlob", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).IterateGlob(ctx, req.(*QueryIterateGlobRequest)) } return interceptor(ctx, in, info, handler) } func _Query_BulletinPolicyId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryBulletinPolicyIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).BulletinPolicyId(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Query/BulletinPolicyId", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).BulletinPolicyId(ctx, req.(*QueryBulletinPolicyIdRequest)) } return interceptor(ctx, in, info, handler) } var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.bulletin.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, { MethodName: "Namespace", Handler: _Query_Namespace_Handler, }, { MethodName: "Namespaces", Handler: _Query_Namespaces_Handler, }, { MethodName: "NamespaceCollaborators", Handler: _Query_NamespaceCollaborators_Handler, }, { MethodName: "NamespacePosts", Handler: _Query_NamespacePosts_Handler, }, { MethodName: "Post", Handler: _Query_Post_Handler, }, { MethodName: "Posts", Handler: _Query_Posts_Handler, }, { MethodName: "IterateGlob", Handler: _Query_IterateGlob_Handler, }, { MethodName: "BulletinPolicyId", Handler: _Query_BulletinPolicyId_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/bulletin/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 (m *QueryNamespaceRequest) 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 *QueryNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryNamespaceResponse) 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 *QueryNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Namespace != nil { { size, err := m.Namespace.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 (m *QueryNamespacesRequest) 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 *QueryNamespacesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespacesRequest) 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] = 0xa } return len(dAtA) - i, nil } func (m *QueryNamespacesResponse) 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 *QueryNamespacesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespacesResponse) 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.Namespaces) > 0 { for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Namespaces[iNdEx].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 (m *QueryNamespaceCollaboratorsRequest) 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 *QueryNamespaceCollaboratorsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespaceCollaboratorsRequest) 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.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryNamespaceCollaboratorsResponse) 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 *QueryNamespaceCollaboratorsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespaceCollaboratorsResponse) 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.Collaborators) > 0 { for iNdEx := len(m.Collaborators) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Collaborators[iNdEx].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 (m *QueryNamespacePostsRequest) 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 *QueryNamespacePostsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespacePostsRequest) 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.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryNamespacePostsResponse) 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 *QueryNamespacePostsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryNamespacePostsResponse) 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.Posts) > 0 { for iNdEx := len(m.Posts) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Posts[iNdEx].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 (m *QueryPostRequest) 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 *QueryPostRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x12 } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryPostResponse) 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 *QueryPostResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Post != nil { { size, err := m.Post.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 (m *QueryPostsRequest) 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 *QueryPostsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPostsRequest) 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] = 0xa } return len(dAtA) - i, nil } func (m *QueryPostsResponse) 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 *QueryPostsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryPostsResponse) 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.Posts) > 0 { for iNdEx := len(m.Posts) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Posts[iNdEx].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 (m *QueryBulletinPolicyIdRequest) 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 *QueryBulletinPolicyIdRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryBulletinPolicyIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *QueryBulletinPolicyIdResponse) 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 *QueryBulletinPolicyIdResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryBulletinPolicyIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.PolicyId) > 0 { i -= len(m.PolicyId) copy(dAtA[i:], m.PolicyId) i = encodeVarintQuery(dAtA, i, uint64(len(m.PolicyId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryIterateGlobRequest) 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 *QueryIterateGlobRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryIterateGlobRequest) 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.Glob) > 0 { i -= len(m.Glob) copy(dAtA[i:], m.Glob) i = encodeVarintQuery(dAtA, i, uint64(len(m.Glob))) i-- dAtA[i] = 0x12 } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintQuery(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryIterateGlobResponse) 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 *QueryIterateGlobResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryIterateGlobResponse) 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.Posts) > 0 { for iNdEx := len(m.Posts) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Posts[iNdEx].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 (m *QueryNamespaceRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Namespace) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryNamespaceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Namespace != nil { l = m.Namespace.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryNamespacesRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryNamespacesResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Namespaces) > 0 { for _, e := range m.Namespaces { 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 (m *QueryNamespaceCollaboratorsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Namespace) 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 *QueryNamespaceCollaboratorsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Collaborators) > 0 { for _, e := range m.Collaborators { 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 (m *QueryNamespacePostsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Namespace) 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 *QueryNamespacePostsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Posts) > 0 { for _, e := range m.Posts { 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 (m *QueryPostRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Namespace) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } l = len(m.Id) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryPostResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Post != nil { l = m.Post.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryPostsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryPostsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Posts) > 0 { for _, e := range m.Posts { 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 (m *QueryBulletinPolicyIdRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *QueryBulletinPolicyIdResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PolicyId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryIterateGlobRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Namespace) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } l = len(m.Glob) 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 *QueryIterateGlobResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Posts) > 0 { for _, e := range m.Posts { 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 } 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 (m *QueryNamespaceRequest) 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: QueryNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) 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 *QueryNamespaceResponse) 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: QueryNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace == nil { m.Namespace = &Namespace{} } if err := m.Namespace.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 *QueryNamespacesRequest) 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: QueryNamespacesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: 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 *QueryNamespacesResponse) 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: QueryNamespacesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", 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.Namespaces = append(m.Namespaces, Namespace{}) if err := m.Namespaces[len(m.Namespaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *QueryNamespaceCollaboratorsRequest) 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: QueryNamespaceCollaboratorsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespaceCollaboratorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) 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 *QueryNamespaceCollaboratorsResponse) 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: QueryNamespaceCollaboratorsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespaceCollaboratorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Collaborators", 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.Collaborators = append(m.Collaborators, Collaborator{}) if err := m.Collaborators[len(m.Collaborators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *QueryNamespacePostsRequest) 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: QueryNamespacePostsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespacePostsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) 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 *QueryNamespacePostsResponse) 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: QueryNamespacePostsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryNamespacePostsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Posts", 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.Posts = append(m.Posts, Post{}) if err := m.Posts[len(m.Posts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *QueryPostRequest) 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: QueryPostRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPostRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) 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 *QueryPostResponse) 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: QueryPostResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPostResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Post", 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.Post == nil { m.Post = &Post{} } if err := m.Post.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 *QueryPostsRequest) 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: QueryPostsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPostsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: 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 *QueryPostsResponse) 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: QueryPostsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryPostsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Posts", 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.Posts = append(m.Posts, Post{}) if err := m.Posts[len(m.Posts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *QueryBulletinPolicyIdRequest) 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: QueryBulletinPolicyIdRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryBulletinPolicyIdRequest: 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 *QueryBulletinPolicyIdResponse) 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: QueryBulletinPolicyIdResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryBulletinPolicyIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PolicyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.PolicyId = string(dAtA[iNdEx:postIndex]) 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 *QueryIterateGlobRequest) 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: QueryIterateGlobRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryIterateGlobRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Glob", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Glob = string(dAtA[iNdEx:postIndex]) 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.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 *QueryIterateGlobResponse) 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: QueryIterateGlobResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryIterateGlobResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Posts", 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.Posts = append(m.Posts, &Post{}) if err := m.Posts[len(m.Posts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 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") ) ================================================ FILE: x/bulletin/types/query.pb.gw.go ================================================ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // source: sourcehub/bulletin/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 } func request_Query_Namespace_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespaceRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } msg, err := client.Namespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Namespace_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespaceRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } msg, err := server.Namespace(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_Namespaces_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_Namespaces_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespacesRequest 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_Namespaces_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Namespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Namespaces_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespacesRequest 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_Namespaces_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.Namespaces(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_NamespaceCollaborators_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_NamespaceCollaborators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespaceCollaboratorsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_NamespaceCollaborators_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.NamespaceCollaborators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_NamespaceCollaborators_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespaceCollaboratorsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_NamespaceCollaborators_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.NamespaceCollaborators(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_NamespacePosts_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_NamespacePosts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespacePostsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_NamespacePosts_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.NamespacePosts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_NamespacePosts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNamespacePostsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_NamespacePosts_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.NamespacePosts(ctx, &protoReq) return msg, metadata, err } func request_Query_Post_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPostRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } msg, err := client.Post(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Post_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPostRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } protoReq.Namespace, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } msg, err := server.Post(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_Posts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_Posts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPostsRequest 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_Posts_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Posts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Posts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPostsRequest 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_Posts_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.Posts(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_IterateGlob_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_IterateGlob_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryIterateGlobRequest 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_IterateGlob_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.IterateGlob(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_IterateGlob_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryIterateGlobRequest 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_IterateGlob_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.IterateGlob(ctx, &protoReq) return msg, metadata, err } func request_Query_BulletinPolicyId_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryBulletinPolicyIdRequest var metadata runtime.ServerMetadata msg, err := client.BulletinPolicyId(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_BulletinPolicyId_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryBulletinPolicyIdRequest var metadata runtime.ServerMetadata msg, err := server.BulletinPolicyId(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()...) }) mux.Handle("GET", pattern_Query_Namespace_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_Namespace_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_Namespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Namespaces_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_Namespaces_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_Namespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_NamespaceCollaborators_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_NamespaceCollaborators_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_NamespaceCollaborators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_NamespacePosts_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_NamespacePosts_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_NamespacePosts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Post_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_Post_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_Post_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Posts_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_Posts_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_Posts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_IterateGlob_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_IterateGlob_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_IterateGlob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_BulletinPolicyId_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_BulletinPolicyId_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_BulletinPolicyId_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()...) }) mux.Handle("GET", pattern_Query_Namespace_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_Namespace_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_Namespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Namespaces_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_Namespaces_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_Namespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_NamespaceCollaborators_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_NamespaceCollaborators_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_NamespaceCollaborators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_NamespacePosts_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_NamespacePosts_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_NamespacePosts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Post_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_Post_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_Post_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Posts_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_Posts_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_Posts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_IterateGlob_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_IterateGlob_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_IterateGlob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_BulletinPolicyId_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_BulletinPolicyId_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_BulletinPolicyId_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}, []string{"sourcenetwork", "sourcehub", "bulletin", "params"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Namespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3}, []string{"sourcenetwork", "sourcehub", "bulletin", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Namespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "bulletin", "namespaces"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_NamespaceCollaborators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "bulletin", "collaborators", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_NamespacePosts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcenetwork", "sourcehub", "bulletin", "posts", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Post_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcenetwork", "sourcehub", "bulletin", "post", "namespace", "id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Posts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "bulletin", "posts"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_IterateGlob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "bulletin", "iterate_glob"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_BulletinPolicyId_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcenetwork", "sourcehub", "bulletin", "policy_id"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_Namespace_0 = runtime.ForwardResponseMessage forward_Query_Namespaces_0 = runtime.ForwardResponseMessage forward_Query_NamespaceCollaborators_0 = runtime.ForwardResponseMessage forward_Query_NamespacePosts_0 = runtime.ForwardResponseMessage forward_Query_Post_0 = runtime.ForwardResponseMessage forward_Query_Posts_0 = runtime.ForwardResponseMessage forward_Query_IterateGlob_0 = runtime.ForwardResponseMessage forward_Query_BulletinPolicyId_0 = runtime.ForwardResponseMessage ) ================================================ FILE: x/bulletin/types/tx.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/bulletin/tx.proto package types import ( context "context" fmt "fmt" _ "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" 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 // 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"` // 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_0497d0f203b2b5e8, []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_0497d0f203b2b5e8, []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 type MsgCreatePost struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` Artifact string `protobuf:"bytes,5,opt,name=artifact,proto3" json:"artifact,omitempty"` } func (m *MsgCreatePost) Reset() { *m = MsgCreatePost{} } func (m *MsgCreatePost) String() string { return proto.CompactTextString(m) } func (*MsgCreatePost) ProtoMessage() {} func (*MsgCreatePost) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{2} } func (m *MsgCreatePost) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCreatePost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCreatePost.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 *MsgCreatePost) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCreatePost.Merge(m, src) } func (m *MsgCreatePost) XXX_Size() int { return m.Size() } func (m *MsgCreatePost) XXX_DiscardUnknown() { xxx_messageInfo_MsgCreatePost.DiscardUnknown(m) } var xxx_messageInfo_MsgCreatePost proto.InternalMessageInfo func (m *MsgCreatePost) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgCreatePost) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *MsgCreatePost) GetPayload() []byte { if m != nil { return m.Payload } return nil } func (m *MsgCreatePost) GetArtifact() string { if m != nil { return m.Artifact } return "" } type MsgCreatePostResponse struct { } func (m *MsgCreatePostResponse) Reset() { *m = MsgCreatePostResponse{} } func (m *MsgCreatePostResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreatePostResponse) ProtoMessage() {} func (*MsgCreatePostResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{3} } func (m *MsgCreatePostResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCreatePostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCreatePostResponse.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 *MsgCreatePostResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCreatePostResponse.Merge(m, src) } func (m *MsgCreatePostResponse) XXX_Size() int { return m.Size() } func (m *MsgCreatePostResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgCreatePostResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgCreatePostResponse proto.InternalMessageInfo type MsgRegisterNamespace struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (m *MsgRegisterNamespace) Reset() { *m = MsgRegisterNamespace{} } func (m *MsgRegisterNamespace) String() string { return proto.CompactTextString(m) } func (*MsgRegisterNamespace) ProtoMessage() {} func (*MsgRegisterNamespace) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{4} } func (m *MsgRegisterNamespace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRegisterNamespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRegisterNamespace.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 *MsgRegisterNamespace) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRegisterNamespace.Merge(m, src) } func (m *MsgRegisterNamespace) XXX_Size() int { return m.Size() } func (m *MsgRegisterNamespace) XXX_DiscardUnknown() { xxx_messageInfo_MsgRegisterNamespace.DiscardUnknown(m) } var xxx_messageInfo_MsgRegisterNamespace proto.InternalMessageInfo func (m *MsgRegisterNamespace) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgRegisterNamespace) GetNamespace() string { if m != nil { return m.Namespace } return "" } type MsgRegisterNamespaceResponse struct { Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (m *MsgRegisterNamespaceResponse) Reset() { *m = MsgRegisterNamespaceResponse{} } func (m *MsgRegisterNamespaceResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterNamespaceResponse) ProtoMessage() {} func (*MsgRegisterNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{5} } func (m *MsgRegisterNamespaceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRegisterNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRegisterNamespaceResponse.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 *MsgRegisterNamespaceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRegisterNamespaceResponse.Merge(m, src) } func (m *MsgRegisterNamespaceResponse) XXX_Size() int { return m.Size() } func (m *MsgRegisterNamespaceResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgRegisterNamespaceResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgRegisterNamespaceResponse proto.InternalMessageInfo func (m *MsgRegisterNamespaceResponse) GetNamespace() *Namespace { if m != nil { return m.Namespace } return nil } type MsgAddCollaborator struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Collaborator string `protobuf:"bytes,3,opt,name=collaborator,proto3" json:"collaborator,omitempty"` } func (m *MsgAddCollaborator) Reset() { *m = MsgAddCollaborator{} } func (m *MsgAddCollaborator) String() string { return proto.CompactTextString(m) } func (*MsgAddCollaborator) ProtoMessage() {} func (*MsgAddCollaborator) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{6} } func (m *MsgAddCollaborator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgAddCollaborator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAddCollaborator.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 *MsgAddCollaborator) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAddCollaborator.Merge(m, src) } func (m *MsgAddCollaborator) XXX_Size() int { return m.Size() } func (m *MsgAddCollaborator) XXX_DiscardUnknown() { xxx_messageInfo_MsgAddCollaborator.DiscardUnknown(m) } var xxx_messageInfo_MsgAddCollaborator proto.InternalMessageInfo func (m *MsgAddCollaborator) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgAddCollaborator) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *MsgAddCollaborator) GetCollaborator() string { if m != nil { return m.Collaborator } return "" } type MsgAddCollaboratorResponse struct { CollaboratorDid string `protobuf:"bytes,1,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` } func (m *MsgAddCollaboratorResponse) Reset() { *m = MsgAddCollaboratorResponse{} } func (m *MsgAddCollaboratorResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddCollaboratorResponse) ProtoMessage() {} func (*MsgAddCollaboratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{7} } func (m *MsgAddCollaboratorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgAddCollaboratorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAddCollaboratorResponse.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 *MsgAddCollaboratorResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAddCollaboratorResponse.Merge(m, src) } func (m *MsgAddCollaboratorResponse) XXX_Size() int { return m.Size() } func (m *MsgAddCollaboratorResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgAddCollaboratorResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgAddCollaboratorResponse proto.InternalMessageInfo func (m *MsgAddCollaboratorResponse) GetCollaboratorDid() string { if m != nil { return m.CollaboratorDid } return "" } type MsgRemoveCollaborator struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Collaborator string `protobuf:"bytes,3,opt,name=collaborator,proto3" json:"collaborator,omitempty"` } func (m *MsgRemoveCollaborator) Reset() { *m = MsgRemoveCollaborator{} } func (m *MsgRemoveCollaborator) String() string { return proto.CompactTextString(m) } func (*MsgRemoveCollaborator) ProtoMessage() {} func (*MsgRemoveCollaborator) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{8} } func (m *MsgRemoveCollaborator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRemoveCollaborator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveCollaborator.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 *MsgRemoveCollaborator) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveCollaborator.Merge(m, src) } func (m *MsgRemoveCollaborator) XXX_Size() int { return m.Size() } func (m *MsgRemoveCollaborator) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveCollaborator.DiscardUnknown(m) } var xxx_messageInfo_MsgRemoveCollaborator proto.InternalMessageInfo func (m *MsgRemoveCollaborator) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgRemoveCollaborator) GetNamespace() string { if m != nil { return m.Namespace } return "" } func (m *MsgRemoveCollaborator) GetCollaborator() string { if m != nil { return m.Collaborator } return "" } type MsgRemoveCollaboratorResponse struct { CollaboratorDid string `protobuf:"bytes,1,opt,name=collaborator_did,json=collaboratorDid,proto3" json:"collaborator_did,omitempty"` } func (m *MsgRemoveCollaboratorResponse) Reset() { *m = MsgRemoveCollaboratorResponse{} } func (m *MsgRemoveCollaboratorResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveCollaboratorResponse) ProtoMessage() {} func (*MsgRemoveCollaboratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0497d0f203b2b5e8, []int{9} } func (m *MsgRemoveCollaboratorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRemoveCollaboratorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveCollaboratorResponse.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 *MsgRemoveCollaboratorResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveCollaboratorResponse.Merge(m, src) } func (m *MsgRemoveCollaboratorResponse) XXX_Size() int { return m.Size() } func (m *MsgRemoveCollaboratorResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveCollaboratorResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgRemoveCollaboratorResponse proto.InternalMessageInfo func (m *MsgRemoveCollaboratorResponse) GetCollaboratorDid() string { if m != nil { return m.CollaboratorDid } return "" } func init() { proto.RegisterType((*MsgUpdateParams)(nil), "sourcehub.bulletin.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.bulletin.MsgUpdateParamsResponse") proto.RegisterType((*MsgCreatePost)(nil), "sourcehub.bulletin.MsgCreatePost") proto.RegisterType((*MsgCreatePostResponse)(nil), "sourcehub.bulletin.MsgCreatePostResponse") proto.RegisterType((*MsgRegisterNamespace)(nil), "sourcehub.bulletin.MsgRegisterNamespace") proto.RegisterType((*MsgRegisterNamespaceResponse)(nil), "sourcehub.bulletin.MsgRegisterNamespaceResponse") proto.RegisterType((*MsgAddCollaborator)(nil), "sourcehub.bulletin.MsgAddCollaborator") proto.RegisterType((*MsgAddCollaboratorResponse)(nil), "sourcehub.bulletin.MsgAddCollaboratorResponse") proto.RegisterType((*MsgRemoveCollaborator)(nil), "sourcehub.bulletin.MsgRemoveCollaborator") proto.RegisterType((*MsgRemoveCollaboratorResponse)(nil), "sourcehub.bulletin.MsgRemoveCollaboratorResponse") } func init() { proto.RegisterFile("sourcehub/bulletin/tx.proto", fileDescriptor_0497d0f203b2b5e8) } var fileDescriptor_0497d0f203b2b5e8 = []byte{ // 638 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x4f, 0xd4, 0x5e, 0x14, 0x9d, 0xf7, 0xe3, 0x07, 0xda, 0xeb, 0x18, 0xa4, 0xc1, 0x50, 0x2a, 0x14, 0xac, 0xc6, 0x0c, 0x18, 0xa7, 0x02, 0x89, 0x26, 0x18, 0x17, 0x80, 0x89, 0x89, 0x49, 0x8d, 0xa9, 0x71, 0x83, 0x26, 0xf8, 0xa6, 0x7d, 0x96, 0xc6, 0x69, 0x5f, 0xf3, 0xde, 0x1b, 0x84, 0x8d, 0x51, 0x97, 0xba, 0x71, 0xed, 0x27, 0x70, 0xc9, 0xc2, 0x2f, 0xe0, 0x8e, 0x25, 0x71, 0xe5, 0xca, 0x18, 0x58, 0xf0, 0x35, 0x4c, 0xff, 0x97, 0x4e, 0x27, 0x4e, 0xd8, 0xb8, 0x99, 0x99, 0x7b, 0xef, 0xb9, 0xf7, 0x9c, 0xf3, 0x5e, 0x6f, 0x07, 0xae, 0x70, 0xda, 0x63, 0x36, 0xd9, 0xee, 0x75, 0x8c, 0x4e, 0xaf, 0xdb, 0x25, 0xc2, 0x0b, 0x0c, 0xb1, 0xdb, 0x0e, 0x19, 0x15, 0x54, 0x96, 0xf3, 0x62, 0x3b, 0x2b, 0xaa, 0x13, 0xd8, 0xf7, 0x02, 0x6a, 0xc4, 0x9f, 0x09, 0x4c, 0x9d, 0xb2, 0x29, 0xf7, 0x29, 0x37, 0x7c, 0xee, 0x1a, 0x3b, 0x4b, 0xd1, 0x57, 0x5a, 0x98, 0x4e, 0x0a, 0x5b, 0x71, 0x64, 0x24, 0x41, 0x5a, 0x9a, 0x74, 0xa9, 0x4b, 0x93, 0x7c, 0xf4, 0x2b, 0xcd, 0xce, 0xd5, 0xa8, 0x09, 0x31, 0xc3, 0x7e, 0xd6, 0xa6, 0xd7, 0x00, 0x02, 0xec, 0x13, 0x1e, 0x62, 0x9b, 0x24, 0x18, 0xfd, 0x3b, 0x82, 0x71, 0x93, 0xbb, 0xcf, 0x42, 0x07, 0x0b, 0xf2, 0x24, 0xee, 0x96, 0xef, 0x80, 0x84, 0x7b, 0x62, 0x9b, 0x32, 0x4f, 0xec, 0x29, 0x68, 0x1e, 0xb5, 0xa4, 0x75, 0xe5, 0xc7, 0xb7, 0x5b, 0x93, 0xa9, 0xa6, 0x35, 0xc7, 0x61, 0x84, 0xf3, 0xa7, 0x82, 0x79, 0x81, 0x6b, 0x15, 0x50, 0xf9, 0x3e, 0x8c, 0x25, 0xfc, 0xca, 0x7f, 0xf3, 0xa8, 0x75, 0x61, 0x59, 0x6d, 0xf7, 0x1f, 0x49, 0x3b, 0xe1, 0x58, 0x97, 0x0e, 0x7e, 0xcd, 0x35, 0xbe, 0x9e, 0xec, 0x2f, 0x22, 0x2b, 0x6d, 0x5a, 0xbd, 0xfb, 0xe1, 0x64, 0x7f, 0xb1, 0x18, 0xf7, 0xf1, 0x64, 0x7f, 0xf1, 0x7a, 0xe1, 0x60, 0xb7, 0xf0, 0x50, 0xd1, 0xab, 0x4f, 0xc3, 0x54, 0x25, 0x65, 0x11, 0x1e, 0xd2, 0x80, 0x13, 0xfd, 0x13, 0x82, 0x8b, 0x26, 0x77, 0x37, 0x18, 0x89, 0x6a, 0x94, 0x0b, 0x59, 0x81, 0x73, 0x76, 0x14, 0x51, 0x96, 0x58, 0xb3, 0xb2, 0x50, 0x9e, 0x01, 0x29, 0x3f, 0x9d, 0xd8, 0x81, 0x64, 0x15, 0x89, 0xa8, 0x2f, 0xc4, 0x7b, 0x5d, 0x8a, 0x1d, 0x65, 0x64, 0x1e, 0xb5, 0x9a, 0x56, 0x16, 0xca, 0x2a, 0x9c, 0xc7, 0x4c, 0x78, 0xaf, 0xb0, 0x2d, 0x94, 0xd1, 0xb8, 0x2d, 0x8f, 0x57, 0x9b, 0x91, 0xa7, 0x8c, 0x41, 0x9f, 0x82, 0xcb, 0xa7, 0xc4, 0xe4, 0x32, 0x5f, 0xc0, 0xa4, 0xc9, 0x5d, 0x8b, 0xb8, 0x1e, 0x17, 0x84, 0x3d, 0x2e, 0x93, 0x9e, 0x45, 0x6c, 0x85, 0xf6, 0x39, 0xcc, 0xd4, 0x4d, 0xcf, 0xd8, 0xe5, 0x7b, 0xe5, 0x59, 0x28, 0xbe, 0xba, 0xd9, 0xba, 0xab, 0x2b, 0x3a, 0x0b, 0xbc, 0xfe, 0x16, 0x64, 0x93, 0xbb, 0x6b, 0x8e, 0xb3, 0x41, 0xbb, 0x5d, 0xdc, 0xa1, 0x2c, 0x96, 0x77, 0xd6, 0x53, 0xd6, 0xa1, 0x69, 0x97, 0xe6, 0xc4, 0x47, 0x2d, 0x59, 0xa7, 0x72, 0x15, 0x73, 0x0f, 0x41, 0xed, 0xe7, 0xcf, 0xad, 0x2d, 0xc0, 0xa5, 0x72, 0xef, 0x96, 0xe3, 0x39, 0xa9, 0xa0, 0xf1, 0x72, 0xfe, 0x81, 0xe7, 0xe8, 0xef, 0x51, 0x7c, 0x3b, 0x16, 0xf1, 0xe9, 0x0e, 0xf9, 0x47, 0x66, 0x1e, 0xc1, 0x6c, 0xad, 0x84, 0x33, 0xf8, 0x59, 0xfe, 0xf2, 0x3f, 0x8c, 0x98, 0xdc, 0x95, 0x5f, 0x42, 0xf3, 0xd4, 0x76, 0x5f, 0xab, 0xbb, 0xda, 0xca, 0xfe, 0xa8, 0x37, 0x87, 0x00, 0xe5, 0xa2, 0x36, 0x01, 0x4a, 0x0b, 0x76, 0x75, 0x40, 0x6b, 0x01, 0x51, 0x17, 0xfe, 0x0a, 0xc9, 0x67, 0x53, 0x98, 0xe8, 0x5f, 0x8b, 0xd6, 0x80, 0xfe, 0x3e, 0xa4, 0x7a, 0x7b, 0x58, 0x64, 0x4e, 0xe8, 0xc1, 0x78, 0xf5, 0x61, 0xbe, 0x31, 0x60, 0x48, 0x05, 0xa7, 0xb6, 0x87, 0xc3, 0xe5, 0x54, 0x0c, 0xe4, 0x9a, 0xa7, 0x6d, 0x61, 0xa0, 0xe4, 0x2a, 0x54, 0x5d, 0x1a, 0x1a, 0x9a, 0x71, 0xaa, 0xa3, 0xef, 0xa2, 0x77, 0xee, 0xba, 0x79, 0x70, 0xa4, 0xa1, 0xc3, 0x23, 0x0d, 0xfd, 0x3e, 0xd2, 0xd0, 0xe7, 0x63, 0xad, 0x71, 0x78, 0xac, 0x35, 0x7e, 0x1e, 0x6b, 0x8d, 0xcd, 0x15, 0xd7, 0x13, 0xd1, 0x3c, 0x9b, 0xfa, 0x46, 0x32, 0x3d, 0x20, 0xe2, 0x0d, 0x65, 0xaf, 0x8d, 0xda, 0x77, 0xb1, 0xd8, 0x0b, 0x09, 0xef, 0x8c, 0xc5, 0x7f, 0x26, 0x2b, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x26, 0x0c, 0x21, 0xfb, 0x21, 0x07, 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) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, error) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(ctx context.Context, in *MsgRemoveCollaborator, opts ...grpc.CallOption) (*MsgRemoveCollaboratorResponse, 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, "/sourcehub.bulletin.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, error) { out := new(MsgCreatePostResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/CreatePost", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RegisterNamespace(ctx context.Context, in *MsgRegisterNamespace, opts ...grpc.CallOption) (*MsgRegisterNamespaceResponse, error) { out := new(MsgRegisterNamespaceResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/RegisterNamespace", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) AddCollaborator(ctx context.Context, in *MsgAddCollaborator, opts ...grpc.CallOption) (*MsgAddCollaboratorResponse, error) { out := new(MsgAddCollaboratorResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/AddCollaborator", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RemoveCollaborator(ctx context.Context, in *MsgRemoveCollaborator, opts ...grpc.CallOption) (*MsgRemoveCollaboratorResponse, error) { out := new(MsgRemoveCollaboratorResponse) err := c.cc.Invoke(ctx, "/sourcehub.bulletin.Msg/RemoveCollaborator", 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) CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error) RegisterNamespace(context.Context, *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) AddCollaborator(context.Context, *MsgAddCollaborator) (*MsgAddCollaboratorResponse, error) RemoveCollaborator(context.Context, *MsgRemoveCollaborator) (*MsgRemoveCollaboratorResponse, 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 (*UnimplementedMsgServer) CreatePost(ctx context.Context, req *MsgCreatePost) (*MsgCreatePostResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePost not implemented") } func (*UnimplementedMsgServer) RegisterNamespace(ctx context.Context, req *MsgRegisterNamespace) (*MsgRegisterNamespaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNamespace not implemented") } func (*UnimplementedMsgServer) AddCollaborator(ctx context.Context, req *MsgAddCollaborator) (*MsgAddCollaboratorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddCollaborator not implemented") } func (*UnimplementedMsgServer) RemoveCollaborator(ctx context.Context, req *MsgRemoveCollaborator) (*MsgRemoveCollaboratorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveCollaborator 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: "/sourcehub.bulletin.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_CreatePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreatePost) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CreatePost(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Msg/CreatePost", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreatePost(ctx, req.(*MsgCreatePost)) } return interceptor(ctx, in, info, handler) } func _Msg_RegisterNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRegisterNamespace) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RegisterNamespace(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Msg/RegisterNamespace", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RegisterNamespace(ctx, req.(*MsgRegisterNamespace)) } return interceptor(ctx, in, info, handler) } func _Msg_AddCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAddCollaborator) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).AddCollaborator(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Msg/AddCollaborator", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AddCollaborator(ctx, req.(*MsgAddCollaborator)) } return interceptor(ctx, in, info, handler) } func _Msg_RemoveCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveCollaborator) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RemoveCollaborator(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.bulletin.Msg/RemoveCollaborator", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RemoveCollaborator(ctx, req.(*MsgRemoveCollaborator)) } return interceptor(ctx, in, info, handler) } var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.bulletin.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "CreatePost", Handler: _Msg_CreatePost_Handler, }, { MethodName: "RegisterNamespace", Handler: _Msg_RegisterNamespace_Handler, }, { MethodName: "AddCollaborator", Handler: _Msg_AddCollaborator_Handler, }, { MethodName: "RemoveCollaborator", Handler: _Msg_RemoveCollaborator_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/bulletin/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 (m *MsgCreatePost) 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 *MsgCreatePost) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCreatePost) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Artifact) > 0 { i -= len(m.Artifact) copy(dAtA[i:], m.Artifact) i = encodeVarintTx(dAtA, i, uint64(len(m.Artifact))) i-- dAtA[i] = 0x2a } if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) i = encodeVarintTx(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x1a } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) 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 *MsgCreatePostResponse) 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 *MsgCreatePostResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCreatePostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgRegisterNamespace) 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 *MsgRegisterNamespace) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRegisterNamespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) 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 *MsgRegisterNamespaceResponse) 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 *MsgRegisterNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRegisterNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Namespace != nil { { size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgAddCollaborator) 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 *MsgAddCollaborator) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgAddCollaborator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Collaborator) > 0 { i -= len(m.Collaborator) copy(dAtA[i:], m.Collaborator) i = encodeVarintTx(dAtA, i, uint64(len(m.Collaborator))) i-- dAtA[i] = 0x1a } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) 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 *MsgAddCollaboratorResponse) 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 *MsgAddCollaboratorResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgAddCollaboratorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.CollaboratorDid) > 0 { i -= len(m.CollaboratorDid) copy(dAtA[i:], m.CollaboratorDid) i = encodeVarintTx(dAtA, i, uint64(len(m.CollaboratorDid))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgRemoveCollaborator) 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 *MsgRemoveCollaborator) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRemoveCollaborator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Collaborator) > 0 { i -= len(m.Collaborator) copy(dAtA[i:], m.Collaborator) i = encodeVarintTx(dAtA, i, uint64(len(m.Collaborator))) i-- dAtA[i] = 0x1a } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) i = encodeVarintTx(dAtA, i, uint64(len(m.Namespace))) 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 *MsgRemoveCollaboratorResponse) 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 *MsgRemoveCollaboratorResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRemoveCollaboratorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.CollaboratorDid) > 0 { i -= len(m.CollaboratorDid) copy(dAtA[i:], m.CollaboratorDid) i = encodeVarintTx(dAtA, i, uint64(len(m.CollaboratorDid))) i-- dAtA[i] = 0xa } 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 (m *MsgCreatePost) 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.Namespace) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Payload) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Artifact) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgCreatePostResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgRegisterNamespace) 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.Namespace) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgRegisterNamespaceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Namespace != nil { l = m.Namespace.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgAddCollaborator) 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.Namespace) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Collaborator) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgAddCollaboratorResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.CollaboratorDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgRemoveCollaborator) 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.Namespace) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Collaborator) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgRemoveCollaboratorResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.CollaboratorDid) if l > 0 { n += 1 + l + sovTx(uint64(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 (m *MsgCreatePost) 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: MsgCreatePost: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCreatePost: 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 Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Payload", 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.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) if m.Payload == nil { m.Payload = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Artifact", 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.Artifact = string(dAtA[iNdEx:postIndex]) 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 *MsgCreatePostResponse) 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: MsgCreatePostResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCreatePostResponse: 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 (m *MsgRegisterNamespace) 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: MsgRegisterNamespace: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRegisterNamespace: 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 Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) 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 *MsgRegisterNamespaceResponse) 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: MsgRegisterNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRegisterNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace == nil { m.Namespace = &Namespace{} } if err := m.Namespace.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 *MsgAddCollaborator) 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: MsgAddCollaborator: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgAddCollaborator: 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 Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Collaborator", 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.Collaborator = string(dAtA[iNdEx:postIndex]) 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 *MsgAddCollaboratorResponse) 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: MsgAddCollaboratorResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgAddCollaboratorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", 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.CollaboratorDid = string(dAtA[iNdEx:postIndex]) 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 *MsgRemoveCollaborator) 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: MsgRemoveCollaborator: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRemoveCollaborator: 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 Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Collaborator", 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.Collaborator = string(dAtA[iNdEx:postIndex]) 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 *MsgRemoveCollaboratorResponse) 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: MsgRemoveCollaboratorResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRemoveCollaboratorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CollaboratorDid", 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.CollaboratorDid = string(dAtA[iNdEx:postIndex]) 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 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") ) ================================================ FILE: x/bulletin/types/types.go ================================================ package types ================================================ FILE: x/epochs/README.md ================================================ # Epochs ## Abstract Often in the SDK, we would like to run certain code every-so often. The purpose of `epochs` module is to allow other modules to set that they would like to be signaled once every period. So another module can specify it wants to execute code once a week, starting at UTC-time = x. `epochs` creates a generalized epoch interface to other modules so that they can easily be signalled upon such events. ## Contents 1. **[Concept](#concepts)** 2. **[State](#state)** 3. **[Events](#events)** 4. **[Keeper](#keepers)** 5. **[Hooks](#hooks)** 6. **[Queries](#queries)** ## Concepts The epochs module defines on-chain timers, that execute at fixed time intervals. Other SDK modules can then register logic to be executed at the timer ticks. We refer to the period in between two timer ticks as an "epoch". Every timer has a unique identifier. Every epoch will have a start time, and an end time, where `end time = start time + timer interval`. On Osmosis mainnet, we only utilize one identifier, with a time interval of `one day`. The timer will tick at the first block whose blocktime is greater than the timer end time, and set the start as the prior timer end time. (Notably, its not set to the block time!) This means that if the chain has been down for awhile, you will get one timer tick per block, until the timer has caught up. ## State The Epochs module keeps a single [`EpochInfo`](https://github.com/sourcenetwork/sourcehub/blob/b4befe4f3eb97ebb477323234b910c4afafab9b7/proto/osmosis/epochs/genesis.proto#L12) per identifier. This contains the current state of the timer with the corresponding identifier. Its fields are modified at every timer tick. EpochInfos are initialized as part of genesis initialization or upgrade logic, and are only modified on begin blockers. ## Events The `epochs` module emits the following events: ### BeginBlocker | Type | Attribute Key | Attribute Value | | ----------- | ------------- | --------------- | | epoch_start | epoch_number | {epoch_number} | | epoch_start | start_time | {start_time} | ### EndBlocker | Type | Attribute Key | Attribute Value | | --------- | ------------- | --------------- | | epoch_end | epoch_number | {epoch_number} | ## Keepers ### Keeper functions Epochs keeper module provides utility functions to manage epochs. ```go // Keeper is the interface for epochs module keeper type Keeper interface { // GetEpochInfo returns epoch info by identifier GetEpochInfo(ctx sdk.Context, identifier string) types.EpochInfo // SetEpochInfo set epoch info SetEpochInfo(ctx sdk.Context, epoch types.EpochInfo) // DeleteEpochInfo delete epoch info DeleteEpochInfo(ctx sdk.Context, identifier string) // IterateEpochInfo iterate through epochs IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool)) // Get all epoch infos AllEpochInfos(ctx sdk.Context) []types.EpochInfo } ``` ## Hooks ```go // the first block whose timestamp is after the duration is counted as the end of the epoch AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) // new epoch is next block of epoch end block BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) ``` ### How modules receive hooks On hook receiver function of other modules, they need to filter `epochIdentifier` and only do executions for only specific epochIdentifier. Filtering epochIdentifier could be in `Params` of other modules so that they can be modified by governance. This is the standard dev UX of this: ```golang func (k MyModuleKeeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) { params := k.GetParams(ctx) if epochIdentifier == params.DistrEpochIdentifier { // my logic } } ``` ### Panic isolation If a given epoch hook panics, its state update is reverted, but we keep proceeding through the remaining hooks. This allows more advanced epoch logic to be used, without concern over state machine halting, or halting subsequent modules. This does mean that if there is behavior you expect from a prior epoch hook, and that epoch hook reverted, your hook may also have an issue. So do keep in mind "what if a prior hook didn't get executed" in the safety checks you consider for a new epoch hook. ## Queries Epochs module is providing below queries to check the module's state. ```protobuf service Query { // EpochInfos provide running epochInfos rpc EpochInfos(QueryEpochsInfoRequest) returns (QueryEpochsInfoResponse) {} // CurrentEpoch provide current epoch of specified identifier rpc CurrentEpoch(QueryCurrentEpochRequest) returns (QueryCurrentEpochResponse) {} } ``` ### Epoch Infos Query the currently running epochInfos ```sh osmosisd query epochs epoch-infos ``` ::: details Example An example output: ```sh epochs: - current_epoch: "183" current_epoch_start_height: "2438409" current_epoch_start_time: "2021-12-18T17:16:09.898160996Z" duration: 86400s epoch_counting_started: true identifier: day start_time: "2021-06-18T17:00:00Z" - current_epoch: "26" current_epoch_start_height: "2424854" current_epoch_start_time: "2021-12-17T17:02:07.229632445Z" duration: 604800s epoch_counting_started: true identifier: week start_time: "2021-06-18T17:00:00Z" ``` ::: ### Current Epoch Query the current epoch by the specified identifier ```sh osmosisd query epochs current-epoch [identifier] ``` ::: details Example Query the current `day` epoch: ```sh osmosisd query epochs current-epoch day ``` Which in this example outputs: ```sh current_epoch: "183" ``` ================================================ FILE: x/epochs/keeper/abci.go ================================================ package keeper import ( "fmt" "time" "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" ) // BeginBlocker of epochs module. func (k Keeper) BeginBlocker(ctx sdk.Context) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) k.IterateEpochInfo(ctx, func(index int64, epochInfo types.EpochInfo) (stop bool) { logger := k.Logger() // If blocktime < initial epoch start time, return if ctx.BlockTime().Before(epochInfo.StartTime) { return } // if epoch counting hasn't started, signal we need to start. shouldInitialEpochStart := !epochInfo.EpochCountingStarted epochEndTime := epochInfo.CurrentEpochStartTime.Add(epochInfo.Duration) shouldEpochStart := (ctx.BlockTime().After(epochEndTime)) || shouldInitialEpochStart if !shouldEpochStart { return false } epochInfo.CurrentEpochStartHeight = ctx.BlockHeight() if shouldInitialEpochStart { epochInfo.EpochCountingStarted = true epochInfo.CurrentEpoch = 1 epochInfo.CurrentEpochStartTime = epochInfo.StartTime logger.Info(fmt.Sprintf("Starting new epoch with identifier %s epoch number %d", epochInfo.Identifier, epochInfo.CurrentEpoch)) } else { ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeEpochEnd, sdk.NewAttribute(types.AttributeEpochNumber, fmt.Sprintf("%d", epochInfo.CurrentEpoch)), ), ) k.AfterEpochEnd(ctx, epochInfo.Identifier, epochInfo.CurrentEpoch) epochInfo.CurrentEpoch += 1 epochInfo.CurrentEpochStartTime = epochInfo.CurrentEpochStartTime.Add(epochInfo.Duration) logger.Info(fmt.Sprintf("Starting epoch with identifier %s epoch number %d", epochInfo.Identifier, epochInfo.CurrentEpoch)) } // emit new epoch start event, set epoch info, and run BeforeEpochStart hook ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeEpochStart, sdk.NewAttribute(types.AttributeEpochNumber, fmt.Sprintf("%d", epochInfo.CurrentEpoch)), sdk.NewAttribute(types.AttributeEpochStartTime, fmt.Sprintf("%d", epochInfo.CurrentEpochStartTime.Unix())), ), ) k.SetEpochInfo(ctx, epochInfo) k.BeforeEpochStart(ctx, epochInfo.Identifier, epochInfo.CurrentEpoch) return false }) } ================================================ FILE: x/epochs/keeper/abci_test.go ================================================ package keeper_test import ( "testing" "time" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/epochs/osmoutils" "github.com/sourcenetwork/sourcehub/x/epochs/types" "golang.org/x/exp/maps" ) // This test is responsible for testing how epochs increment based off // of their initial conditions, and subsequent block height / times. func (suite *KeeperTestSuite) TestEpochInfoBeginBlockChanges() { block1Time := time.Unix(1656907200, 0).UTC() const defaultIdentifier = "hourly" const defaultDuration = time.Hour // eps is short for epsilon - in this case a negligible amount of time. const eps = time.Nanosecond tests := map[string]struct { // if identifier, duration is not set, we make it defaultIdentifier and defaultDuration. // EpochCountingStarted, if unspecified, is inferred by CurrentEpoch == 0 // StartTime is inferred to be block1Time if left blank. initialEpochInfo types.EpochInfo blockHeightTimePairs map[int]time.Time expEpochInfo types.EpochInfo }{ "First block running at exactly start time sets epoch tick": { initialEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, expEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 1, CurrentEpochStartTime: block1Time, CurrentEpochStartHeight: 1}, }, "First block run sets start time, subsequent blocks within timer interval do not cause timer tick": { initialEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, blockHeightTimePairs: map[int]time.Time{2: block1Time.Add(time.Second), 3: block1Time.Add(time.Minute), 4: block1Time.Add(30 * time.Minute)}, expEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 1, CurrentEpochStartTime: block1Time, CurrentEpochStartHeight: 1}, }, "Second block at exactly timer interval later does not tick": { initialEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, blockHeightTimePairs: map[int]time.Time{2: block1Time.Add(defaultDuration)}, expEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 1, CurrentEpochStartTime: block1Time, CurrentEpochStartHeight: 1}, }, "Second block at timer interval + epsilon later does tick": { initialEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, blockHeightTimePairs: map[int]time.Time{2: block1Time.Add(defaultDuration).Add(eps)}, expEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 2, CurrentEpochStartTime: block1Time.Add(time.Hour), CurrentEpochStartHeight: 2}, }, "Downtime recovery (many intervals), first block causes 1 tick and sets current start time 1 interval ahead": { initialEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, blockHeightTimePairs: map[int]time.Time{2: block1Time.Add(24 * time.Hour)}, expEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 2, CurrentEpochStartTime: block1Time.Add(time.Hour), CurrentEpochStartHeight: 2}, }, "Downtime recovery (many intervals), second block is at tick 2, w/ start time 2 intervals ahead": { initialEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, blockHeightTimePairs: map[int]time.Time{2: block1Time.Add(24 * time.Hour), 3: block1Time.Add(24 * time.Hour).Add(eps)}, expEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 3, CurrentEpochStartTime: block1Time.Add(2 * time.Hour), CurrentEpochStartHeight: 3}, }, "Many blocks between first and second tick": { initialEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 1, CurrentEpochStartTime: block1Time}, blockHeightTimePairs: map[int]time.Time{2: block1Time.Add(time.Second), 3: block1Time.Add(2 * time.Second), 4: block1Time.Add(time.Hour).Add(eps)}, expEpochInfo: types.EpochInfo{StartTime: block1Time, CurrentEpoch: 2, CurrentEpochStartTime: block1Time.Add(time.Hour), CurrentEpochStartHeight: 4}, }, "Distinct identifier and duration still works": { initialEpochInfo: types.EpochInfo{Identifier: "hello", Duration: time.Minute, StartTime: block1Time, CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, blockHeightTimePairs: map[int]time.Time{2: block1Time.Add(time.Second), 3: block1Time.Add(time.Minute).Add(eps)}, expEpochInfo: types.EpochInfo{Identifier: "hello", Duration: time.Minute, StartTime: block1Time, CurrentEpoch: 2, CurrentEpochStartTime: block1Time.Add(time.Minute), CurrentEpochStartHeight: 3}, }, "StartTime in future won't get ticked on first block": { initialEpochInfo: types.EpochInfo{StartTime: block1Time.Add(time.Second), CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, // currentEpochStartHeight is 1 because that's when the timer was created on-chain expEpochInfo: types.EpochInfo{StartTime: block1Time.Add(time.Second), CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}, CurrentEpochStartHeight: 1}, }, "StartTime in past will get ticked on first block": { initialEpochInfo: types.EpochInfo{StartTime: block1Time.Add(-time.Second), CurrentEpoch: 0, CurrentEpochStartTime: time.Time{}}, expEpochInfo: types.EpochInfo{StartTime: block1Time.Add(-time.Second), CurrentEpoch: 1, CurrentEpochStartTime: block1Time.Add(-time.Second), CurrentEpochStartHeight: 1}, }, } for name, test := range tests { suite.Run(name, func() { suite.SetupTest() suite.Ctx = suite.Ctx.WithBlockHeight(1).WithBlockTime(block1Time) initialEpoch := initializeBlankEpochInfoFields(test.initialEpochInfo, defaultIdentifier, defaultDuration) suite.EpochsKeeper.AddEpochInfo(suite.Ctx, initialEpoch) suite.EpochsKeeper.BeginBlocker(suite.Ctx) // get sorted heights heights := maps.Keys(test.blockHeightTimePairs) osmoutils.SortSlice(heights) for _, h := range heights { // for each height in order, run begin block suite.Ctx = suite.Ctx.WithBlockHeight(int64(h)).WithBlockTime(test.blockHeightTimePairs[h]) suite.EpochsKeeper.BeginBlocker(suite.Ctx) } expEpoch := initializeBlankEpochInfoFields(test.expEpochInfo, initialEpoch.Identifier, initialEpoch.Duration) actEpoch := suite.EpochsKeeper.GetEpochInfo(suite.Ctx, initialEpoch.Identifier) suite.Require().Equal(expEpoch, actEpoch) }) } } // initializeBlankEpochInfoFields set identifier, duration and epochCountingStarted if blank in epoch func initializeBlankEpochInfoFields(epoch types.EpochInfo, identifier string, duration time.Duration) types.EpochInfo { if epoch.Identifier == "" { epoch.Identifier = identifier } if epoch.Duration == time.Duration(0) { epoch.Duration = duration } epoch.EpochCountingStarted = (epoch.CurrentEpoch != 0) return epoch } func TestEpochStartingOneMonthAfterInitGenesis(t *testing.T) { ctx, epochsKeeper := Setup() // On init genesis, default epochs information is set // To check init genesis again, should make it fresh status epochInfos := epochsKeeper.AllEpochInfos(ctx) for _, epochInfo := range epochInfos { epochsKeeper.DeleteEpochInfo(ctx, epochInfo.Identifier) } now := time.Now() week := time.Hour * 24 * 7 month := time.Hour * 24 * 30 initialBlockHeight := int64(1) ctx = ctx.WithBlockHeight(initialBlockHeight).WithBlockTime(now) epochsKeeper.InitGenesis(ctx, types.GenesisState{ Epochs: []types.EpochInfo{ { Identifier: "monthly", StartTime: now.Add(month), Duration: time.Hour * 24 * 30, CurrentEpoch: 0, CurrentEpochStartHeight: ctx.BlockHeight(), CurrentEpochStartTime: time.Time{}, EpochCountingStarted: false, }, }, }) // epoch not started yet epochInfo := epochsKeeper.GetEpochInfo(ctx, "monthly") require.Equal(t, epochInfo.CurrentEpoch, int64(0)) require.Equal(t, epochInfo.CurrentEpochStartHeight, initialBlockHeight) require.Equal(t, epochInfo.CurrentEpochStartTime, time.Time{}) require.Equal(t, epochInfo.EpochCountingStarted, false) // after 1 week ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(week)) epochsKeeper.BeginBlocker(ctx) // epoch not started yet epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.Equal(t, epochInfo.CurrentEpoch, int64(0)) require.Equal(t, epochInfo.CurrentEpochStartHeight, initialBlockHeight) require.Equal(t, epochInfo.CurrentEpochStartTime, time.Time{}) require.Equal(t, epochInfo.EpochCountingStarted, false) // after 1 month ctx = ctx.WithBlockHeight(3).WithBlockTime(now.Add(month)) epochsKeeper.BeginBlocker(ctx) // epoch started epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.Equal(t, epochInfo.CurrentEpoch, int64(1)) require.Equal(t, epochInfo.CurrentEpochStartHeight, ctx.BlockHeight()) require.Equal(t, epochInfo.CurrentEpochStartTime.UTC().String(), now.Add(month).UTC().String()) require.Equal(t, epochInfo.EpochCountingStarted, true) } ================================================ FILE: x/epochs/keeper/epoch.go ================================================ package keeper import ( "context" "fmt" "time" "github.com/cosmos/gogoproto/proto" "github.com/sourcenetwork/sourcehub/x/epochs/types" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" ) // GetEpochInfo returns epoch info by identifier. func (k Keeper) GetEpochInfo(ctx context.Context, identifier string) types.EpochInfo { epoch := types.EpochInfo{} store := k.epochStore(ctx) b := store.Get(append(types.KeyPrefixEpoch, []byte(identifier)...)) if b == nil { return epoch } err := proto.Unmarshal(b, &epoch) if err != nil { panic(err) } return epoch } // AddEpochInfo adds a new epoch info. Will return an error if the epoch fails validation, // or re-uses an existing identifier. // This method also sets the start time if left unset, and sets the epoch start height. func (k Keeper) AddEpochInfo(ctx context.Context, epoch types.EpochInfo) error { sdkCtx := sdk.UnwrapSDKContext(ctx) err := epoch.Validate() if err != nil { return err } // Check if identifier already exists if (k.GetEpochInfo(ctx, epoch.Identifier) != types.EpochInfo{}) { return fmt.Errorf("epoch with identifier %s already exists", epoch.Identifier) } // Initialize empty and default epoch values if epoch.StartTime.Equal(time.Time{}) { epoch.StartTime = sdkCtx.BlockTime() } epoch.CurrentEpochStartHeight = sdkCtx.BlockHeight() k.SetEpochInfo(ctx, epoch) return nil } // SetEpochInfo set epoch info. func (k Keeper) SetEpochInfo(ctx context.Context, epoch types.EpochInfo) { store := k.epochStore(ctx) value, err := proto.Marshal(&epoch) if err != nil { panic(err) } store.Set(append(types.KeyPrefixEpoch, []byte(epoch.Identifier)...), value) } // DeleteEpochInfo delete epoch info. func (k Keeper) DeleteEpochInfo(ctx context.Context, identifier string) { store := k.epochStore(ctx) store.Delete(append(types.KeyPrefixEpoch, []byte(identifier)...)) } // IterateEpochInfo iterate through epochs. func (k Keeper) IterateEpochInfo(ctx context.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool)) { store := k.epochStore(ctx) iterator := storetypes.KVStorePrefixIterator(store, types.KeyPrefixEpoch) defer iterator.Close() i := int64(0) for ; iterator.Valid(); iterator.Next() { epoch := types.EpochInfo{} err := proto.Unmarshal(iterator.Value(), &epoch) if err != nil { panic(err) } stop := fn(i, epoch) if stop { break } i++ } } // AllEpochInfos iterate through epochs to return all epochs info. func (k Keeper) AllEpochInfos(ctx sdk.Context) []types.EpochInfo { epochs := []types.EpochInfo{} k.IterateEpochInfo(ctx, func(index int64, epochInfo types.EpochInfo) (stop bool) { epochs = append(epochs, epochInfo) return false }) return epochs } // NumBlocksSinceEpochStart returns the number of blocks since the epoch started. // if the epoch started on block N, then calling this during block N (after BeforeEpochStart) // would return 0. // Calling it any point in block N+1 (assuming the epoch doesn't increment) would return 1. func (k Keeper) NumBlocksSinceEpochStart(ctx sdk.Context, identifier string) (int64, error) { epoch := k.GetEpochInfo(ctx, identifier) if (epoch == types.EpochInfo{}) { return 0, fmt.Errorf("epoch with identifier %s not found", identifier) } return ctx.BlockHeight() - epoch.CurrentEpochStartHeight, nil } func (k Keeper) epochStore(ctx context.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, types.KeyPrefix()) } ================================================ FILE: x/epochs/keeper/epoch_test.go ================================================ package keeper_test import ( "time" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) func (s *KeeperTestSuite) TestAddEpochInfo() { defaultIdentifier := "default_add_epoch_info_id" defaultDuration := time.Hour startBlockHeight := int64(100) startBlockTime := time.Unix(1656907200, 0).UTC() tests := map[string]struct { addedEpochInfo types.EpochInfo expErr bool expEpochInfo types.EpochInfo }{ "simple_add": { addedEpochInfo: types.EpochInfo{ Identifier: defaultIdentifier, StartTime: time.Time{}, Duration: defaultDuration, CurrentEpoch: 0, CurrentEpochStartHeight: 0, CurrentEpochStartTime: time.Time{}, EpochCountingStarted: false, }, expErr: false, expEpochInfo: types.EpochInfo{ Identifier: defaultIdentifier, StartTime: startBlockTime, Duration: defaultDuration, CurrentEpoch: 0, CurrentEpochStartHeight: startBlockHeight, CurrentEpochStartTime: time.Time{}, EpochCountingStarted: false, }, }, "zero_duration": { addedEpochInfo: types.EpochInfo{ Identifier: defaultIdentifier, StartTime: time.Time{}, Duration: time.Duration(0), CurrentEpoch: 0, CurrentEpochStartHeight: 0, CurrentEpochStartTime: time.Time{}, EpochCountingStarted: false, }, expErr: true, }, } for name, test := range tests { s.Run(name, func() { s.SetupTest() s.Ctx = s.Ctx.WithBlockHeight(startBlockHeight).WithBlockTime(startBlockTime) err := s.EpochsKeeper.AddEpochInfo(s.Ctx, test.addedEpochInfo) if !test.expErr { s.Require().NoError(err) actualEpochInfo := s.EpochsKeeper.GetEpochInfo(s.Ctx, test.addedEpochInfo.Identifier) s.Require().Equal(test.expEpochInfo, actualEpochInfo) } else { s.Require().Error(err) } }) } } func (s *KeeperTestSuite) TestDuplicateAddEpochInfo() { identifier := "duplicate_add_epoch_info" epochInfo := types.NewGenesisEpochInfo(identifier, time.Hour*24*30) err := s.EpochsKeeper.AddEpochInfo(s.Ctx, epochInfo) s.Require().NoError(err) err = s.EpochsKeeper.AddEpochInfo(s.Ctx, epochInfo) s.Require().Error(err) } func (s *KeeperTestSuite) TestEpochLifeCycle() { s.SetupTest() epochInfo := types.NewGenesisEpochInfo("monthly", time.Hour*24*30) s.EpochsKeeper.AddEpochInfo(s.Ctx, epochInfo) epochInfoSaved := s.EpochsKeeper.GetEpochInfo(s.Ctx, "monthly") // setup expected epoch info expectedEpochInfo := epochInfo expectedEpochInfo.StartTime = s.Ctx.BlockTime() expectedEpochInfo.CurrentEpochStartHeight = s.Ctx.BlockHeight() s.Require().Equal(expectedEpochInfo, epochInfoSaved) allEpochs := s.EpochsKeeper.AllEpochInfos(s.Ctx) s.Require().Len(allEpochs, 4) s.Require().Equal(allEpochs[0].Identifier, "day") // alphabetical order s.Require().Equal(allEpochs[1].Identifier, "hour") s.Require().Equal(allEpochs[2].Identifier, "monthly") s.Require().Equal(allEpochs[3].Identifier, "week") } ================================================ FILE: x/epochs/keeper/genesis.go ================================================ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) // InitGenesis sets epoch info from genesis func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { for _, epoch := range genState.Epochs { err := k.AddEpochInfo(ctx, epoch) if err != nil { panic(err) } } } // ExportGenesis returns the capability module's exported genesis. func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Epochs = k.AllEpochInfos(ctx) return genesis } ================================================ FILE: x/epochs/keeper/genesis_test.go ================================================ package keeper_test import ( "testing" "time" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) func TestEpochsExportGenesis(t *testing.T) { ctx, epochsKeeper := Setup() chainStartTime := ctx.BlockTime() chainStartHeight := ctx.BlockHeight() genesis := epochsKeeper.ExportGenesis(ctx) require.Len(t, genesis.Epochs, 3) expectedEpochs := types.DefaultGenesis().Epochs for i := 0; i < len(expectedEpochs); i++ { expectedEpochs[i].CurrentEpochStartHeight = chainStartHeight expectedEpochs[i].CurrentEpochStartTime = chainStartTime } require.Equal(t, expectedEpochs, genesis.Epochs) } func TestEpochsInitGenesis(t *testing.T) { ctx, epochsKeeper := Setup() // On init genesis, default epochs information is set // To check init genesis again, should make it fresh status epochInfos := epochsKeeper.AllEpochInfos(ctx) for _, epochInfo := range epochInfos { epochsKeeper.DeleteEpochInfo(ctx, epochInfo.Identifier) } now := time.Now() ctx = ctx.WithBlockHeight(1) ctx = ctx.WithBlockTime(now) // test genesisState validation genesisState := types.GenesisState{ Epochs: []types.EpochInfo{ { Identifier: "monthly", StartTime: time.Time{}, Duration: time.Hour * 24, CurrentEpoch: 0, CurrentEpochStartHeight: ctx.BlockHeight(), CurrentEpochStartTime: time.Time{}, EpochCountingStarted: true, }, { Identifier: "monthly", StartTime: time.Time{}, Duration: time.Hour * 24, CurrentEpoch: 0, CurrentEpochStartHeight: ctx.BlockHeight(), CurrentEpochStartTime: time.Time{}, EpochCountingStarted: true, }, }, } require.EqualError(t, genesisState.Validate(), "epoch identifier should be unique") genesisState = types.GenesisState{ Epochs: []types.EpochInfo{ { Identifier: "monthly", StartTime: time.Time{}, Duration: time.Hour * 24, CurrentEpoch: 0, CurrentEpochStartHeight: ctx.BlockHeight(), CurrentEpochStartTime: time.Time{}, EpochCountingStarted: true, }, }, } epochsKeeper.InitGenesis(ctx, genesisState) epochInfo := epochsKeeper.GetEpochInfo(ctx, "monthly") require.Equal(t, epochInfo.Identifier, "monthly") require.Equal(t, epochInfo.StartTime.UTC().String(), now.UTC().String()) require.Equal(t, epochInfo.Duration, time.Hour*24) require.Equal(t, epochInfo.CurrentEpoch, int64(0)) require.Equal(t, epochInfo.CurrentEpochStartHeight, ctx.BlockHeight()) require.Equal(t, epochInfo.CurrentEpochStartTime.UTC().String(), time.Time{}.String()) require.Equal(t, epochInfo.EpochCountingStarted, true) } ================================================ FILE: x/epochs/keeper/grpc_query.go ================================================ package keeper import ( "context" "errors" sdk "github.com/cosmos/cosmos-sdk/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) var _ types.QueryServer = Querier{} // Querier defines a wrapper around the x/epochs keeper providing gRPC method // handlers. type Querier struct { *Keeper } // NewQuerier initializes new querier. func NewQuerier(k *Keeper) Querier { return Querier{Keeper: k} } // EpochInfos provide running epochInfos. func (q Querier) EpochInfos(c context.Context, _ *types.QueryEpochsInfoRequest) (*types.QueryEpochsInfoResponse, error) { ctx := sdk.UnwrapSDKContext(c) return &types.QueryEpochsInfoResponse{ Epochs: q.Keeper.AllEpochInfos(ctx), }, nil } // CurrentEpoch provides current epoch of specified identifier. func (q Querier) CurrentEpoch(c context.Context, req *types.QueryCurrentEpochRequest) (*types.QueryCurrentEpochResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.Identifier == "" { return nil, status.Error(codes.InvalidArgument, "identifier is empty") } ctx := sdk.UnwrapSDKContext(c) info := q.Keeper.GetEpochInfo(ctx, req.Identifier) if info.Identifier != req.Identifier { return nil, errors.New("not available identifier") } return &types.QueryCurrentEpochResponse{ CurrentEpoch: info.CurrentEpoch, }, nil } ================================================ FILE: x/epochs/keeper/grpc_query_test.go ================================================ package keeper_test import ( gocontext "context" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) func (s *KeeperTestSuite) TestQueryEpochInfos() { s.SetupTest() queryClient := s.queryClient // Check that querying epoch infos on default genesis returns the default genesis epoch infos epochInfosResponse, err := queryClient.EpochInfos(gocontext.Background(), &types.QueryEpochsInfoRequest{}) s.Require().NoError(err) s.Require().Len(epochInfosResponse.Epochs, 3) expectedEpochs := types.DefaultGenesis().Epochs for id := range expectedEpochs { expectedEpochs[id].StartTime = s.Ctx.BlockTime() expectedEpochs[id].CurrentEpochStartHeight = s.Ctx.BlockHeight() } s.Require().Equal(expectedEpochs, epochInfosResponse.Epochs) } ================================================ FILE: x/epochs/keeper/hooks.go ================================================ package keeper import ( "context" ) // AfterEpochEnd gets called at the end of the epoch, end of epoch is the timestamp of first block produced after epoch duration. func (k Keeper) AfterEpochEnd(ctx context.Context, identifier string, epochNumber int64) { // Error is not handled as AfterEpochEnd Hooks use ApplyFuncIfNoError() _ = k.hooks.AfterEpochEnd(ctx, identifier, epochNumber) } // BeforeEpochStart new epoch is next block of epoch end block func (k Keeper) BeforeEpochStart(ctx context.Context, identifier string, epochNumber int64) { // Error is not handled as BeforeEpochStart Hooks use ApplyFuncIfNoError() _ = k.hooks.BeforeEpochStart(ctx, identifier, epochNumber) } ================================================ FILE: x/epochs/keeper/keeper.go ================================================ package keeper import ( "fmt" "cosmossdk.io/core/store" "cosmossdk.io/log" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) type ( Keeper struct { storeService store.KVStoreService hooks types.EpochHooks logger log.Logger } ) // NewKeeper returns a new keeper by codec and storeKey inputs. func NewKeeper( storeService store.KVStoreService, logger log.Logger, ) *Keeper { return &Keeper{ storeService: storeService, logger: logger, } } // Set the epoch hooks. func (k *Keeper) SetHooks(eh types.EpochHooks) *Keeper { if k.hooks != nil { panic("cannot set epochs hooks twice") } k.hooks = eh return k } func (k Keeper) Logger() log.Logger { return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) } ================================================ FILE: x/epochs/keeper/keeper_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/stretchr/testify/suite" cdcutil "github.com/cosmos/cosmos-sdk/codec/testutil" epochskeeper "github.com/sourcenetwork/sourcehub/x/epochs/keeper" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) type KeeperTestSuite struct { suite.Suite Ctx sdk.Context EpochsKeeper *epochskeeper.Keeper queryClient types.QueryClient } func (s *KeeperTestSuite) SetupTest() { ctx, epochsKeeper := Setup() s.Ctx = ctx s.EpochsKeeper = epochsKeeper queryRouter := baseapp.NewGRPCQueryRouter() cfg := module.NewConfigurator(nil, nil, queryRouter) types.RegisterQueryServer(cfg.QueryServer(), epochskeeper.NewQuerier(s.EpochsKeeper)) grpcQueryService := &baseapp.QueryServiceTestHelper{ GRPCQueryRouter: queryRouter, Ctx: s.Ctx, } interfaceRegistry := cdcutil.CodecOptions{AccAddressPrefix: "osmo", ValAddressPrefix: "osmovaloper"}.NewInterfaceRegistry() grpcQueryService.SetInterfaceRegistry(interfaceRegistry) s.queryClient = types.NewQueryClient(grpcQueryService) } func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } func Setup() (sdk.Context, *epochskeeper.Keeper) { epochsStoreKey := storetypes.NewKVStoreKey(types.StoreKey) storeService := runtime.NewKVStoreService(epochsStoreKey) ctx := testutil.DefaultContext(epochsStoreKey, storetypes.NewTransientStoreKey("transient_test")) epochsKeeper := epochskeeper.NewKeeper(storeService, log.NewNopLogger()) epochsKeeper.SetHooks(types.NewMultiEpochHooks()) ctx.WithBlockHeight(1).WithChainID("osmosis-1").WithBlockTime(time.Now().UTC()) epochsKeeper.InitGenesis(ctx, *types.DefaultGenesis()) SetEpochStartTime(ctx, epochsKeeper) return ctx, epochsKeeper } func SetEpochStartTime(ctx sdk.Context, epochsKeeper *epochskeeper.Keeper) { for _, epoch := range epochsKeeper.AllEpochInfos(ctx) { epoch.StartTime = ctx.BlockTime() epochsKeeper.DeleteEpochInfo(ctx, epoch.Identifier) err := epochsKeeper.AddEpochInfo(ctx, epoch) if err != nil { panic(err) } } } ================================================ FILE: x/epochs/module/abci.go ================================================ package epochs import ( "fmt" "time" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/epochs/keeper" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) func BeginBlocker(ctx sdk.Context, k *keeper.Keeper) error { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) k.IterateEpochInfo(ctx, func(index int64, epochInfo types.EpochInfo) (stop bool) { logger := k.Logger() // If blocktime < initial epoch start time, return if ctx.BlockTime().Before(epochInfo.StartTime) { return } // if epoch counting hasn't started, signal we need to start. shouldInitialEpochStart := !epochInfo.EpochCountingStarted epochEndTime := epochInfo.CurrentEpochStartTime.Add(epochInfo.Duration) shouldEpochStart := (ctx.BlockTime().After(epochEndTime)) || shouldInitialEpochStart if !shouldEpochStart { return false } epochInfo.CurrentEpochStartHeight = ctx.BlockHeight() if shouldInitialEpochStart { epochInfo.EpochCountingStarted = true epochInfo.CurrentEpoch = 1 epochInfo.CurrentEpochStartTime = epochInfo.StartTime logger.Info(fmt.Sprintf("Starting new epoch with identifier %s epoch number %d", epochInfo.Identifier, epochInfo.CurrentEpoch)) } else { ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeEpochEnd, sdk.NewAttribute(types.AttributeEpochNumber, fmt.Sprintf("%d", epochInfo.CurrentEpoch)), ), ) k.AfterEpochEnd(ctx, epochInfo.Identifier, epochInfo.CurrentEpoch) epochInfo.CurrentEpoch += 1 epochInfo.CurrentEpochStartTime = epochInfo.CurrentEpochStartTime.Add(epochInfo.Duration) logger.Info(fmt.Sprintf("Starting epoch with identifier %s epoch number %d", epochInfo.Identifier, epochInfo.CurrentEpoch)) } // emit new epoch start event, set epoch info, and run BeforeEpochStart hook ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeEpochStart, sdk.NewAttribute(types.AttributeEpochNumber, fmt.Sprintf("%d", epochInfo.CurrentEpoch)), sdk.NewAttribute(types.AttributeEpochStartTime, fmt.Sprintf("%d", epochInfo.CurrentEpochStartTime.Unix())), ), ) k.SetEpochInfo(ctx, epochInfo) k.BeforeEpochStart(ctx, epochInfo.Identifier, epochInfo.CurrentEpoch) return false }) return nil } ================================================ FILE: x/epochs/module/autocli.go ================================================ package epochs import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" modulev1beta1 "github.com/sourcenetwork/sourcehub/api/osmosis/epochs/v1beta1" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ Service: modulev1beta1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "EpochInfos", Use: "epoch-infos", Short: "Query running epoch infos.", }, { RpcMethod: "CurrentEpoch", Use: "current-epoch", Short: "Query current epoch by specified identifier.", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "identifier"}}, }, }, }, } } ================================================ FILE: x/epochs/module/module.go ================================================ /* Often in the SDK, we would like to run certain code every-so often. The purpose of `epochs` module is to allow other modules to set that they would like to be signaled once every period. So another module can specify it wants to execute code once a week, starting at UTC-time = x. `epochs` creates a generalized epoch interface to other modules so that they can easily be signalled upon such events. - Contains functionality for querying epoch. - Events for BeginBlock and EndBlock. - Initialization for epoch-related infos. */ package epochs import ( "context" "encoding/json" "fmt" "sort" "golang.org/x/exp/maps" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" modulev1beta1 "github.com/sourcenetwork/sourcehub/api/osmosis/epochs/module/v1beta1" "github.com/sourcenetwork/sourcehub/x/epochs/keeper" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} ) // ---------------------------------------------------------------------------- // AppModuleBasic // ---------------------------------------------------------------------------- // AppModuleBasic implements the AppModuleBasic interface for the epochs module. type AppModuleBasic struct{} func NewAppModuleBasic() AppModuleBasic { return AppModuleBasic{} } // Name returns the epochs module's name. func (AppModuleBasic) Name() string { return types.ModuleName } // RegisterLegacyAminoCodec registers the module's Amino codec that properly handles protobuf types with Any's. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers the module's interface types. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {} // DefaultGenesis returns the epochs module's default genesis state. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesis()) } // ValidateGenesis performs genesis state validation for the epochs module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } return genState.Validate() } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) //nolint:errcheck } // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- // AppModule implements the AppModule interface for the epochs module. type AppModule struct { AppModuleBasic keeper *keeper.Keeper } func NewAppModule(keeper *keeper.Keeper) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(), keeper: keeper, } } // Name returns the epochs module's name. func (am AppModule) Name() string { return am.AppModuleBasic.Name() } // QuerierRoute returns the epochs module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(am.keeper)) } // RegisterInvariants registers the epochs module's invariants. func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the epochs module's genesis initialization. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { var genState types.GenesisState // Initialize global index to index in genesis state cdc.MustUnmarshalJSON(gs, &genState) am.keeper.InitGenesis(ctx, genState) return []abci.ValidatorUpdate{} } // ExportGenesis returns the epochs module's exported genesis state as raw JSON bytes. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { genState := am.keeper.ExportGenesis(ctx) return cdc.MustMarshalJSON(genState) } // ConsensusVersion implements AppModule/ConsensusVersion. 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(ctx context.Context) error { c := sdk.UnwrapSDKContext(ctx) return BeginBlocker(c, am.keeper) } // 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 } // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} // ---------------------------------------------------------------------------- // App Wiring Setup // ---------------------------------------------------------------------------- func init() { appmodule.Register( &modulev1beta1.Module{}, appmodule.Provide(ProvideModule), appmodule.Invoke(InvokeSetEpochsHooks), ) } type ModuleInputs struct { depinject.In Config *modulev1beta1.Module StoreService store.KVStoreService Logger log.Logger } type ModuleOutputs struct { depinject.Out EpochsKeeper *keeper.Keeper Module appmodule.AppModule } func ProvideModule(in ModuleInputs) ModuleOutputs { k := keeper.NewKeeper( in.StoreService, in.Logger) m := NewAppModule( k, ) return ModuleOutputs{EpochsKeeper: k, Module: m} } func InvokeSetEpochsHooks( config *modulev1beta1.Module, keeper *keeper.Keeper, epochsHooks map[string]types.EpochsHooksWrapper, ) error { // all arguments to invokers are optional if keeper == nil || config == nil { return nil } modNames := maps.Keys(epochsHooks) order := config.HooksOrder if len(order) == 0 { order = modNames sort.Strings(order) } if len(order) != len(modNames) { return fmt.Errorf("len(hooks_order: %v) != len(hooks modules: %v)", order, modNames) } if len(modNames) == 0 { return nil } var multiHooks types.MultiEpochHooks for _, modName := range order { hook, ok := epochsHooks[modName] if !ok { return fmt.Errorf("can't find epoch hooks for module %s", modName) } multiHooks = append(multiHooks, hook) } keeper.SetHooks(multiHooks) return nil } ================================================ FILE: x/epochs/osmoutils/cache_ctx.go ================================================ package osmoutils import ( context "context" "errors" "fmt" "runtime" "runtime/debug" "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) // This function lets you run the function f, but if there's an error or panic // drop the state machine change and log the error. // If there is no error, proceeds as normal (but with some slowdown due to SDK store weirdness) // Try to avoid usage of iterators in f. // // If its an out of gas panic, this function will also panic like in normal tx execution flow. // This is still safe for beginblock / endblock code though, as they do not have out of gas panics. func ApplyFuncIfNoError(ctx context.Context, f func(ctx context.Context) error) (err error) { sdkCtx := sdk.UnwrapSDKContext(ctx) return applyFunc(ctx, f, sdkCtx.Logger().Error) } // ApplyFuncIfNoErrorLogToDebug is the same as ApplyFuncIfNoError, but sends logs to debug instead of error if there is an error. func ApplyFuncIfNoErrorLogToDebug(ctx context.Context, f func(ctx context.Context) error) (err error) { sdkCtx := sdk.UnwrapSDKContext(ctx) return applyFunc(ctx, f, sdkCtx.Logger().Debug) } func applyFunc(ctx context.Context, f func(ctx context.Context) error, logFunc func(string, ...interface{})) (err error) { // Add a panic safeguard defer func() { if recoveryError := recover(); recoveryError != nil { if isErr, _ := IsOutOfGasError(recoveryError); isErr { // We panic with the same error, to replicate the normal tx execution flow. panic(recoveryError) } else { PrintPanicRecoveryError(ctx, recoveryError) err = errors.New("panic occurred during execution") } } }() // makes a new cache context, which all state changes get wrapped inside of. sdkCtx := sdk.UnwrapSDKContext(ctx) cacheCtx, write := sdkCtx.CacheContext() err = f(cacheCtx) if err != nil { logFunc(err.Error()) } else { // no error, write the output of f write() } return err } // Frustratingly, this has to return the error descriptor, not an actual error itself // because the SDK errors here are not actually errors. (They don't implement error interface) func IsOutOfGasError(err any) (bool, string) { switch e := err.(type) { case types.ErrorOutOfGas: return true, e.Descriptor case types.ErrorGasOverflow: return true, e.Descriptor default: return false, "" } } // PrintPanicRecoveryError error logs the recoveryError, along with the stacktrace, if it can be parsed. // If not emits them to stdout. func PrintPanicRecoveryError(ctx context.Context, recoveryError interface{}) { logger := sdk.UnwrapSDKContext(ctx).Logger() errStackTrace := string(debug.Stack()) switch e := recoveryError.(type) { case types.ErrorOutOfGas: logger.Debug("out of gas error inside panic recovery block: " + e.Descriptor) return case string: logger.Error("Recovering from (string) panic: " + e) case runtime.Error: logger.Error("recovered (runtime.Error) panic: " + e.Error()) case error: logger.Error("recovered (error) panic: " + e.Error()) default: logger.Error("recovered (default) panic. Could not capture logs in ctx, see stdout") fmt.Println("Recovering from panic ", recoveryError) debug.PrintStack() return } logger.Error("stack trace: " + errStackTrace) } ================================================ FILE: x/epochs/osmoutils/slice_helper.go ================================================ package osmoutils import ( "math/rand" "reflect" "sort" "golang.org/x/exp/constraints" ) // SortSlice sorts a slice of type T elements that implement constraints.Ordered. // Mutates input slice s func SortSlice[T constraints.Ordered](s []T) { sort.Slice(s, func(i, j int) bool { return s[i] < s[j] }) } func Filter[T interface{}](filter func(T) bool, s []T) []T { filteredSlice := []T{} for _, s := range s { if filter(s) { filteredSlice = append(filteredSlice, s) } } return filteredSlice } // ReverseSlice reverses the input slice in place. // Does mutate argument. func ReverseSlice[T any](s []T) []T { maxIndex := len(s) for i := 0; i < maxIndex/2; i++ { temp := s[i] s[i] = s[maxIndex-i-1] s[maxIndex-1-i] = temp } return s } // ContainsDuplicate checks if there are any duplicate // elements in the slice. func ContainsDuplicate[T any](arr []T) bool { visited := make(map[any]bool, 0) for i := 0; i < len(arr); i++ { if visited[arr[i]] { return true } else { visited[arr[i]] = true } } return false } // ContainsDuplicateDeepEqual returns true if there are duplicates // in the slice by performing deep comparison. This is useful // for comparing matrices or slices of pointers. // Returns false if there are no deep equal duplicates. func ContainsDuplicateDeepEqual[T any](multihops []T) bool { for i := 0; i < len(multihops)-1; i++ { if reflect.DeepEqual(multihops[i], multihops[i+1]) { return true } } return false } type LessFunc[T any] func(a, b T) bool // MergeSlices efficiently merges two sorted slices into a single sorted slice. // The resulting slice contains all elements from slice1 and slice2, sorted according to the less function. // The input slices must be sorted in ascending order according to the less function. // The less function takes two elements of type T and returns a boolean value indicating whether the first element is less than the second element. // The function returns a new slice containing all elements from slice1 and slice2, sorted according to the less function. // The function does not modify the input slices. func MergeSlices[T any](slice1, slice2 []T, less LessFunc[T]) []T { result := make([]T, 0, len(slice1)+len(slice2)) i, j := 0, 0 for i < len(slice1) && j < len(slice2) { if less(slice1[i], slice2[j]) { result = append(result, slice1[i]) i++ } else { result = append(result, slice2[j]) j++ } } // Append any remaining elements from slice1 and slice2 result = append(result, slice1[i:]...) result = append(result, slice2[j:]...) return result } // Contains returns true if the slice contains the item, false otherwise. func Contains[T comparable](slice []T, item T) bool { for _, a := range slice { if a == item { return true } } return false } // GetRandomSubset returns a random subset of the given slice func GetRandomSubset[T any](slice []T) []T { if len(slice) == 0 { return []T{} } rand.Shuffle(len(slice), func(i, j int) { slice[i], slice[j] = slice[j], slice[i] }) n := rand.Intn(len(slice)) return slice[:n] } ================================================ FILE: x/epochs/types/cache_ctx.go ================================================ package types import ( context "context" "errors" "fmt" "runtime" "runtime/debug" "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) // This function lets you run the function f, but if there's an error or panic // drop the state machine change and log the error. // If there is no error, proceeds as normal (but with some slowdown due to SDK store weirdness) // Try to avoid usage of iterators in f. // // If its an out of gas panic, this function will also panic like in normal tx execution flow. // This is still safe for beginblock / endblock code though, as they do not have out of gas panics. func ApplyFuncIfNoError(ctx context.Context, f func(ctx context.Context) error) (err error) { sdkCtx := sdk.UnwrapSDKContext(ctx) return applyFunc(ctx, f, sdkCtx.Logger().Error) } // ApplyFuncIfNoErrorLogToDebug is the same as ApplyFuncIfNoError, but sends logs to debug instead of error if there is an error. func ApplyFuncIfNoErrorLogToDebug(ctx context.Context, f func(ctx context.Context) error) (err error) { sdkCtx := sdk.UnwrapSDKContext(ctx) return applyFunc(ctx, f, sdkCtx.Logger().Debug) } func applyFunc(ctx context.Context, f func(ctx context.Context) error, logFunc func(string, ...interface{})) (err error) { // Add a panic safeguard defer func() { if recoveryError := recover(); recoveryError != nil { if isErr, _ := IsOutOfGasError(recoveryError); isErr { // We panic with the same error, to replicate the normal tx execution flow. panic(recoveryError) } else { PrintPanicRecoveryError(ctx, recoveryError) err = errors.New("panic occurred during execution") } } }() // makes a new cache context, which all state changes get wrapped inside of. sdkCtx := sdk.UnwrapSDKContext(ctx) cacheCtx, write := sdkCtx.CacheContext() err = f(cacheCtx) if err != nil { logFunc(err.Error()) } else { // no error, write the output of f write() } return err } // Frustratingly, this has to return the error descriptor, not an actual error itself // because the SDK errors here are not actually errors. (They don't implement error interface) func IsOutOfGasError(err any) (bool, string) { switch e := err.(type) { case types.ErrorOutOfGas: return true, e.Descriptor case types.ErrorGasOverflow: return true, e.Descriptor default: return false, "" } } // PrintPanicRecoveryError error logs the recoveryError, along with the stacktrace, if it can be parsed. // If not emits them to stdout. func PrintPanicRecoveryError(ctx context.Context, recoveryError interface{}) { logger := sdk.UnwrapSDKContext(ctx).Logger() errStackTrace := string(debug.Stack()) switch e := recoveryError.(type) { case types.ErrorOutOfGas: logger.Debug("out of gas error inside panic recovery block: " + e.Descriptor) return case string: logger.Error("Recovering from (string) panic: " + e) case runtime.Error: logger.Error("recovered (runtime.Error) panic: " + e.Error()) case error: logger.Error("recovered (error) panic: " + e.Error()) default: logger.Error("recovered (default) panic. Could not capture logs in ctx, see stdout") fmt.Println("Recovering from panic ", recoveryError) debug.PrintStack() return } logger.Error("stack trace: " + errStackTrace) } ================================================ FILE: x/epochs/types/doc.go ================================================ /* Package types translates gRPC into RESTful JSON APIs. */ package types ================================================ FILE: x/epochs/types/events.go ================================================ package types const ( EventTypeEpochEnd = "epoch_end" EventTypeEpochStart = "epoch_start" AttributeEpochNumber = "epoch_number" AttributeEpochStartTime = "start_time" ) ================================================ FILE: x/epochs/types/expected_keepers.go ================================================ package types // EpochsHooksWrapper is a wrapper for modules to inject EpochsHooks using depinject. type EpochsHooksWrapper struct{ EpochHooks } // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (EpochsHooksWrapper) IsOnePerModuleType() {} ================================================ FILE: x/epochs/types/genesis.go ================================================ package types import ( "errors" "time" ) // DefaultIndex is the default epochs global index. const DefaultIndex uint64 = 1 func NewGenesisState(epochs []EpochInfo) *GenesisState { return &GenesisState{Epochs: epochs} } // DefaultGenesis returns the default epochs genesis state. func DefaultGenesis() *GenesisState { epochs := []EpochInfo{ NewGenesisEpochInfo("day", time.Hour*24), // alphabetical order NewGenesisEpochInfo("hour", time.Hour), NewGenesisEpochInfo("week", time.Hour*24*7), } return NewGenesisState(epochs) } // Validate performs basic genesis state validation returning an error upon any // failure. func (gs GenesisState) Validate() error { epochIdentifiers := map[string]bool{} for _, epoch := range gs.Epochs { if err := epoch.Validate(); err != nil { return err } if epochIdentifiers[epoch.Identifier] { return errors.New("epoch identifier should be unique") } epochIdentifiers[epoch.Identifier] = true } return nil } // Validate also validates epoch info. func (epoch EpochInfo) Validate() error { if epoch.Identifier == "" { return errors.New("epoch identifier should NOT be empty") } if epoch.Duration == 0 { return errors.New("epoch duration should NOT be 0") } if epoch.CurrentEpoch < 0 { return errors.New("epoch CurrentEpoch must be non-negative") } if epoch.CurrentEpochStartHeight < 0 { return errors.New("epoch CurrentEpochStartHeight must be non-negative") } return nil } func NewGenesisEpochInfo(identifier string, duration time.Duration) EpochInfo { return EpochInfo{ Identifier: identifier, StartTime: time.Time{}, Duration: duration, CurrentEpoch: 0, CurrentEpochStartHeight: 0, CurrentEpochStartTime: time.Time{}, EpochCountingStarted: false, } } ================================================ FILE: x/epochs/types/genesis.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: osmosis/epochs/v1beta1/genesis.proto package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // EpochInfo is a struct that describes the data going into // a timer defined by the x/epochs module. type EpochInfo struct { // identifier is a unique reference to this particular timer. Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // start_time is the time at which the timer first ever ticks. // If start_time is in the future, the epoch will not begin until the start // time. StartTime time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` // duration is the time in between epoch ticks. // In order for intended behavior to be met, duration should // be greater than the chains expected block time. // Duration must be non-zero. Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration,omitempty" yaml:"duration"` // current_epoch is the current epoch number, or in other words, // how many times has the timer 'ticked'. // The first tick (current_epoch=1) is defined as // the first block whose blocktime is greater than the EpochInfo start_time. CurrentEpoch int64 `protobuf:"varint,4,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` // current_epoch_start_time describes the start time of the current timer // interval. The interval is (current_epoch_start_time, // current_epoch_start_time + duration] When the timer ticks, this is set to // current_epoch_start_time = last_epoch_start_time + duration only one timer // tick for a given identifier can occur per block. // // NOTE! The current_epoch_start_time may diverge significantly from the // wall-clock time the epoch began at. Wall-clock time of epoch start may be // >> current_epoch_start_time. Suppose current_epoch_start_time = 10, // duration = 5. Suppose the chain goes offline at t=14, and comes back online // at t=30, and produces blocks at every successive time. (t=31, 32, etc.) // * The t=30 block will start the epoch for (10, 15] // * The t=31 block will start the epoch for (15, 20] // * The t=32 block will start the epoch for (20, 25] // * The t=33 block will start the epoch for (25, 30] // * The t=34 block will start the epoch for (30, 35] // * The **t=36** block will start the epoch for (35, 40] CurrentEpochStartTime time.Time `protobuf:"bytes,5,opt,name=current_epoch_start_time,json=currentEpochStartTime,proto3,stdtime" json:"current_epoch_start_time" yaml:"current_epoch_start_time"` // epoch_counting_started is a boolean, that indicates whether this // epoch timer has began yet. EpochCountingStarted bool `protobuf:"varint,6,opt,name=epoch_counting_started,json=epochCountingStarted,proto3" json:"epoch_counting_started,omitempty"` // current_epoch_start_height is the block height at which the current epoch // started. (The block height at which the timer last ticked) CurrentEpochStartHeight int64 `protobuf:"varint,8,opt,name=current_epoch_start_height,json=currentEpochStartHeight,proto3" json:"current_epoch_start_height,omitempty"` } func (m *EpochInfo) Reset() { *m = EpochInfo{} } func (m *EpochInfo) String() string { return proto.CompactTextString(m) } func (*EpochInfo) ProtoMessage() {} func (*EpochInfo) Descriptor() ([]byte, []int) { return fileDescriptor_7dd2db84ad8300ca, []int{0} } func (m *EpochInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EpochInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EpochInfo.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 *EpochInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_EpochInfo.Merge(m, src) } func (m *EpochInfo) XXX_Size() int { return m.Size() } func (m *EpochInfo) XXX_DiscardUnknown() { xxx_messageInfo_EpochInfo.DiscardUnknown(m) } var xxx_messageInfo_EpochInfo proto.InternalMessageInfo func (m *EpochInfo) GetIdentifier() string { if m != nil { return m.Identifier } return "" } func (m *EpochInfo) GetStartTime() time.Time { if m != nil { return m.StartTime } return time.Time{} } func (m *EpochInfo) GetDuration() time.Duration { if m != nil { return m.Duration } return 0 } func (m *EpochInfo) GetCurrentEpoch() int64 { if m != nil { return m.CurrentEpoch } return 0 } func (m *EpochInfo) GetCurrentEpochStartTime() time.Time { if m != nil { return m.CurrentEpochStartTime } return time.Time{} } func (m *EpochInfo) GetEpochCountingStarted() bool { if m != nil { return m.EpochCountingStarted } return false } func (m *EpochInfo) GetCurrentEpochStartHeight() int64 { if m != nil { return m.CurrentEpochStartHeight } return 0 } // GenesisState defines the epochs module's genesis state. type GenesisState struct { Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"` } 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_7dd2db84ad8300ca, []int{1} } 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) GetEpochs() []EpochInfo { if m != nil { return m.Epochs } return nil } func init() { proto.RegisterType((*EpochInfo)(nil), "osmosis.epochs.v1beta1.EpochInfo") proto.RegisterType((*GenesisState)(nil), "osmosis.epochs.v1beta1.GenesisState") } func init() { proto.RegisterFile("osmosis/epochs/v1beta1/genesis.proto", fileDescriptor_7dd2db84ad8300ca) } var fileDescriptor_7dd2db84ad8300ca = []byte{ // 485 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x3f, 0x8f, 0xd3, 0x30, 0x18, 0xc6, 0x6b, 0x5a, 0x4a, 0xeb, 0x3b, 0x04, 0x44, 0xc7, 0x11, 0x2a, 0x91, 0x84, 0xc0, 0x10, 0x09, 0xe4, 0xa8, 0x07, 0x13, 0x0c, 0x48, 0x05, 0xc4, 0xbf, 0x01, 0x29, 0x65, 0x40, 0x2c, 0x55, 0x92, 0xba, 0x89, 0xc5, 0x25, 0x8e, 0xe2, 0x37, 0x40, 0x37, 0x3e, 0x42, 0x47, 0x3e, 0xd2, 0x8d, 0x37, 0x32, 0x15, 0xd4, 0x6e, 0x8c, 0xf7, 0x09, 0x50, 0x6c, 0xa7, 0x14, 0xee, 0xd0, 0x6d, 0xb1, 0x9f, 0xdf, 0xfb, 0x3c, 0x7e, 0x5f, 0xbd, 0xc1, 0x77, 0xb9, 0xc8, 0xb8, 0x60, 0xc2, 0xa7, 0x05, 0x8f, 0x53, 0xe1, 0x7f, 0x1a, 0x46, 0x14, 0xc2, 0xa1, 0x9f, 0xd0, 0x9c, 0x0a, 0x26, 0x48, 0x51, 0x72, 0xe0, 0xc6, 0xbe, 0xa6, 0x88, 0xa2, 0x88, 0xa6, 0x06, 0x7b, 0x09, 0x4f, 0xb8, 0x44, 0xfc, 0xfa, 0x4b, 0xd1, 0x03, 0x2b, 0xe1, 0x3c, 0x39, 0xa4, 0xbe, 0x3c, 0x45, 0xd5, 0xcc, 0x9f, 0x56, 0x65, 0x08, 0x8c, 0xe7, 0x5a, 0xb7, 0xff, 0xd5, 0x81, 0x65, 0x54, 0x40, 0x98, 0x15, 0x0a, 0x70, 0x17, 0x1d, 0xdc, 0x7f, 0x5e, 0x27, 0xbd, 0xca, 0x67, 0xdc, 0xb0, 0x30, 0x66, 0x53, 0x9a, 0x03, 0x9b, 0x31, 0x5a, 0x9a, 0xc8, 0x41, 0x5e, 0x3f, 0xd8, 0xba, 0x31, 0xde, 0x63, 0x2c, 0x20, 0x2c, 0x61, 0x52, 0xdb, 0x98, 0x17, 0x1c, 0xe4, 0xed, 0x1c, 0x0c, 0x88, 0xca, 0x20, 0x4d, 0x06, 0x79, 0xd7, 0x64, 0x8c, 0x6e, 0x1d, 0x2d, 0xed, 0xd6, 0xc9, 0xd2, 0xbe, 0x36, 0x0f, 0xb3, 0xc3, 0x47, 0xee, 0x9f, 0x5a, 0x77, 0xf1, 0xc3, 0x46, 0x41, 0x5f, 0x5e, 0xd4, 0xb8, 0x91, 0xe2, 0x5e, 0xf3, 0x74, 0xb3, 0x2d, 0x7d, 0x6f, 0x9e, 0xf2, 0x7d, 0xa6, 0x81, 0xd1, 0xb0, 0xb6, 0xfd, 0xb5, 0xb4, 0x8d, 0xa6, 0xe4, 0x3e, 0xcf, 0x18, 0xd0, 0xac, 0x80, 0xf9, 0xc9, 0xd2, 0xbe, 0xa2, 0xc2, 0x1a, 0xcd, 0xfd, 0x56, 0x47, 0x6d, 0xdc, 0x8d, 0x3b, 0xf8, 0x72, 0x5c, 0x95, 0x25, 0xcd, 0x61, 0x22, 0x47, 0x6c, 0x76, 0x1c, 0xe4, 0xb5, 0x83, 0x5d, 0x7d, 0x29, 0x87, 0x61, 0x7c, 0x45, 0xd8, 0xfc, 0x8b, 0x9a, 0x6c, 0xf5, 0x7d, 0xf1, 0xdc, 0xbe, 0xef, 0xe9, 0xbe, 0x6d, 0xf5, 0x94, 0xff, 0x39, 0xa9, 0x29, 0x5c, 0xdf, 0x4e, 0x1e, 0x6f, 0x26, 0xf2, 0x10, 0xef, 0x2b, 0x3e, 0xe6, 0x55, 0x0e, 0x2c, 0x4f, 0x54, 0x21, 0x9d, 0x9a, 0x5d, 0x07, 0x79, 0xbd, 0x60, 0x4f, 0xaa, 0x4f, 0xb5, 0x38, 0x56, 0x9a, 0xf1, 0x18, 0x0f, 0xce, 0x4a, 0x4b, 0x29, 0x4b, 0x52, 0x30, 0x7b, 0xb2, 0xd5, 0x1b, 0xa7, 0x02, 0x5f, 0x4a, 0xf9, 0x75, 0xa7, 0x77, 0xe9, 0x6a, 0xcf, 0x7d, 0x8b, 0x77, 0x5f, 0xa8, 0x95, 0x1c, 0x43, 0x08, 0xd4, 0x78, 0x82, 0xbb, 0x6a, 0x17, 0x4d, 0xe4, 0xb4, 0xbd, 0x9d, 0x83, 0xdb, 0xe4, 0xec, 0x15, 0x25, 0x9b, 0x3d, 0x1a, 0x75, 0xea, 0xfe, 0x03, 0x5d, 0x36, 0x7a, 0x73, 0xb4, 0xb2, 0xd0, 0xf1, 0xca, 0x42, 0x3f, 0x57, 0x16, 0x5a, 0xac, 0xad, 0xd6, 0xf1, 0xda, 0x6a, 0x7d, 0x5f, 0x5b, 0xad, 0x0f, 0xc3, 0x84, 0x41, 0x5a, 0x45, 0x24, 0xe6, 0x99, 0x2f, 0x78, 0x55, 0xc6, 0x34, 0xa7, 0xf0, 0x99, 0x97, 0x1f, 0xf5, 0x29, 0xad, 0x22, 0xff, 0x4b, 0xf3, 0xbf, 0xc0, 0xbc, 0xa0, 0x22, 0xea, 0xca, 0x71, 0x3f, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x0b, 0xa3, 0x6b, 0xf7, 0x4e, 0x03, 0x00, 0x00, } func (m *EpochInfo) 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 *EpochInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.CurrentEpochStartHeight != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.CurrentEpochStartHeight)) i-- dAtA[i] = 0x40 } if m.EpochCountingStarted { i-- if m.EpochCountingStarted { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x30 } n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CurrentEpochStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintGenesis(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x2a if m.CurrentEpoch != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.CurrentEpoch)) i-- dAtA[i] = 0x20 } n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintGenesis(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x1a n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err3 != nil { return 0, err3 } i -= n3 i = encodeVarintGenesis(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x12 if len(m.Identifier) > 0 { i -= len(m.Identifier) copy(dAtA[i:], m.Identifier) i = encodeVarintGenesis(dAtA, i, uint64(len(m.Identifier))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } 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 if len(m.Epochs) > 0 { for iNdEx := len(m.Epochs) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Epochs[iNdEx].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 *EpochInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identifier) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovGenesis(uint64(l)) l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) n += 1 + l + sovGenesis(uint64(l)) if m.CurrentEpoch != 0 { n += 1 + sovGenesis(uint64(m.CurrentEpoch)) } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime) n += 1 + l + sovGenesis(uint64(l)) if m.EpochCountingStarted { n += 2 } if m.CurrentEpochStartHeight != 0 { n += 1 + sovGenesis(uint64(m.CurrentEpochStartHeight)) } return n } func (m *GenesisState) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Epochs) > 0 { for _, e := range m.Epochs { l = e.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 *EpochInfo) 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: EpochInfo: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EpochInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis } 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 ErrInvalidLengthGenesis } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } m.Identifier = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartTime", 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 := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Duration", 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 := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) } m.CurrentEpoch = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CurrentEpoch |= int64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartTime", 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 := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CurrentEpochStartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EpochCountingStarted", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.EpochCountingStarted = bool(v != 0) case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartHeight", wireType) } m.CurrentEpochStartHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CurrentEpochStartHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } 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 *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 Epochs", 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.Epochs = append(m.Epochs, EpochInfo{}) if err := m.Epochs[len(m.Epochs)-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 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") ) ================================================ FILE: x/epochs/types/hooks.go ================================================ package types import ( "context" fmt "fmt" "strconv" "github.com/cosmos/cosmos-sdk/telemetry" "github.com/hashicorp/go-metrics" sdk "github.com/cosmos/cosmos-sdk/types" ) type EpochHooks interface { // the first block whose timestamp is after the duration is counted as the end of the epoch AfterEpochEnd(ctx context.Context, epochIdentifier string, epochNumber int64) error // new epoch is next block of epoch end block BeforeEpochStart(ctx context.Context, epochIdentifier string, epochNumber int64) error // Returns the name of the module implementing epoch hook. GetModuleName() string } const ( // flag indicating whether this is a before epoch hook isBeforeEpoch = true ) var _ EpochHooks = MultiEpochHooks{} // combine multiple epoch hooks, all hook functions are run in array sequence. type MultiEpochHooks []EpochHooks // GetModuleName implements EpochHooks. func (MultiEpochHooks) GetModuleName() string { return ModuleName } func NewMultiEpochHooks(hooks ...EpochHooks) MultiEpochHooks { return hooks } // AfterEpochEnd is called when epoch is going to be ended, epochNumber is the number of epoch that is ending. func (h MultiEpochHooks) AfterEpochEnd(ctx context.Context, epochIdentifier string, epochNumber int64) error { for _, hook := range h { panicCatchingEpochHook(ctx, hook.AfterEpochEnd, epochIdentifier, epochNumber, hook.GetModuleName(), !isBeforeEpoch) } return nil } // BeforeEpochStart is called when epoch is going to be started, epochNumber is the number of epoch that is starting. func (h MultiEpochHooks) BeforeEpochStart(ctx context.Context, epochIdentifier string, epochNumber int64) error { for _, hook := range h { panicCatchingEpochHook(ctx, hook.BeforeEpochStart, epochIdentifier, epochNumber, hook.GetModuleName(), isBeforeEpoch) } return nil } func panicCatchingEpochHook( ctx context.Context, hookFn func(ctx context.Context, epochIdentifier string, epochNumber int64) error, epochIdentifier string, epochNumber int64, moduleName string, isBeforeEpoch bool, ) { wrappedHookFn := func(ctx context.Context) error { return hookFn(ctx, epochIdentifier, epochNumber) } // TODO: Thread info for which hook this is, may be dependent on larger hook system refactoring err := ApplyFuncIfNoError(ctx, wrappedHookFn) if err != nil { telemetry.IncrCounterWithLabels([]string{EpochHookFailedMetricName}, 1, []metrics.Label{ { Name: "module_name", Value: moduleName, }, { Name: "error", Value: err.Error(), }, { Name: "is_before_hook", Value: strconv.FormatBool(isBeforeEpoch), }, }) sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.Logger().Error(fmt.Sprintf("error in epoch hook %v", err)) } } ================================================ FILE: x/epochs/types/hooks_test.go ================================================ package types_test import ( context "context" "strconv" "testing" errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" "github.com/sourcenetwork/sourcehub/x/epochs/types" ) type KeeperTestSuite struct { suite.Suite Ctx sdk.Context } func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } func (s *KeeperTestSuite) SetupTest() { s.Ctx = testutil.DefaultContext(storetypes.NewKVStoreKey(types.StoreKey), storetypes.NewTransientStoreKey("transient_test")) } func dummyAfterEpochEndEvent(epochIdentifier string, epochNumber int64) sdk.Event { return sdk.NewEvent( "afterEpochEnd", sdk.NewAttribute("epochIdentifier", epochIdentifier), sdk.NewAttribute("epochNumber", strconv.FormatInt(epochNumber, 10)), ) } func dummyBeforeEpochStartEvent(epochIdentifier string, epochNumber int64) sdk.Event { return sdk.NewEvent( "beforeEpochStart", sdk.NewAttribute("epochIdentifier", epochIdentifier), sdk.NewAttribute("epochNumber", strconv.FormatInt(epochNumber, 10)), ) } var dummyErr = errorsmod.New("9", 9, "dummyError") // dummyEpochHook is a struct satisfying the epoch hook interface, // that maintains a counter for how many times its been successfully called, // and a boolean for whether it should panic during its execution. type dummyEpochHook struct { successCounter int shouldPanic bool shouldError bool } // GetModuleName implements types.EpochHooks. func (*dummyEpochHook) GetModuleName() string { return "dummy" } func (hook *dummyEpochHook) AfterEpochEnd(ctx context.Context, epochIdentifier string, epochNumber int64) error { if hook.shouldPanic { panic("dummyEpochHook is panicking") } if hook.shouldError { return dummyErr } hook.successCounter += 1 sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent(dummyAfterEpochEndEvent(epochIdentifier, epochNumber)) return nil } func (hook *dummyEpochHook) BeforeEpochStart(ctx context.Context, epochIdentifier string, epochNumber int64) error { if hook.shouldPanic { panic("dummyEpochHook is panicking") } if hook.shouldError { return dummyErr } hook.successCounter += 1 sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent(dummyBeforeEpochStartEvent(epochIdentifier, epochNumber)) return nil } func (hook *dummyEpochHook) Clone() *dummyEpochHook { newHook := dummyEpochHook{shouldPanic: hook.shouldPanic, successCounter: hook.successCounter, shouldError: hook.shouldError} return &newHook } var _ types.EpochHooks = &dummyEpochHook{} func (s *KeeperTestSuite) TestHooksPanicRecovery() { panicHook := dummyEpochHook{shouldPanic: true} noPanicHook := dummyEpochHook{shouldPanic: false} errorHook := dummyEpochHook{shouldError: true} noErrorHook := dummyEpochHook{shouldError: false} // same as nopanic simpleHooks := []dummyEpochHook{panicHook, noPanicHook, errorHook, noErrorHook} tests := []struct { hooks []dummyEpochHook expectedCounterValues []int lenEvents int }{ {[]dummyEpochHook{noPanicHook}, []int{1}, 1}, {[]dummyEpochHook{panicHook}, []int{0}, 0}, {[]dummyEpochHook{errorHook}, []int{0}, 0}, {simpleHooks, []int{0, 1, 0, 1}, 2}, } for tcIndex, tc := range tests { for epochActionSelector := 0; epochActionSelector < 2; epochActionSelector++ { s.SetupTest() hookRefs := []types.EpochHooks{} for _, hook := range tc.hooks { hookRefs = append(hookRefs, hook.Clone()) } hooks := types.NewMultiEpochHooks(hookRefs...) events := func(epochID string, epochNumber int64, dummyEvent func(id string, number int64) sdk.Event) sdk.Events { evts := make(sdk.Events, tc.lenEvents) for i := 0; i < tc.lenEvents; i++ { evts[i] = dummyEvent(epochID, epochNumber) } return evts } s.NotPanics(func() { if epochActionSelector == 0 { hooks.BeforeEpochStart(s.Ctx, "id", 0) s.Require().Equal(events("id", 0, dummyBeforeEpochStartEvent), s.Ctx.EventManager().Events(), "test case index %d, before epoch event check", tcIndex) } else if epochActionSelector == 1 { hooks.AfterEpochEnd(s.Ctx, "id", 0) s.Require().Equal(events("id", 0, dummyAfterEpochEndEvent), s.Ctx.EventManager().Events(), "test case index %d, after epoch event check", tcIndex) } }) for i := 0; i < len(hooks); i++ { epochHook := hookRefs[i].(*dummyEpochHook) s.Require().Equal(tc.expectedCounterValues[i], epochHook.successCounter, "test case index %d", tcIndex) } } } } ================================================ FILE: x/epochs/types/identifier.go ================================================ package types import ( "fmt" ) func ValidateEpochIdentifierInterface(i interface{}) error { v, ok := i.(string) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if err := ValidateEpochIdentifierString(v); err != nil { return err } return nil } func ValidateEpochIdentifierString(s string) error { if s == "" { return fmt.Errorf("empty distribution epoch identifier: %+v", s) } return nil } ================================================ FILE: x/epochs/types/keys.go ================================================ package types const ( // ModuleName defines the module name. ModuleName = "epochs" // StoreKey defines the primary module store key. StoreKey = ModuleName // RouterKey is the message route for epochs. RouterKey = ModuleName // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName ) // KeyPrefixEpoch defines prefix key for storing epochs. var KeyPrefixEpoch = []byte{0x01} func KeyPrefix() []byte { return []byte(StoreKey) } ================================================ FILE: x/epochs/types/query.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: osmosis/epochs/v1beta1/query.proto package types import ( context "context" fmt "fmt" _ "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" 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 QueryEpochsInfoRequest struct { } func (m *QueryEpochsInfoRequest) Reset() { *m = QueryEpochsInfoRequest{} } func (m *QueryEpochsInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryEpochsInfoRequest) ProtoMessage() {} func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor_82bf2f47d6aaa9fa, []int{0} } func (m *QueryEpochsInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryEpochsInfoRequest.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 *QueryEpochsInfoRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryEpochsInfoRequest.Merge(m, src) } func (m *QueryEpochsInfoRequest) XXX_Size() int { return m.Size() } func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryEpochsInfoRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryEpochsInfoRequest proto.InternalMessageInfo type QueryEpochsInfoResponse struct { Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"` } func (m *QueryEpochsInfoResponse) Reset() { *m = QueryEpochsInfoResponse{} } func (m *QueryEpochsInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryEpochsInfoResponse) ProtoMessage() {} func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_82bf2f47d6aaa9fa, []int{1} } func (m *QueryEpochsInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryEpochsInfoResponse.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 *QueryEpochsInfoResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryEpochsInfoResponse.Merge(m, src) } func (m *QueryEpochsInfoResponse) XXX_Size() int { return m.Size() } func (m *QueryEpochsInfoResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryEpochsInfoResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryEpochsInfoResponse proto.InternalMessageInfo func (m *QueryEpochsInfoResponse) GetEpochs() []EpochInfo { if m != nil { return m.Epochs } return nil } type QueryCurrentEpochRequest struct { Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` } func (m *QueryCurrentEpochRequest) Reset() { *m = QueryCurrentEpochRequest{} } func (m *QueryCurrentEpochRequest) String() string { return proto.CompactTextString(m) } func (*QueryCurrentEpochRequest) ProtoMessage() {} func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int) { return fileDescriptor_82bf2f47d6aaa9fa, []int{2} } func (m *QueryCurrentEpochRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryCurrentEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCurrentEpochRequest.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 *QueryCurrentEpochRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCurrentEpochRequest.Merge(m, src) } func (m *QueryCurrentEpochRequest) XXX_Size() int { return m.Size() } func (m *QueryCurrentEpochRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryCurrentEpochRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryCurrentEpochRequest proto.InternalMessageInfo func (m *QueryCurrentEpochRequest) GetIdentifier() string { if m != nil { return m.Identifier } return "" } type QueryCurrentEpochResponse struct { CurrentEpoch int64 `protobuf:"varint,1,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` } func (m *QueryCurrentEpochResponse) Reset() { *m = QueryCurrentEpochResponse{} } func (m *QueryCurrentEpochResponse) String() string { return proto.CompactTextString(m) } func (*QueryCurrentEpochResponse) ProtoMessage() {} func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int) { return fileDescriptor_82bf2f47d6aaa9fa, []int{3} } func (m *QueryCurrentEpochResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryCurrentEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCurrentEpochResponse.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 *QueryCurrentEpochResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCurrentEpochResponse.Merge(m, src) } func (m *QueryCurrentEpochResponse) XXX_Size() int { return m.Size() } func (m *QueryCurrentEpochResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryCurrentEpochResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryCurrentEpochResponse proto.InternalMessageInfo func (m *QueryCurrentEpochResponse) GetCurrentEpoch() int64 { if m != nil { return m.CurrentEpoch } return 0 } func init() { proto.RegisterType((*QueryEpochsInfoRequest)(nil), "osmosis.epochs.v1beta1.QueryEpochsInfoRequest") proto.RegisterType((*QueryEpochsInfoResponse)(nil), "osmosis.epochs.v1beta1.QueryEpochsInfoResponse") proto.RegisterType((*QueryCurrentEpochRequest)(nil), "osmosis.epochs.v1beta1.QueryCurrentEpochRequest") proto.RegisterType((*QueryCurrentEpochResponse)(nil), "osmosis.epochs.v1beta1.QueryCurrentEpochResponse") } func init() { proto.RegisterFile("osmosis/epochs/v1beta1/query.proto", fileDescriptor_82bf2f47d6aaa9fa) } var fileDescriptor_82bf2f47d6aaa9fa = []byte{ // 396 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x6e, 0xd3, 0x30, 0x1c, 0xc7, 0xe3, 0x16, 0x2a, 0x61, 0xca, 0xc5, 0x42, 0x25, 0x44, 0xc8, 0x94, 0xf0, 0xaf, 0x17, 0x62, 0x52, 0x6e, 0x5c, 0x40, 0x45, 0x1c, 0x10, 0x27, 0x72, 0xec, 0x05, 0x25, 0xc1, 0x4d, 0x23, 0xa8, 0x7f, 0x69, 0xec, 0x00, 0xbd, 0xee, 0x09, 0x26, 0x4d, 0x7b, 0x81, 0x3d, 0xcb, 0x0e, 0x3d, 0x56, 0xda, 0x65, 0xa7, 0x69, 0x6a, 0xf7, 0x20, 0x53, 0x1c, 0x6f, 0xea, 0xb4, 0x64, 0xda, 0x6e, 0xb1, 0xfd, 0xf9, 0xfe, 0xf1, 0x2f, 0xc6, 0x2e, 0xc8, 0x19, 0xc8, 0x54, 0x32, 0x9e, 0x41, 0x3c, 0x95, 0xec, 0xaf, 0x1f, 0x71, 0x15, 0xfa, 0x6c, 0x5e, 0xf0, 0x7c, 0xe1, 0x65, 0x39, 0x28, 0x20, 0x3d, 0xc3, 0x78, 0x15, 0xe3, 0x19, 0xc6, 0x79, 0x9c, 0x40, 0x02, 0x1a, 0x61, 0xe5, 0x57, 0x45, 0x3b, 0xcf, 0x12, 0x80, 0xe4, 0x0f, 0x67, 0x61, 0x96, 0xb2, 0x50, 0x08, 0x50, 0xa1, 0x4a, 0x41, 0x48, 0x73, 0xfa, 0xaa, 0x21, 0x2f, 0xe1, 0x82, 0x97, 0x11, 0x9a, 0x72, 0x6d, 0xdc, 0xfb, 0x51, 0x16, 0xf8, 0xaa, 0xa1, 0x6f, 0x62, 0x02, 0x01, 0x9f, 0x17, 0x5c, 0x2a, 0x77, 0x8c, 0x9f, 0x5c, 0x3b, 0x91, 0x19, 0x08, 0xc9, 0xc9, 0x27, 0xdc, 0xa9, 0x4c, 0x6d, 0xd4, 0x6f, 0x0f, 0x1e, 0x0e, 0x5f, 0x78, 0xf5, 0xbd, 0x3d, 0xad, 0x2d, 0xa5, 0xa3, 0x7b, 0xcb, 0x93, 0xe7, 0x56, 0x60, 0x64, 0xee, 0x47, 0x6c, 0x6b, 0xef, 0x2f, 0x45, 0x9e, 0x73, 0xa1, 0x34, 0x66, 0x72, 0x09, 0xc5, 0x38, 0xfd, 0xc5, 0x85, 0x4a, 0x27, 0x29, 0xcf, 0x6d, 0xd4, 0x47, 0x83, 0x07, 0xc1, 0xd6, 0x8e, 0xfb, 0x19, 0x3f, 0xad, 0xd1, 0x9a, 0x66, 0x2f, 0xf1, 0xa3, 0xb8, 0xda, 0xff, 0xa9, 0xa3, 0xb4, 0xbe, 0x1d, 0x74, 0xe3, 0x2d, 0x78, 0x78, 0xd8, 0xc2, 0xf7, 0xb5, 0x05, 0xd9, 0x47, 0x18, 0x5f, 0x76, 0x94, 0xc4, 0x6b, 0xba, 0x47, 0xfd, 0x88, 0x1c, 0x76, 0x6b, 0xbe, 0xaa, 0xe7, 0xbe, 0xd9, 0x39, 0x3a, 0xdb, 0x6b, 0xf5, 0x09, 0x65, 0x0d, 0x3f, 0xa7, 0x5a, 0x92, 0x03, 0x84, 0xbb, 0xdb, 0xf7, 0x23, 0xef, 0x6f, 0x4c, 0xaa, 0x19, 0xa3, 0xe3, 0xdf, 0x41, 0x61, 0xda, 0xbd, 0xd3, 0xed, 0xde, 0x92, 0xd7, 0x4d, 0xed, 0xae, 0x8c, 0x76, 0xf4, 0x7d, 0xb9, 0xa6, 0x68, 0xb5, 0xa6, 0xe8, 0x74, 0x4d, 0xd1, 0xee, 0x86, 0x5a, 0xab, 0x0d, 0xb5, 0x8e, 0x37, 0xd4, 0x1a, 0xfb, 0x49, 0xaa, 0xa6, 0x45, 0xe4, 0xc5, 0x30, 0x63, 0x12, 0x8a, 0x3c, 0xe6, 0x82, 0xab, 0x7f, 0x90, 0xff, 0x36, 0xab, 0x69, 0x11, 0xb1, 0xff, 0x17, 0xe6, 0x6a, 0x91, 0x71, 0x19, 0x75, 0xf4, 0x73, 0xfc, 0x70, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x67, 0xda, 0x89, 0x26, 0x03, 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 { // EpochInfos provide running epochInfos EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) } type queryClient struct { cc grpc1.ClientConn } func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } func (c *queryClient) EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) { out := new(QueryEpochsInfoResponse) err := c.cc.Invoke(ctx, "/osmosis.epochs.v1beta1.Query/EpochInfos", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) { out := new(QueryCurrentEpochResponse) err := c.cc.Invoke(ctx, "/osmosis.epochs.v1beta1.Query/CurrentEpoch", in, out, opts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. type QueryServer interface { // EpochInfos provide running epochInfos EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } func (*UnimplementedQueryServer) EpochInfos(ctx context.Context, req *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EpochInfos not implemented") } func (*UnimplementedQueryServer) CurrentEpoch(ctx context.Context, req *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CurrentEpoch not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } func _Query_EpochInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryEpochsInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).EpochInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/osmosis.epochs.v1beta1.Query/EpochInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EpochInfos(ctx, req.(*QueryEpochsInfoRequest)) } return interceptor(ctx, in, info, handler) } func _Query_CurrentEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryCurrentEpochRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).CurrentEpoch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/osmosis.epochs.v1beta1.Query/CurrentEpoch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).CurrentEpoch(ctx, req.(*QueryCurrentEpochRequest)) } return interceptor(ctx, in, info, handler) } var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.epochs.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EpochInfos", Handler: _Query_EpochInfos_Handler, }, { MethodName: "CurrentEpoch", Handler: _Query_CurrentEpoch_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/epochs/v1beta1/query.proto", } func (m *QueryEpochsInfoRequest) 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 *QueryEpochsInfoRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *QueryEpochsInfoResponse) 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 *QueryEpochsInfoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryEpochsInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Epochs) > 0 { for iNdEx := len(m.Epochs) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Epochs[iNdEx].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 (m *QueryCurrentEpochRequest) 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 *QueryCurrentEpochRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryCurrentEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Identifier) > 0 { i -= len(m.Identifier) copy(dAtA[i:], m.Identifier) i = encodeVarintQuery(dAtA, i, uint64(len(m.Identifier))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryCurrentEpochResponse) 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 *QueryCurrentEpochResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryCurrentEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.CurrentEpoch != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.CurrentEpoch)) i-- dAtA[i] = 0x8 } 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 *QueryEpochsInfoRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *QueryEpochsInfoResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Epochs) > 0 { for _, e := range m.Epochs { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } return n } func (m *QueryCurrentEpochRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identifier) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryCurrentEpochResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.CurrentEpoch != 0 { n += 1 + sovQuery(uint64(m.CurrentEpoch)) } 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 *QueryEpochsInfoRequest) 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: QueryEpochsInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryEpochsInfoRequest: 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 *QueryEpochsInfoResponse) 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: QueryEpochsInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryEpochsInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Epochs", 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.Epochs = append(m.Epochs, EpochInfo{}) if err := m.Epochs[len(m.Epochs)-1].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 *QueryCurrentEpochRequest) 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: QueryCurrentEpochRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryCurrentEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Identifier = string(dAtA[iNdEx:postIndex]) 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 *QueryCurrentEpochResponse) 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: QueryCurrentEpochResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryCurrentEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) } m.CurrentEpoch = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CurrentEpoch |= int64(b&0x7F) << shift if b < 0x80 { break } } 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") ) ================================================ FILE: x/epochs/types/query.pb.gw.go ================================================ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // source: osmosis/epochs/v1beta1/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_EpochInfos_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryEpochsInfoRequest var metadata runtime.ServerMetadata msg, err := client.EpochInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_EpochInfos_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryEpochsInfoRequest var metadata runtime.ServerMetadata msg, err := server.EpochInfos(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_CurrentEpoch_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_CurrentEpoch_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCurrentEpochRequest 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_CurrentEpoch_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.CurrentEpoch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_CurrentEpoch_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCurrentEpochRequest 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_CurrentEpoch_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.CurrentEpoch(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_EpochInfos_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_EpochInfos_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_EpochInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_CurrentEpoch_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_CurrentEpoch_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_CurrentEpoch_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_EpochInfos_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_EpochInfos_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_EpochInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_CurrentEpoch_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_CurrentEpoch_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_CurrentEpoch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } var ( pattern_Query_EpochInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1}, []string{"osmosis", "epochs", "v1beta1"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_CurrentEpoch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "epochs", "v1beta1", "current_epoch"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Query_EpochInfos_0 = runtime.ForwardResponseMessage forward_Query_CurrentEpoch_0 = runtime.ForwardResponseMessage ) ================================================ FILE: x/epochs/types/telemetry.go ================================================ package types var ( // epoch_hook_failed // // counter that is increased if epoch hook fails // // Has the following labels: // * module_name - the name of the module that errored or panicked // * err - the error or panic returned // * is_before_hook - true if this is a before epoch hook. False otherwise. EpochHookFailedMetricName = formatEpochMetricName("hook_failed") ) // formatTxFeesMetricName formats the epochs module metric name. func formatEpochMetricName(metricName string) string { return FormatMetricName(ModuleName, metricName) } // FormatMetricName helper to format a metric name given SDK module name and extension. func FormatMetricName(moduleName, extension string) string { return moduleName + "_" + extension } ================================================ FILE: x/feegrant/basic_fee.go ================================================ package feegrant import ( "context" time "time" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ FeeAllowanceI = (*BasicAllowance)(nil) // Accept can use fee payment requested as well as timestamp of the current block // to determine whether or not to process this. This is checked in // Keeper.UseGrantedFees and the return values should match how it is handled there. // // If it returns an error, the fee payment is rejected, otherwise it is accepted. // The FeeAllowance implementation is expected to update its internal state // and will be saved again after an acceptance. // // If remove is true (regardless of the error), the FeeAllowance will be deleted from storage // (eg. when it is used up). (See call to RevokeAllowance in Keeper.UseGrantedFees) func (a *BasicAllowance) Accept(ctx context.Context, fee sdk.Coins, _ []sdk.Msg) (bool, error) { if a.Expiration != nil && a.Expiration.Before(sdk.UnwrapSDKContext(ctx).BlockTime()) { return true, errorsmod.Wrap(ErrFeeLimitExpired, "basic allowance") } if a.SpendLimit != nil { left, invalid := a.SpendLimit.SafeSub(fee...) if invalid { return false, errorsmod.Wrap(ErrFeeLimitExceeded, "basic allowance") } a.SpendLimit = left return left.IsZero(), nil } return false, nil } // ValidateBasic implements FeeAllowance and enforces basic sanity checks func (a BasicAllowance) ValidateBasic() error { if a.SpendLimit != nil { if !a.SpendLimit.IsValid() { return errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "send amount is invalid: %s", a.SpendLimit) } if !a.SpendLimit.IsAllPositive() { return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "spend limit must be positive") } } if a.Expiration != nil && a.Expiration.Unix() < 0 { return errorsmod.Wrap(ErrInvalidDuration, "expiration time cannot be negative") } return nil } // ExpiresAt returns the expiry time of the BasicAllowance. func (a BasicAllowance) ExpiresAt() (*time.Time, error) { return a.Expiration, nil } ================================================ FILE: x/feegrant/basic_fee_test.go ================================================ package feegrant_test import ( "testing" "time" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) func TestBasicFeeValidAllow(t *testing.T) { key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) badTime := ctx.BlockTime().AddDate(0, 0, -1) allowace := &feegrant.BasicAllowance{ Expiration: &badTime, } require.Error(t, allowace.ValidateBasic()) ctx = ctx.WithBlockHeader(cmtproto.Header{ Time: time.Now(), }) eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 10)) atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) smallAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 43)) bigAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 1000)) leftAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 512)) now := ctx.BlockTime() oneHour := now.Add(1 * time.Hour) cases := map[string]struct { allowance *feegrant.BasicAllowance // all other checks are ignored if valid=false fee sdk.Coins blockTime time.Time valid bool accept bool remove bool remains sdk.Coins }{ "empty": { allowance: &feegrant.BasicAllowance{}, accept: true, }, "small fee without expire": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, }, fee: smallAtom, accept: true, remove: false, remains: leftAtom, }, "all fee without expire": { allowance: &feegrant.BasicAllowance{ SpendLimit: smallAtom, }, fee: smallAtom, accept: true, remove: true, }, "wrong fee": { allowance: &feegrant.BasicAllowance{ SpendLimit: smallAtom, }, fee: eth, accept: false, }, "non-expired": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &oneHour, }, valid: true, fee: smallAtom, blockTime: now, accept: true, remove: false, remains: leftAtom, }, "expired": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &now, }, valid: true, fee: smallAtom, blockTime: oneHour, accept: false, remove: true, }, "fee more than allowed": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &oneHour, }, valid: true, fee: bigAtom, blockTime: now, accept: false, }, "with out spend limit": { allowance: &feegrant.BasicAllowance{ Expiration: &oneHour, }, valid: true, fee: bigAtom, blockTime: now, accept: true, }, "expired no spend limit": { allowance: &feegrant.BasicAllowance{ Expiration: &now, }, valid: true, fee: bigAtom, blockTime: oneHour, accept: false, }, } for name, stc := range cases { tc := stc // to make scopelint happy t.Run(name, func(t *testing.T) { err := tc.allowance.ValidateBasic() require.NoError(t, err) ctx := testCtx.Ctx.WithBlockTime(tc.blockTime) // now try to deduct removed, err := tc.allowance.Accept(ctx, tc.fee, []sdk.Msg{}) if !tc.accept { require.Error(t, err) return } require.NoError(t, err) require.Equal(t, tc.remove, removed) if !removed { assert.Equal(t, tc.allowance.SpendLimit, tc.remains) } }) } } ================================================ FILE: x/feegrant/client/cli/tx.go ================================================ package cli import ( "fmt" "strings" "time" "github.com/spf13/cobra" "cosmossdk.io/core/address" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" ) // flag for feegrant module const ( FlagExpiration = "expiration" FlagPeriod = "period" FlagPeriodLimit = "period-limit" FlagSpendLimit = "spend-limit" FlagAllowedMsgs = "allowed-messages" ) // GetTxCmd returns the transaction commands for feegrant module func GetTxCmd(ac address.Codec) *cobra.Command { feegrantTxCmd := &cobra.Command{ Use: feegrant.ModuleName, Short: "Feegrant transactions sub-commands", Long: "Grant and revoke fee allowance for a grantee by a granter", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } feegrantTxCmd.AddCommand( NewCmdFeeGrant(ac), NewCmdFeeGrantDID(ac), ) return feegrantTxCmd } // NewCmdFeeGrant returns a CLI command handler to create a MsgGrantAllowance transaction. // This command is more powerful than AutoCLI generated command as it allows a better input validation. func NewCmdFeeGrant(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "grant [granter_key_or_address] [grantee]", Aliases: []string{"grant-allowance"}, Short: "Grant Fee allowance to an address", Long: strings.TrimSpace( fmt.Sprintf( `Grant authorization to pay fees from your address. Note, the '--from' flag is ignored as it is implied from [granter]. Examples: %s tx %s grant source1skjw... source1skjw... --spend-limit 100uopen --expiration 2022-01-30T15:04:05Z or %s tx %s grant source1skjw... source1skjw... --spend-limit 100uopen --period 3600 --period-limit 10uopen --expiration 2022-01-30T15:04:05Z or %s tx %s grant source1skjw... source1skjw... --spend-limit 100uopen --expiration 2022-01-30T15:04:05Z --allowed-messages "/cosmos.gov.v1beta1.MsgSubmitProposal,/cosmos.gov.v1beta1.MsgVote" `, version.AppName, feegrant.ModuleName, version.AppName, feegrant.ModuleName, version.AppName, feegrant.ModuleName, ), ), Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { if err := cmd.Flags().Set(flags.FlagFrom, args[0]); err != nil { return err } clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } grantee, err := ac.StringToBytes(args[1]) if err != nil { return err } granter := clientCtx.GetFromAddress() sl, err := cmd.Flags().GetString(FlagSpendLimit) if err != nil { return err } // if `FlagSpendLimit` isn't set, limit will be nil. // Hence, there won't be any spendlimit for the grantee. limit, err := sdk.ParseCoinsNormalized(sl) if err != nil { return err } exp, err := cmd.Flags().GetString(FlagExpiration) if err != nil { return err } basic := feegrant.BasicAllowance{ SpendLimit: limit, } var expiresAtTime time.Time if exp != "" { expiresAtTime, err = time.Parse(time.RFC3339, exp) if err != nil { return err } basic.Expiration = &expiresAtTime } var grant feegrant.FeeAllowanceI grant = &basic periodClock, err := cmd.Flags().GetInt64(FlagPeriod) if err != nil { return err } periodLimitVal, err := cmd.Flags().GetString(FlagPeriodLimit) if err != nil { return err } // check any of period or periodLimit flags are set, // if set consider it as periodic fee allowance. if periodClock > 0 || periodLimitVal != "" { periodLimit, err := sdk.ParseCoinsNormalized(periodLimitVal) if err != nil { return err } if periodClock <= 0 { return fmt.Errorf("period clock was not set") } if periodLimit == nil { return fmt.Errorf("period limit was not set") } periodReset := getPeriodReset(periodClock) if exp != "" && periodReset.Sub(expiresAtTime) > 0 { return fmt.Errorf("period (%d) cannot reset after expiration (%v)", periodClock, exp) } periodic := feegrant.PeriodicAllowance{ Basic: basic, Period: getPeriod(periodClock), PeriodReset: getPeriodReset(periodClock), PeriodSpendLimit: periodLimit, PeriodCanSpend: periodLimit, } grant = &periodic } allowedMsgs, err := cmd.Flags().GetStringSlice(FlagAllowedMsgs) if err != nil { return err } if len(allowedMsgs) > 0 { grant, err = feegrant.NewAllowedMsgAllowance(grant, allowedMsgs) if err != nil { return err } } msg, err := feegrant.NewMsgGrantAllowance(grant, granter, grantee) if err != nil { return err } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } flags.AddTxFlagsToCmd(cmd) cmd.Flags().StringSlice(FlagAllowedMsgs, []string{}, "Set of allowed messages for fee allowance") cmd.Flags().String(FlagExpiration, "", "The RFC 3339 timestamp after which the grant expires for the user") cmd.Flags().String(FlagSpendLimit, "", "Spend limit specifies the max limit can be used, if not mentioned there is no limit") cmd.Flags().Int64(FlagPeriod, 0, "period specifies the time duration(in seconds) in which period_limit coins can be spent before that allowance is reset (ex: 3600)") cmd.Flags().String(FlagPeriodLimit, "", "period limit specifies the maximum number of coins that can be spent in the period") return cmd } func getPeriodReset(duration int64) time.Time { return time.Now().Add(getPeriod(duration)) } func getPeriod(duration int64) time.Duration { return time.Duration(duration) * time.Second } // NewCmdFeeGrantDID returns a CLI command handler to create a MsgGrantDIDAllowance transaction. func NewCmdFeeGrantDID(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "grant-did [granter_key] [grantee_did]", Aliases: []string{"grant-did-allowance"}, Short: "Grant Fee allowance to a DID", Long: strings.TrimSpace( fmt.Sprintf( `Grant authorization to pay fees from your address to a DID. Note, the '--from' flag is ignored as it is implied from [granter]. Examples: %s tx %s grant-did faucet did:key:alice --spend-limit 100uopen --expiration 2022-01-30T15:04:05Z or %s tx %s grant-did developer did:key:bob --spend-limit 100ucredit --period 3600 --period-limit 10ucredit --expiration 2022-01-30T15:04:05Z `, version.AppName, feegrant.ModuleName, version.AppName, feegrant.ModuleName, ), ), Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { if err := cmd.Flags().Set(flags.FlagFrom, args[0]); err != nil { return err } clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } granteeDID := args[1] if granteeDID == "" { return fmt.Errorf("grantee DID cannot be empty") } granter := clientCtx.GetFromAddress() sl, err := cmd.Flags().GetString(FlagSpendLimit) if err != nil { return err } // if `FlagSpendLimit` isn't set, limit will be nil. // Hence, there won't be any spendlimit for the grantee. limit, err := sdk.ParseCoinsNormalized(sl) if err != nil { return err } exp, err := cmd.Flags().GetString(FlagExpiration) if err != nil { return err } basic := feegrant.BasicAllowance{ SpendLimit: limit, } var expiresAtTime time.Time if exp != "" { expiresAtTime, err = time.Parse(time.RFC3339, exp) if err != nil { return err } basic.Expiration = &expiresAtTime } var grant feegrant.FeeAllowanceI grant = &basic periodClock, err := cmd.Flags().GetInt64(FlagPeriod) if err != nil { return err } periodLimitVal, err := cmd.Flags().GetString(FlagPeriodLimit) if err != nil { return err } // check any of period or periodLimit flags are set, // if set consider it as periodic fee allowance. if periodClock > 0 || periodLimitVal != "" { periodLimit, err := sdk.ParseCoinsNormalized(periodLimitVal) if err != nil { return err } if periodClock <= 0 { return fmt.Errorf("period clock was not set") } if periodLimit == nil { return fmt.Errorf("period limit was not set") } periodReset := getPeriodReset(periodClock) if exp != "" && periodReset.Sub(expiresAtTime) > 0 { return fmt.Errorf("period (%d) cannot reset after expiration (%v)", periodClock, exp) } periodic := feegrant.PeriodicAllowance{ Basic: basic, Period: getPeriod(periodClock), PeriodReset: getPeriodReset(periodClock), PeriodSpendLimit: periodLimit, PeriodCanSpend: periodLimit, } grant = &periodic } allowedMsgs, err := cmd.Flags().GetStringSlice(FlagAllowedMsgs) if err != nil { return err } if len(allowedMsgs) > 0 { grant, err = feegrant.NewAllowedMsgAllowance(grant, allowedMsgs) if err != nil { return err } } msg, err := feegrant.NewMsgGrantDIDAllowance(grant, granter, granteeDID) if err != nil { return err } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } flags.AddTxFlagsToCmd(cmd) cmd.Flags().StringSlice(FlagAllowedMsgs, []string{}, "Set of allowed messages for fee allowance") cmd.Flags().String(FlagExpiration, "", "The RFC 3339 timestamp after which the grant expires for the DID") cmd.Flags().String(FlagSpendLimit, "", "Spend limit specifies the max limit can be used, if not mentioned there is no limit") cmd.Flags().Int64(FlagPeriod, 0, "period specifies the time duration(in seconds) in which period_limit coins can be spent before that allowance is reset (ex: 3600)") cmd.Flags().String(FlagPeriodLimit, "", "period limit specifies the maximum number of coins that can be spent in the period") return cmd } ================================================ FILE: x/feegrant/client/cli/tx_test.go ================================================ package cli_test import ( "fmt" "io" "strings" "testing" "time" abci "github.com/cometbft/cometbft/abci/types" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" _ "cosmossdk.io/api/cosmos/gov/v1beta1" sdkmath "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/x/feegrant" _ "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/client/cli" "github.com/sourcenetwork/sourcehub/x/feegrant/module" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( oneYear = 365 * 24 * 60 * 60 tenHours = 10 * 60 * 60 oneHour = 60 * 60 ) type CLITestSuite struct { suite.Suite addedGranter sdk.AccAddress addedGrantee sdk.AccAddress addedGrant feegrant.Grant kr keyring.Keyring baseCtx client.Context encCfg testutilmod.TestEncodingConfig clientCtx client.Context accounts []sdk.AccAddress } func TestCLITestSuite(t *testing.T) { suite.Run(t, new(CLITestSuite)) } func (s *CLITestSuite) SetupSuite() { s.T().Log("setting up integration test suite") s.encCfg = testutilmod.MakeTestEncodingConfig(module.AppModuleBasic{}) s.kr = keyring.NewInMemory(s.encCfg.Codec) s.baseCtx = client.Context{}. WithKeyring(s.kr). WithTxConfig(s.encCfg.TxConfig). WithCodec(s.encCfg.Codec). WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). WithAccountRetriever(client.MockAccountRetriever{}). WithOutput(io.Discard). WithChainID("test-chain") ctxGen := func() client.Context { bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ Value: bz, }) return s.baseCtx.WithClient(c) } s.clientCtx = ctxGen() if testing.Short() { s.T().Skip("skipping test in unit-tests mode.") } accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 2) granter := accounts[0].Address grantee := accounts[1].Address s.createGrant(granter, grantee) grant, err := feegrant.NewGrant(granter, grantee, &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))), }) s.Require().NoError(err) s.addedGrant = grant s.addedGranter = granter s.addedGrantee = grantee for _, v := range accounts { s.accounts = append(s.accounts, v.Address) } s.accounts[1] = accounts[1].Address } // createGrant creates a new basic allowance fee grant from granter to grantee. func (s *CLITestSuite) createGrant(granter, grantee sdk.Address) { commonFlags := []string{ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100))).String()), } fee := sdk.NewCoin("stake", sdkmath.NewInt(100)) args := append( []string{ granter.String(), grantee.String(), fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, fee.String()), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, getFormattedExpiration(oneYear)), }, commonFlags..., ) cmd := cli.NewCmdFeeGrant(codecaddress.NewBech32Codec("cosmos")) out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, args) s.Require().NoError(err) var resp sdk.TxResponse s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) s.Require().Equal(resp.Code, uint32(0)) } func (s *CLITestSuite) TestNewCmdFeeGrant() { granter := s.accounts[0] alreadyExistedGrantee := s.addedGrantee clientCtx := s.clientCtx fromAddr, fromName, _, err := client.GetFromFields(s.baseCtx, s.kr, granter.String()) s.Require().Equal(fromAddr, granter) s.Require().NoError(err) commonFlags := []string{ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), } testCases := []struct { name string args []string expectErr bool expectedCode uint32 respType proto.Message }{ { "wrong granter address", append( []string{ "wrong_granter", "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), true, 0, nil, }, { "wrong grantee address", append( []string{ granter.String(), "wrong_grantee", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), true, 0, nil, }, { "wrong granter key name", append( []string{ "invalid_granter", "cosmos16dun6ehcc86e03wreqqww89ey569wuj4em572w", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), true, 0, nil, }, { "valid basic fee grant", append( []string{ granter.String(), "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid basic fee grant with granter key name", append( []string{ fromName, "cosmos16dun6ehcc86e03wreqqww89ey569wuj4em572w", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, fromName), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid basic fee grant with amino", append( []string{ granter.String(), "cosmos1v57fx2l2rt6ehujuu99u2fw05779m5e2ux4z2h", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid basic fee grant without spend limit", append( []string{ granter.String(), "cosmos17h5lzptx3ghvsuhk7wx4c4hnl7rsswxjer97em", fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid basic fee grant without expiration", append( []string{ granter.String(), "cosmos16dlc38dcqt0uralyd8hksxyrny6kaeqfjvjwp5", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid basic fee grant without spend-limit and expiration", append( []string{ granter.String(), "cosmos1ku40qup9vwag4wtf8cls9mkszxfthaklxkp3c8", fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "try to add existed grant", append( []string{ granter.String(), alreadyExistedGrantee.String(), fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), false, 18, &sdk.TxResponse{}, }, { "invalid number of args(periodic fee grant)", append( []string{ granter.String(), "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, getFormattedExpiration(tenHours)), }, commonFlags..., ), true, 0, nil, }, { "period mentioned and period limit omitted, invalid periodic grant", append( []string{ granter.String(), "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%d", cli.FlagPeriod, tenHours), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, getFormattedExpiration(oneHour)), }, commonFlags..., ), true, 0, nil, }, { "period cannot be greater than the actual expiration(periodic fee grant)", append( []string{ granter.String(), "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%d", cli.FlagPeriod, tenHours), fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, getFormattedExpiration(oneHour)), }, commonFlags..., ), true, 0, nil, }, { "valid periodic fee grant", append( []string{ granter.String(), "cosmos1w55kgcf3ltaqdy4ww49nge3klxmrdavrr6frmp", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%d", cli.FlagPeriod, oneHour), fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, getFormattedExpiration(tenHours)), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid periodic fee grant without spend-limit", append( []string{ granter.String(), "cosmos1vevyks8pthkscvgazc97qyfjt40m6g9xe85ry8", fmt.Sprintf("--%s=%d", cli.FlagPeriod, oneHour), fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, getFormattedExpiration(tenHours)), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid periodic fee grant without expiration", append( []string{ granter.String(), "cosmos14cm33pvnrv2497tyt8sp9yavhmw83nwej3m0e8", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%d", cli.FlagPeriod, oneHour), fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "valid periodic fee grant without spend-limit and expiration", append( []string{ granter.String(), "cosmos12nyk4pcf4arshznkpz882e4l4ts0lt0ap8ce54", fmt.Sprintf("--%s=%d", cli.FlagPeriod, oneHour), fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), false, 0, &sdk.TxResponse{}, }, { "invalid expiration", append( []string{ granter.String(), "cosmos1vevyks8pthkscvgazc97qyfjt40m6g9xe85ry8", fmt.Sprintf("--%s=%d", cli.FlagPeriod, oneHour), fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, "invalid"), }, commonFlags..., ), true, 0, nil, }, } for _, tc := range testCases { tc := tc s.Run(tc.name, func() { cmd := cli.NewCmdFeeGrant(codecaddress.NewBech32Codec("cosmos")) out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { s.Require().Error(err) } else { s.Require().NoError(err) s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) } }) } } func (s *CLITestSuite) TestTxWithFeeGrant() { clientCtx := s.clientCtx granter := s.addedGranter // creating an account manually (This account won't be exist in state) k, _, err := s.baseCtx.Keyring.NewMnemonic("grantee", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) s.Require().NoError(err) pub, err := k.GetPubKey() s.Require().NoError(err) grantee := sdk.AccAddress(pub.Address()) commonFlags := []string{ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), } fee := sdk.NewCoin("stake", sdkmath.NewInt(100)) args := append( []string{ granter.String(), grantee.String(), fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, fee.String()), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), fmt.Sprintf("--%s=%s", cli.FlagExpiration, getFormattedExpiration(oneYear)), }, commonFlags..., ) cmd := cli.NewCmdFeeGrant(codecaddress.NewBech32Codec("cosmos")) var res sdk.TxResponse out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().NoError(err) s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res), out.String()) testcases := []struct { name string from string flags []string expErrCode uint32 }{ { name: "granted fee allowance for an account which is not in state and creating any tx with it by using --fee-granter shouldn't fail", from: grantee.String(), flags: []string{fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter.String())}, }, { name: "--fee-payer should also sign the tx (direct)", from: grantee.String(), flags: []string{fmt.Sprintf("--%s=%s", flags.FlagFeePayer, granter.String())}, expErrCode: 4, }, { name: "--fee-payer should also sign the tx (amino-json)", from: grantee.String(), flags: []string{ fmt.Sprintf("--%s=%s", flags.FlagFeePayer, granter.String()), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, expErrCode: 4, }, { name: "use --fee-payer and --fee-granter together works", from: grantee.String(), flags: []string{ fmt.Sprintf("--%s=%s", flags.FlagFeePayer, grantee.String()), fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter.String()), }, }, } for _, tc := range testcases { s.Run(tc.name, func() { err := s.msgSubmitLegacyProposal(s.baseCtx, tc.from, "Text Proposal", "No desc", govv1beta1.ProposalTypeText, tc.flags..., ) s.Require().NoError(err) var resp sdk.TxResponse s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) }) } } func (s *CLITestSuite) msgSubmitLegacyProposal(clientCtx client.Context, from, title, description, proposalType string, extraArgs ...string) error { commonArgs := []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), } args := append([]string{ fmt.Sprintf("--%s=%s", govcli.FlagTitle, title), fmt.Sprintf("--%s=%s", govcli.FlagDescription, description), //nolint:staticcheck // SA1019: govcli.FlagDescription is deprecated: use FlagDescription instead fmt.Sprintf("--%s=%s", govcli.FlagProposalType, proposalType), //nolint:staticcheck // SA1019: govcli.FlagProposalType is deprecated: use FlagProposalType instead fmt.Sprintf("--%s=%s", flags.FlagFrom, from), }, commonArgs...) args = append(args, extraArgs...) cmd := govcli.NewCmdSubmitLegacyProposal() out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().NoError(err) var resp sdk.TxResponse s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) return err } func (s *CLITestSuite) TestFilteredFeeAllowance() { granter := s.addedGranter k, _, err := s.baseCtx.Keyring.NewMnemonic("grantee1", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) s.Require().NoError(err) pub, err := k.GetPubKey() s.Require().NoError(err) grantee := sdk.AccAddress(pub.Address()) clientCtx := s.clientCtx commonFlags := []string{ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))).String()), } spendLimit := sdk.NewCoin("stake", sdkmath.NewInt(1000)) allowMsgs := strings.Join([]string{sdk.MsgTypeURL(&govv1beta1.MsgSubmitProposal{}), sdk.MsgTypeURL(&govv1.MsgVoteWeighted{})}, ",") testCases := []struct { name string args []string expectErrMsg string }{ { "invalid granter address", append( []string{ "not an address", "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", fmt.Sprintf("--%s=%s", cli.FlagAllowedMsgs, allowMsgs), fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, spendLimit.String()), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), "key not found", }, { "invalid grantee address", append( []string{ granter.String(), "not an address", fmt.Sprintf("--%s=%s", cli.FlagAllowedMsgs, allowMsgs), fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, spendLimit.String()), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), "decoding bech32 failed", }, { "valid filter fee grant", append( []string{ granter.String(), grantee.String(), fmt.Sprintf("--%s=%s", cli.FlagAllowedMsgs, allowMsgs), fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, spendLimit.String()), fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), }, commonFlags..., ), "", }, } for _, tc := range testCases { tc := tc s.Run(tc.name, func() { cmd := cli.NewCmdFeeGrant(codecaddress.NewBech32Codec("cosmos")) out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErrMsg != "" { s.Require().Error(err) s.Require().Contains(err.Error(), tc.expectErrMsg) } else { s.Require().NoError(err) msg := &sdk.TxResponse{} s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), msg), out.String()) } }) } // exec filtered fee allowance cases := []struct { name string malleate func() error }{ { "valid proposal tx", func() error { return s.msgSubmitLegacyProposal(s.baseCtx, grantee.String(), "Text Proposal", "No desc", govv1beta1.ProposalTypeText, fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter.String()), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))).String()), ) }, }, { "valid weighted_vote tx", func() error { return s.msgVote(s.baseCtx, grantee.String(), "0", "yes", fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter.String()), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))).String()), ) }, }, { "should fail with unauthorized msgs", func() error { args := append( []string{ grantee.String(), "cosmos14cm33pvnrv2497tyt8sp9yavhmw83nwej3m0e8", fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter), }, commonFlags..., ) cmd := cli.NewCmdFeeGrant(codecaddress.NewBech32Codec("cosmos")) out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &sdk.TxResponse{}), out.String()) return err }, }, } for _, tc := range cases { tc := tc s.Run(tc.name, func() { err := tc.malleate() s.Require().NoError(err) }) } } // msgVote votes for a proposal func (s *CLITestSuite) msgVote(clientCtx client.Context, from, id, vote string, extraArgs ...string) error { commonArgs := []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10))).String()), } args := append([]string{ id, vote, fmt.Sprintf("--%s=%s", flags.FlagFrom, from), }, commonArgs...) args = append(args, extraArgs...) cmd := govcli.NewCmdWeightedVote() out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &sdk.TxResponse{}), out.String()) return err } func getFormattedExpiration(duration int64) string { return time.Now().Add(time.Duration(duration) * time.Second).Format(time.RFC3339) } ================================================ FILE: x/feegrant/codec.go ================================================ package feegrant import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterLegacyAminoCodec registers the necessary x/feegrant interfaces and concrete types // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgGrantAllowance{}, "cosmos-sdk/MsgGrantAllowance") legacy.RegisterAminoMsg(cdc, &MsgRevokeAllowance{}, "cosmos-sdk/MsgRevokeAllowance") cdc.RegisterInterface((*FeeAllowanceI)(nil), nil) cdc.RegisterConcrete(&BasicAllowance{}, "cosmos-sdk/BasicAllowance", nil) cdc.RegisterConcrete(&PeriodicAllowance{}, "cosmos-sdk/PeriodicAllowance", nil) cdc.RegisterConcrete(&AllowedMsgAllowance{}, "cosmos-sdk/AllowedMsgAllowance", nil) } // RegisterInterfaces registers the interfaces types with the interface registry func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgGrantAllowance{}, &MsgRevokeAllowance{}, &MsgGrantDIDAllowance{}, &MsgExpireDIDAllowance{}, &MsgPruneDIDAllowances{}, ) registry.RegisterInterface( "sourcehub.feegrant.v1beta1.FeeAllowanceI", (*FeeAllowanceI)(nil), &BasicAllowance{}, &PeriodicAllowance{}, &AllowedMsgAllowance{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } ================================================ FILE: x/feegrant/doc.go ================================================ /* Package feegrant provides functionality for authorizing the payment of transaction fees from one account (key) to another account (key). Effectively, this allows for a user to pay fees using the balance of an account different from their own. Example use cases would be allowing a key on a device to pay for fees using a master wallet, or a third party service allowing users to pay for transactions without ever really holding their own coins. This package provides ways for specifying fee allowances such that authorizing fee payment to another account can be done with clear and safe restrictions. A user would authorize granting fee payment to another user using MsgGrantAllowance and revoke that delegation using MsgRevokeAllowance. In both cases, Granter is the one who is authorizing fee payment and Grantee is the one who is receiving the fee payment authorization. So grantee would correspond to the one who is signing a transaction and the granter would be the address that pays the fees. The fee allowance that a grantee receives is specified by an implementation of the FeeAllowance interface. Two FeeAllowance implementations are provided in this package: BasicAllowance and PeriodicAllowance. */ package feegrant ================================================ FILE: x/feegrant/errors.go ================================================ package feegrant import "cosmossdk.io/errors" // Codes for feegrant errors const ( DefaultCodespace = ModuleName ) var ( // ErrFeeLimitExceeded error if there are not enough allowance to cover the fees ErrFeeLimitExceeded = errors.Register(DefaultCodespace, 2, "fee limit exceeded") // ErrFeeLimitExpired error if the allowance has expired ErrFeeLimitExpired = errors.Register(DefaultCodespace, 3, "fee allowance expired") // ErrInvalidDuration error if the Duration is invalid or doesn't match the expiration ErrInvalidDuration = errors.Register(DefaultCodespace, 4, "invalid duration") // ErrNoAllowance error if there is no allowance for that pair ErrNoAllowance = errors.Register(DefaultCodespace, 5, "no allowance") // ErrNoMessages error if there is no message ErrNoMessages = errors.Register(DefaultCodespace, 6, "allowed messages are empty") // ErrMessageNotAllowed error if message is not allowed ErrMessageNotAllowed = errors.Register(DefaultCodespace, 7, "message not allowed") // ErrInvalidDID error if a DID is not valid ErrInvalidDID = errors.Register(DefaultCodespace, 8, "invalid DID") ) ================================================ FILE: x/feegrant/events.go ================================================ package feegrant // feegrant module events const ( EventTypeUseFeeGrant = "use_feegrant" EventTypeUseDIDFeeGrant = "use_did_feegrant" EventTypeRevokeFeeGrant = "revoke_feegrant" EventTypeRevokeDIDFeeGrant = "revoke_did_feegrant" EventTypeExpireDIDFeeGrant = "expire_did_feegrant" EventTypeSetFeeGrant = "set_feegrant" EventTypeSetDIDFeeGrant = "set_did_feegrant" EventTypeUpdateFeeGrant = "update_feegrant" EventTypeUpdateDIDFeeGrant = "update_did_feegrant" EventTypePruneFeeGrant = "prune_feegrant" EventTypePruneDIDFeeGrant = "prune_did_feegrant" AttributeKeyExpirationTime = "expiration_time" AttributeKeyGranter = "granter" AttributeKeyGrantee = "grantee" AttributeKeyGranteeDid = "grantee_did" AttributeKeyPruner = "pruner" ) ================================================ FILE: x/feegrant/expected_keepers.go ================================================ package feegrant import ( "context" "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" ) // AccountKeeper defines the expected auth Account Keeper (noalias) type AccountKeeper interface { AddressCodec() address.Codec GetModuleAddress(moduleName string) sdk.AccAddress GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI SetAccount(ctx context.Context, acc sdk.AccountI) } // BankKeeper defines the expected supply Keeper (noalias) type BankKeeper interface { SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error BlockedAddr(addr sdk.AccAddress) bool } ================================================ FILE: x/feegrant/feegrant.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/feegrant/v1beta1/feegrant.proto package feegrant import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" types2 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // BasicAllowance implements Allowance with a one-time grant of coins // that optionally expires. The grantee can use up to SpendLimit to cover fees. type BasicAllowance struct { // spend_limit specifies the maximum amount of coins that can be spent // by this allowance and will be updated as coins are spent. If it is // empty, there is no spend limit and any amount of coins can be spent. SpendLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"spend_limit"` // expiration specifies an optional time when this allowance expires Expiration *time.Time `protobuf:"bytes,2,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` } func (m *BasicAllowance) Reset() { *m = BasicAllowance{} } func (m *BasicAllowance) String() string { return proto.CompactTextString(m) } func (*BasicAllowance) ProtoMessage() {} func (*BasicAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_30097885dd4859f3, []int{0} } func (m *BasicAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BasicAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_BasicAllowance.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 *BasicAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_BasicAllowance.Merge(m, src) } func (m *BasicAllowance) XXX_Size() int { return m.Size() } func (m *BasicAllowance) XXX_DiscardUnknown() { xxx_messageInfo_BasicAllowance.DiscardUnknown(m) } var xxx_messageInfo_BasicAllowance proto.InternalMessageInfo func (m *BasicAllowance) GetSpendLimit() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.SpendLimit } return nil } func (m *BasicAllowance) GetExpiration() *time.Time { if m != nil { return m.Expiration } return nil } // PeriodicAllowance extends Allowance to allow for both a maximum cap, // as well as a limit per time period. type PeriodicAllowance struct { // basic specifies a struct of `BasicAllowance` Basic BasicAllowance `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic"` // period specifies the time duration in which period_spend_limit coins can // be spent before that allowance is reset Period time.Duration `protobuf:"bytes,2,opt,name=period,proto3,stdduration" json:"period"` // period_spend_limit specifies the maximum number of coins that can be spent // in the period PeriodSpendLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=period_spend_limit,json=periodSpendLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"period_spend_limit"` // period_can_spend is the number of coins left to be spent before the period_reset time PeriodCanSpend github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=period_can_spend,json=periodCanSpend,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"period_can_spend"` // period_reset is the time at which this period resets and a new one begins, // it is calculated from the start time of the first transaction after the // last period ended PeriodReset time.Time `protobuf:"bytes,5,opt,name=period_reset,json=periodReset,proto3,stdtime" json:"period_reset"` } func (m *PeriodicAllowance) Reset() { *m = PeriodicAllowance{} } func (m *PeriodicAllowance) String() string { return proto.CompactTextString(m) } func (*PeriodicAllowance) ProtoMessage() {} func (*PeriodicAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_30097885dd4859f3, []int{1} } func (m *PeriodicAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PeriodicAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PeriodicAllowance.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 *PeriodicAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_PeriodicAllowance.Merge(m, src) } func (m *PeriodicAllowance) XXX_Size() int { return m.Size() } func (m *PeriodicAllowance) XXX_DiscardUnknown() { xxx_messageInfo_PeriodicAllowance.DiscardUnknown(m) } var xxx_messageInfo_PeriodicAllowance proto.InternalMessageInfo func (m *PeriodicAllowance) GetBasic() BasicAllowance { if m != nil { return m.Basic } return BasicAllowance{} } func (m *PeriodicAllowance) GetPeriod() time.Duration { if m != nil { return m.Period } return 0 } func (m *PeriodicAllowance) GetPeriodSpendLimit() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.PeriodSpendLimit } return nil } func (m *PeriodicAllowance) GetPeriodCanSpend() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.PeriodCanSpend } return nil } func (m *PeriodicAllowance) GetPeriodReset() time.Time { if m != nil { return m.PeriodReset } return time.Time{} } // AllowedMsgAllowance creates allowance only for specified message types. type AllowedMsgAllowance struct { // allowance can be any of basic and periodic fee allowance. Allowance *types2.Any `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` // allowed_messages are the messages for which the grantee has the access. AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"` } func (m *AllowedMsgAllowance) Reset() { *m = AllowedMsgAllowance{} } func (m *AllowedMsgAllowance) String() string { return proto.CompactTextString(m) } func (*AllowedMsgAllowance) ProtoMessage() {} func (*AllowedMsgAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_30097885dd4859f3, []int{2} } func (m *AllowedMsgAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AllowedMsgAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AllowedMsgAllowance.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 *AllowedMsgAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_AllowedMsgAllowance.Merge(m, src) } func (m *AllowedMsgAllowance) XXX_Size() int { return m.Size() } func (m *AllowedMsgAllowance) XXX_DiscardUnknown() { xxx_messageInfo_AllowedMsgAllowance.DiscardUnknown(m) } var xxx_messageInfo_AllowedMsgAllowance proto.InternalMessageInfo // Grant is stored in the KVStore to record a grant with full context type Grant struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *types2.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (m *Grant) Reset() { *m = Grant{} } func (m *Grant) String() string { return proto.CompactTextString(m) } func (*Grant) ProtoMessage() {} func (*Grant) Descriptor() ([]byte, []int) { return fileDescriptor_30097885dd4859f3, []int{3} } func (m *Grant) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Grant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Grant.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 *Grant) XXX_Merge(src proto.Message) { xxx_messageInfo_Grant.Merge(m, src) } func (m *Grant) XXX_Size() int { return m.Size() } func (m *Grant) XXX_DiscardUnknown() { xxx_messageInfo_Grant.DiscardUnknown(m) } var xxx_messageInfo_Grant proto.InternalMessageInfo func (m *Grant) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *Grant) GetGrantee() string { if m != nil { return m.Grantee } return "" } func (m *Grant) GetAllowance() *types2.Any { if m != nil { return m.Allowance } return nil } // DIDGrant is stored in the KVStore to record a grant with DID as grantee type DIDGrant struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID of the user being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *types2.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (m *DIDGrant) Reset() { *m = DIDGrant{} } func (m *DIDGrant) String() string { return proto.CompactTextString(m) } func (*DIDGrant) ProtoMessage() {} func (*DIDGrant) Descriptor() ([]byte, []int) { return fileDescriptor_30097885dd4859f3, []int{4} } func (m *DIDGrant) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DIDGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DIDGrant.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 *DIDGrant) XXX_Merge(src proto.Message) { xxx_messageInfo_DIDGrant.Merge(m, src) } func (m *DIDGrant) XXX_Size() int { return m.Size() } func (m *DIDGrant) XXX_DiscardUnknown() { xxx_messageInfo_DIDGrant.DiscardUnknown(m) } var xxx_messageInfo_DIDGrant proto.InternalMessageInfo func (m *DIDGrant) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *DIDGrant) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } func (m *DIDGrant) GetAllowance() *types2.Any { if m != nil { return m.Allowance } return nil } func init() { proto.RegisterType((*BasicAllowance)(nil), "sourcehub.feegrant.v1beta1.BasicAllowance") proto.RegisterType((*PeriodicAllowance)(nil), "sourcehub.feegrant.v1beta1.PeriodicAllowance") proto.RegisterType((*AllowedMsgAllowance)(nil), "sourcehub.feegrant.v1beta1.AllowedMsgAllowance") proto.RegisterType((*Grant)(nil), "sourcehub.feegrant.v1beta1.Grant") proto.RegisterType((*DIDGrant)(nil), "sourcehub.feegrant.v1beta1.DIDGrant") } func init() { proto.RegisterFile("sourcehub/feegrant/v1beta1/feegrant.proto", fileDescriptor_30097885dd4859f3) } var fileDescriptor_30097885dd4859f3 = []byte{ // 697 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xbf, 0x4f, 0xdb, 0x40, 0x14, 0xce, 0x11, 0xa0, 0xcd, 0x85, 0x52, 0x70, 0x19, 0x92, 0xa8, 0xb2, 0x51, 0xa6, 0x10, 0x35, 0xb6, 0xa0, 0x1b, 0x13, 0x98, 0x08, 0x44, 0x0b, 0x52, 0x65, 0x3a, 0x75, 0x71, 0x2f, 0xf6, 0xe1, 0x9e, 0x88, 0x7d, 0x91, 0xcf, 0x29, 0x64, 0xed, 0x54, 0xb5, 0x43, 0x19, 0xab, 0x4e, 0x95, 0xba, 0x54, 0x9d, 0x18, 0xf8, 0x07, 0xba, 0xa1, 0x4e, 0xb4, 0x53, 0xa7, 0xa6, 0x82, 0x81, 0x3f, 0xa1, 0x6b, 0xe5, 0xbb, 0xb3, 0x63, 0xa0, 0xbf, 0xa8, 0x04, 0x4b, 0xe2, 0xf7, 0xee, 0x7d, 0xef, 0x7d, 0xdf, 0x7b, 0xcf, 0x3e, 0x38, 0xc3, 0x68, 0x37, 0x74, 0xf0, 0x93, 0x6e, 0xcb, 0xd8, 0xc4, 0xd8, 0x0b, 0x51, 0x10, 0x19, 0x4f, 0x67, 0x5b, 0x38, 0x42, 0xb3, 0xa9, 0x43, 0xef, 0x84, 0x34, 0xa2, 0x4a, 0x25, 0x0d, 0xd5, 0xd3, 0x13, 0x19, 0x5a, 0x99, 0xf2, 0xa8, 0x47, 0x79, 0x98, 0x11, 0x3f, 0x09, 0x44, 0xa5, 0xec, 0x51, 0xea, 0xb5, 0xb1, 0xc1, 0xad, 0x56, 0x77, 0xd3, 0x40, 0x41, 0x2f, 0x39, 0x72, 0x28, 0xf3, 0x29, 0xb3, 0x05, 0x46, 0x18, 0xf2, 0x48, 0x15, 0x96, 0xd1, 0x42, 0x0c, 0xa7, 0x5c, 0x1c, 0x4a, 0x02, 0x79, 0x3e, 0x89, 0x7c, 0x12, 0x50, 0x83, 0xff, 0x4a, 0x97, 0x76, 0xb6, 0x50, 0x44, 0x7c, 0xcc, 0x22, 0xe4, 0x77, 0x92, 0x9c, 0x67, 0x03, 0xdc, 0x6e, 0x88, 0x22, 0x42, 0x65, 0xce, 0xea, 0xbb, 0x21, 0x38, 0x6e, 0x22, 0x46, 0x9c, 0xc5, 0x76, 0x9b, 0x6e, 0xa3, 0xc0, 0xc1, 0xca, 0x33, 0x00, 0x8b, 0xac, 0x83, 0x03, 0xd7, 0x6e, 0x13, 0x9f, 0x44, 0x25, 0x30, 0x9d, 0xaf, 0x15, 0xe7, 0xca, 0xba, 0xe4, 0x1a, 0xb3, 0x4b, 0xe4, 0xeb, 0x4b, 0x94, 0x04, 0xe6, 0xf2, 0xc1, 0x37, 0x2d, 0xf7, 0xa1, 0xaf, 0xd5, 0x3c, 0x12, 0xc5, 0x4d, 0x72, 0xa8, 0x2f, 0x85, 0xc9, 0xbf, 0x06, 0x73, 0xb7, 0x8c, 0xa8, 0xd7, 0xc1, 0x8c, 0x03, 0xd8, 0x9b, 0x93, 0xbd, 0xfa, 0x58, 0x1b, 0x7b, 0xc8, 0xe9, 0xd9, 0xb1, 0x3e, 0xf6, 0xfe, 0x64, 0xaf, 0x0e, 0x2c, 0xc8, 0xab, 0xae, 0xc5, 0x45, 0x95, 0x05, 0x08, 0xf1, 0x4e, 0x87, 0x08, 0xae, 0xa5, 0xa1, 0x69, 0x50, 0x2b, 0xce, 0x55, 0x74, 0x21, 0x46, 0x4f, 0xc4, 0xe8, 0x0f, 0x13, 0xb5, 0xe6, 0xf0, 0x6e, 0x5f, 0x03, 0x56, 0x06, 0x33, 0x7f, 0xef, 0xd3, 0x7e, 0xa3, 0xf6, 0xfb, 0xc9, 0xe9, 0xcb, 0x18, 0xa7, 0x9a, 0x57, 0x5f, 0x9c, 0xec, 0xd5, 0xcb, 0x19, 0xb2, 0xa7, 0x5b, 0x52, 0xed, 0x0f, 0xc3, 0xc9, 0x07, 0x38, 0x24, 0xd4, 0xcd, 0x36, 0xea, 0x3e, 0x1c, 0x69, 0xc5, 0x71, 0x25, 0xc0, 0xe9, 0xd5, 0xf5, 0x3f, 0x54, 0x3b, 0x9d, 0xd0, 0x2c, 0xc4, 0x2d, 0x13, 0xaa, 0x45, 0x0e, 0x65, 0x01, 0x8e, 0x76, 0x78, 0x05, 0x29, 0xb6, 0x7c, 0x4e, 0x6c, 0x53, 0x4e, 0xce, 0xbc, 0x11, 0x83, 0x5f, 0xf7, 0x35, 0x20, 0x12, 0x48, 0x9c, 0xf2, 0x0a, 0x40, 0x45, 0x3c, 0xda, 0xd9, 0xf1, 0xe5, 0xaf, 0x6a, 0x7c, 0x13, 0xa2, 0xf8, 0xc6, 0x60, 0x88, 0x2f, 0x01, 0x94, 0x4e, 0xdb, 0x41, 0x81, 0x60, 0x55, 0x1a, 0xbe, 0x2a, 0x3e, 0xe3, 0xa2, 0xf4, 0x12, 0x0a, 0x38, 0x25, 0x65, 0x0d, 0x8e, 0x49, 0x32, 0x21, 0x66, 0x38, 0x2a, 0x8d, 0xfc, 0x75, 0xa9, 0x78, 0xa3, 0x77, 0xd3, 0x46, 0x17, 0x05, 0xdc, 0x8a, 0xd1, 0xf3, 0xeb, 0x17, 0x5d, 0xaf, 0xdb, 0x19, 0xf2, 0xe7, 0x76, 0xa9, 0xfa, 0x03, 0xc0, 0x5b, 0xdc, 0xc2, 0xee, 0x3a, 0xf3, 0x06, 0x3b, 0xf6, 0x18, 0x16, 0x50, 0x62, 0xc8, 0x3d, 0x9b, 0x3a, 0xc7, 0x78, 0x31, 0xe8, 0x99, 0x77, 0x2e, 0xc2, 0xc7, 0x1a, 0x24, 0x55, 0x66, 0xe0, 0x04, 0x12, 0x85, 0x6d, 0x1f, 0x33, 0x86, 0x3c, 0xcc, 0x4a, 0x43, 0xd3, 0xf9, 0x5a, 0xc1, 0xba, 0x29, 0xfd, 0xeb, 0xd2, 0x3d, 0xbf, 0xf1, 0xfc, 0xad, 0x96, 0xbb, 0xa8, 0x6e, 0x35, 0xa3, 0xfb, 0x17, 0x0a, 0xab, 0x9f, 0x01, 0x1c, 0x59, 0x89, 0x53, 0x28, 0x73, 0xf0, 0x1a, 0xcf, 0x85, 0x43, 0xae, 0xb4, 0x60, 0x96, 0xbe, 0xec, 0x37, 0xa6, 0xe4, 0x9e, 0x2c, 0xba, 0x6e, 0x88, 0x19, 0xdb, 0x88, 0x42, 0x12, 0x78, 0x56, 0x12, 0x38, 0xc0, 0x60, 0xfe, 0xde, 0xfc, 0x03, 0xe6, 0x4c, 0x4f, 0xf3, 0x97, 0xd0, 0xd3, 0xea, 0x47, 0x00, 0xaf, 0x37, 0x57, 0x9b, 0xff, 0x2f, 0x4b, 0x83, 0x45, 0xc9, 0xd6, 0x76, 0x89, 0xf8, 0x24, 0x14, 0x2c, 0x28, 0x5d, 0x4d, 0xe2, 0x5e, 0xbe, 0x06, 0x73, 0xe5, 0xe0, 0x48, 0x05, 0x87, 0x47, 0x2a, 0xf8, 0x7e, 0xa4, 0x82, 0xdd, 0x63, 0x35, 0x77, 0x78, 0xac, 0xe6, 0xbe, 0x1e, 0xab, 0xb9, 0x47, 0x8d, 0xcc, 0x8b, 0x29, 0x32, 0x07, 0x38, 0xda, 0xa6, 0xe1, 0x96, 0x31, 0xb8, 0x53, 0x77, 0xd2, 0x4b, 0xb4, 0x35, 0xca, 0xf9, 0xdc, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x4e, 0x09, 0x66, 0x72, 0x07, 0x00, 0x00, } func (m *BasicAllowance) 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 *BasicAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *BasicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Expiration != nil { n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintFeegrant(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x12 } if len(m.SpendLimit) > 0 { for iNdEx := len(m.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.SpendLimit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFeegrant(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *PeriodicAllowance) 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 *PeriodicAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PeriodicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.PeriodReset, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.PeriodReset):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintFeegrant(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x2a if len(m.PeriodCanSpend) > 0 { for iNdEx := len(m.PeriodCanSpend) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.PeriodCanSpend[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFeegrant(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } } if len(m.PeriodSpendLimit) > 0 { for iNdEx := len(m.PeriodSpendLimit) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.PeriodSpendLimit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFeegrant(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Period, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Period):]) if err3 != nil { return 0, err3 } i -= n3 i = encodeVarintFeegrant(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x12 { size, err := m.Basic.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFeegrant(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *AllowedMsgAllowance) 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 *AllowedMsgAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *AllowedMsgAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.AllowedMessages) > 0 { for iNdEx := len(m.AllowedMessages) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.AllowedMessages[iNdEx]) copy(dAtA[i:], m.AllowedMessages[iNdEx]) i = encodeVarintFeegrant(dAtA, i, uint64(len(m.AllowedMessages[iNdEx]))) i-- dAtA[i] = 0x12 } } if m.Allowance != nil { { size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFeegrant(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Grant) 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 *Grant) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Allowance != nil { { size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFeegrant(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.Grantee) > 0 { i -= len(m.Grantee) copy(dAtA[i:], m.Grantee) i = encodeVarintFeegrant(dAtA, i, uint64(len(m.Grantee))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintFeegrant(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *DIDGrant) 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 *DIDGrant) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DIDGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Allowance != nil { { size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintFeegrant(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintFeegrant(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintFeegrant(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintFeegrant(dAtA []byte, offset int, v uint64) int { offset -= sovFeegrant(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *BasicAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.SpendLimit) > 0 { for _, e := range m.SpendLimit { l = e.Size() n += 1 + l + sovFeegrant(uint64(l)) } } if m.Expiration != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) n += 1 + l + sovFeegrant(uint64(l)) } return n } func (m *PeriodicAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.Basic.Size() n += 1 + l + sovFeegrant(uint64(l)) l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Period) n += 1 + l + sovFeegrant(uint64(l)) if len(m.PeriodSpendLimit) > 0 { for _, e := range m.PeriodSpendLimit { l = e.Size() n += 1 + l + sovFeegrant(uint64(l)) } } if len(m.PeriodCanSpend) > 0 { for _, e := range m.PeriodCanSpend { l = e.Size() n += 1 + l + sovFeegrant(uint64(l)) } } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.PeriodReset) n += 1 + l + sovFeegrant(uint64(l)) return n } func (m *AllowedMsgAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Allowance != nil { l = m.Allowance.Size() n += 1 + l + sovFeegrant(uint64(l)) } if len(m.AllowedMessages) > 0 { for _, s := range m.AllowedMessages { l = len(s) n += 1 + l + sovFeegrant(uint64(l)) } } return n } func (m *Grant) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovFeegrant(uint64(l)) } l = len(m.Grantee) if l > 0 { n += 1 + l + sovFeegrant(uint64(l)) } if m.Allowance != nil { l = m.Allowance.Size() n += 1 + l + sovFeegrant(uint64(l)) } return n } func (m *DIDGrant) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovFeegrant(uint64(l)) } l = len(m.GranteeDid) if l > 0 { n += 1 + l + sovFeegrant(uint64(l)) } if m.Allowance != nil { l = m.Allowance.Size() n += 1 + l + sovFeegrant(uint64(l)) } return n } func sovFeegrant(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozFeegrant(x uint64) (n int) { return sovFeegrant(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *BasicAllowance) 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 ErrIntOverflowFeegrant } 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: BasicAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BasicAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.SpendLimit = append(m.SpendLimit, types.Coin{}) if err := m.SpendLimit[len(m.SpendLimit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } if m.Expiration == nil { m.Expiration = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFeegrant(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFeegrant } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PeriodicAllowance) 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 ErrIntOverflowFeegrant } 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: PeriodicAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PeriodicAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Period, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PeriodSpendLimit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.PeriodSpendLimit = append(m.PeriodSpendLimit, types.Coin{}) if err := m.PeriodSpendLimit[len(m.PeriodSpendLimit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PeriodCanSpend", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.PeriodCanSpend = append(m.PeriodCanSpend, types.Coin{}) if err := m.PeriodCanSpend[len(m.PeriodCanSpend)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PeriodReset", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.PeriodReset, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFeegrant(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFeegrant } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *AllowedMsgAllowance) 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 ErrIntOverflowFeegrant } 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: AllowedMsgAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: AllowedMsgAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } if m.Allowance == nil { m.Allowance = &types2.Any{} } if err := m.Allowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AllowedMessages", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } 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 ErrInvalidLengthFeegrant } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.AllowedMessages = append(m.AllowedMessages, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFeegrant(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFeegrant } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Grant) 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 ErrIntOverflowFeegrant } 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: Grant: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Grant: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } 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 ErrInvalidLengthFeegrant } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } 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 ErrInvalidLengthFeegrant } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } if m.Allowance == nil { m.Allowance = &types2.Any{} } if err := m.Allowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFeegrant(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFeegrant } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DIDGrant) 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 ErrIntOverflowFeegrant } 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: DIDGrant: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DIDGrant: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } 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 ErrInvalidLengthFeegrant } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } 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 ErrInvalidLengthFeegrant } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } m.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeegrant } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthFeegrant } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthFeegrant } if postIndex > l { return io.ErrUnexpectedEOF } if m.Allowance == nil { m.Allowance = &types2.Any{} } if err := m.Allowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFeegrant(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFeegrant } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipFeegrant(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, ErrIntOverflowFeegrant } 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, ErrIntOverflowFeegrant } 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, ErrIntOverflowFeegrant } 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, ErrInvalidLengthFeegrant } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupFeegrant } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthFeegrant } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthFeegrant = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowFeegrant = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupFeegrant = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/feegrant/fees.go ================================================ package feegrant import ( "context" "time" sdk "github.com/cosmos/cosmos-sdk/types" ) // FeeAllowance implementations are tied to a given fee delegator and delegatee, // and are used to enforce feegrant limits. type FeeAllowanceI interface { // Accept can use fee payment requested as well as timestamp of the current block // to determine whether or not to process this. This is checked in // Keeper.UseGrantedFees and the return values should match how it is handled there. // // If it returns an error, the fee payment is rejected, otherwise it is accepted. // The FeeAllowance implementation is expected to update its internal state // and will be saved again after an acceptance. // // If remove is true (regardless of the error), the FeeAllowance will be deleted from storage // (eg. when it is used up). (See call to RevokeAllowance in Keeper.UseGrantedFees) Accept(ctx context.Context, fee sdk.Coins, msgs []sdk.Msg) (remove bool, err error) // ValidateBasic should evaluate this FeeAllowance for internal consistency. // Don't allow negative amounts, or negative periods for example. ValidateBasic() error // ExpiresAt returns the expiry time of the allowance. ExpiresAt() (*time.Time, error) } ================================================ FILE: x/feegrant/filtered_fee.go ================================================ package feegrant import ( "context" "time" "github.com/cosmos/gogoproto/proto" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // TODO: Revisit this once we have proper gas fee framework. // Tracking issues https://github.com/cosmos/cosmos-sdk/issues/9054, https://github.com/cosmos/cosmos-sdk/discussions/9072 const ( gasCostPerIteration = uint64(10) ) var ( _ FeeAllowanceI = (*AllowedMsgAllowance)(nil) _ types.UnpackInterfacesMessage = (*AllowedMsgAllowance)(nil) ) // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (a *AllowedMsgAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error { var allowance FeeAllowanceI return unpacker.UnpackAny(a.Allowance, &allowance) } // NewAllowedMsgFeeAllowance creates new filtered fee allowance. func NewAllowedMsgAllowance(allowance FeeAllowanceI, allowedMsgs []string) (*AllowedMsgAllowance, error) { msg, ok := allowance.(proto.Message) if !ok { return nil, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", msg) } any, err := types.NewAnyWithValue(msg) if err != nil { return nil, err } return &AllowedMsgAllowance{ Allowance: any, AllowedMessages: allowedMsgs, }, nil } // GetAllowance returns allowed fee allowance. func (a *AllowedMsgAllowance) GetAllowance() (FeeAllowanceI, error) { allowance, ok := a.Allowance.GetCachedValue().(FeeAllowanceI) if !ok { return nil, errorsmod.Wrap(ErrNoAllowance, "failed to get allowance") } return allowance, nil } // SetAllowance sets allowed fee allowance. func (a *AllowedMsgAllowance) SetAllowance(allowance FeeAllowanceI) error { var err error a.Allowance, err = types.NewAnyWithValue(allowance.(proto.Message)) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", allowance) } return nil } // Accept method checks for the filtered messages has valid expiry func (a *AllowedMsgAllowance) Accept(ctx context.Context, fee sdk.Coins, msgs []sdk.Msg) (bool, error) { if !a.allMsgTypesAllowed(sdk.UnwrapSDKContext(ctx), msgs) { return false, errorsmod.Wrap(ErrMessageNotAllowed, "message does not exist in allowed messages") } allowance, err := a.GetAllowance() if err != nil { return false, err } remove, err := allowance.Accept(ctx, fee, msgs) if err == nil && !remove { if err = a.SetAllowance(allowance); err != nil { return false, err } } return remove, err } func (a *AllowedMsgAllowance) allowedMsgsToMap(ctx sdk.Context) map[string]bool { msgsMap := make(map[string]bool, len(a.AllowedMessages)) for _, msg := range a.AllowedMessages { ctx.GasMeter().ConsumeGas(gasCostPerIteration, "check msg") msgsMap[msg] = true } return msgsMap } func (a *AllowedMsgAllowance) allMsgTypesAllowed(ctx sdk.Context, msgs []sdk.Msg) bool { msgsMap := a.allowedMsgsToMap(ctx) for _, msg := range msgs { ctx.GasMeter().ConsumeGas(gasCostPerIteration, "check msg") if !msgsMap[sdk.MsgTypeURL(msg)] { return false } } return true } // ValidateBasic implements FeeAllowance and enforces basic sanity checks func (a *AllowedMsgAllowance) ValidateBasic() error { if a.Allowance == nil { return errorsmod.Wrap(ErrNoAllowance, "allowance should not be empty") } if len(a.AllowedMessages) == 0 { return errorsmod.Wrap(ErrNoMessages, "allowed messages shouldn't be empty") } allowance, err := a.GetAllowance() if err != nil { return err } return allowance.ValidateBasic() } // ExpiresAt returns the expiry time of the AllowedMsgAllowance. func (a *AllowedMsgAllowance) ExpiresAt() (*time.Time, error) { allowance, err := a.GetAllowance() if err != nil { return nil, err } return allowance.ExpiresAt() } ================================================ FILE: x/feegrant/filtered_fee_test.go ================================================ package feegrant_test import ( "testing" "time" ocproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/module" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) func TestFilteredFeeValidAllow(t *testing.T) { key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) ctx := testCtx.Ctx.WithBlockHeader(ocproto.Header{Time: time.Now()}) eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 10)) atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) smallAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 43)) bigAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 1000)) leftAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 512)) now := ctx.BlockTime() oneHour := now.Add(1 * time.Hour) // msg we will call in the all cases call := banktypes.MsgSend{} cases := map[string]struct { allowance *feegrant.BasicAllowance msgs []string fee sdk.Coins blockTime time.Time accept bool remove bool remains sdk.Coins }{ "msg contained": { allowance: &feegrant.BasicAllowance{}, msgs: []string{sdk.MsgTypeURL(&call)}, accept: true, }, "msg not contained": { allowance: &feegrant.BasicAllowance{}, msgs: []string{"/cosmos.gov.v1.MsgVote"}, accept: false, }, "small fee without expire": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: smallAtom, accept: true, remove: false, remains: leftAtom, }, "all fee without expire": { allowance: &feegrant.BasicAllowance{ SpendLimit: smallAtom, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: smallAtom, accept: true, remove: true, }, "wrong fee": { allowance: &feegrant.BasicAllowance{ SpendLimit: smallAtom, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: eth, accept: false, }, "non-expired": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &oneHour, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: smallAtom, blockTime: now, accept: true, remove: false, remains: leftAtom, }, "expired": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &now, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: smallAtom, blockTime: oneHour, accept: false, remove: true, }, "fee more than allowed": { allowance: &feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &oneHour, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: bigAtom, blockTime: now, accept: false, }, "with out spend limit": { allowance: &feegrant.BasicAllowance{ Expiration: &oneHour, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: bigAtom, blockTime: now, accept: true, }, "expired no spend limit": { allowance: &feegrant.BasicAllowance{ Expiration: &now, }, msgs: []string{sdk.MsgTypeURL(&call)}, fee: bigAtom, blockTime: oneHour, accept: false, }, } for name, stc := range cases { tc := stc // to make scopelint happy t.Run(name, func(t *testing.T) { err := tc.allowance.ValidateBasic() require.NoError(t, err) ctx := testCtx.Ctx.WithBlockTime(tc.blockTime) // create grant var granter, grantee sdk.AccAddress allowance, err := feegrant.NewAllowedMsgAllowance(tc.allowance, tc.msgs) require.NoError(t, err) grant, err := feegrant.NewGrant(granter, grantee, allowance) require.NoError(t, err) // now try to deduct removed, err := allowance.Accept(ctx, tc.fee, []sdk.Msg{&call}) if !tc.accept { require.Error(t, err) return } require.NoError(t, err) require.Equal(t, tc.remove, removed) if !removed { // mimic save & load process (#10564) // the cached allowance was correct even before the fix, // however, the saved value was not. // so we need this to catch the bug. // create a new updated grant newGrant, err := feegrant.NewGrant( sdk.AccAddress(grant.Granter), sdk.AccAddress(grant.Grantee), allowance) require.NoError(t, err) // save the grant bz, err := encCfg.Codec.Marshal(&newGrant) require.NoError(t, err) // load the grant var loadedGrant feegrant.Grant err = encCfg.Codec.Unmarshal(bz, &loadedGrant) require.NoError(t, err) newAllowance, err := loadedGrant.GetGrant() require.NoError(t, err) feeAllowance, err := newAllowance.(*feegrant.AllowedMsgAllowance).GetAllowance() require.NoError(t, err) assert.Equal(t, tc.remains, feeAllowance.(*feegrant.BasicAllowance).SpendLimit) } }) } } ================================================ FILE: x/feegrant/genesis.go ================================================ package feegrant import ( "github.com/cosmos/cosmos-sdk/codec/types" ) var _ types.UnpackInterfacesMessage = GenesisState{} // NewGenesisState creates new GenesisState object func NewGenesisState(entries []Grant) *GenesisState { return &GenesisState{ Allowances: entries, } } // ValidateGenesis ensures all grants in the genesis state are valid func ValidateGenesis(data GenesisState) error { for _, f := range data.Allowances { grant, err := f.GetGrant() if err != nil { return err } err = grant.ValidateBasic() if err != nil { return err } } return nil } // DefaultGenesisState returns default state for feegrant module. func DefaultGenesisState() *GenesisState { return &GenesisState{} } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error { for _, f := range data.Allowances { err := f.UnpackInterfaces(unpacker) if err != nil { return err } } return nil } ================================================ FILE: x/feegrant/genesis.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/feegrant/v1beta1/genesis.proto package feegrant 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 // GenesisState contains a set of fee allowances, persisted from the store. type GenesisState struct { Allowances []Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances"` DidAllowances []DIDGrant `protobuf:"bytes,2,rep,name=did_allowances,json=didAllowances,proto3" json:"did_allowances"` } 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_1dcebc65950ee977, []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) GetAllowances() []Grant { if m != nil { return m.Allowances } return nil } func (m *GenesisState) GetDidAllowances() []DIDGrant { if m != nil { return m.DidAllowances } return nil } func init() { proto.RegisterType((*GenesisState)(nil), "sourcehub.feegrant.v1beta1.GenesisState") } func init() { proto.RegisterFile("sourcehub/feegrant/v1beta1/genesis.proto", fileDescriptor_1dcebc65950ee977) } var fileDescriptor_1dcebc65950ee977 = []byte{ // 254 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x28, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x4f, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x82, 0xab, 0xd4, 0x83, 0xa9, 0xd4, 0x83, 0xaa, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd3, 0x07, 0xb1, 0x20, 0x3a, 0xa4, 0x34, 0xf1, 0x98, 0x0d, 0x37, 0x02, 0xa2, 0x54, 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x84, 0x94, 0xb6, 0x30, 0x72, 0xf1, 0xb8, 0x43, 0x5c, 0x10, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xe4, 0xc3, 0xc5, 0x95, 0x98, 0x93, 0x93, 0x5f, 0x9e, 0x98, 0x97, 0x9c, 0x5a, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa8, 0x87, 0xdb, 0x55, 0x7a, 0xee, 0x20, 0x9e, 0x13, 0xe7, 0x89, 0x7b, 0xf2, 0x0c, 0x2b, 0x9e, 0x6f, 0xd0, 0x62, 0x0c, 0x42, 0xd2, 0x2f, 0x14, 0xc6, 0xc5, 0x97, 0x92, 0x99, 0x12, 0x8f, 0x64, 0x22, 0x13, 0xd8, 0x44, 0x15, 0x7c, 0x26, 0xba, 0x78, 0xba, 0x60, 0x18, 0xca, 0x9b, 0x92, 0x99, 0xe2, 0x08, 0x37, 0xc5, 0xc9, 0xfd, 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, 0x74, 0xd3, 0x33, 0x4b, 0x40, 0xa6, 0x26, 0xe7, 0xe7, 0xea, 0x43, 0xec, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x47, 0x84, 0x53, 0x05, 0x3c, 0x60, 0x92, 0xd8, 0xc0, 0xc1, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xad, 0xe8, 0x42, 0xa2, 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 if len(m.DidAllowances) > 0 { for iNdEx := len(m.DidAllowances) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.DidAllowances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } if len(m.Allowances) > 0 { for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Allowances[iNdEx].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 if len(m.Allowances) > 0 { for _, e := range m.Allowances { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.DidAllowances) > 0 { for _, e := range m.DidAllowances { l = e.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 Allowances", 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.Allowances = append(m.Allowances, Grant{}) if err := m.Allowances[len(m.Allowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DidAllowances", 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.DidAllowances = append(m.DidAllowances, DIDGrant{}) if err := m.DidAllowances[len(m.DidAllowances)-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 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") ) ================================================ FILE: x/feegrant/grant.go ================================================ package feegrant import ( "github.com/cosmos/gogoproto/proto" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _, _ types.UnpackInterfacesMessage = &Grant{}, &DIDGrant{} // NewGrant creates a new Grant. func NewGrant(granter, grantee sdk.AccAddress, feeAllowance FeeAllowanceI) (Grant, error) { msg, ok := feeAllowance.(proto.Message) if !ok { return Grant{}, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", feeAllowance) } any, err := types.NewAnyWithValue(msg) if err != nil { return Grant{}, err } return Grant{ Granter: granter.String(), Grantee: grantee.String(), Allowance: any, }, nil } // ValidateBasic performs basic validation on Grant. func (a Grant) ValidateBasic() error { if a.Granter == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "missing granter address") } if a.Grantee == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "missing grantee address") } if a.Grantee == a.Granter { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "cannot self-grant fee authorization") } f, err := a.GetGrant() if err != nil { return err } return f.ValidateBasic() } // GetGrant unpacks allowance. func (a Grant) GetGrant() (FeeAllowanceI, error) { allowance, ok := a.Allowance.GetCachedValue().(FeeAllowanceI) if !ok { return nil, errorsmod.Wrap(ErrNoAllowance, "failed to get allowance") } return allowance, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces. func (a Grant) UnpackInterfaces(unpacker types.AnyUnpacker) error { var allowance FeeAllowanceI return unpacker.UnpackAny(a.Allowance, &allowance) } // NewDIDGrant creates a new DIDGrant with DID as grantee. func NewDIDGrant(granter sdk.AccAddress, granteeDID string, feeAllowance FeeAllowanceI) (DIDGrant, error) { msg, ok := feeAllowance.(proto.Message) if !ok { return DIDGrant{}, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", feeAllowance) } any, err := types.NewAnyWithValue(msg) if err != nil { return DIDGrant{}, err } return DIDGrant{ Granter: granter.String(), GranteeDid: granteeDID, Allowance: any, }, nil } // ValidateBasic performs basic validation on DIDGrant. func (a DIDGrant) ValidateBasic() error { if a.Granter == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "missing granter address") } if len(a.GranteeDid) <= 4 || a.GranteeDid[:4] != "did:" { return ErrInvalidDID } f, err := a.GetDIDGrant() if err != nil { return err } return f.ValidateBasic() } // GetGrant unpacks allowance for DIDGrant. func (a DIDGrant) GetDIDGrant() (FeeAllowanceI, error) { allowance, ok := a.Allowance.GetCachedValue().(FeeAllowanceI) if !ok { return nil, errorsmod.Wrap(ErrNoAllowance, "failed to get allowance") } return allowance, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces for DIDGrant. func (a DIDGrant) UnpackInterfaces(unpacker types.AnyUnpacker) error { var allowance FeeAllowanceI return unpacker.UnpackAny(a.Allowance, &allowance) } ================================================ FILE: x/feegrant/grant_test.go ================================================ package feegrant_test import ( "testing" "time" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/module" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) func TestGrant(t *testing.T) { addressCodec := codecaddress.NewBech32Codec("source") key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) addr, err := addressCodec.StringToBytes("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) addr2, err := addressCodec.StringToBytes("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) uopen := sdk.NewCoins(sdk.NewInt64Coin("uopen", 555)) now := ctx.BlockTime() oneYear := now.AddDate(1, 0, 0) zeroUopen := sdk.NewCoins(sdk.NewInt64Coin("uopen", 0)) cases := map[string]struct { granter sdk.AccAddress grantee sdk.AccAddress limit sdk.Coins expires time.Time valid bool }{ "good": { granter: addr2, grantee: addr, limit: uopen, expires: oneYear, valid: true, }, "no grantee": { granter: addr2, grantee: nil, limit: uopen, expires: oneYear, valid: false, }, "no granter": { granter: nil, grantee: addr, limit: uopen, expires: oneYear, valid: false, }, "self-grant": { granter: addr2, grantee: addr2, limit: uopen, expires: oneYear, valid: false, }, "zero allowance": { granter: addr2, grantee: addr, limit: zeroUopen, expires: oneYear, valid: false, }, } for name, tc := range cases { tc := tc t.Run(name, func(t *testing.T) { grant, err := feegrant.NewGrant(tc.granter, tc.grantee, &feegrant.BasicAllowance{ SpendLimit: tc.limit, Expiration: &tc.expires, }) require.NoError(t, err) err = grant.ValidateBasic() if !tc.valid { require.Error(t, err) return } require.NoError(t, err) // if it is valid, let's try to serialize, deserialize, and make sure it matches bz, err := encCfg.Codec.Marshal(&grant) require.NoError(t, err) var loaded feegrant.Grant err = encCfg.Codec.Unmarshal(bz, &loaded) require.NoError(t, err) err = loaded.ValidateBasic() require.NoError(t, err) require.Equal(t, grant, loaded) }) } } func TestDIDGrant(t *testing.T) { addressCodec := codecaddress.NewBech32Codec("source") key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) addr, err := addressCodec.StringToBytes("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) uopen := sdk.NewCoins(sdk.NewInt64Coin("uopen", 555)) now := ctx.BlockTime() oneYear := now.AddDate(1, 0, 0) zeroUopen := sdk.NewCoins(sdk.NewInt64Coin("uopen", 0)) cases := map[string]struct { granter sdk.AccAddress granteeDID string limit sdk.Coins expires time.Time valid bool }{ "good": { granter: addr, granteeDID: "did:example:bob", limit: uopen, expires: oneYear, valid: true, }, "empty DID": { granter: addr, granteeDID: "", limit: uopen, expires: oneYear, valid: false, }, "invalid DID - no prefix": { granter: addr, granteeDID: "example:bob", limit: uopen, expires: oneYear, valid: false, }, "invalid DID - short": { granter: addr, granteeDID: "did:", limit: uopen, expires: oneYear, valid: false, }, "no granter": { granter: nil, granteeDID: "did:example:bob", limit: uopen, expires: oneYear, valid: false, }, "zero allowance": { granter: addr, granteeDID: "did:example:bob", limit: zeroUopen, expires: oneYear, valid: false, }, } for name, tc := range cases { tc := tc t.Run(name, func(t *testing.T) { grant, err := feegrant.NewDIDGrant(tc.granter, tc.granteeDID, &feegrant.BasicAllowance{ SpendLimit: tc.limit, Expiration: &tc.expires, }) if !tc.valid { // For invalid cases, we expect either NewDIDGrant to fail or ValidateBasic to fail if err != nil { require.Error(t, err) return } err = grant.ValidateBasic() require.Error(t, err) return } require.NoError(t, err) err = grant.ValidateBasic() require.NoError(t, err) // if it is valid, let's try to serialize, deserialize, and make sure it matches bz, err := encCfg.Codec.Marshal(&grant) require.NoError(t, err) var loaded feegrant.DIDGrant err = encCfg.Codec.Unmarshal(bz, &loaded) require.NoError(t, err) err = loaded.ValidateBasic() require.NoError(t, err) require.Equal(t, grant, loaded) }) } } ================================================ FILE: x/feegrant/keeper/genesis_test.go ================================================ package keeper_test import ( "errors" "testing" "github.com/golang/mock/gomock" "gotest.tools/v3/assert" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" "github.com/sourcenetwork/sourcehub/x/feegrant/module" feegranttestutil "github.com/sourcenetwork/sourcehub/x/feegrant/testutil" "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" 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" ) var ( granteePub = secp256k1.GenPrivKey().PubKey() granterPub = secp256k1.GenPrivKey().PubKey() granteeAddr = sdk.AccAddress(granteePub.Address()) granterAddr = sdk.AccAddress(granterPub.Address()) ) type genesisFixture struct { ctx sdk.Context feegrantKeeper keeper.Keeper accountKeeper *feegranttestutil.MockAccountKeeper } func initFixture(t *testing.T) *genesisFixture { key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) ctrl := gomock.NewController(t) accountKeeper := feegranttestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() return &genesisFixture{ ctx: testCtx.Ctx, feegrantKeeper: keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), accountKeeper), accountKeeper: accountKeeper, } } func TestImportExportGenesis(t *testing.T) { f := initFixture(t) f.accountKeeper.EXPECT().GetAccount(gomock.Any(), granteeAddr).Return(authtypes.NewBaseAccountWithAddress(granteeAddr)).AnyTimes() f.accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() coins := sdk.NewCoins(sdk.NewCoin("foo", math.NewInt(1_000))) now := f.ctx.BlockHeader().Time oneYear := now.AddDate(1, 0, 0) msgSrvr := keeper.NewMsgServerImpl(f.feegrantKeeper) allowance := &feegrant.BasicAllowance{SpendLimit: coins, Expiration: &oneYear} err := f.feegrantKeeper.GrantAllowance(f.ctx, granterAddr, granteeAddr, allowance) assert.NilError(t, err) genesis, err := f.feegrantKeeper.ExportGenesis(f.ctx) assert.NilError(t, err) // revoke fee allowance _, err = msgSrvr.RevokeAllowance(f.ctx, &feegrant.MsgRevokeAllowance{ Granter: granterAddr.String(), Grantee: granteeAddr.String(), }) assert.NilError(t, err) err = f.feegrantKeeper.InitGenesis(f.ctx, genesis) assert.NilError(t, err) newGenesis, err := f.feegrantKeeper.ExportGenesis(f.ctx) assert.NilError(t, err) assert.DeepEqual(t, genesis, newGenesis) } func TestInitGenesis(t *testing.T) { any, err := codectypes.NewAnyWithValue(&testdata.Dog{}) assert.NilError(t, err) testCases := []struct { name string feeAllowances []feegrant.Grant invalidAddr bool }{ { "invalid granter", []feegrant.Grant{ { Granter: "invalid granter", Grantee: granteeAddr.String(), }, }, true, }, { "invalid grantee", []feegrant.Grant{ { Granter: granterAddr.String(), Grantee: "invalid grantee", }, }, true, }, { "invalid allowance", []feegrant.Grant{ { Granter: granterAddr.String(), Grantee: granteeAddr.String(), Allowance: any, }, }, false, }, } for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { f := initFixture(t) if !tc.invalidAddr { err := f.feegrantKeeper.InitGenesis(f.ctx, &feegrant.GenesisState{Allowances: tc.feeAllowances}) assert.ErrorContains(t, err, "failed to get allowance: no allowance") } else { expectedErr := errors.New("decoding bech32 failed") err := f.feegrantKeeper.InitGenesis(f.ctx, &feegrant.GenesisState{Allowances: tc.feeAllowances}) assert.ErrorContains(t, err, expectedErr.Error()) } }) } } ================================================ FILE: x/feegrant/keeper/grpc_query.go ================================================ package keeper import ( "bytes" "context" "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "cosmossdk.io/store/prefix" "github.com/sourcenetwork/sourcehub/x/feegrant" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" ) var _ feegrant.QueryServer = Keeper{} // Allowance returns granted allowance to the grantee by the granter. func (q Keeper) Allowance(c context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } granteeAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Grantee) if err != nil { return nil, err } ctx := sdk.UnwrapSDKContext(c) feeAllowance, err := q.GetAllowance(ctx, granterAddr, granteeAddr) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } msg, ok := feeAllowance.(proto.Message) if !ok { return nil, status.Errorf(codes.Internal, "can't proto marshal %T", msg) } feeAllowanceAny, err := codectypes.NewAnyWithValue(msg) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &feegrant.QueryAllowanceResponse{ Allowance: &feegrant.Grant{ Granter: req.Granter, Grantee: req.Grantee, Allowance: feeAllowanceAny, }, }, nil } // Allowances queries all the allowances granted to the given grantee. func (q Keeper) Allowances(c context.Context, req *feegrant.QueryAllowancesRequest) (*feegrant.QueryAllowancesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } granteeAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Grantee) if err != nil { return nil, err } ctx := sdk.UnwrapSDKContext(c) var grants []*feegrant.Grant store := q.storeService.OpenKVStore(ctx) grantsStore := prefix.NewStore(runtime.KVStoreAdapter(store), feegrant.FeeAllowancePrefixByGrantee(granteeAddr)) pageRes, err := query.Paginate(grantsStore, req.Pagination, func(key, value []byte) error { var grant feegrant.Grant if err := q.cdc.Unmarshal(value, &grant); err != nil { return err } grants = append(grants, &grant) return nil }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &feegrant.QueryAllowancesResponse{Allowances: grants, Pagination: pageRes}, nil } // AllowancesByGranter queries all the allowances granted by the given granter. func (q Keeper) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowancesByGranterRequest) (*feegrant.QueryAllowancesByGranterResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } ctx := sdk.UnwrapSDKContext(c) store := q.storeService.OpenKVStore(ctx) prefixStore := prefix.NewStore(runtime.KVStoreAdapter(store), feegrant.FeeAllowanceKeyPrefix) grants, pageRes, err := query.GenericFilteredPaginate(q.cdc, prefixStore, req.Pagination, func(key []byte, grant *feegrant.Grant) (*feegrant.Grant, error) { // ParseAddressesFromFeeAllowanceKey expects the full key including the prefix. granter, _ := feegrant.ParseAddressesFromFeeAllowanceKey(append(feegrant.FeeAllowanceKeyPrefix, key...)) if !bytes.Equal(granter, granterAddr) { return nil, nil } return grant, nil }, func() *feegrant.Grant { return &feegrant.Grant{} }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &feegrant.QueryAllowancesByGranterResponse{Allowances: grants, Pagination: pageRes}, nil } // DIDAllowance returns granted allowance to the DID by the granter. func (q Keeper) DIDAllowance(c context.Context, req *feegrant.QueryDIDAllowanceRequest) (*feegrant.QueryDIDAllowanceResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } if req.GranteeDid == "" { return nil, status.Error(codes.InvalidArgument, "grantee DID cannot be empty") } ctx := sdk.UnwrapSDKContext(c) feeAllowance, err := q.GetDIDAllowance(ctx, granterAddr, req.GranteeDid) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get allowance: %v", err) } msg, ok := feeAllowance.(proto.Message) if !ok { return nil, status.Errorf(codes.Internal, "can't proto marshal %T", msg) } feeAllowanceAny, err := codectypes.NewAnyWithValue(msg) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get allowance: %v", err) } return &feegrant.QueryDIDAllowanceResponse{ Allowance: &feegrant.Grant{ Granter: req.Granter, Grantee: req.GranteeDid, Allowance: feeAllowanceAny, }, }, nil } // DIDAllowances queries all the DID allowances granted to the given DID. func (q Keeper) DIDAllowances(c context.Context, req *feegrant.QueryDIDAllowancesRequest) (*feegrant.QueryDIDAllowancesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } if req.GranteeDid == "" { return nil, status.Error(codes.InvalidArgument, "grantee DID cannot be empty") } ctx := sdk.UnwrapSDKContext(c) var grants []*feegrant.Grant store := q.storeService.OpenKVStore(ctx) grantsStore := prefix.NewStore(runtime.KVStoreAdapter(store), feegrant.FeeAllowancePrefixByDID(req.GranteeDid)) pageRes, err := query.Paginate(grantsStore, req.Pagination, func(key, value []byte) error { var didGrant feegrant.DIDGrant if err := q.cdc.Unmarshal(value, &didGrant); err != nil { return err } grant := &feegrant.Grant{ Granter: didGrant.Granter, Grantee: didGrant.GranteeDid, Allowance: didGrant.Allowance, } grants = append(grants, grant) return nil }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &feegrant.QueryDIDAllowancesResponse{Allowances: grants, Pagination: pageRes}, nil } // DIDAllowancesByGranter queries all the DID allowances granted by the given granter. func (q Keeper) DIDAllowancesByGranter(c context.Context, req *feegrant.QueryDIDAllowancesByGranterRequest) (*feegrant.QueryDIDAllowancesByGranterResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } granterAddr, err := q.authKeeper.AddressCodec().StringToBytes(req.Granter) if err != nil { return nil, err } ctx := sdk.UnwrapSDKContext(c) store := q.storeService.OpenKVStore(ctx) prefixStore := prefix.NewStore(runtime.KVStoreAdapter(store), feegrant.DIDFeeAllowanceKeyPrefix) grants, pageRes, err := query.GenericFilteredPaginate(q.cdc, prefixStore, req.Pagination, func(key []byte, didGrant *feegrant.DIDGrant) (*feegrant.Grant, error) { granter, _ := feegrant.ParseGranterDIDFromFeeAllowanceKey(append(feegrant.DIDFeeAllowanceKeyPrefix, key...)) if !bytes.Equal(granter, granterAddr) { return nil, nil } return &feegrant.Grant{ Granter: didGrant.Granter, Grantee: didGrant.GranteeDid, Allowance: didGrant.Allowance, }, nil }, func() *feegrant.DIDGrant { return &feegrant.DIDGrant{} }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &feegrant.QueryDIDAllowancesByGranterResponse{Allowances: grants, Pagination: pageRes}, nil } ================================================ FILE: x/feegrant/keeper/grpc_query_test.go ================================================ package keeper_test import ( "github.com/sourcenetwork/sourcehub/x/feegrant" sdk "github.com/cosmos/cosmos-sdk/types" ) const ( invalidGrantee = "invalid-grantee" invalidGranter = "invalid-granter" ) func (suite *KeeperTestSuite) TestFeeAllowance() { testCases := []struct { name string req *feegrant.QueryAllowanceRequest expectErr bool preRun func() postRun func(_ *feegrant.QueryAllowanceResponse) }{ { "nil request", nil, true, func() {}, func(*feegrant.QueryAllowanceResponse) {}, }, { "fail: invalid granter", &feegrant.QueryAllowanceRequest{ Granter: invalidGranter, Grantee: suite.addrs[0].String(), }, true, func() {}, func(*feegrant.QueryAllowanceResponse) {}, }, { "fail: invalid grantee", &feegrant.QueryAllowanceRequest{ Granter: suite.addrs[0].String(), Grantee: invalidGrantee, }, true, func() {}, func(*feegrant.QueryAllowanceResponse) {}, }, { "fail: no grants", &feegrant.QueryAllowanceRequest{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }, true, func() {}, func(*feegrant.QueryAllowanceResponse) {}, }, { "non existed grant", &feegrant.QueryAllowanceRequest{ Granter: invalidGranter, Grantee: invalidGrantee, }, true, func() {}, func(*feegrant.QueryAllowanceResponse) {}, }, { "valid query: expect single grant", &feegrant.QueryAllowanceRequest{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }, false, func() { suite.grantFeeAllowance(suite.addrs[0], suite.addrs[1]) }, func(response *feegrant.QueryAllowanceResponse) { suite.Require().Equal(response.Allowance.Granter, suite.addrs[0].String()) suite.Require().Equal(response.Allowance.Grantee, suite.addrs[1].String()) }, }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() resp, err := suite.feegrantKeeper.Allowance(suite.ctx, tc.req) if tc.expectErr { suite.Require().Error(err) } else { suite.Require().NoError(err) tc.postRun(resp) } }) } } func (suite *KeeperTestSuite) TestFeeAllowances() { testCases := []struct { name string req *feegrant.QueryAllowancesRequest expectErr bool preRun func() postRun func(_ *feegrant.QueryAllowancesResponse) }{ { "nil request", nil, true, func() {}, func(*feegrant.QueryAllowancesResponse) {}, }, { "fail: invalid grantee", &feegrant.QueryAllowancesRequest{ Grantee: invalidGrantee, }, true, func() {}, func(*feegrant.QueryAllowancesResponse) {}, }, { "no grants", &feegrant.QueryAllowancesRequest{ Grantee: suite.addrs[1].String(), }, false, func() {}, func(resp *feegrant.QueryAllowancesResponse) { suite.Require().Equal(len(resp.Allowances), 0) }, }, { "valid query: expect single grant", &feegrant.QueryAllowancesRequest{ Grantee: suite.addrs[1].String(), }, false, func() { suite.grantFeeAllowance(suite.addrs[0], suite.addrs[1]) }, func(resp *feegrant.QueryAllowancesResponse) { suite.Require().Equal(len(resp.Allowances), 1) suite.Require().Equal(resp.Allowances[0].Granter, suite.addrs[0].String()) suite.Require().Equal(resp.Allowances[0].Grantee, suite.addrs[1].String()) }, }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() resp, err := suite.feegrantKeeper.Allowances(suite.ctx, tc.req) if tc.expectErr { suite.Require().Error(err) } else { suite.Require().NoError(err) tc.postRun(resp) } }) } } func (suite *KeeperTestSuite) TestFeeAllowancesByGranter() { testCases := []struct { name string req *feegrant.QueryAllowancesByGranterRequest expectErr bool preRun func() postRun func(_ *feegrant.QueryAllowancesByGranterResponse) }{ { "nil request", nil, true, func() {}, func(*feegrant.QueryAllowancesByGranterResponse) {}, }, { "fail: invalid grantee", &feegrant.QueryAllowancesByGranterRequest{ Granter: invalidGrantee, }, true, func() {}, func(*feegrant.QueryAllowancesByGranterResponse) {}, }, { "no grants", &feegrant.QueryAllowancesByGranterRequest{ Granter: suite.addrs[0].String(), }, false, func() {}, func(resp *feegrant.QueryAllowancesByGranterResponse) { suite.Require().Equal(len(resp.Allowances), 0) }, }, { "valid query: expect single grant", &feegrant.QueryAllowancesByGranterRequest{ Granter: suite.addrs[0].String(), }, false, func() { suite.grantFeeAllowance(suite.addrs[0], suite.addrs[1]) // adding this allowance to check whether the pagination working fine. suite.grantFeeAllowance(suite.addrs[1], suite.addrs[2]) }, func(resp *feegrant.QueryAllowancesByGranterResponse) { suite.Require().Equal(len(resp.Allowances), 1) suite.Require().Equal(resp.Allowances[0].Granter, suite.addrs[0].String()) suite.Require().Equal(resp.Allowances[0].Grantee, suite.addrs[1].String()) suite.Require().Equal(resp.Pagination.Total, uint64(1)) }, }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() resp, err := suite.feegrantKeeper.AllowancesByGranter(suite.ctx, tc.req) if tc.expectErr { suite.Require().Error(err) } else { suite.Require().NoError(err) tc.postRun(resp) } }) } } func (suite *KeeperTestSuite) grantFeeAllowance(granter, grantee sdk.AccAddress) { exp := suite.ctx.BlockTime().AddDate(1, 0, 0) err := suite.feegrantKeeper.GrantAllowance(suite.ctx, granter, grantee, &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 555)), Expiration: &exp, }) suite.Require().NoError(err) } func (suite *KeeperTestSuite) TestDIDAllowance() { invalidGranter := "invalid_granter" testDID := "did:example:alice" testCases := []struct { name string req *feegrant.QueryDIDAllowanceRequest expectErr bool preRun func() postRun func(_ *feegrant.QueryDIDAllowanceResponse) }{ { "nil request", nil, true, func() {}, func(*feegrant.QueryDIDAllowanceResponse) {}, }, { "fail: invalid granter", &feegrant.QueryDIDAllowanceRequest{ Granter: invalidGranter, GranteeDid: testDID, }, true, func() {}, func(*feegrant.QueryDIDAllowanceResponse) {}, }, { "fail: empty DID", &feegrant.QueryDIDAllowanceRequest{ Granter: suite.addrs[0].String(), GranteeDid: "", }, true, func() {}, func(*feegrant.QueryDIDAllowanceResponse) {}, }, { "fail: non-existent DID allowance", &feegrant.QueryDIDAllowanceRequest{ Granter: suite.addrs[0].String(), GranteeDid: "did:example:nonexistent", }, true, func() {}, func(*feegrant.QueryDIDAllowanceResponse) {}, }, { "valid query: single DID grant", &feegrant.QueryDIDAllowanceRequest{ Granter: suite.addrs[0].String(), GranteeDid: testDID, }, false, func() { suite.grantDIDFeeAllowance(suite.addrs[0], testDID) }, func(resp *feegrant.QueryDIDAllowanceResponse) { suite.Require().NotNil(resp.Allowance) suite.Require().Equal(resp.Allowance.Granter, suite.addrs[0].String()) suite.Require().Equal(resp.Allowance.Grantee, testDID) }, }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() resp, err := suite.feegrantKeeper.DIDAllowance(suite.ctx, tc.req) if tc.expectErr { suite.Require().Error(err) } else { suite.Require().NoError(err) tc.postRun(resp) } }) } } func (suite *KeeperTestSuite) TestDIDAllowancesByGranter() { invalidGranter := "invalid_granter" testCases := []struct { name string req *feegrant.QueryDIDAllowancesByGranterRequest expectErr bool preRun func() postRun func(_ *feegrant.QueryDIDAllowancesByGranterResponse) }{ { "nil request", nil, true, func() {}, func(*feegrant.QueryDIDAllowancesByGranterResponse) {}, }, { "fail: invalid granter", &feegrant.QueryDIDAllowancesByGranterRequest{ Granter: invalidGranter, }, true, func() {}, func(*feegrant.QueryDIDAllowancesByGranterResponse) {}, }, { "no DID grants", &feegrant.QueryDIDAllowancesByGranterRequest{ Granter: suite.addrs[0].String(), }, false, func() { // Grant regular allowance (not DID) to ensure it's not returned suite.grantFeeAllowance(suite.addrs[0], suite.addrs[1]) }, func(resp *feegrant.QueryDIDAllowancesByGranterResponse) { suite.Require().Equal(len(resp.Allowances), 0) }, }, { "valid query: expect DID grants only", &feegrant.QueryDIDAllowancesByGranterRequest{ Granter: suite.addrs[2].String(), }, false, func() { // Grant regular allowance (should not appear in DID query) suite.grantFeeAllowance(suite.addrs[2], suite.addrs[3]) // Grant DID allowances (should appear in DID query) suite.grantDIDFeeAllowance(suite.addrs[2], "did:example:bob") suite.grantDIDFeeAllowance(suite.addrs[2], "did:example:alice") }, func(resp *feegrant.QueryDIDAllowancesByGranterResponse) { suite.Require().Equal(len(resp.Allowances), 2) for _, allowance := range resp.Allowances { suite.Require().Equal(allowance.Granter, suite.addrs[2].String()) suite.Require().True(allowance.Grantee == "did:example:bob" || allowance.Grantee == "did:example:alice") } }, }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() resp, err := suite.feegrantKeeper.DIDAllowancesByGranter(suite.ctx, tc.req) if tc.expectErr { suite.Require().Error(err) } else { suite.Require().NoError(err) tc.postRun(resp) } }) } } func (suite *KeeperTestSuite) grantDIDFeeAllowance(granter sdk.AccAddress, granteeDID string) { exp := suite.ctx.BlockTime().AddDate(1, 0, 0) err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, granteeDID, &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 777)), Expiration: &exp, }) suite.Require().NoError(err) } func (suite *KeeperTestSuite) TestDIDAllowances() { testDID := "did:example:charlie" testCases := []struct { name string req *feegrant.QueryDIDAllowancesRequest expectErr bool preRun func() postRun func(_ *feegrant.QueryDIDAllowancesResponse) }{ { "nil request", nil, true, func() {}, func(*feegrant.QueryDIDAllowancesResponse) {}, }, { "fail: empty DID", &feegrant.QueryDIDAllowancesRequest{ GranteeDid: "", }, true, func() {}, func(*feegrant.QueryDIDAllowancesResponse) {}, }, { "no DID grants for this DID", &feegrant.QueryDIDAllowancesRequest{ GranteeDid: "did:example:nonexistent", }, false, func() {}, func(resp *feegrant.QueryDIDAllowancesResponse) { suite.Require().Equal(len(resp.Allowances), 0) }, }, { "valid query: expect single DID grant", &feegrant.QueryDIDAllowancesRequest{ GranteeDid: testDID, }, false, func() { suite.grantDIDFeeAllowance(suite.addrs[0], testDID) }, func(resp *feegrant.QueryDIDAllowancesResponse) { suite.Require().Equal(len(resp.Allowances), 1) suite.Require().Equal(resp.Allowances[0].Granter, suite.addrs[0].String()) suite.Require().Equal(resp.Allowances[0].Grantee, testDID) }, }, { "valid query: expect multiple DID grants from different granters", &feegrant.QueryDIDAllowancesRequest{ GranteeDid: "did:example:multiple", }, false, func() { // Multiple granters giving allowances to the same DID suite.grantDIDFeeAllowance(suite.addrs[0], "did:example:multiple") suite.grantDIDFeeAllowance(suite.addrs[1], "did:example:multiple") suite.grantDIDFeeAllowance(suite.addrs[2], "did:example:multiple") // Grant to a different DID to ensure it's not returned suite.grantDIDFeeAllowance(suite.addrs[3], "did:example:other") }, func(resp *feegrant.QueryDIDAllowancesResponse) { suite.Require().Equal(len(resp.Allowances), 3) granters := make(map[string]bool) for _, allowance := range resp.Allowances { suite.Require().Equal(allowance.Grantee, "did:example:multiple") granters[allowance.Granter] = true } // Verify all three granters are present suite.Require().True(granters[suite.addrs[0].String()]) suite.Require().True(granters[suite.addrs[1].String()]) suite.Require().True(granters[suite.addrs[2].String()]) }, }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() resp, err := suite.feegrantKeeper.DIDAllowances(suite.ctx, tc.req) if tc.expectErr { suite.Require().Error(err) } else { suite.Require().NoError(err) tc.postRun(resp) } }) } } ================================================ FILE: x/feegrant/keeper/keeper.go ================================================ package keeper import ( "context" "errors" "fmt" "time" "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" ) // Keeper manages state of all fee grants, as well as calculating approval. // It must have a codec with all available allowances registered. type Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService authKeeper feegrant.AccountKeeper bankKeeper feegrant.BankKeeper } var _ ante.FeegrantKeeper = &Keeper{} // NewKeeper creates a feegrant Keeper func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ak feegrant.AccountKeeper) Keeper { return Keeper{ cdc: cdc, storeService: storeService, authKeeper: ak, } } // Super ugly hack to not be breaking in v0.50 and v0.47 // DO NOT USE. func (k Keeper) SetBankKeeper(bk feegrant.BankKeeper) Keeper { k.bankKeeper = bk return k } // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", feegrant.ModuleName)) } // GrantAllowance creates a new grant func (k Keeper) GrantAllowance(ctx context.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error { // Checking for duplicate entry if f, _ := k.GetAllowance(ctx, granter, grantee); f != nil { return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "fee allowance already exists") } // create the account if it is not in account state granteeAcc := k.authKeeper.GetAccount(ctx, grantee) if granteeAcc == nil { if k.bankKeeper.BlockedAddr(grantee) { return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive funds", grantee) } granteeAcc = k.authKeeper.NewAccountWithAddress(ctx, grantee) k.authKeeper.SetAccount(ctx, granteeAcc) } store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceKey(granter, grantee) exp, err := feeAllowance.ExpiresAt() if err != nil { return err } // expiration shouldn't be in the past. sdkCtx := sdk.UnwrapSDKContext(ctx) if exp != nil && exp.Before(sdkCtx.BlockTime()) { return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "expiration is before current block time") } // if expiry is not nil, add the new key to pruning queue. if exp != nil { // `key` formed here with the prefix of `FeeAllowanceKeyPrefix` (which is `0x00`) // remove the 1st byte and reuse the remaining key as it is err = k.addToFeeAllowanceQueue(ctx, key[1:], exp) if err != nil { return err } } grant, err := feegrant.NewGrant(granter, grantee, feeAllowance) if err != nil { return err } bz, err := k.cdc.Marshal(&grant) if err != nil { return err } err = store.Set(key, bz) if err != nil { return err } sdkCtx.EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeSetFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, grant.Granter), sdk.NewAttribute(feegrant.AttributeKeyGrantee, grant.Grantee), ), ) return nil } // UpdateAllowance updates the existing grant. func (k Keeper) UpdateAllowance(ctx context.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error { store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceKey(granter, grantee) _, err := k.getGrant(ctx, granter, grantee) if err != nil { return err } grant, err := feegrant.NewGrant(granter, grantee, feeAllowance) if err != nil { return err } bz, err := k.cdc.Marshal(&grant) if err != nil { return err } err = store.Set(key, bz) if err != nil { return err } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeUpdateFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, grant.Granter), sdk.NewAttribute(feegrant.AttributeKeyGrantee, grant.Grantee), ), ) return nil } // revokeAllowance removes an existing grant func (k Keeper) revokeAllowance(ctx context.Context, granter, grantee sdk.AccAddress) error { grant, err := k.GetAllowance(ctx, granter, grantee) if err != nil { return err } store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceKey(granter, grantee) err = store.Delete(key) if err != nil { return err } exp, err := grant.ExpiresAt() if err != nil { return err } if exp != nil { if err := store.Delete(feegrant.FeeAllowancePrefixQueue(exp, feegrant.FeeAllowanceKey(grantee, granter)[1:])); err != nil { return err } } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeRevokeFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, granter.String()), sdk.NewAttribute(feegrant.AttributeKeyGrantee, grantee.String()), ), ) return nil } // GetAllowance returns the allowance between the granter and grantee. // If there is none, it returns nil, nil. // Returns an error on parsing issues func (k Keeper) GetAllowance(ctx context.Context, granter, grantee sdk.AccAddress) (feegrant.FeeAllowanceI, error) { grant, err := k.getGrant(ctx, granter, grantee) if err != nil { return nil, err } return grant.GetGrant() } // getGrant returns entire grant between both accounts func (k Keeper) getGrant(ctx context.Context, granter, grantee sdk.AccAddress) (*feegrant.Grant, error) { store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceKey(granter, grantee) bz, err := store.Get(key) if err != nil { return nil, err } if len(bz) == 0 { return nil, sdkerrors.ErrNotFound.Wrap("fee-grant not found") } var feegrant feegrant.Grant if err := k.cdc.Unmarshal(bz, &feegrant); err != nil { return nil, err } return &feegrant, nil } // IterateAllFeeAllowances iterates over all the grants in the store. // Callback to get all data, returns true to stop, false to keep reading // Calling this without pagination is very expensive and only designed for export genesis func (k Keeper) IterateAllFeeAllowances(ctx context.Context, cb func(grant feegrant.Grant) bool) error { store := k.storeService.OpenKVStore(ctx) iter := storetypes.KVStorePrefixIterator(runtime.KVStoreAdapter(store), feegrant.FeeAllowanceKeyPrefix) defer iter.Close() stop := false for ; iter.Valid() && !stop; iter.Next() { bz := iter.Value() var feeGrant feegrant.Grant if err := k.cdc.Unmarshal(bz, &feeGrant); err != nil { return err } stop = cb(feeGrant) } return nil } // UseGrantedFees will try to pay the given fee from the granter's account as requested by the grantee func (k Keeper) UseGrantedFees(ctx context.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error { grant, err := k.GetAllowance(ctx, granter, grantee) if err != nil { return err } remove, err := grant.Accept(ctx, fee, msgs) if remove { // Ignoring the `revokeFeeAllowance` error, because the user has enough grants to perform this transaction. k.revokeAllowance(ctx, granter, grantee) if err != nil { return err } emitUseGrantEvent(ctx, granter.String(), grantee.String()) return nil } if err != nil { return err } emitUseGrantEvent(ctx, granter.String(), grantee.String()) // if fee allowance is accepted, store the updated state of the allowance return k.UpdateAllowance(ctx, granter, grantee, grant) } func emitUseGrantEvent(ctx context.Context, granter, grantee string) { sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeUseFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, granter), sdk.NewAttribute(feegrant.AttributeKeyGrantee, grantee), ), ) } // InitGenesis will initialize the keeper from a *previously validated* GenesisState func (k Keeper) InitGenesis(ctx context.Context, data *feegrant.GenesisState) error { for _, f := range data.Allowances { granter, err := k.authKeeper.AddressCodec().StringToBytes(f.Granter) if err != nil { return err } grantee, err := k.authKeeper.AddressCodec().StringToBytes(f.Grantee) if err != nil { return err } grant, err := f.GetGrant() if err != nil { return err } err = k.GrantAllowance(ctx, granter, grantee, grant) if err != nil { return err } } for _, f := range data.DidAllowances { granter, err := k.authKeeper.AddressCodec().StringToBytes(f.Granter) if err != nil { return err } didGrant, err := f.GetDIDGrant() if err != nil { return err } err = k.GrantDIDAllowance(ctx, granter, f.GranteeDid, didGrant) if err != nil { return err } } return nil } // ExportGenesis will dump the contents of the keeper into a serializable GenesisState. func (k Keeper) ExportGenesis(ctx context.Context) (*feegrant.GenesisState, error) { var grants []feegrant.Grant var didGrants []feegrant.DIDGrant grantErr := k.IterateAllFeeAllowances(ctx, func(grant feegrant.Grant) bool { grants = append(grants, grant) return false }) didGrantErr := k.IterateAllDIDAllowances(ctx, func(grant feegrant.DIDGrant) bool { didGrants = append(didGrants, grant) return false }) return &feegrant.GenesisState{ Allowances: grants, DidAllowances: didGrants, }, errors.Join(grantErr, didGrantErr) } func (k Keeper) addToFeeAllowanceQueue(ctx context.Context, grantKey []byte, exp *time.Time) error { store := k.storeService.OpenKVStore(ctx) return store.Set(feegrant.FeeAllowancePrefixQueue(exp, grantKey), []byte{}) } // RemoveExpiredAllowances iterates grantsByExpiryQueue and deletes the expired grants. func (k Keeper) RemoveExpiredAllowances(ctx context.Context, limit int32) error { exp := sdk.UnwrapSDKContext(ctx).BlockTime() store := k.storeService.OpenKVStore(ctx) iterator, err := store.Iterator(feegrant.FeeAllowanceQueueKeyPrefix, storetypes.InclusiveEndBytes(feegrant.AllowanceByExpTimeKey(&exp))) var count int32 if err != nil { return err } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { err = store.Delete(iterator.Key()) if err != nil { return err } granter, grantee := feegrant.ParseAddressesFromFeeAllowanceQueueKey(iterator.Key()) err = store.Delete(feegrant.FeeAllowanceKey(granter, grantee)) if err != nil { return err } // limit the amount of iterations to avoid taking too much time count++ if count == limit { return nil } } return nil } // RemoveExpiredDIDAllowances iterates DID grantsByExpiryQueue and deletes the expired DID grants. func (k Keeper) RemoveExpiredDIDAllowances(ctx context.Context, limit int32) error { exp := sdk.UnwrapSDKContext(ctx).BlockTime() store := k.storeService.OpenKVStore(ctx) iterator, err := store.Iterator(feegrant.DIDFeeAllowanceQueueKeyPrefix, storetypes.InclusiveEndBytes(feegrant.DIDAllowanceByExpTimeKey(&exp))) var count int32 if err != nil { return err } defer iterator.Close() for ; iterator.Valid(); iterator.Next() { err = store.Delete(iterator.Key()) if err != nil { return err } granter, granteeDID := feegrant.ParseGranterDIDFromDIDAllowanceQueueKey(iterator.Key()) granterAddr := sdk.AccAddress(granter) err = store.Delete(feegrant.FeeAllowanceByDIDKey(granterAddr, granteeDID)) if err != nil { return err } // limit the amount of iterations to avoid taking too much time count++ if count == limit { return nil } } return nil } // IterateAllDIDAllowances iterates over all the DID grants in the store. // Callback to get all data, returns true to stop, false to keep reading. // Calling this without pagination is very expensive and only designed for export genesis. func (k Keeper) IterateAllDIDAllowances(ctx context.Context, cb func(grant feegrant.DIDGrant) bool) error { store := k.storeService.OpenKVStore(ctx) iter := storetypes.KVStorePrefixIterator(runtime.KVStoreAdapter(store), feegrant.DIDFeeAllowanceKeyPrefix) defer iter.Close() stop := false for ; iter.Valid() && !stop; iter.Next() { bz := iter.Value() var didGrant feegrant.DIDGrant if err := k.cdc.Unmarshal(bz, &didGrant); err != nil { return err } stop = cb(didGrant) } return nil } // GrantDIDAllowance creates a new DID-based grant. func (k Keeper) GrantDIDAllowance( ctx context.Context, granter sdk.AccAddress, granteeDID string, feeAllowance feegrant.FeeAllowanceI, ) error { // Check for duplicate entry if f, _ := k.GetDIDAllowance(ctx, granter, granteeDID); f != nil { return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "fee allowance already exists for this DID") } store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceByDIDKey(granter, granteeDID) exp, err := feeAllowance.ExpiresAt() if err != nil { return err } // expiration shouldn't be in the past. sdkCtx := sdk.UnwrapSDKContext(ctx) if exp != nil && exp.Before(sdkCtx.BlockTime()) { return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "expiration is before current block time") } // if expiry is not nil, add the new key to pruning queue. if exp != nil { // `key` formed here with the prefix of `DIDFeeAllowanceKeyPrefix` (which is `0x02`) // remove the 1st byte and reuse the remaining key as it is err = k.addToDIDFeeAllowanceQueue(ctx, key[1:], exp) if err != nil { return err } } didGrant, err := feegrant.NewDIDGrant(granter, granteeDID, feeAllowance) if err != nil { return err } bz, err := k.cdc.Marshal(&didGrant) if err != nil { return err } err = store.Set(key, bz) if err != nil { return err } sdkCtx.EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeSetDIDFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, didGrant.Granter), sdk.NewAttribute(feegrant.AttributeKeyGranteeDid, didGrant.GranteeDid), ), ) return nil } // GetDIDAllowance returns the allowance between the granter and DID. // If there is none, it returns nil, nil. Returns an error on parsing issues. func (k Keeper) GetDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) (feegrant.FeeAllowanceI, error) { didGrant, err := k.getDIDGrant(ctx, granter, granteeDID) if err != nil { return nil, err } return didGrant.GetDIDGrant() } // getDIDGrant returns entire grant between granter and DID. func (k Keeper) getDIDGrant(ctx context.Context, granter sdk.AccAddress, granteeDID string) (*feegrant.DIDGrant, error) { store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceByDIDKey(granter, granteeDID) bz, err := store.Get(key) if err != nil { return nil, err } if len(bz) == 0 { return nil, sdkerrors.ErrNotFound.Wrap("fee-grant not found for DID") } var didGrant feegrant.DIDGrant if err := k.cdc.Unmarshal(bz, &didGrant); err != nil { return nil, err } return &didGrant, nil } // revokeDIDAllowance removes an existing DID-based grant. func (k Keeper) revokeDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) error { didGrant, err := k.GetDIDAllowance(ctx, granter, granteeDID) if err != nil { return err } store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceByDIDKey(granter, granteeDID) err = store.Delete(key) if err != nil { return err } exp, err := didGrant.ExpiresAt() if err != nil { return err } if exp != nil { if err := store.Delete(feegrant.DIDFeeAllowancePrefixQueue(exp, key[1:])); err != nil { return err } } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeRevokeDIDFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, granter.String()), sdk.NewAttribute(feegrant.AttributeKeyGranteeDid, granteeDID), ), ) return nil } // ExpireDIDAllowance expires existing allowance by setting the expiration date. func (k Keeper) ExpireDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) error { sdkCtx := sdk.UnwrapSDKContext(ctx) existingAllowance, err := k.GetDIDAllowance(ctx, granter, granteeDID) if err != nil { return err } var newExpiration time.Time switch allowance := existingAllowance.(type) { case *feegrant.PeriodicAllowance: // expire at the end of the current period newExpiration = allowance.PeriodReset allowance.Basic.Expiration = &newExpiration case *feegrant.BasicAllowance: // expire immediately newExpiration = sdkCtx.BlockTime() allowance.Expiration = &newExpiration default: return fmt.Errorf("unsupported allowance type: %T", existingAllowance) } if err := k.UpdateDIDAllowance(ctx, granter, granteeDID, existingAllowance); err != nil { return err } sdkCtx.EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeExpireDIDFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, granter.String()), sdk.NewAttribute(feegrant.AttributeKeyGranteeDid, granteeDID), sdk.NewAttribute(feegrant.AttributeKeyExpirationTime, newExpiration.String()), ), ) return nil } // UseGrantedFeesByDID validates the DID-based fee allowance for the given granter and DID. func (k Keeper) UseGrantedFeesByDID(ctx context.Context, granter sdk.AccAddress, granteeDID string, fee sdk.Coins, msgs []sdk.Msg) error { didGrant, err := k.GetDIDAllowance(ctx, granter, granteeDID) if err != nil { return errorsmod.Wrapf(err, "fee-grant not found for DID %s", granteeDID) } remove, err := didGrant.Accept(ctx, fee, msgs) if remove { k.revokeDIDAllowance(ctx, granter, granteeDID) if err != nil { return err } emitUseDIDGrantEvent(ctx, granter.String(), granteeDID) return nil } if err != nil { return err } emitUseDIDGrantEvent(ctx, granter.String(), granteeDID) return k.UpdateDIDAllowance(ctx, granter, granteeDID, didGrant) } // UpdateDIDAllowance updates the existing DID-based grant. func (k Keeper) UpdateDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string, feeAllowance feegrant.FeeAllowanceI) error { store := k.storeService.OpenKVStore(ctx) key := feegrant.FeeAllowanceByDIDKey(granter, granteeDID) _, err := k.getDIDGrant(ctx, granter, granteeDID) if err != nil { return err } didGrant, err := feegrant.NewDIDGrant(granter, granteeDID, feeAllowance) if err != nil { return err } bz, err := k.cdc.Marshal(&didGrant) if err != nil { return err } err = store.Set(key, bz) if err != nil { return err } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeUpdateDIDFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, didGrant.Granter), sdk.NewAttribute(feegrant.AttributeKeyGranteeDid, didGrant.GranteeDid), ), ) return nil } // addToDIDFeeAllowanceQueue adds DID grant to the expiration queue. func (k Keeper) addToDIDFeeAllowanceQueue(ctx context.Context, grantKey []byte, exp *time.Time) error { store := k.storeService.OpenKVStore(ctx) return store.Set(feegrant.DIDFeeAllowancePrefixQueue(exp, grantKey), []byte{}) } // GetFirstAvailableDIDGrant returns the first available grant for a given DID. // Returns the granter address and the fee allowance, or an error if no grant is found. func (k Keeper) GetFirstAvailableDIDGrant(ctx context.Context, granteeDID string) (sdk.AccAddress, feegrant.FeeAllowanceI, error) { store := k.storeService.OpenKVStore(ctx) prefix := feegrant.FeeAllowancePrefixByDID(granteeDID) iter := storetypes.KVStorePrefixIterator(runtime.KVStoreAdapter(store), prefix) defer iter.Close() if !iter.Valid() { return nil, nil, sdkerrors.ErrNotFound.Wrap("no fee-grant found for DID") } var didGrant feegrant.DIDGrant if err := k.cdc.Unmarshal(iter.Value(), &didGrant); err != nil { return nil, nil, err } granter, err := k.authKeeper.AddressCodec().StringToBytes(didGrant.Granter) if err != nil { return nil, nil, err } allowance, err := didGrant.GetDIDGrant() if err != nil { return nil, nil, err } return granter, allowance, nil } // UseFirstAvailableDIDGrant finds and validates the first available grant for a given DID. // Returns the granter address that was used, or an error if no grant is found or cannot be used. func (k Keeper) UseFirstAvailableDIDGrant(ctx context.Context, granteeDID string, fee sdk.Coins, msgs []sdk.Msg) (sdk.AccAddress, error) { store := k.storeService.OpenKVStore(ctx) prefix := feegrant.FeeAllowancePrefixByDID(granteeDID) iter := storetypes.KVStorePrefixIterator(runtime.KVStoreAdapter(store), prefix) defer iter.Close() // Try each grant until we find one that works for ; iter.Valid(); iter.Next() { var didGrant feegrant.DIDGrant if err := k.cdc.Unmarshal(iter.Value(), &didGrant); err != nil { continue } granter, err := k.authKeeper.AddressCodec().StringToBytes(didGrant.Granter) if err != nil { continue } allowance, err := didGrant.GetDIDGrant() if err != nil { continue } // Try to use this grant remove, err := allowance.Accept(ctx, fee, msgs) if remove { k.revokeDIDAllowance(ctx, granter, granteeDID) if err != nil { continue } emitUseDIDGrantEvent(ctx, didGrant.Granter, granteeDID) return granter, nil } if err != nil { continue } // Update the allowance err = k.UpdateDIDAllowance(ctx, granter, granteeDID, allowance) if err != nil { continue } emitUseDIDGrantEvent(ctx, didGrant.Granter, granteeDID) return granter, nil } return nil, sdkerrors.ErrNotFound.Wrap("no usable fee-grant found for DID") } func emitUseDIDGrantEvent(ctx context.Context, granter, grantee string) { sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeUseDIDFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyGranter, granter), sdk.NewAttribute(feegrant.AttributeKeyGranteeDid, grantee), ), ) } ================================================ FILE: x/feegrant/keeper/keeper_test.go ================================================ package keeper_test import ( "testing" "time" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" "cosmossdk.io/math" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" "github.com/sourcenetwork/sourcehub/x/feegrant/module" feegranttestutil "github.com/sourcenetwork/sourcehub/x/feegrant/testutil" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" 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" appparams "github.com/sourcenetwork/sourcehub/app/params" ) type KeeperTestSuite struct { suite.Suite ctx sdk.Context addrs []sdk.AccAddress msgSrvr feegrant.MsgServer coins sdk.Coins feegrantKeeper keeper.Keeper accountKeeper *feegranttestutil.MockAccountKeeper bankKeeper *feegranttestutil.MockBankKeeper } func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) SetupTest() { suite.addrs = simtestutil.CreateIncrementalAccounts(20) key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) // setup gomock and initialize some globally expected executions ctrl := gomock.NewController(suite.T()) suite.accountKeeper = feegranttestutil.NewMockAccountKeeper(ctrl) for i := 0; i < len(suite.addrs); i++ { suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[i]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[i])).AnyTimes() } suite.accountKeeper.EXPECT().AddressCodec().Return(codecaddress.NewBech32Codec("cosmos")).AnyTimes() suite.bankKeeper = feegranttestutil.NewMockBankKeeper(ctrl) suite.bankKeeper.EXPECT().BlockedAddr(gomock.Any()).Return(false).AnyTimes() suite.feegrantKeeper = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), suite.accountKeeper).SetBankKeeper(suite.bankKeeper) suite.ctx = testCtx.Ctx suite.msgSrvr = keeper.NewMsgServerImpl(suite.feegrantKeeper) suite.coins = sdk.NewCoins(sdk.NewCoin("uopen", sdkmath.NewInt(555))) } func (suite *KeeperTestSuite) TestKeeperCrud() { // some helpers eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) exp := suite.ctx.BlockTime().AddDate(1, 0, 0) exp2 := suite.ctx.BlockTime().AddDate(2, 0, 0) basic := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &exp, } basic2 := &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &exp, } basic3 := &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &exp2, } // let's set up some initial state here // addrs[0] -> addrs[1] (basic) err := suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[0], suite.addrs[1], basic) suite.Require().NoError(err) // addrs[0] -> addrs[2] (basic2) err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[0], suite.addrs[2], basic2) suite.Require().NoError(err) // addrs[1] -> addrs[2] (basic) err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[1], suite.addrs[2], basic) suite.Require().NoError(err) // addrs[1] -> addrs[3] (basic) err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[1], suite.addrs[3], basic) suite.Require().NoError(err) // addrs[3] -> addrs[0] (basic2) err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[3], suite.addrs[0], basic2) suite.Require().NoError(err) // addrs[3] -> addrs[0] (basic2) expect error with duplicate grant err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[3], suite.addrs[0], basic2) suite.Require().Error(err) // remove some, overwrite other _, err = suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String()}) suite.Require().NoError(err) _, err = suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{Granter: suite.addrs[0].String(), Grantee: suite.addrs[2].String()}) suite.Require().NoError(err) // revoke non-exist fee allowance _, err = suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{Granter: suite.addrs[0].String(), Grantee: suite.addrs[2].String()}) suite.Require().Error(err) err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[0], suite.addrs[2], basic) suite.Require().NoError(err) // revoke an existing grant and grant again with different allowance. _, err = suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{Granter: suite.addrs[1].String(), Grantee: suite.addrs[2].String()}) suite.Require().NoError(err) err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[1], suite.addrs[2], basic3) suite.Require().NoError(err) // end state: // addr -> addr3 (basic) // addr2 -> addr3 (basic2), addr4(basic) // addr4 -> addr (basic2) // then lots of queries cases := map[string]struct { grantee sdk.AccAddress granter sdk.AccAddress allowance feegrant.FeeAllowanceI }{ "addr revoked": { granter: suite.addrs[0], grantee: suite.addrs[1], }, "addr revoked and added": { granter: suite.addrs[0], grantee: suite.addrs[2], allowance: basic, }, "addr never there": { granter: suite.addrs[0], grantee: suite.addrs[3], }, "addr modified": { granter: suite.addrs[1], grantee: suite.addrs[2], allowance: basic3, }, } for name, tc := range cases { tc := tc suite.Run(name, func() { allow, _ := suite.feegrantKeeper.GetAllowance(suite.ctx, tc.granter, tc.grantee) if tc.allowance == nil { suite.Nil(allow) return } suite.NotNil(allow) suite.Equal(tc.allowance, allow) }) } address := "cosmos1rxr4mq58w3gtnx5tsc438mwjjafv3mja7k5pnu" accAddr, err := codecaddress.NewBech32Codec("cosmos").StringToBytes(address) suite.Require().NoError(err) suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), accAddr).Return(authtypes.NewBaseAccountWithAddress(accAddr)).AnyTimes() // let's grant and revoke authorization to non existing account err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[3], accAddr, basic2) suite.Require().NoError(err) _, err = suite.feegrantKeeper.GetAllowance(suite.ctx, suite.addrs[3], accAddr) suite.Require().NoError(err) _, err = suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{Granter: suite.addrs[3].String(), Grantee: address}) suite.Require().NoError(err) } func (suite *KeeperTestSuite) TestUseGrantedFee() { eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) blockTime := suite.ctx.BlockTime() oneYear := blockTime.AddDate(1, 0, 0) future := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, } // for testing limits of the contract hugeAmount := sdk.NewCoins(sdk.NewInt64Coin("uopen", 9999)) smallAmount := sdk.NewCoins(sdk.NewInt64Coin("uopen", 1)) futureAfterSmall := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 554)), Expiration: &oneYear, } // then lots of queries cases := map[string]struct { grantee sdk.AccAddress granter sdk.AccAddress fee sdk.Coins allowed bool final feegrant.FeeAllowanceI postRun func() }{ "use entire pot": { granter: suite.addrs[0], grantee: suite.addrs[1], fee: suite.coins, allowed: true, final: nil, postRun: func() {}, }, "too high": { granter: suite.addrs[0], grantee: suite.addrs[1], fee: hugeAmount, allowed: false, final: future, postRun: func() { _, err := suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }) suite.Require().NoError(err) }, }, "use a little": { granter: suite.addrs[0], grantee: suite.addrs[1], fee: smallAmount, allowed: true, final: futureAfterSmall, postRun: func() { _, err := suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }) suite.Require().NoError(err) }, }, } for name, tc := range cases { tc := tc suite.Run(name, func() { err := suite.feegrantKeeper.GrantAllowance(suite.ctx, tc.granter, tc.grantee, future) suite.Require().NoError(err) err = suite.feegrantKeeper.UseGrantedFees(suite.ctx, tc.granter, tc.grantee, tc.fee, []sdk.Msg{}) if tc.allowed { suite.NoError(err) } else { suite.Error(err) } loaded, _ := suite.feegrantKeeper.GetAllowance(suite.ctx, tc.granter, tc.grantee) suite.Equal(tc.final, loaded) tc.postRun() }) } basicAllowance := &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &blockTime, } // create basic fee allowance err := suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[0], suite.addrs[2], basicAllowance) suite.Require().NoError(err) // waiting for future blocks, allowance to be pruned. ctx := suite.ctx.WithBlockTime(oneYear) // expect error: feegrant expired err = suite.feegrantKeeper.UseGrantedFees(ctx, suite.addrs[0], suite.addrs[2], eth, []sdk.Msg{}) suite.Error(err) suite.Contains(err.Error(), "fee allowance expired") // verify: feegrant is revoked _, err = suite.feegrantKeeper.GetAllowance(ctx, suite.addrs[0], suite.addrs[2]) suite.Error(err) suite.Contains(err.Error(), "fee-grant not found") } func (suite *KeeperTestSuite) TestIterateGrants() { eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) exp := suite.ctx.BlockTime().AddDate(1, 0, 0) allowance := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &exp, } allowance1 := &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &exp, } suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[0], suite.addrs[1], allowance) suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[2], suite.addrs[1], allowance1) suite.feegrantKeeper.IterateAllFeeAllowances(suite.ctx, func(grant feegrant.Grant) bool { suite.Require().Equal(suite.addrs[1].String(), grant.Grantee) suite.Require().Contains([]string{suite.addrs[0].String(), suite.addrs[2].String()}, grant.Granter) return true }) } func (suite *KeeperTestSuite) TestPruneGrants() { eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) now := suite.ctx.BlockTime() oneYearExpiry := now.AddDate(1, 0, 0) testCases := []struct { name string ctx sdk.Context granter sdk.AccAddress grantee sdk.AccAddress allowance feegrant.FeeAllowanceI expErrMsg string preRun func() postRun func() }{ { name: "grant not pruned from state", ctx: suite.ctx, granter: suite.addrs[0], grantee: suite.addrs[1], allowance: &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &now, }, }, { name: "grant pruned from state after a block: error", ctx: suite.ctx.WithBlockTime(now.AddDate(0, 0, 1)), granter: suite.addrs[2], grantee: suite.addrs[1], expErrMsg: "not found", allowance: &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &now, }, }, { name: "grant not pruned from state after a day: no error", ctx: suite.ctx.WithBlockTime(now.AddDate(0, 0, 1)), granter: suite.addrs[1], grantee: suite.addrs[0], allowance: &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &oneYearExpiry, }, }, { name: "grant pruned from state after a year: error", ctx: suite.ctx.WithBlockTime(now.AddDate(1, 0, 1)), granter: suite.addrs[1], grantee: suite.addrs[2], expErrMsg: "not found", allowance: &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &oneYearExpiry, }, }, { name: "no expiry: no error", ctx: suite.ctx.WithBlockTime(now.AddDate(1, 0, 0)), granter: suite.addrs[1], grantee: suite.addrs[2], allowance: &feegrant.BasicAllowance{ SpendLimit: eth, Expiration: &oneYearExpiry, }, }, } for _, tc := range testCases { tc := tc suite.Run(tc.name, func() { if tc.preRun != nil { tc.preRun() } err := suite.feegrantKeeper.GrantAllowance(suite.ctx, tc.granter, tc.grantee, tc.allowance) suite.NoError(err) err = suite.feegrantKeeper.RemoveExpiredAllowances(tc.ctx, 5) suite.NoError(err) grant, err := suite.feegrantKeeper.GetAllowance(tc.ctx, tc.granter, tc.grantee) if tc.expErrMsg != "" { suite.Error(err) suite.Contains(err.Error(), tc.expErrMsg) } else { suite.NotNil(grant) } if tc.postRun != nil { tc.postRun() } }) } } func (suite *KeeperTestSuite) TestDIDAllowanceGrant() { testDID := "did:example:bob" testCases := []struct { name string granter sdk.AccAddress granteeDID string allowance feegrant.FeeAllowanceI expectedError string preRun func() }{ { name: "valid DID grant", granter: suite.addrs[0], granteeDID: testDID, allowance: &feegrant.BasicAllowance{ SpendLimit: suite.coins, }, }, { name: "duplicate DID grant", granter: suite.addrs[1], granteeDID: testDID, allowance: &feegrant.BasicAllowance{SpendLimit: suite.coins}, preRun: func() { // Grant first time err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, suite.addrs[1], testDID, &feegrant.BasicAllowance{SpendLimit: suite.coins}) suite.NoError(err) }, expectedError: "already exists", }, } for _, tc := range testCases { tc := tc suite.Run(tc.name, func() { if tc.preRun != nil { tc.preRun() } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, tc.granter, tc.granteeDID, tc.allowance) if tc.expectedError != "" { suite.Error(err) suite.Contains(err.Error(), tc.expectedError) return } suite.NoError(err) // Verify the grant was created allowance, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, tc.granter, tc.granteeDID) suite.NoError(err) suite.NotNil(allowance) }) } } func (suite *KeeperTestSuite) TestDIDAllowanceRevoke() { testDID := "did:example:alice" granter := suite.addrs[2] now := sdk.UnwrapSDKContext(suite.ctx).BlockTime() spendLimit := sdk.NewCoins(sdk.NewCoin(appparams.MicroCreditDenom, math.NewInt(100))) period := time.Hour periodicAllowance := &feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: suite.coins, }, Period: period, PeriodSpendLimit: spendLimit, PeriodCanSpend: spendLimit, PeriodReset: now.Add(period), } // First grant a periodic allowance err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, periodicAllowance) suite.NoError(err) // Verify it exists existingAllowance, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, granter, testDID) suite.NoError(err) suite.NotNil(existingAllowance) // Verify there was no expiration existingExpiration, err := existingAllowance.ExpiresAt() suite.NoError(err) suite.Nil(existingExpiration) // Now expire it err = suite.feegrantKeeper.ExpireDIDAllowance(suite.ctx, granter, testDID) suite.NoError(err) // Verify that allowance exists and has expiration set expiredAllowance, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, granter, testDID) suite.NoError(err) suite.NotNil(expiredAllowance) expiredExpiration, err := expiredAllowance.ExpiresAt() suite.NotNil(expiredExpiration) } func (suite *KeeperTestSuite) TestDIDAllowanceUsage() { testDID := "did:example:bob" granter := suite.addrs[3] // Create allowance with specific spend limit spendLimit := sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)) allowance := &feegrant.BasicAllowance{SpendLimit: spendLimit} err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, allowance) suite.NoError(err) // Test fee usage fee := sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)) msgs := []sdk.Msg{} err = suite.feegrantKeeper.UseGrantedFeesByDID(suite.ctx, granter, testDID, fee, msgs) suite.NoError(err) // Check remaining allowance remainingAllowance, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, granter, testDID) suite.NoError(err) basic, ok := remainingAllowance.(*feegrant.BasicAllowance) suite.True(ok) expected := sdk.NewCoins(sdk.NewInt64Coin("uopen", 900)) suite.Equal(expected, basic.SpendLimit) } func (suite *KeeperTestSuite) TestDIDAllowanceWithFallback() { testDID := "did:example:alice" granter := suite.addrs[4] // Create DID allowance didAllowance := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 500)), } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, didAllowance) suite.NoError(err) fee := sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)) msgs := []sdk.Msg{} // Mock messages with DID err = suite.feegrantKeeper.UseGrantedFeesByDID(suite.ctx, granter, testDID, fee, msgs) suite.NoError(err) } func (suite *KeeperTestSuite) TestDIDAllowanceExpiry() { testDID := "did:example:bob" granter := suite.addrs[6] // Create allowance that expires in future now := suite.ctx.BlockTime() expiry := now.Add(time.Hour) // Expires in 1 hour allowance := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &expiry, } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, allowance) suite.NoError(err) // Advance time to make allowance expire expiredCtx := suite.ctx.WithBlockTime(now.Add(2 * time.Hour)) suite.ctx = expiredCtx // Try to use expired allowance fee := sdk.NewCoins(sdk.NewInt64Coin("uopen", 10)) msgs := []sdk.Msg{} err = suite.feegrantKeeper.UseGrantedFeesByDID(suite.ctx, granter, testDID, fee, msgs) suite.Error(err) suite.Contains(err.Error(), "expired") // Verify allowance was removed due to expiry _, err = suite.feegrantKeeper.GetDIDAllowance(suite.ctx, granter, testDID) suite.Error(err) suite.Contains(err.Error(), "not found") } // TestSeparateQueueSystems verifies that DID grants and regular grants use completely separate expiration queue systems func (suite *KeeperTestSuite) TestSeparateQueueSystems() { now := suite.ctx.BlockTime() expiry := now.Add(time.Hour) // Both types expire in 1 hour // Create regular grant (uses 0x01 queue prefix) regularGranter := suite.addrs[0] regularGrantee := suite.addrs[1] regularAllowance := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &expiry, } err := suite.feegrantKeeper.GrantAllowance(suite.ctx, regularGranter, regularGrantee, regularAllowance) suite.NoError(err) // Create DID grant (uses 0x03 queue prefix) didGranter := suite.addrs[2] testDID := "did:example:alice" didAllowance := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &expiry, } err = suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, didGranter, testDID, didAllowance) suite.NoError(err) // Verify both grants exist before expiry _, err = suite.feegrantKeeper.GetAllowance(suite.ctx, regularGranter, regularGrantee) suite.NoError(err) _, err = suite.feegrantKeeper.GetDIDAllowance(suite.ctx, didGranter, testDID) suite.NoError(err) // Advance time to expire both grants expiredCtx := suite.ctx.WithBlockTime(now.Add(2 * time.Hour)) // Remove expired regular grants only - this should NOT affect DID grants err = suite.feegrantKeeper.RemoveExpiredAllowances(expiredCtx, 10) suite.NoError(err) // Regular grant should be removed _, err = suite.feegrantKeeper.GetAllowance(expiredCtx, regularGranter, regularGrantee) suite.Error(err) suite.Contains(err.Error(), "not found") // DID grant should still exist (not removed by regular grant cleanup) _, err = suite.feegrantKeeper.GetDIDAllowance(expiredCtx, didGranter, testDID) suite.NoError(err) // Now remove expired DID grants only err = suite.feegrantKeeper.RemoveExpiredDIDAllowances(expiredCtx, 10) suite.NoError(err) // Now DID grant should be removed _, err = suite.feegrantKeeper.GetDIDAllowance(expiredCtx, didGranter, testDID) suite.Error(err) suite.Contains(err.Error(), "not found") } // TestQueueKeyPrefixSeparation tests that regular and DID grants use different key prefixes in their queues func (suite *KeeperTestSuite) TestQueueKeyPrefixSeparation() { // Test the key prefixes are different suite.NotEqual(feegrant.FeeAllowanceQueueKeyPrefix, feegrant.DIDFeeAllowanceQueueKeyPrefix) // Regular grants use 0x01 prefix suite.Equal([]byte{0x01}, feegrant.FeeAllowanceQueueKeyPrefix) // DID grants use 0x03 prefix suite.Equal([]byte{0x03}, feegrant.DIDFeeAllowanceQueueKeyPrefix) // Test storage key prefixes are also different suite.NotEqual(feegrant.FeeAllowanceKeyPrefix, feegrant.DIDFeeAllowanceKeyPrefix) // Regular grants use 0x00 prefix suite.Equal([]byte{0x00}, feegrant.FeeAllowanceKeyPrefix) // DID grants use 0x02 prefix suite.Equal([]byte{0x02}, feegrant.DIDFeeAllowanceKeyPrefix) } // TestMixedExpirationHandling tests that mixed regular and DID grants with different expiration times are handled correctly func (suite *KeeperTestSuite) TestMixedExpirationHandling() { now := suite.ctx.BlockTime() shortExpiry := now.Add(time.Hour) longExpiry := now.Add(24 * time.Hour) // Create regular grants with different expiry times regularGranter1 := suite.addrs[0] regularGrantee1 := suite.addrs[1] regularAllowanceShort := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &shortExpiry, } err := suite.feegrantKeeper.GrantAllowance(suite.ctx, regularGranter1, regularGrantee1, regularAllowanceShort) suite.NoError(err) regularGranter2 := suite.addrs[2] regularGrantee2 := suite.addrs[3] regularAllowanceLong := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &longExpiry, } err = suite.feegrantKeeper.GrantAllowance(suite.ctx, regularGranter2, regularGrantee2, regularAllowanceLong) suite.NoError(err) // Create DID grants with different expiry times didGranter1 := suite.addrs[4] testDID1 := "did:example:alice" didAllowanceShort := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &shortExpiry, } err = suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, didGranter1, testDID1, didAllowanceShort) suite.NoError(err) didGranter2 := suite.addrs[5] testDID2 := "did:example:bob" didAllowanceLong := &feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &longExpiry, } err = suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, didGranter2, testDID2, didAllowanceLong) suite.NoError(err) // Advance time to expire short-term grants but not long-term midCtx := suite.ctx.WithBlockTime(now.Add(2 * time.Hour)) // Remove expired regular grants err = suite.feegrantKeeper.RemoveExpiredAllowances(midCtx, 10) suite.NoError(err) // Short-term regular grant should be removed _, err = suite.feegrantKeeper.GetAllowance(midCtx, regularGranter1, regularGrantee1) suite.Error(err) // Long-term regular grant should still exist _, err = suite.feegrantKeeper.GetAllowance(midCtx, regularGranter2, regularGrantee2) suite.NoError(err) // DID grants should not be affected by regular grant cleanup _, err = suite.feegrantKeeper.GetDIDAllowance(midCtx, didGranter1, testDID1) suite.NoError(err) _, err = suite.feegrantKeeper.GetDIDAllowance(midCtx, didGranter2, testDID2) suite.NoError(err) // Now remove expired DID grants err = suite.feegrantKeeper.RemoveExpiredDIDAllowances(midCtx, 10) suite.NoError(err) // Short-term DID grant should be removed _, err = suite.feegrantKeeper.GetDIDAllowance(midCtx, didGranter1, testDID1) suite.Error(err) // Long-term DID grant should still exist _, err = suite.feegrantKeeper.GetDIDAllowance(midCtx, didGranter2, testDID2) suite.NoError(err) // Regular grants should not be affected by DID grant cleanup _, err = suite.feegrantKeeper.GetAllowance(midCtx, regularGranter2, regularGrantee2) suite.NoError(err) } // TestIterationSeparation tests that iteration functions only return their respective grant types func (suite *KeeperTestSuite) TestIterationSeparation() { // Create mixed grants regularGranter := suite.addrs[0] regularGrantee := suite.addrs[1] regularAllowance := &feegrant.BasicAllowance{SpendLimit: suite.coins} err := suite.feegrantKeeper.GrantAllowance(suite.ctx, regularGranter, regularGrantee, regularAllowance) suite.NoError(err) didGranter := suite.addrs[2] testDID := "did:example:alice" didAllowance := &feegrant.BasicAllowance{SpendLimit: suite.coins} err = suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, didGranter, testDID, didAllowance) suite.NoError(err) // Test regular grant iteration only finds regular grants regularCount := 0 err = suite.feegrantKeeper.IterateAllFeeAllowances(suite.ctx, func(grant feegrant.Grant) bool { regularCount++ // Should be regular grant format - grantee is an address suite.Equal(regularGrantee.String(), grant.Grantee) suite.Equal(regularGranter.String(), grant.Granter) return true }) suite.NoError(err) suite.Equal(1, regularCount) // Test DID grant iteration only finds DID grants didCount := 0 err = suite.feegrantKeeper.IterateAllDIDAllowances(suite.ctx, func(grant feegrant.DIDGrant) bool { didCount++ // Should be DID grant format - grantee is a DID suite.Equal(testDID, grant.GranteeDid) suite.Equal(didGranter.String(), grant.Granter) return true }) suite.NoError(err) suite.Equal(1, didCount) } // TestGetFirstAvailableDIDGrant tests retrieving the first available grant for a DID func (suite *KeeperTestSuite) TestGetFirstAvailableDIDGrant() { testDID := "did:example:charlie" testCases := []struct { name string setupGrants func() expectedError string validateGrant func(granter sdk.AccAddress, allowance feegrant.FeeAllowanceI) }{ { name: "no grants available", setupGrants: func() { // Don't create any grants }, expectedError: "no fee-grant found for DID", }, { name: "single grant available", setupGrants: func() { granter := suite.addrs[10] allowance := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)), } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, allowance) suite.NoError(err) }, validateGrant: func(granter sdk.AccAddress, allowance feegrant.FeeAllowanceI) { suite.Equal(suite.addrs[10], granter) basic, ok := allowance.(*feegrant.BasicAllowance) suite.True(ok) suite.Equal(sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)), basic.SpendLimit) }, }, { name: "multiple grants available - returns first one", setupGrants: func() { // Create multiple grants for the same DID granter1 := suite.addrs[11] allowance1 := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 500)), } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter1, testDID, allowance1) suite.NoError(err) granter2 := suite.addrs[12] allowance2 := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 2000)), } err = suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter2, testDID, allowance2) suite.NoError(err) }, validateGrant: func(granter sdk.AccAddress, allowance feegrant.FeeAllowanceI) { // Should return one of the grants suite.NotNil(granter) suite.NotNil(allowance) }, }, } for _, tc := range testCases { tc := tc suite.Run(tc.name, func() { suite.SetupTest() if tc.setupGrants != nil { tc.setupGrants() } granter, allowance, err := suite.feegrantKeeper.GetFirstAvailableDIDGrant(suite.ctx, testDID) if tc.expectedError != "" { suite.Error(err) suite.Contains(err.Error(), tc.expectedError) suite.Nil(granter) suite.Nil(allowance) return } suite.NoError(err) if tc.validateGrant != nil { tc.validateGrant(granter, allowance) } }) } } // TestUseFirstAvailableDIDGrant tests using the first available grant for a DID func (suite *KeeperTestSuite) TestUseFirstAvailableDIDGrant() { testDID := "did:example:dave" testCases := []struct { name string setupGrants func() fee sdk.Coins expectedError string validateAfter func() }{ { name: "no grants available", setupGrants: func() { // Don't create any grants }, fee: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), expectedError: "no usable fee-grant found for DID", }, { name: "single grant - successful use", setupGrants: func() { granter := suite.addrs[13] allowance := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)), } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, allowance) suite.NoError(err) }, fee: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), validateAfter: func() { // Grant should still exist with reduced spend limit allowance, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, suite.addrs[13], testDID) suite.NoError(err) basic, ok := allowance.(*feegrant.BasicAllowance) suite.True(ok) suite.Equal(sdk.NewCoins(sdk.NewInt64Coin("uopen", 900)), basic.SpendLimit) }, }, { name: "single grant - depletes allowance completely", setupGrants: func() { granter := suite.addrs[14] allowance := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, allowance) suite.NoError(err) }, fee: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), validateAfter: func() { // Grant should be removed when fully depleted _, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, suite.addrs[14], testDID) suite.Error(err) suite.Contains(err.Error(), "not found") }, }, { name: "single grant - fee exceeds limit", setupGrants: func() { granter := suite.addrs[15] allowance := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 50)), } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, allowance) suite.NoError(err) }, fee: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), expectedError: "no usable fee-grant found for DID", }, { name: "multiple grants - first one insufficient, second one works", setupGrants: func() { // First grant with insufficient limit granter1 := suite.addrs[16] allowance1 := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 50)), } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter1, testDID, allowance1) suite.NoError(err) // Second grant with sufficient limit granter2 := suite.addrs[17] allowance2 := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)), } err = suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter2, testDID, allowance2) suite.NoError(err) }, fee: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), validateAfter: func() { // First grant should still exist (wasn't used) allowance1, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, suite.addrs[16], testDID) suite.NoError(err) basic1, ok := allowance1.(*feegrant.BasicAllowance) suite.True(ok) suite.Equal(sdk.NewCoins(sdk.NewInt64Coin("uopen", 50)), basic1.SpendLimit) // Second grant should have reduced limit allowance2, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, suite.addrs[17], testDID) suite.NoError(err) basic2, ok := allowance2.(*feegrant.BasicAllowance) suite.True(ok) suite.Equal(sdk.NewCoins(sdk.NewInt64Coin("uopen", 900)), basic2.SpendLimit) }, }, { name: "expired grant - should be skipped and removed", setupGrants: func() { now := suite.ctx.BlockTime() futureExpiry := now.Add(time.Hour) granter := suite.addrs[18] allowance := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)), Expiration: &futureExpiry, } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter, testDID, allowance) suite.NoError(err) // Advance time to make it expired suite.ctx = suite.ctx.WithBlockTime(now.Add(2 * time.Hour)) }, fee: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), expectedError: "no usable fee-grant found for DID", validateAfter: func() { // Expired grant should be removed _, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, suite.addrs[18], testDID) suite.Error(err) suite.Contains(err.Error(), "not found") }, }, { name: "mixed grants - expired first, valid second", setupGrants: func() { now := suite.ctx.BlockTime() futureExpiry := now.Add(time.Hour) // First grant - will be expired (using lower index so it comes first in iteration) granter1 := suite.addrs[7] allowance1 := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)), Expiration: &futureExpiry, } err := suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter1, testDID, allowance1) suite.NoError(err) // Second grant - valid (no expiration, using higher index so it comes second in iteration) granter2 := suite.addrs[19] allowance2 := &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("uopen", 1000)), } err = suite.feegrantKeeper.GrantDIDAllowance(suite.ctx, granter2, testDID, allowance2) suite.NoError(err) // Advance time to make first grant expired suite.ctx = suite.ctx.WithBlockTime(now.Add(2 * time.Hour)) }, fee: sdk.NewCoins(sdk.NewInt64Coin("uopen", 100)), validateAfter: func() { // First grant should be removed (expired) _, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, suite.addrs[7], testDID) suite.Error(err) suite.Contains(err.Error(), "not found") // Second grant should have reduced limit allowance2, err := suite.feegrantKeeper.GetDIDAllowance(suite.ctx, suite.addrs[19], testDID) suite.NoError(err) basic2, ok := allowance2.(*feegrant.BasicAllowance) suite.True(ok) suite.Equal(sdk.NewCoins(sdk.NewInt64Coin("uopen", 900)), basic2.SpendLimit) }, }, } for _, tc := range testCases { tc := tc suite.Run(tc.name, func() { suite.SetupTest() if tc.setupGrants != nil { tc.setupGrants() } granter, err := suite.feegrantKeeper.UseFirstAvailableDIDGrant(suite.ctx, testDID, tc.fee, []sdk.Msg{}) if tc.expectedError != "" { suite.Error(err) suite.Contains(err.Error(), tc.expectedError) suite.Nil(granter) return } suite.NoError(err) suite.NotNil(granter) if tc.validateAfter != nil { tc.validateAfter() } }) } } ================================================ FILE: x/feegrant/keeper/migrations.go ================================================ package keeper import ( v2 "github.com/sourcenetwork/sourcehub/x/feegrant/migrations/v2" sdk "github.com/cosmos/cosmos-sdk/types" ) // Migrator is a struct for handling in-place store migrations. type Migrator struct { keeper Keeper } // NewMigrator returns a new Migrator. func NewMigrator(keeper Keeper) Migrator { return Migrator{keeper: keeper} } // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { return v2.MigrateStore(ctx, m.keeper.storeService, m.keeper.cdc) } ================================================ FILE: x/feegrant/keeper/msg_server.go ================================================ package keeper import ( "context" "strings" errorsmod "cosmossdk.io/errors" "github.com/sourcenetwork/sourcehub/x/feegrant" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) type msgServer struct { Keeper } // NewMsgServerImpl returns an implementation of the feegrant MsgServer interface // for the provided Keeper. func NewMsgServerImpl(k Keeper) feegrant.MsgServer { return &msgServer{ Keeper: k, } } var _ feegrant.MsgServer = msgServer{} // GrantAllowance grants an allowance from the granter's funds to be used by the grantee. func (k msgServer) GrantAllowance(goCtx context.Context, msg *feegrant.MsgGrantAllowance) (*feegrant.MsgGrantAllowanceResponse, error) { if strings.EqualFold(msg.Grantee, msg.Granter) { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "cannot self-grant fee authorization") } ctx := sdk.UnwrapSDKContext(goCtx) grantee, err := k.authKeeper.AddressCodec().StringToBytes(msg.Grantee) if err != nil { return nil, err } granter, err := k.authKeeper.AddressCodec().StringToBytes(msg.Granter) if err != nil { return nil, err } if f, _ := k.GetAllowance(ctx, granter, grantee); f != nil { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "fee allowance already exists") } allowance, err := msg.GetFeeAllowanceI() if err != nil { return nil, err } if err := allowance.ValidateBasic(); err != nil { return nil, err } err = k.Keeper.GrantAllowance(ctx, granter, grantee, allowance) if err != nil { return nil, err } return &feegrant.MsgGrantAllowanceResponse{}, nil } // RevokeAllowance revokes a fee allowance between a granter and grantee. func (k msgServer) RevokeAllowance(goCtx context.Context, msg *feegrant.MsgRevokeAllowance) (*feegrant.MsgRevokeAllowanceResponse, error) { if msg.Grantee == msg.Granter { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "addresses must be different") } ctx := sdk.UnwrapSDKContext(goCtx) grantee, err := k.authKeeper.AddressCodec().StringToBytes(msg.Grantee) if err != nil { return nil, err } granter, err := k.authKeeper.AddressCodec().StringToBytes(msg.Granter) if err != nil { return nil, err } err = k.Keeper.revokeAllowance(ctx, granter, grantee) if err != nil { return nil, err } return &feegrant.MsgRevokeAllowanceResponse{}, nil } // PruneAllowances removes expired allowances from the store. func (k msgServer) PruneAllowances(ctx context.Context, req *feegrant.MsgPruneAllowances) (*feegrant.MsgPruneAllowancesResponse, error) { // 75 is an arbitrary value, we can change it later if needed err := k.RemoveExpiredAllowances(ctx, 75) if err != nil { return nil, err } sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypePruneFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyPruner, req.Pruner), ), ) return &feegrant.MsgPruneAllowancesResponse{}, nil } // GrantDIDAllowance grants an allowance from the granter's funds to be used by a DID. func (k msgServer) GrantDIDAllowance( goCtx context.Context, msg *feegrant.MsgGrantDIDAllowance, ) (*feegrant.MsgGrantDIDAllowanceResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) granter, err := k.authKeeper.AddressCodec().StringToBytes(msg.Granter) if err != nil { return nil, err } // Check if DID allowance already exists if existingAllowance, _ := k.GetDIDAllowance(ctx, granter, msg.GranteeDid); existingAllowance != nil { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "DID allowance already exists") } allowance, err := msg.GetFeeAllowanceI() if err != nil { return nil, err } if err := allowance.ValidateBasic(); err != nil { return nil, err } err = k.Keeper.GrantDIDAllowance(ctx, granter, msg.GranteeDid, allowance) if err != nil { return nil, err } return &feegrant.MsgGrantDIDAllowanceResponse{}, nil } // ExpireDIDAllowance expires a periodic allowance by setting the expiration to current PeriodReset. func (k msgServer) ExpireDIDAllowance( goCtx context.Context, msg *feegrant.MsgExpireDIDAllowance, ) (*feegrant.MsgExpireDIDAllowanceResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) granter, err := k.authKeeper.AddressCodec().StringToBytes(msg.Granter) if err != nil { return nil, err } err = k.Keeper.ExpireDIDAllowance(ctx, granter, msg.GranteeDid) if err != nil { return nil, err } return &feegrant.MsgExpireDIDAllowanceResponse{}, nil } // PruneDIDAllowances removes expired DID allowances from the store. func (k msgServer) PruneDIDAllowances(ctx context.Context, req *feegrant.MsgPruneDIDAllowances) (*feegrant.MsgPruneDIDAllowancesResponse, error) { // 75 is an arbitrary value, we can change it later if needed err := k.RemoveExpiredDIDAllowances(ctx, 75) if err != nil { return nil, err } sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypePruneDIDFeeGrant, sdk.NewAttribute(feegrant.AttributeKeyPruner, req.Pruner), ), ) return &feegrant.MsgPruneDIDAllowancesResponse{}, nil } ================================================ FILE: x/feegrant/keeper/msg_server_test.go ================================================ package keeper_test import ( "fmt" "time" "github.com/golang/mock/gomock" "github.com/sourcenetwork/sourcehub/x/feegrant" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func (suite *KeeperTestSuite) TestGrantAllowance() { ctx := suite.ctx.WithBlockTime(time.Now()) oneYear := ctx.BlockTime().AddDate(1, 0, 0) yesterday := ctx.BlockTime().AddDate(0, 0, -1) addressCodec := codecaddress.NewBech32Codec("cosmos") testCases := []struct { name string req func() *feegrant.MsgGrantAllowance expectErr bool errMsg string }{ { "invalid granter address", func() *feegrant.MsgGrantAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{}) suite.Require().NoError(err) invalid := "invalid-granter" return &feegrant.MsgGrantAllowance{ Granter: invalid, Grantee: suite.addrs[1].String(), Allowance: any, } }, true, "decoding bech32 failed", }, { "invalid grantee address", func() *feegrant.MsgGrantAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{}) suite.Require().NoError(err) invalid := "invalid-grantee" return &feegrant.MsgGrantAllowance{ Granter: suite.addrs[0].String(), Grantee: invalid, Allowance: any, } }, true, "decoding bech32 failed", }, { "valid: grantee account doesn't exist", func() *feegrant.MsgGrantAllowance { grantee := "cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5" granteeAccAddr, err := addressCodec.StringToBytes(grantee) suite.Require().NoError(err) any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }) suite.Require().NoError(err) suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), granteeAccAddr).Return(nil).AnyTimes() acc := authtypes.NewBaseAccountWithAddress(granteeAccAddr) add, err := addressCodec.StringToBytes(grantee) suite.Require().NoError(err) suite.accountKeeper.EXPECT().NewAccountWithAddress(gomock.Any(), add).Return(acc).AnyTimes() suite.accountKeeper.EXPECT().SetAccount(gomock.Any(), acc).Return() suite.Require().NoError(err) return &feegrant.MsgGrantAllowance{ Granter: suite.addrs[0].String(), Grantee: grantee, Allowance: any, } }, false, "", }, { "invalid: past expiry", func() *feegrant.MsgGrantAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &yesterday, }) suite.Require().NoError(err) return &feegrant.MsgGrantAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), Allowance: any, } }, true, "expiration is before current block time", }, { "valid: basic fee allowance", func() *feegrant.MsgGrantAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }) suite.Require().NoError(err) return &feegrant.MsgGrantAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), Allowance: any, } }, false, "", }, { "fail: fee allowance exists", func() *feegrant.MsgGrantAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }) suite.Require().NoError(err) return &feegrant.MsgGrantAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), Allowance: any, } }, true, "fee allowance already exists", }, { "valid: periodic fee allowance", func() *feegrant.MsgGrantAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }, PeriodSpendLimit: suite.coins, }) suite.Require().NoError(err) return &feegrant.MsgGrantAllowance{ Granter: suite.addrs[1].String(), Grantee: suite.addrs[2].String(), Allowance: any, } }, false, "", }, { "error: fee allowance exists", func() *feegrant.MsgGrantAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }, PeriodSpendLimit: suite.coins, }) suite.Require().NoError(err) return &feegrant.MsgGrantAllowance{ Granter: suite.addrs[1].String(), Grantee: suite.addrs[2].String(), Allowance: any, } }, true, "fee allowance already exists", }, } for _, tc := range testCases { suite.Run(tc.name, func() { _, err := suite.msgSrvr.GrantAllowance(ctx, tc.req()) if tc.expectErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.errMsg) } }) } } func (suite *KeeperTestSuite) TestRevokeAllowance() { oneYear := suite.ctx.BlockTime().AddDate(1, 0, 0) testCases := []struct { name string request *feegrant.MsgRevokeAllowance preRun func() expectErr bool errMsg string }{ { "error: invalid granter", &feegrant.MsgRevokeAllowance{ Granter: invalidGranter, Grantee: suite.addrs[1].String(), }, func() {}, true, "decoding bech32 failed", }, { "error: invalid grantee", &feegrant.MsgRevokeAllowance{ Granter: suite.addrs[0].String(), Grantee: invalidGrantee, }, func() {}, true, "decoding bech32 failed", }, { "error: fee allowance not found", &feegrant.MsgRevokeAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }, func() {}, true, "fee-grant not found", }, { "success: revoke fee allowance", &feegrant.MsgRevokeAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }, func() { // removing fee allowance from previous tests if exists suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }) any, err := codectypes.NewAnyWithValue(&feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }, PeriodSpendLimit: suite.coins, }) suite.Require().NoError(err) req := &feegrant.MsgGrantAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), Allowance: any, } _, err = suite.msgSrvr.GrantAllowance(suite.ctx, req) suite.Require().NoError(err) }, false, "", }, { "error: check fee allowance revoked", &feegrant.MsgRevokeAllowance{ Granter: suite.addrs[0].String(), Grantee: suite.addrs[1].String(), }, func() {}, true, "fee-grant not found", }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() _, err := suite.msgSrvr.RevokeAllowance(suite.ctx, tc.request) if tc.expectErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.errMsg) } }) } } func (suite *KeeperTestSuite) TestPruneAllowances() { ctx := suite.ctx.WithBlockTime(time.Now()) oneYear := ctx.BlockTime().AddDate(1, 0, 0) // We create 76 allowances, all expiring in one year count := 0 for i := 0; i < len(suite.addrs); i++ { for j := 0; j < len(suite.addrs); j++ { if count == 76 { break } if suite.addrs[i].String() == suite.addrs[j].String() { continue } any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }) suite.Require().NoError(err) req := &feegrant.MsgGrantAllowance{ Granter: suite.addrs[i].String(), Grantee: suite.addrs[j].String(), Allowance: any, } _, err = suite.msgSrvr.GrantAllowance(ctx, req) if err != nil { // do not fail, just try with another pair continue } count++ } } // we have 76 allowances count = 0 err := suite.feegrantKeeper.IterateAllFeeAllowances(ctx, func(grant feegrant.Grant) bool { count++ return false }) suite.Require().NoError(err) suite.Require().Equal(76, count) // after a year and one day passes, they are all expired oneYearAndADay := ctx.BlockTime().AddDate(1, 0, 1) ctx = suite.ctx.WithBlockTime(oneYearAndADay) // we prune them, but currently only 75 will be pruned _, err = suite.msgSrvr.PruneAllowances(ctx, &feegrant.MsgPruneAllowances{}) suite.Require().NoError(err) // we have 1 allowance left count = 0 err = suite.feegrantKeeper.IterateAllFeeAllowances(ctx, func(grant feegrant.Grant) bool { count++ return false }) suite.Require().NoError(err) suite.Require().Equal(1, count) } func (suite *KeeperTestSuite) TestGrantDIDAllowance() { ctx := suite.ctx.WithBlockTime(time.Now()) oneYear := ctx.BlockTime().AddDate(1, 0, 0) testCases := []struct { name string req func() *feegrant.MsgGrantDIDAllowance expectErr bool errMsg string preRun func() }{ { "valid DID allowance grant", func() *feegrant.MsgGrantDIDAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }) suite.Require().NoError(err) return &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[0].String(), GranteeDid: "did:example:bob", Allowance: any, } }, false, "", func() {}, }, { "invalid granter address", func() *feegrant.MsgGrantDIDAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, }) suite.Require().NoError(err) return &feegrant.MsgGrantDIDAllowance{ Granter: "invalid", GranteeDid: "did:example:alice", Allowance: any, } }, true, "decoding bech32 failed", func() {}, }, { "empty DID", func() *feegrant.MsgGrantDIDAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, }) suite.Require().NoError(err) return &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[0].String(), GranteeDid: "", Allowance: any, } }, true, "invalid DID", func() {}, }, { "duplicate DID allowance", func() *feegrant.MsgGrantDIDAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, }) suite.Require().NoError(err) return &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[1].String(), GranteeDid: "did:example:bob", Allowance: any, } }, true, "DID allowance already exists", func() { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, }) suite.Require().NoError(err) req := &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[1].String(), GranteeDid: "did:example:bob", Allowance: any, } _, err = suite.msgSrvr.GrantDIDAllowance(ctx, req) suite.Require().NoError(err) }, }, { "invalid DID - no colon", func() *feegrant.MsgGrantDIDAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, }) suite.Require().NoError(err) return &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[0].String(), GranteeDid: "invalid-did-format", Allowance: any, } }, true, "invalid DID", func() {}, }, { "invalid DID - wrong prefix", func() *feegrant.MsgGrantDIDAllowance { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, }) suite.Require().NoError(err) return &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[0].String(), GranteeDid: "notdid:example:alice", Allowance: any, } }, true, "invalid DID", func() {}, }, { "DID allowance with past expiration", func() *feegrant.MsgGrantDIDAllowance { yesterday := ctx.BlockTime().AddDate(0, 0, -1) any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &yesterday, }) suite.Require().NoError(err) return &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[0].String(), GranteeDid: "did:example:future", Allowance: any, } }, true, "expiration is before current block time", func() {}, }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() req := tc.req() // Call ValidateBasic first if err := req.ValidateBasic(); err != nil { if tc.expectErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.errMsg) return } else { suite.Require().NoError(err) } } _, err := suite.msgSrvr.GrantDIDAllowance(ctx, req) if tc.expectErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.errMsg) } else { suite.Require().NoError(err) } }) } } func (suite *KeeperTestSuite) TestExpireDIDAllowance() { ctx := suite.ctx.WithBlockTime(time.Now()) oneYear := ctx.BlockTime().AddDate(1, 0, 0) testCases := []struct { name string req func() *feegrant.MsgExpireDIDAllowance preRun func() expectErr bool errMsg string }{ { "invalid granter address", func() *feegrant.MsgExpireDIDAllowance { return &feegrant.MsgExpireDIDAllowance{ Granter: "invalid", GranteeDid: "did:example:alice", } }, func() {}, true, "decoding bech32 failed", }, { "empty DID", func() *feegrant.MsgExpireDIDAllowance { return &feegrant.MsgExpireDIDAllowance{ Granter: suite.addrs[0].String(), GranteeDid: "", } }, func() {}, true, "invalid DID", }, { "DID allowance not found", func() *feegrant.MsgExpireDIDAllowance { return &feegrant.MsgExpireDIDAllowance{ Granter: suite.addrs[0].String(), GranteeDid: "did:example:bob", } }, func() {}, true, "not found", }, { "success: expire DID allowance", func() *feegrant.MsgExpireDIDAllowance { return &feegrant.MsgExpireDIDAllowance{ Granter: suite.addrs[2].String(), GranteeDid: "did:example:bob", } }, func() { any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }) suite.Require().NoError(err) req := &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[2].String(), GranteeDid: "did:example:bob", Allowance: any, } _, err = suite.msgSrvr.GrantDIDAllowance(ctx, req) suite.Require().NoError(err) }, false, "", }, { "error: check DID allowance expired", func() *feegrant.MsgExpireDIDAllowance { return &feegrant.MsgExpireDIDAllowance{ Granter: suite.addrs[2].String(), GranteeDid: "did:example:bob", } }, func() {}, false, "", }, } for _, tc := range testCases { suite.Run(tc.name, func() { tc.preRun() req := tc.req() // Call ValidateBasic first if err := req.ValidateBasic(); err != nil { if tc.expectErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.errMsg) return } suite.Require().NoError(err) } _, err := suite.msgSrvr.ExpireDIDAllowance(ctx, req) if tc.expectErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.errMsg) } else { suite.Require().NoError(err) } }) } } func (suite *KeeperTestSuite) TestPruneDIDAllowances() { ctx := suite.ctx.WithBlockTime(time.Now()) oneYear := ctx.BlockTime().AddDate(1, 0, 0) // We create 100 DID allowances, all expiring in one year count := 0 for i := 0; i < len(suite.addrs) && count < 100; i++ { did := fmt.Sprintf("did:example:test%d", i) any, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{ SpendLimit: suite.coins, Expiration: &oneYear, }) suite.Require().NoError(err) req := &feegrant.MsgGrantDIDAllowance{ Granter: suite.addrs[i].String(), GranteeDid: did, Allowance: any, } _, err = suite.msgSrvr.GrantDIDAllowance(ctx, req) if err != nil { // do not fail, just try with another address continue } count++ } // we have some DID allowances countBefore := 0 err := suite.feegrantKeeper.IterateAllDIDAllowances(ctx, func(grant feegrant.DIDGrant) bool { countBefore++ return false }) suite.Require().NoError(err) suite.Require().True(countBefore >= count) // after a year and one day passes, they are all expired oneYearAndADay := ctx.BlockTime().AddDate(1, 0, 1) ctx = suite.ctx.WithBlockTime(oneYearAndADay) // we prune them, currently up to 75 will be pruned (same as regular allowances) _, err = suite.msgSrvr.PruneDIDAllowances(ctx, &feegrant.MsgPruneDIDAllowances{ Pruner: suite.addrs[0].String(), }) suite.Require().NoError(err) // count remaining DID allowances after pruning countAfter := 0 err = suite.feegrantKeeper.IterateAllDIDAllowances(ctx, func(grant feegrant.DIDGrant) bool { countAfter++ return false }) suite.Require().NoError(err) // Verify that some allowances were pruned (should be fewer than before) suite.Require().True(countAfter < countBefore, "some DID allowances should have been pruned") } ================================================ FILE: x/feegrant/key.go ================================================ package feegrant import ( time "time" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" ) const ( // ModuleName is the module name constant used in many places ModuleName = "feegrant" // StoreKey is the store key string for supply StoreKey = ModuleName // RouterKey is the message route for supply RouterKey = ModuleName // QuerierRoute is the querier route for supply QuerierRoute = ModuleName ) var ( // FeeAllowanceKeyPrefix is the set of the kvstore for fee allowance data // - 0x00: allowance FeeAllowanceKeyPrefix = []byte{0x00} // FeeAllowanceQueueKeyPrefix is the set of the kvstore for fee allowance keys data // - 0x01: FeeAllowanceQueueKeyPrefix = []byte{0x01} // DIDFeeAllowanceKeyPrefix is the set of the kvstore for DID fee allowance data // - 0x02: did_allowance DIDFeeAllowanceKeyPrefix = []byte{0x02} // DIDFeeAllowanceQueueKeyPrefix is the set of the kvstore for DID fee allowance expiration queue // - 0x03: DIDFeeAllowanceQueueKeyPrefix = []byte{0x03} ) // FeeAllowanceKey is the canonical key to store a grant from granter to grantee // We store by grantee first to allow searching by everyone who granted to you // // Key format: // - <0x00> func FeeAllowanceKey(granter, grantee sdk.AccAddress) []byte { return append(FeeAllowancePrefixByGrantee(grantee), address.MustLengthPrefix(granter.Bytes())...) } // FeeAllowanceByDIDKey is the canonical key to store a grant from granter to DID // We store by DID first to allow searching by DID // // Key format: // - <0x02> func FeeAllowanceByDIDKey(granter sdk.AccAddress, did string) []byte { return append(FeeAllowancePrefixByDID(did), address.MustLengthPrefix(granter.Bytes())...) } // FeeAllowancePrefixByGrantee returns a prefix to scan for all grants to this given address. // // Key format: // - <0x00> func FeeAllowancePrefixByGrantee(grantee sdk.AccAddress) []byte { return append(FeeAllowanceKeyPrefix, address.MustLengthPrefix(grantee.Bytes())...) } // FeeAllowancePrefixByDID returns a prefix to scan for all grants to this given DID. // // Key format: // - <0x02> func FeeAllowancePrefixByDID(did string) []byte { didBytes := []byte(did) return append(DIDFeeAllowanceKeyPrefix, address.MustLengthPrefix(didBytes)...) } // FeeAllowancePrefixQueue is the canonical key to store grant key. // // Key format: // - <0x01> func FeeAllowancePrefixQueue(exp *time.Time, key []byte) []byte { allowanceByExpTimeKey := AllowanceByExpTimeKey(exp) return append(allowanceByExpTimeKey, key...) } // AllowanceByExpTimeKey returns a key with `FeeAllowanceQueueKeyPrefix`, expiry // // Key format: // - <0x01> func AllowanceByExpTimeKey(exp *time.Time) []byte { // no need of appending len(exp_bytes) here, `FormatTimeBytes` gives const length everytime. return append(FeeAllowanceQueueKeyPrefix, sdk.FormatTimeBytes(*exp)...) } // DIDFeeAllowancePrefixQueue is the canonical key to store DID grant key. // // Key format: // - <0x03> func DIDFeeAllowancePrefixQueue(exp *time.Time, key []byte) []byte { allowanceByExpTimeKey := DIDAllowanceByExpTimeKey(exp) return append(allowanceByExpTimeKey, key...) } // DIDAllowanceByExpTimeKey returns a key with `DIDFeeAllowanceQueueKeyPrefix`, expiry // // Key format: // - <0x03> func DIDAllowanceByExpTimeKey(exp *time.Time) []byte { // no need of appending len(exp_bytes) here, `FormatTimeBytes` gives const length everytime. return append(DIDFeeAllowanceQueueKeyPrefix, sdk.FormatTimeBytes(*exp)...) } // ParseAddressesFromFeeAllowanceKey extracts and returns the granter, grantee from the given key. func ParseAddressesFromFeeAllowanceKey(key []byte) (granter, grantee []byte) { // key is of format: // 0x00 granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 1, 1) // ignore key[0] since it is a prefix key grantee, granterAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) granteeAddrLen, granteeAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrEndIndex+1, 1) granter, _ = sdk.ParseLengthPrefixedBytes(key, granteeAddrLenEndIndex+1, int(granteeAddrLen[0])) return granter, grantee } // ParseAddressesFromFeeAllowanceQueueKey extracts and returns the granter, grantee from the given key. func ParseAddressesFromFeeAllowanceQueueKey(key []byte) (granter, grantee []byte) { lenTime := len(sdk.FormatTimeBytes(time.Now())) // key is of format: // <0x01> granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 1+lenTime, 1) // ignore key[0] since it is a prefix key grantee, granterAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) granteeAddrLen, granteeAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrEndIndex+1, 1) granter, _ = sdk.ParseLengthPrefixedBytes(key, granteeAddrLenEndIndex+1, int(granteeAddrLen[0])) return granter, grantee } // ParseGranterDIDFromFeeAllowanceKey extracts and returns the granter address and DID from the given DID-based key. func ParseGranterDIDFromFeeAllowanceKey(key []byte) (granter []byte, did string) { // key is of format: // 0x02 didLen, didLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 1, 1) // ignore key[0] since it is a prefix key didBytes, granterAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, didLenEndIndex+1, int(didLen[0])) granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrEndIndex+1, 1) granter, _ = sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) return granter, string(didBytes) } // ParseGranterDIDFromDIDAllowanceQueueKey extracts and returns the granter address and DID from the given DID expiration queue key. func ParseGranterDIDFromDIDAllowanceQueueKey(key []byte) (granter []byte, did string) { lenTime := len(sdk.FormatTimeBytes(time.Now())) // key is of format: // <0x03> didLen, didLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 1+lenTime, 1) // ignore key[0] since it is a prefix key didBytes, granterAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, didLenEndIndex+1, int(didLen[0])) granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrEndIndex+1, 1) granter, _ = sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) return granter, string(didBytes) } ================================================ FILE: x/feegrant/key_test.go ================================================ package feegrant_test import ( "testing" "time" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/feegrant" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" ) func TestMarshalAndUnmarshalFeegrantKey(t *testing.T) { addressCodec := codecaddress.NewBech32Codec("source") grantee, err := addressCodec.StringToBytes("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) granter, err := addressCodec.StringToBytes("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) key := feegrant.FeeAllowanceKey(granter, grantee) require.Len(t, key, len(grantee)+len(granter)+3) require.Equal(t, feegrant.FeeAllowancePrefixByGrantee(grantee), key[:len(grantee)+2]) g1, g2 := feegrant.ParseAddressesFromFeeAllowanceKey(key) require.Equal(t, granter, g1) require.Equal(t, grantee, g2) } func TestMarshalAndUnmarshalFeegrantKeyQueueKey(t *testing.T) { addressCodec := codecaddress.NewBech32Codec("source") grantee, err := addressCodec.StringToBytes("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) granter, err := addressCodec.StringToBytes("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) exp := time.Now() expBytes := sdk.FormatTimeBytes(exp) key := feegrant.FeeAllowancePrefixQueue(&exp, feegrant.FeeAllowanceKey(granter, grantee)[1:]) require.Len(t, key, len(grantee)+len(granter)+3+len(expBytes)) granter1, grantee1 := feegrant.ParseAddressesFromFeeAllowanceQueueKey(key) require.Equal(t, granter, granter1) require.Equal(t, grantee, grantee1) } func TestMarshalAndUnmarshalDIDFeegrantKey(t *testing.T) { addressCodec := codecaddress.NewBech32Codec("source") granter, err := addressCodec.StringToBytes("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) testDID := "did:example:alice123" key := feegrant.FeeAllowanceByDIDKey(granter, testDID) require.Len(t, key, len(testDID)+len(granter)+3) require.Equal(t, feegrant.FeeAllowancePrefixByDID(testDID), key[:len(testDID)+2]) parsedGranter, parsedDID := feegrant.ParseGranterDIDFromFeeAllowanceKey(key) require.Equal(t, granter, parsedGranter) require.Equal(t, testDID, parsedDID) } func TestMarshalAndUnmarshalDIDFeegrantQueueKey(t *testing.T) { addressCodec := codecaddress.NewBech32Codec("source") granter, err := addressCodec.StringToBytes("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) testDID := "did:example:bob456" exp := time.Now() expBytes := sdk.FormatTimeBytes(exp) // Create the DID allowance key (without the prefix, as used in queue) didKey := feegrant.FeeAllowanceByDIDKey(granter, testDID)[1:] // Remove the 0x02 prefix queueKey := feegrant.DIDFeeAllowancePrefixQueue(&exp, didKey) require.Len(t, queueKey, len(testDID)+len(granter)+3+len(expBytes)) // 0x03 + exp + did_len + did + granter_len + granter parsedGranter, parsedDID := feegrant.ParseGranterDIDFromDIDAllowanceQueueKey(queueKey) require.Equal(t, granter, parsedGranter) require.Equal(t, testDID, parsedDID) } func TestDIDKeyPrefixes(t *testing.T) { require.Equal(t, []byte{0x00}, feegrant.FeeAllowanceKeyPrefix) require.Equal(t, []byte{0x01}, feegrant.FeeAllowanceQueueKeyPrefix) require.Equal(t, []byte{0x02}, feegrant.DIDFeeAllowanceKeyPrefix) require.Equal(t, []byte{0x03}, feegrant.DIDFeeAllowanceQueueKeyPrefix) prefixes := [][]byte{ feegrant.FeeAllowanceKeyPrefix, feegrant.FeeAllowanceQueueKeyPrefix, feegrant.DIDFeeAllowanceKeyPrefix, feegrant.DIDFeeAllowanceQueueKeyPrefix, } for i := 0; i < len(prefixes); i++ { for j := i + 1; j < len(prefixes); j++ { require.NotEqual(t, prefixes[i], prefixes[j], "Prefixes %d and %d should be different", i, j) } } } func TestDIDPrefixByDID(t *testing.T) { testDID := "did:example:bob" prefix := feegrant.FeeAllowancePrefixByDID(testDID) require.Equal(t, feegrant.DIDFeeAllowanceKeyPrefix[0], prefix[0]) require.Len(t, prefix, len(testDID)+2) didBytes := prefix[2:] require.Equal(t, testDID, string(didBytes)) } func TestDIDAllowanceByExpTimeKey(t *testing.T) { exp := time.Now() expKey := feegrant.DIDAllowanceByExpTimeKey(&exp) require.Equal(t, feegrant.DIDFeeAllowanceQueueKeyPrefix[0], expKey[0]) expBytes := sdk.FormatTimeBytes(exp) require.Len(t, expKey, 1+len(expBytes)) } func TestKeyFormatConsistency(t *testing.T) { addressCodec := codecaddress.NewBech32Codec("source") granter, err := addressCodec.StringToBytes("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) grantee, err := addressCodec.StringToBytes("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) testDID := "did:example:alice" regularKey := feegrant.FeeAllowanceKey(granter, grantee) require.Equal(t, feegrant.FeeAllowanceKeyPrefix[0], regularKey[0]) didKey := feegrant.FeeAllowanceByDIDKey(granter, testDID) require.Equal(t, feegrant.DIDFeeAllowanceKeyPrefix[0], didKey[0]) require.NotEqual(t, regularKey, didKey) parsedGranter1, parsedGrantee := feegrant.ParseAddressesFromFeeAllowanceKey(regularKey) require.Equal(t, granter, parsedGranter1) require.Equal(t, grantee, parsedGrantee) parsedGranter2, parsedDID := feegrant.ParseGranterDIDFromFeeAllowanceKey(didKey) require.Equal(t, granter, parsedGranter2) require.Equal(t, testDID, parsedDID) } ================================================ FILE: x/feegrant/migrations/v2/keys.go ================================================ package v2 import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" ) var ( ModuleName = "feegrant" // FeeAllowanceKeyPrefix is the set of the kvstore for fee allowance data // - 0x00: allowance FeeAllowanceKeyPrefix = []byte{0x00} // FeeAllowanceQueueKeyPrefix is the set of the kvstore for fee allowance keys data // - 0x01: FeeAllowanceQueueKeyPrefix = []byte{0x01} ) // FeeAllowancePrefixQueue is the canonical key to store grant key. // // Key format: // - <0x01> func FeeAllowancePrefixQueue(exp *time.Time, granterAddrBz []byte) []byte { // no need of appending len(exp_bytes) here, `FormatTimeBytes` gives const length everytime. var key []byte key = append(key, FeeAllowanceQueueKeyPrefix...) key = append(key, sdk.FormatTimeBytes(*exp)...) return append(key, granterAddrBz...) } // FeeAllowanceKey is the canonical key to store a grant from granter to grantee // We store by grantee first to allow searching by everyone who granted to you // // Key format: // - <0x00> func FeeAllowanceKey(granter, grantee sdk.AccAddress) []byte { return append(FeeAllowancePrefixByGrantee(grantee), address.MustLengthPrefix(granter.Bytes())...) } // FeeAllowancePrefixByGrantee returns a prefix to scan for all grants to this given address. // // Key format: // - <0x00> func FeeAllowancePrefixByGrantee(grantee sdk.AccAddress) []byte { return append(FeeAllowanceKeyPrefix, address.MustLengthPrefix(grantee.Bytes())...) } ================================================ FILE: x/feegrant/migrations/v2/store.go ================================================ package v2 import ( "context" "cosmossdk.io/core/store" "cosmossdk.io/store/prefix" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types" ) func addAllowancesByExpTimeQueue(ctx context.Context, store store.KVStore, cdc codec.BinaryCodec) error { prefixStore := prefix.NewStore(runtime.KVStoreAdapter(store), FeeAllowanceKeyPrefix) iterator := prefixStore.Iterator(nil, nil) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var grant feegrant.Grant bz := iterator.Value() if err := cdc.Unmarshal(bz, &grant); err != nil { return err } grantInfo, err := grant.GetGrant() if err != nil { return err } exp, err := grantInfo.ExpiresAt() if err != nil { return err } if exp != nil { // store key is not changed in 0.46 key := iterator.Key() if exp.Before(types.UnwrapSDKContext(ctx).BlockTime()) { prefixStore.Delete(key) } else { grantByExpTimeQueueKey := FeeAllowancePrefixQueue(exp, key) store.Set(grantByExpTimeQueueKey, []byte{}) } } } return nil } func MigrateStore(ctx context.Context, storeService store.KVStoreService, cdc codec.BinaryCodec) error { store := storeService.OpenKVStore(ctx) return addAllowancesByExpTimeQueue(ctx, store, cdc) } ================================================ FILE: x/feegrant/migrations/v2/store_test.go ================================================ package v2_test import ( "testing" "time" "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" v2 "github.com/sourcenetwork/sourcehub/x/feegrant/migrations/v2" "github.com/sourcenetwork/sourcehub/x/feegrant/module" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "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" ) func TestMigration(t *testing.T) { encodingConfig := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) cdc := encodingConfig.Codec feegrantKey := storetypes.NewKVStoreKey(v2.ModuleName) ctx := testutil.DefaultContext(feegrantKey, storetypes.NewTransientStoreKey("transient_test")) granter1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) grantee1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) granter2 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) grantee2 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) spendLimit := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(1000))) now := ctx.BlockTime() oneDay := now.AddDate(0, 0, 1) twoDays := now.AddDate(0, 0, 2) grants := []struct { granter sdk.AccAddress grantee sdk.AccAddress spendLimit sdk.Coins expiration *time.Time }{ { granter: granter1, grantee: grantee1, spendLimit: spendLimit, expiration: &twoDays, }, { granter: granter2, grantee: grantee2, spendLimit: spendLimit, expiration: &oneDay, }, { granter: granter1, grantee: grantee2, spendLimit: spendLimit, }, { granter: granter2, grantee: grantee1, expiration: &oneDay, }, } store := ctx.KVStore(feegrantKey) for _, grant := range grants { newGrant, err := feegrant.NewGrant(grant.granter, grant.grantee, &feegrant.BasicAllowance{ SpendLimit: grant.spendLimit, Expiration: grant.expiration, }) require.NoError(t, err) bz, err := cdc.Marshal(&newGrant) require.NoError(t, err) store.Set(v2.FeeAllowanceKey(grant.granter, grant.grantee), bz) } ctx = ctx.WithBlockTime(now.Add(30 * time.Hour)) require.NoError(t, v2.MigrateStore(ctx, runtime.NewKVStoreService(feegrantKey), cdc)) store = ctx.KVStore(feegrantKey) require.NotNil(t, store.Get(v2.FeeAllowanceKey(granter1, grantee1))) require.Nil(t, store.Get(v2.FeeAllowanceKey(granter2, grantee2))) require.NotNil(t, store.Get(v2.FeeAllowanceKey(granter1, grantee2))) require.Nil(t, store.Get(v2.FeeAllowanceKey(granter2, grantee1))) } ================================================ FILE: x/feegrant/module/abci.go ================================================ package module import ( "context" "errors" "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" ) func EndBlocker(ctx context.Context, k keeper.Keeper) error { // 200 is an arbitrary value, we can change it later if needed errAllowances := k.RemoveExpiredAllowances(ctx, 200) errDidAllowances := k.RemoveExpiredDIDAllowances(ctx, 200) return errors.Join(errAllowances, errDidAllowances) } ================================================ FILE: x/feegrant/module/abci_test.go ================================================ package module_test import ( "testing" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" "github.com/sourcenetwork/sourcehub/x/feegrant/module" feegranttestutil "github.com/sourcenetwork/sourcehub/x/feegrant/testutil" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" 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" ) func TestFeegrantPruning(t *testing.T) { key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) addrs := simtestutil.CreateIncrementalAccounts(4) granter1 := addrs[0] granter2 := addrs[1] granter3 := addrs[2] grantee := addrs[3] spendLimit := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(1000))) now := testCtx.Ctx.BlockTime() oneDay := now.AddDate(0, 0, 1) ctrl := gomock.NewController(t) accountKeeper := feegranttestutil.NewMockAccountKeeper(ctrl) accountKeeper.EXPECT().GetAccount(gomock.Any(), grantee).Return(authtypes.NewBaseAccountWithAddress(grantee)).AnyTimes() accountKeeper.EXPECT().GetAccount(gomock.Any(), granter1).Return(authtypes.NewBaseAccountWithAddress(granter1)).AnyTimes() accountKeeper.EXPECT().GetAccount(gomock.Any(), granter2).Return(authtypes.NewBaseAccountWithAddress(granter2)).AnyTimes() accountKeeper.EXPECT().GetAccount(gomock.Any(), granter3).Return(authtypes.NewBaseAccountWithAddress(granter3)).AnyTimes() accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() feegrantKeeper := keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), accountKeeper) feegrantKeeper.GrantAllowance( testCtx.Ctx, granter1, grantee, &feegrant.BasicAllowance{ Expiration: &now, }, ) feegrantKeeper.GrantAllowance( testCtx.Ctx, granter2, grantee, &feegrant.BasicAllowance{ SpendLimit: spendLimit, }, ) feegrantKeeper.GrantAllowance( testCtx.Ctx, granter3, grantee, &feegrant.BasicAllowance{ Expiration: &oneDay, }, ) queryHelper := baseapp.NewQueryServerTestHelper(testCtx.Ctx, encCfg.InterfaceRegistry) feegrant.RegisterQueryServer(queryHelper, feegrantKeeper) queryClient := feegrant.NewQueryClient(queryHelper) require.NoError(t, module.EndBlocker(testCtx.Ctx, feegrantKeeper)) res, err := queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{ Grantee: grantee.String(), }) require.NoError(t, err) require.NotNil(t, res) require.Len(t, res.Allowances, 3) testCtx.Ctx = testCtx.Ctx.WithBlockTime(now.AddDate(0, 0, 2)) module.EndBlocker(testCtx.Ctx, feegrantKeeper) res, err = queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{ Grantee: grantee.String(), }) require.NoError(t, err) require.NotNil(t, res) require.Len(t, res.Allowances, 1) } ================================================ FILE: x/feegrant/module/autocli.go ================================================ package module import ( "fmt" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "github.com/cosmos/cosmos-sdk/version" "github.com/sourcenetwork/sourcehub/x/feegrant" ) func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ Service: feegrant.Query_serviceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Allowance", Use: "grant [granter] [grantee]", Short: "Query details of a single grant", Long: "Query details for a grant. You can find the fee-grant of a granter and grantee.", Example: fmt.Sprintf(`$ %s query feegrant grant [granter] [grantee]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "granter"}, {ProtoField: "grantee"}, }, }, { RpcMethod: "Allowances", Use: "grants-by-grantee [grantee]", Short: "Query all grants of a grantee", Long: "Queries all the grants for a grantee address.", Example: fmt.Sprintf(`$ %s query feegrant grants-by-grantee [grantee]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "grantee"}, }, }, { RpcMethod: "AllowancesByGranter", Use: "grants-by-granter [granter]", Short: "Query all grants by a granter", Example: fmt.Sprintf(`$ %s query feegrant grants-by-granter [granter]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "granter"}, }, }, { RpcMethod: "DIDAllowance", Use: "did-grant [granter] [grantee-did]", Short: "Query details of a single DID grant", Long: "Query details for a DID grant. You can find the fee-grant of a granter and grantee DID.", Example: fmt.Sprintf(`$ %s query feegrant did-grant [granter] [grantee-did]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "granter"}, {ProtoField: "grantee_did"}, }, }, { RpcMethod: "DIDAllowances", Use: "did-grants-by-grantee [grantee-did]", Short: "Query all DID grants of a grantee DID", Long: "Queries all the DID grants for a grantee DID.", Example: fmt.Sprintf(`$ %s query feegrant did-grants-by-grantee [grantee-did]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "grantee_did"}, }, }, { RpcMethod: "DIDAllowancesByGranter", Use: "did-grants-by-granter [granter]", Short: "Query all DID grants by a granter", Long: "Queries all the DID grants issued by a granter address.", Example: fmt.Sprintf(`$ %s query feegrant did-grants-by-granter [granter]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "granter"}, }, }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: feegrant.Msg_serviceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "RevokeAllowance", Use: "revoke [granter] [grantee]", Short: "Revoke a fee grant", Long: "Revoke fee grant from a granter to a grantee. Note, the '--from' flag is ignored as it is implied from [granter]", Example: fmt.Sprintf(`$ %s tx feegrant revoke [granter] [grantee]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "granter"}, {ProtoField: "grantee"}, }, }, { RpcMethod: "PruneAllowances", Use: "prune", Short: "Prune expired allowances", Long: "Prune up to 75 expired allowances in order to reduce the size of the store when the number of expired allowances is large.", Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), }, { RpcMethod: "ExpireDIDAllowance", Use: "expire-did [granter] [grantee-did]", Short: "Expire a DID fee grant", Long: "Expire fee grant from a granter to a grantee DID. Note, the '--from' flag is ignored as it is implied from [granter]", Example: fmt.Sprintf(`$ %s tx feegrant expire-did [granter] [grantee-did]`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "granter"}, {ProtoField: "grantee_did"}, }, }, { RpcMethod: "PruneDIDAllowances", Use: "prune-did", Short: "Prune expired DID allowances", Long: "Prune expired DID allowances in order to reduce the size of the store when the number of expired DID allowances is large.", Example: fmt.Sprintf(`$ %s tx feegrant prune-did --from [mykey]`, version.AppName), }, }, EnhanceCustomCommand: true, }, } } ================================================ FILE: x/feegrant/module/module.go ================================================ package module import ( "context" "encoding/json" "fmt" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/errors" modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/feegrant/module/v1" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/client/cli" "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" "github.com/sourcenetwork/sourcehub/x/feegrant/simulation" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) var ( _ module.AppModuleBasic = AppModule{} _ module.AppModuleSimulation = AppModule{} _ module.HasServices = AppModule{} _ module.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasEndBlocker = AppModule{} ) // ---------------------------------------------------------------------------- // AppModuleBasic // ---------------------------------------------------------------------------- // AppModuleBasic defines the basic application module used by the feegrant module. type AppModuleBasic struct { cdc codec.Codec ac address.Codec } // Name returns the feegrant module's name. func (ab AppModuleBasic) Name() string { return feegrant.ModuleName } // RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { feegrant.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) feegrant.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := keeper.NewMigrator(am.keeper) err := cfg.RegisterMigration(feegrant.ModuleName, 1, m.Migrate1to2) if err != nil { panic(fmt.Sprintf("failed to migrate x/feegrant from version 1 to 2: %v", err)) } } // RegisterLegacyAminoCodec registers the feegrant module's types for the given codec. func (ab AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { feegrant.RegisterLegacyAminoCodec(cdc) } // RegisterInterfaces registers the feegrant module's interface types func (ab AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) { feegrant.RegisterInterfaces(registry) } // DefaultGenesis returns default genesis state as raw bytes for the feegrant // module. func (ab AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(feegrant.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the feegrant module. func (ab AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { var data feegrant.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return errors.Wrapf(err, "failed to unmarshal %s genesis state", feegrant.ModuleName) } return feegrant.ValidateGenesis(data) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the feegrant module. func (ab AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *gwruntime.ServeMux) { if err := feegrant.RegisterQueryHandlerClient(context.Background(), mux, feegrant.NewQueryClient(clientCtx)); err != nil { panic(err) } } // GetTxCmd returns the root tx command for the feegrant module. func (ab AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd(ab.ac) } // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- // AppModule implements an application module for the feegrant module. type AppModule struct { AppModuleBasic keeper keeper.Keeper accountKeeper feegrant.AccountKeeper bankKeeper feegrant.BankKeeper registry cdctypes.InterfaceRegistry } // NewAppModule creates a new AppModule object func NewAppModule(cdc codec.Codec, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, keeper keeper.Keeper, registry cdctypes.InterfaceRegistry) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc, ac: ak.AddressCodec()}, keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47 accountKeeper: ak, bankKeeper: bk, registry: registry, } } // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} // InitGenesis performs genesis initialization for the feegrant module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) { var gs feegrant.GenesisState cdc.MustUnmarshalJSON(bz, &gs) err := am.keeper.InitGenesis(ctx, &gs) if err != nil { panic(err) } } // ExportGenesis returns the exported genesis state as raw bytes for the feegrant // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { gs, err := am.keeper.ExportGenesis(ctx) if err != nil { panic(err) } return cdc.MustMarshalJSON(gs) } // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 2 } // EndBlock returns the end blocker for the feegrant module. It returns no validator // updates. func (am AppModule) EndBlock(ctx context.Context) error { return EndBlocker(ctx, am.keeper) } func init() { appmodule.Register(&modulev1.Module{}, appmodule.Provide(ProvideModule), ) } type FeegrantInputs struct { depinject.In StoreService store.KVStoreService Cdc codec.Codec AccountKeeper feegrant.AccountKeeper BankKeeper feegrant.BankKeeper Registry cdctypes.InterfaceRegistry } func ProvideModule(in FeegrantInputs) (keeper.Keeper, appmodule.AppModule) { k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper) m := NewAppModule(in.Cdc, in.AccountKeeper, in.BankKeeper, k, in.Registry) return k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, m } // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the feegrant module. func (AppModule) GenerateGenesisState(simState *module.SimulationState) { simulation.RandomizedGenState(simState) } // RegisterStoreDecoder registers a decoder for feegrant module's types func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { sdr[feegrant.StoreKey] = simulation.NewDecodeStore(am.cdc) } // WeightedOperations returns all the feegrant module operations with their respective weights. func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { return simulation.WeightedOperations( am.registry, simState.AppParams, simState.Cdc, simState.TxConfig, am.accountKeeper, am.bankKeeper, am.keeper, am.ac, ) } ================================================ FILE: x/feegrant/msgs.go ================================================ package feegrant import ( "github.com/cosmos/gogoproto/proto" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var ( _, _, _, _, _, _ sdk.Msg = &MsgGrantAllowance{}, &MsgRevokeAllowance{}, &MsgPruneAllowances{}, &MsgGrantDIDAllowance{}, &MsgExpireDIDAllowance{}, &MsgPruneDIDAllowances{} _, _ types.UnpackInterfacesMessage = &MsgGrantAllowance{}, &MsgGrantDIDAllowance{} ) // NewMsgGrantAllowance creates a new MsgGrantAllowance. func NewMsgGrantAllowance(feeAllowance FeeAllowanceI, granter, grantee sdk.AccAddress) (*MsgGrantAllowance, error) { msg, ok := feeAllowance.(proto.Message) if !ok { return nil, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", msg) } any, err := types.NewAnyWithValue(msg) if err != nil { return nil, err } return &MsgGrantAllowance{ Granter: granter.String(), Grantee: grantee.String(), Allowance: any, }, nil } // GetFeeAllowanceI returns unpacked FeeAllowance. func (msg MsgGrantAllowance) GetFeeAllowanceI() (FeeAllowanceI, error) { allowance, ok := msg.Allowance.GetCachedValue().(FeeAllowanceI) if !ok { return nil, errorsmod.Wrap(ErrNoAllowance, "failed to get allowance") } return allowance, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (msg MsgGrantAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error { var allowance FeeAllowanceI return unpacker.UnpackAny(msg.Allowance, &allowance) } // NewMsgRevokeAllowance returns a message to revoke a fee allowance for a given granter and grantee. func NewMsgRevokeAllowance(granter, grantee sdk.AccAddress) MsgRevokeAllowance { return MsgRevokeAllowance{Granter: granter.String(), Grantee: grantee.String()} } // NewMsgGrantDIDAllowance creates a new MsgGrantDIDAllowance. func NewMsgGrantDIDAllowance(feeAllowance FeeAllowanceI, granter sdk.AccAddress, granteeDID string) (*MsgGrantDIDAllowance, error) { msg, ok := feeAllowance.(proto.Message) if !ok { return nil, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", msg) } any, err := types.NewAnyWithValue(msg) if err != nil { return nil, err } return &MsgGrantDIDAllowance{ Granter: granter.String(), GranteeDid: granteeDID, Allowance: any, }, nil } // GetFeeAllowanceI returns unpacked FeeAllowance for DID grants. func (msg MsgGrantDIDAllowance) GetFeeAllowanceI() (FeeAllowanceI, error) { allowance, ok := msg.Allowance.GetCachedValue().(FeeAllowanceI) if !ok { return nil, errorsmod.Wrap(ErrNoAllowance, "failed to get allowance") } return allowance, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces for DID grants. func (msg MsgGrantDIDAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error { var allowance FeeAllowanceI return unpacker.UnpackAny(msg.Allowance, &allowance) } func (msg MsgGrantDIDAllowance) ValidateBasic() error { if msg.Granter == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "missing granter address") } if len(msg.GranteeDid) <= 4 || msg.GranteeDid[:4] != "did:" { return ErrInvalidDID } if msg.Allowance == nil { return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "missing allowance") } allowance, err := msg.GetFeeAllowanceI() if err != nil { return err } return allowance.ValidateBasic() } // NewMsgExpireDIDAllowance returns a message to expire a fee allowance for a given granter and DID. func NewMsgExpireDIDAllowance(granter sdk.AccAddress, granteeDID string) MsgExpireDIDAllowance { return MsgExpireDIDAllowance{Granter: granter.String(), GranteeDid: granteeDID} } // NewMsgPruneDIDAllowances returns a message to prune expired DID allowances. func NewMsgPruneDIDAllowances(pruner sdk.AccAddress) MsgPruneDIDAllowances { return MsgPruneDIDAllowances{Pruner: pruner.String()} } // ValidateBasic implements sdk.Msg func (msg MsgPruneDIDAllowances) ValidateBasic() error { if msg.Pruner == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "missing pruner address") } return nil } func (msg MsgExpireDIDAllowance) ValidateBasic() error { if msg.Granter == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "missing granter address") } if len(msg.GranteeDid) <= 4 || msg.GranteeDid[:4] != "did:" { return ErrInvalidDID } return nil } ================================================ FILE: x/feegrant/msgs_test.go ================================================ package feegrant_test import ( "testing" "github.com/stretchr/testify/require" "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/x/feegrant" "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/x/auth/migrations/legacytx" ) func TestAminoJSON(t *testing.T) { legacyAmino := codec.NewLegacyAmino() feegrant.RegisterLegacyAminoCodec(legacyAmino) legacytx.RegressionTestingAminoCodec = legacyAmino tx := legacytx.StdTx{} var msg sdk.Msg allowanceAny, err := codectypes.NewAnyWithValue(&feegrant.BasicAllowance{SpendLimit: sdk.NewCoins(sdk.NewCoin("foo", math.NewInt(100)))}) require.NoError(t, err) // Amino JSON encoding has changed in feegrant since v0.46. // Before, it was outputting something like: // `{"account_number":"1","chain_id":"foo","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[{"allowance":{"spend_limit":[{"amount":"100","denom":"foo"}]},"grantee":"cosmos1def","granter":"cosmos1abc"}],"sequence":"1","timeout_height":"1"}` // // This was a bug. Now, it's as below, See how there's `type` & `value` fields. // ref: https://github.com/cosmos/cosmos-sdk/issues/11190 // ref: https://github.com/cosmos/cosmjs/issues/1026 msg = &feegrant.MsgGrantAllowance{Granter: "cosmos1abc", Grantee: "cosmos1def", Allowance: allowanceAny} tx.Msgs = []sdk.Msg{msg} require.Equal(t, `{"account_number":"1","chain_id":"foo","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[{"type":"cosmos-sdk/MsgGrantAllowance","value":{"allowance":{"type":"cosmos-sdk/BasicAllowance","value":{"spend_limit":[{"amount":"100","denom":"foo"}]}},"grantee":"cosmos1def","granter":"cosmos1abc"}}],"sequence":"1","timeout_height":"1"}`, string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo")), ) msg = &feegrant.MsgRevokeAllowance{Granter: "cosmos1abc", Grantee: "cosmos1def"} tx.Msgs = []sdk.Msg{msg} require.Equal(t, `{"account_number":"1","chain_id":"foo","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[{"type":"cosmos-sdk/MsgRevokeAllowance","value":{"grantee":"cosmos1def","granter":"cosmos1abc"}}],"sequence":"1","timeout_height":"1"}`, string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo")), ) } ================================================ FILE: x/feegrant/periodic_fee.go ================================================ package feegrant import ( "context" "time" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ FeeAllowanceI = (*PeriodicAllowance)(nil) // Accept can use fee payment requested as well as timestamp of the current block // to determine whether or not to process this. This is checked in // Keeper.UseGrantedFees and the return values should match how it is handled there. // // If it returns an error, the fee payment is rejected, otherwise it is accepted. // The FeeAllowance implementation is expected to update it's internal state // and will be saved again after an acceptance. // // If remove is true (regardless of the error), the FeeAllowance will be deleted from storage // (eg. when it is used up). (See call to RevokeAllowance in Keeper.UseGrantedFees) func (a *PeriodicAllowance) Accept(ctx context.Context, fee sdk.Coins, _ []sdk.Msg) (bool, error) { blockTime := sdk.UnwrapSDKContext(ctx).BlockTime() if a.Basic.Expiration != nil && blockTime.After(*a.Basic.Expiration) { return true, errorsmod.Wrap(ErrFeeLimitExpired, "absolute limit") } a.tryResetPeriod(blockTime) // deduct from both the current period and the max amount var isNeg bool a.PeriodCanSpend, isNeg = a.PeriodCanSpend.SafeSub(fee...) if isNeg { return false, errorsmod.Wrap(ErrFeeLimitExceeded, "period limit") } if a.Basic.SpendLimit != nil { a.Basic.SpendLimit, isNeg = a.Basic.SpendLimit.SafeSub(fee...) if isNeg { return false, errorsmod.Wrap(ErrFeeLimitExceeded, "absolute limit") } return a.Basic.SpendLimit.IsZero(), nil } return false, nil } // tryResetPeriod will check if the PeriodReset has been hit. If not, it is a no-op. // If we hit the reset period, it will top up the PeriodCanSpend amount to // min(PeriodSpendLimit, Basic.SpendLimit) so it is never more than the maximum allowed. // It will also update the PeriodReset. If we are within one Period, it will update from the // last PeriodReset (eg. if you always do one tx per day, it will always reset the same time) // If we are more than one period out (eg. no activity in a week), reset is one Period from the execution of this method func (a *PeriodicAllowance) tryResetPeriod(blockTime time.Time) { if blockTime.Before(a.PeriodReset) { return } // set PeriodCanSpend to the lesser of Basic.SpendLimit and PeriodSpendLimit if _, isNeg := a.Basic.SpendLimit.SafeSub(a.PeriodSpendLimit...); isNeg && !a.Basic.SpendLimit.Empty() { a.PeriodCanSpend = a.Basic.SpendLimit } else { a.PeriodCanSpend = a.PeriodSpendLimit } // If we are within the period, step from expiration (eg. if you always do one tx per day, it will always reset the same time) // If we are more then one period out (eg. no activity in a week), reset is one period from this time a.PeriodReset = a.PeriodReset.Add(a.Period) if blockTime.After(a.PeriodReset) { a.PeriodReset = blockTime.Add(a.Period) } } // ValidateBasic implements FeeAllowance and enforces basic sanity checks func (a PeriodicAllowance) ValidateBasic() error { if err := a.Basic.ValidateBasic(); err != nil { return err } if !a.PeriodSpendLimit.IsValid() { return errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "spend amount is invalid: %s", a.PeriodSpendLimit) } if !a.PeriodSpendLimit.IsAllPositive() { return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "spend limit must be positive") } if !a.PeriodCanSpend.IsValid() { return errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "can spend amount is invalid: %s", a.PeriodCanSpend) } // We allow 0 for `PeriodCanSpend` if a.PeriodCanSpend.IsAnyNegative() { return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "can spend must not be negative") } // ensure PeriodSpendLimit can be subtracted from total (same coin types) if a.Basic.SpendLimit != nil && !a.PeriodSpendLimit.DenomsSubsetOf(a.Basic.SpendLimit) { return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "period spend limit has different currency than basic spend limit") } // check times if a.Period.Seconds() < 0 { return errorsmod.Wrap(ErrInvalidDuration, "negative clock step") } return nil } // ExpiresAt returns the expiry time of the PeriodicAllowance. func (a PeriodicAllowance) ExpiresAt() (*time.Time, error) { return a.Basic.ExpiresAt() } ================================================ FILE: x/feegrant/periodic_fee_test.go ================================================ package feegrant_test import ( "testing" "time" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) func TestPeriodicFeeValidAllow(t *testing.T) { key := storetypes.NewKVStoreKey(feegrant.StoreKey) testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) smallAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 43)) leftAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 512)) oneAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 1)) eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 1)) emptyCoins := sdk.Coins{} now := ctx.BlockTime() oneHour := now.Add(1 * time.Hour) twoHours := now.Add(2 * time.Hour) tenMinutes := time.Duration(10) * time.Minute cases := map[string]struct { allow feegrant.PeriodicAllowance fee sdk.Coins blockTime time.Time valid bool // all other checks are ignored if valid=false accept bool remove bool remains sdk.Coins remainsPeriod sdk.Coins periodReset time.Time }{ "empty": { allow: feegrant.PeriodicAllowance{}, valid: false, }, "only basic": { allow: feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &oneHour, }, }, valid: false, }, "empty basic": { allow: feegrant.PeriodicAllowance{ Period: tenMinutes, PeriodSpendLimit: smallAtom, PeriodReset: now.Add(30 * time.Minute), }, blockTime: now, valid: true, accept: true, remove: false, remainsPeriod: emptyCoins, periodReset: now.Add(30 * time.Minute), }, "mismatched currencies": { allow: feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &oneHour, }, Period: tenMinutes, PeriodSpendLimit: eth, }, valid: false, }, "same period": { allow: feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &twoHours, }, Period: tenMinutes, PeriodReset: now.Add(1 * time.Hour), PeriodSpendLimit: leftAtom, PeriodCanSpend: smallAtom, }, valid: true, fee: smallAtom, blockTime: now, accept: true, remove: false, remainsPeriod: emptyCoins, remains: leftAtom, periodReset: now.Add(1 * time.Hour), }, "step one period": { allow: feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &twoHours, }, Period: tenMinutes, PeriodReset: now, PeriodSpendLimit: leftAtom, }, valid: true, fee: leftAtom, blockTime: now.Add(1 * time.Hour), accept: true, remove: false, remainsPeriod: emptyCoins, remains: smallAtom, periodReset: oneHour.Add(tenMinutes), // one step from last reset, not now }, "step limited by global allowance": { allow: feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: smallAtom, Expiration: &twoHours, }, Period: tenMinutes, PeriodReset: now, PeriodSpendLimit: atom, }, valid: true, fee: oneAtom, blockTime: oneHour, accept: true, remove: false, remainsPeriod: smallAtom.Sub(oneAtom...), remains: smallAtom.Sub(oneAtom...), periodReset: oneHour.Add(tenMinutes), // one step from last reset, not now }, "period reset no spend limit": { allow: feegrant.PeriodicAllowance{ Period: tenMinutes, PeriodReset: now, PeriodSpendLimit: atom, }, valid: true, fee: atom, blockTime: oneHour, accept: true, remove: false, remainsPeriod: emptyCoins, periodReset: oneHour.Add(tenMinutes), // one step from last reset, not now }, "expired": { allow: feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &now, }, Period: time.Hour, PeriodSpendLimit: smallAtom, }, valid: true, fee: smallAtom, blockTime: oneHour, accept: false, remove: true, }, "over period limit": { allow: feegrant.PeriodicAllowance{ Basic: feegrant.BasicAllowance{ SpendLimit: atom, Expiration: &now, }, Period: time.Hour, PeriodReset: now.Add(1 * time.Hour), PeriodSpendLimit: leftAtom, PeriodCanSpend: smallAtom, }, valid: true, fee: leftAtom, blockTime: now, accept: false, remove: true, }, } for name, stc := range cases { tc := stc // to make scopelint happy t.Run(name, func(t *testing.T) { err := tc.allow.ValidateBasic() if !tc.valid { require.Error(t, err) return } require.NoError(t, err) ctx := testCtx.Ctx.WithBlockTime(tc.blockTime) // now try to deduct remove, err := tc.allow.Accept(ctx, tc.fee, []sdk.Msg{}) if !tc.accept { require.Error(t, err) return } require.NoError(t, err) require.Equal(t, tc.remove, remove) if !remove { assert.Equal(t, tc.remains, tc.allow.Basic.SpendLimit) assert.Equal(t, tc.remainsPeriod, tc.allow.PeriodCanSpend) assert.Equal(t, tc.periodReset.String(), tc.allow.PeriodReset.String()) } }) } } ================================================ FILE: x/feegrant/query.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/feegrant/v1beta1/query.proto package feegrant import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" 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" 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 // QueryAllowanceRequest is the request type for the Query/Allowance RPC method. type QueryAllowanceRequest struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` } func (m *QueryAllowanceRequest) Reset() { *m = QueryAllowanceRequest{} } func (m *QueryAllowanceRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllowanceRequest) ProtoMessage() {} func (*QueryAllowanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{0} } func (m *QueryAllowanceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllowanceRequest.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 *QueryAllowanceRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllowanceRequest.Merge(m, src) } func (m *QueryAllowanceRequest) XXX_Size() int { return m.Size() } func (m *QueryAllowanceRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllowanceRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryAllowanceRequest proto.InternalMessageInfo func (m *QueryAllowanceRequest) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *QueryAllowanceRequest) GetGrantee() string { if m != nil { return m.Grantee } return "" } // QueryAllowanceResponse is the response type for the Query/Allowance RPC method. type QueryAllowanceResponse struct { // allowance is an allowance granted for grantee by granter. Allowance *Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (m *QueryAllowanceResponse) Reset() { *m = QueryAllowanceResponse{} } func (m *QueryAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllowanceResponse) ProtoMessage() {} func (*QueryAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{1} } func (m *QueryAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllowanceResponse.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 *QueryAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllowanceResponse.Merge(m, src) } func (m *QueryAllowanceResponse) XXX_Size() int { return m.Size() } func (m *QueryAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryAllowanceResponse proto.InternalMessageInfo func (m *QueryAllowanceResponse) GetAllowance() *Grant { if m != nil { return m.Allowance } return nil } // QueryAllowancesRequest is the request type for the Query/Allowances RPC method. type QueryAllowancesRequest struct { Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` // pagination defines a pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryAllowancesRequest) Reset() { *m = QueryAllowancesRequest{} } func (m *QueryAllowancesRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllowancesRequest) ProtoMessage() {} func (*QueryAllowancesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{2} } func (m *QueryAllowancesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAllowancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllowancesRequest.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 *QueryAllowancesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllowancesRequest.Merge(m, src) } func (m *QueryAllowancesRequest) XXX_Size() int { return m.Size() } func (m *QueryAllowancesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllowancesRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryAllowancesRequest proto.InternalMessageInfo func (m *QueryAllowancesRequest) GetGrantee() string { if m != nil { return m.Grantee } return "" } func (m *QueryAllowancesRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // QueryAllowancesResponse is the response type for the Query/Allowances RPC method. type QueryAllowancesResponse struct { // allowances are allowance's granted for grantee by granter. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryAllowancesResponse) Reset() { *m = QueryAllowancesResponse{} } func (m *QueryAllowancesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllowancesResponse) ProtoMessage() {} func (*QueryAllowancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{3} } func (m *QueryAllowancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllowancesResponse.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 *QueryAllowancesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllowancesResponse.Merge(m, src) } func (m *QueryAllowancesResponse) XXX_Size() int { return m.Size() } func (m *QueryAllowancesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllowancesResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryAllowancesResponse proto.InternalMessageInfo func (m *QueryAllowancesResponse) GetAllowances() []*Grant { if m != nil { return m.Allowances } return nil } func (m *QueryAllowancesResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } // QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. type QueryAllowancesByGranterRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // pagination defines a pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryAllowancesByGranterRequest) Reset() { *m = QueryAllowancesByGranterRequest{} } func (m *QueryAllowancesByGranterRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllowancesByGranterRequest) ProtoMessage() {} func (*QueryAllowancesByGranterRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{4} } func (m *QueryAllowancesByGranterRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAllowancesByGranterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllowancesByGranterRequest.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 *QueryAllowancesByGranterRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllowancesByGranterRequest.Merge(m, src) } func (m *QueryAllowancesByGranterRequest) XXX_Size() int { return m.Size() } func (m *QueryAllowancesByGranterRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllowancesByGranterRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryAllowancesByGranterRequest proto.InternalMessageInfo func (m *QueryAllowancesByGranterRequest) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *QueryAllowancesByGranterRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. type QueryAllowancesByGranterResponse struct { // allowances that have been issued by the granter. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryAllowancesByGranterResponse) Reset() { *m = QueryAllowancesByGranterResponse{} } func (m *QueryAllowancesByGranterResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllowancesByGranterResponse) ProtoMessage() {} func (*QueryAllowancesByGranterResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{5} } func (m *QueryAllowancesByGranterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryAllowancesByGranterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllowancesByGranterResponse.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 *QueryAllowancesByGranterResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllowancesByGranterResponse.Merge(m, src) } func (m *QueryAllowancesByGranterResponse) XXX_Size() int { return m.Size() } func (m *QueryAllowancesByGranterResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllowancesByGranterResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryAllowancesByGranterResponse proto.InternalMessageInfo func (m *QueryAllowancesByGranterResponse) GetAllowances() []*Grant { if m != nil { return m.Allowances } return nil } func (m *QueryAllowancesByGranterResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } // QueryDIDAllowanceRequest is the request type for the Query/DIDAllowance RPC method. type QueryDIDAllowanceRequest struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (m *QueryDIDAllowanceRequest) Reset() { *m = QueryDIDAllowanceRequest{} } func (m *QueryDIDAllowanceRequest) String() string { return proto.CompactTextString(m) } func (*QueryDIDAllowanceRequest) ProtoMessage() {} func (*QueryDIDAllowanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{6} } func (m *QueryDIDAllowanceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryDIDAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDIDAllowanceRequest.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 *QueryDIDAllowanceRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDIDAllowanceRequest.Merge(m, src) } func (m *QueryDIDAllowanceRequest) XXX_Size() int { return m.Size() } func (m *QueryDIDAllowanceRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryDIDAllowanceRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryDIDAllowanceRequest proto.InternalMessageInfo func (m *QueryDIDAllowanceRequest) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *QueryDIDAllowanceRequest) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } // QueryDIDAllowanceResponse is the response type for the Query/DIDAllowance RPC method. type QueryDIDAllowanceResponse struct { // allowance is an allowance granted for DID by granter. Allowance *Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (m *QueryDIDAllowanceResponse) Reset() { *m = QueryDIDAllowanceResponse{} } func (m *QueryDIDAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*QueryDIDAllowanceResponse) ProtoMessage() {} func (*QueryDIDAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{7} } func (m *QueryDIDAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryDIDAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDIDAllowanceResponse.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 *QueryDIDAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDIDAllowanceResponse.Merge(m, src) } func (m *QueryDIDAllowanceResponse) XXX_Size() int { return m.Size() } func (m *QueryDIDAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryDIDAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryDIDAllowanceResponse proto.InternalMessageInfo func (m *QueryDIDAllowanceResponse) GetAllowance() *Grant { if m != nil { return m.Allowance } return nil } // QueryDIDAllowancesRequest is the request type for the Query/DIDAllowances RPC method. type QueryDIDAllowancesRequest struct { // grantee_did is the DID being granted allowances. GranteeDid string `protobuf:"bytes,1,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` // pagination defines a pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDIDAllowancesRequest) Reset() { *m = QueryDIDAllowancesRequest{} } func (m *QueryDIDAllowancesRequest) String() string { return proto.CompactTextString(m) } func (*QueryDIDAllowancesRequest) ProtoMessage() {} func (*QueryDIDAllowancesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{8} } func (m *QueryDIDAllowancesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryDIDAllowancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDIDAllowancesRequest.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 *QueryDIDAllowancesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDIDAllowancesRequest.Merge(m, src) } func (m *QueryDIDAllowancesRequest) XXX_Size() int { return m.Size() } func (m *QueryDIDAllowancesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryDIDAllowancesRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryDIDAllowancesRequest proto.InternalMessageInfo func (m *QueryDIDAllowancesRequest) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } func (m *QueryDIDAllowancesRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // QueryDIDAllowancesResponse is the response type for the Query/DIDAllowances RPC method. type QueryDIDAllowancesResponse struct { // allowances are DID allowances granted for the grantee DID. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDIDAllowancesResponse) Reset() { *m = QueryDIDAllowancesResponse{} } func (m *QueryDIDAllowancesResponse) String() string { return proto.CompactTextString(m) } func (*QueryDIDAllowancesResponse) ProtoMessage() {} func (*QueryDIDAllowancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{9} } func (m *QueryDIDAllowancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryDIDAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDIDAllowancesResponse.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 *QueryDIDAllowancesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDIDAllowancesResponse.Merge(m, src) } func (m *QueryDIDAllowancesResponse) XXX_Size() int { return m.Size() } func (m *QueryDIDAllowancesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryDIDAllowancesResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryDIDAllowancesResponse proto.InternalMessageInfo func (m *QueryDIDAllowancesResponse) GetAllowances() []*Grant { if m != nil { return m.Allowances } return nil } func (m *QueryDIDAllowancesResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } // QueryDIDAllowancesByGranterRequest is the request type for the Query/DIDAllowancesByGranter RPC method. type QueryDIDAllowancesByGranterRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // pagination defines a pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDIDAllowancesByGranterRequest) Reset() { *m = QueryDIDAllowancesByGranterRequest{} } func (m *QueryDIDAllowancesByGranterRequest) String() string { return proto.CompactTextString(m) } func (*QueryDIDAllowancesByGranterRequest) ProtoMessage() {} func (*QueryDIDAllowancesByGranterRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{10} } func (m *QueryDIDAllowancesByGranterRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryDIDAllowancesByGranterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDIDAllowancesByGranterRequest.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 *QueryDIDAllowancesByGranterRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDIDAllowancesByGranterRequest.Merge(m, src) } func (m *QueryDIDAllowancesByGranterRequest) XXX_Size() int { return m.Size() } func (m *QueryDIDAllowancesByGranterRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryDIDAllowancesByGranterRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryDIDAllowancesByGranterRequest proto.InternalMessageInfo func (m *QueryDIDAllowancesByGranterRequest) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *QueryDIDAllowancesByGranterRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // QueryDIDAllowancesByGranterResponse is the response type for the Query/DIDAllowancesByGranter RPC method. type QueryDIDAllowancesByGranterResponse struct { // allowances that have been issued by the granter to DIDs. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines a pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDIDAllowancesByGranterResponse) Reset() { *m = QueryDIDAllowancesByGranterResponse{} } func (m *QueryDIDAllowancesByGranterResponse) String() string { return proto.CompactTextString(m) } func (*QueryDIDAllowancesByGranterResponse) ProtoMessage() {} func (*QueryDIDAllowancesByGranterResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5e33dbb16840460c, []int{11} } func (m *QueryDIDAllowancesByGranterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryDIDAllowancesByGranterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDIDAllowancesByGranterResponse.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 *QueryDIDAllowancesByGranterResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDIDAllowancesByGranterResponse.Merge(m, src) } func (m *QueryDIDAllowancesByGranterResponse) XXX_Size() int { return m.Size() } func (m *QueryDIDAllowancesByGranterResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryDIDAllowancesByGranterResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryDIDAllowancesByGranterResponse proto.InternalMessageInfo func (m *QueryDIDAllowancesByGranterResponse) GetAllowances() []*Grant { if m != nil { return m.Allowances } return nil } func (m *QueryDIDAllowancesByGranterResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } func init() { proto.RegisterType((*QueryAllowanceRequest)(nil), "sourcehub.feegrant.v1beta1.QueryAllowanceRequest") proto.RegisterType((*QueryAllowanceResponse)(nil), "sourcehub.feegrant.v1beta1.QueryAllowanceResponse") proto.RegisterType((*QueryAllowancesRequest)(nil), "sourcehub.feegrant.v1beta1.QueryAllowancesRequest") proto.RegisterType((*QueryAllowancesResponse)(nil), "sourcehub.feegrant.v1beta1.QueryAllowancesResponse") proto.RegisterType((*QueryAllowancesByGranterRequest)(nil), "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterRequest") proto.RegisterType((*QueryAllowancesByGranterResponse)(nil), "sourcehub.feegrant.v1beta1.QueryAllowancesByGranterResponse") proto.RegisterType((*QueryDIDAllowanceRequest)(nil), "sourcehub.feegrant.v1beta1.QueryDIDAllowanceRequest") proto.RegisterType((*QueryDIDAllowanceResponse)(nil), "sourcehub.feegrant.v1beta1.QueryDIDAllowanceResponse") proto.RegisterType((*QueryDIDAllowancesRequest)(nil), "sourcehub.feegrant.v1beta1.QueryDIDAllowancesRequest") proto.RegisterType((*QueryDIDAllowancesResponse)(nil), "sourcehub.feegrant.v1beta1.QueryDIDAllowancesResponse") proto.RegisterType((*QueryDIDAllowancesByGranterRequest)(nil), "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterRequest") proto.RegisterType((*QueryDIDAllowancesByGranterResponse)(nil), "sourcehub.feegrant.v1beta1.QueryDIDAllowancesByGranterResponse") } func init() { proto.RegisterFile("sourcehub/feegrant/v1beta1/query.proto", fileDescriptor_5e33dbb16840460c) } var fileDescriptor_5e33dbb16840460c = []byte{ // 728 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0x4f, 0x6b, 0xd4, 0x4e, 0x18, 0xc7, 0x3b, 0xfd, 0xf1, 0x53, 0xf6, 0xa9, 0x22, 0x4c, 0xb5, 0x6e, 0x83, 0x6c, 0xd7, 0x08, 0xf5, 0x0f, 0x6e, 0xd2, 0xa6, 0xb5, 0xd4, 0x56, 0xac, 0x5b, 0x8b, 0x4b, 0x6f, 0xba, 0x9e, 0x14, 0xa1, 0x64, 0x37, 0x63, 0x0c, 0x6d, 0x33, 0xdb, 0x4c, 0xd6, 0x5a, 0xa4, 0x08, 0xe2, 0x0b, 0x10, 0xf4, 0x05, 0x78, 0x11, 0xbc, 0x15, 0xa5, 0xde, 0x05, 0x41, 0xc4, 0x53, 0x69, 0x2f, 0x7a, 0x93, 0xd6, 0x17, 0x22, 0x99, 0x4c, 0xb2, 0xdb, 0x6c, 0x9a, 0x6e, 0xea, 0x1e, 0xf6, 0xb6, 0xc9, 0x3c, 0xdf, 0x67, 0x3e, 0xdf, 0x67, 0x9e, 0x67, 0x36, 0x30, 0xcc, 0x68, 0xdd, 0xa9, 0x92, 0x27, 0xf5, 0x8a, 0xfa, 0x98, 0x10, 0xd3, 0xd1, 0x6d, 0x57, 0x7d, 0x3a, 0x5a, 0x21, 0xae, 0x3e, 0xaa, 0xae, 0xd4, 0x89, 0xb3, 0xa6, 0xd4, 0x1c, 0xea, 0x52, 0x2c, 0x85, 0x71, 0x4a, 0x10, 0xa7, 0x88, 0x38, 0xe9, 0x72, 0x42, 0x8e, 0x30, 0x98, 0xa7, 0x91, 0xae, 0x54, 0x29, 0x5b, 0xa6, 0x4c, 0xad, 0xe8, 0x8c, 0xf8, 0xf9, 0xc3, 0xc8, 0x9a, 0x6e, 0x5a, 0xb6, 0xee, 0x5a, 0xd4, 0x16, 0xb1, 0xe7, 0x4c, 0x4a, 0xcd, 0x25, 0xa2, 0xea, 0x35, 0x4b, 0xd5, 0x6d, 0x9b, 0xba, 0x7c, 0x91, 0x89, 0xd5, 0x41, 0x3f, 0xd3, 0x02, 0x7f, 0x52, 0xfd, 0x07, 0x7f, 0x49, 0x7e, 0x01, 0x67, 0xee, 0x79, 0xa9, 0x8b, 0x4b, 0x4b, 0x74, 0x55, 0xb7, 0xab, 0xa4, 0x4c, 0x56, 0xea, 0x84, 0xb9, 0x58, 0x83, 0xe3, 0x1c, 0x86, 0x38, 0x59, 0x94, 0x47, 0x97, 0x32, 0xb3, 0xd9, 0xed, 0xcd, 0xc2, 0x69, 0xa1, 0x2d, 0x1a, 0x86, 0x43, 0x18, 0xbb, 0xef, 0x3a, 0x96, 0x6d, 0x96, 0x83, 0xc0, 0x86, 0x86, 0x64, 0x7b, 0xdb, 0xd3, 0x10, 0xf9, 0x01, 0x0c, 0x44, 0x01, 0x58, 0x8d, 0xda, 0x8c, 0xe0, 0x19, 0xc8, 0xe8, 0xc1, 0x4b, 0xce, 0xd0, 0xa7, 0x9d, 0x57, 0x0e, 0x2e, 0xad, 0x52, 0xf2, 0x9e, 0xca, 0x0d, 0x8d, 0xfc, 0x16, 0x45, 0x73, 0xb3, 0x16, 0x77, 0xa4, 0x5d, 0x77, 0x04, 0xdf, 0x01, 0x68, 0xd4, 0x9d, 0x1b, 0xec, 0xd3, 0x86, 0x15, 0xa1, 0xf1, 0x0e, 0x49, 0xf1, 0x9b, 0x20, 0xe0, 0xb9, 0xab, 0x9b, 0x41, 0x35, 0xcb, 0x4d, 0x4a, 0xf9, 0x3d, 0x82, 0xb3, 0x2d, 0x58, 0xc2, 0x73, 0x11, 0x20, 0xe4, 0x67, 0x59, 0x94, 0xff, 0xaf, 0x3d, 0xd3, 0x4d, 0x22, 0x5c, 0x8a, 0xc1, 0xbc, 0x78, 0x28, 0xa6, 0xbf, 0xff, 0x3e, 0xce, 0x4f, 0x08, 0x86, 0x22, 0x9c, 0xb3, 0x6b, 0x25, 0xff, 0xa8, 0xff, 0xa5, 0x4b, 0x3a, 0x54, 0xc7, 0xa9, 0xfe, 0xed, 0xcd, 0xc2, 0x29, 0x5f, 0x56, 0x60, 0xc6, 0x62, 0x7e, 0x44, 0x19, 0x9f, 0x90, 0xbf, 0x22, 0xc8, 0x1f, 0x0c, 0xdd, 0x7d, 0x55, 0x8e, 0x77, 0x41, 0x21, 0xcb, 0x4d, 0xcc, 0xcd, 0xcf, 0x75, 0x64, 0x30, 0x87, 0xa0, 0x4f, 0x74, 0xf1, 0x82, 0x61, 0x19, 0xfe, 0x70, 0x96, 0x41, 0xbc, 0x9a, 0xb3, 0x0c, 0xf9, 0x11, 0x0c, 0xc6, 0x6c, 0xd8, 0xa9, 0x41, 0x7c, 0x85, 0x62, 0xd2, 0x87, 0xb3, 0x18, 0x81, 0x43, 0x51, 0xb8, 0x8e, 0x0d, 0xde, 0x07, 0x04, 0x52, 0x1c, 0x46, 0x17, 0xce, 0xde, 0x3b, 0x04, 0x72, 0x2b, 0x6a, 0x37, 0x8d, 0x9f, 0xfc, 0x11, 0xc1, 0x85, 0x44, 0xc4, 0xee, 0x2b, 0xab, 0xb6, 0x91, 0x81, 0xff, 0x39, 0x33, 0xfe, 0x8c, 0x20, 0x13, 0x52, 0xe3, 0xd1, 0x24, 0x9e, 0xd8, 0xff, 0x47, 0x49, 0x4b, 0x23, 0xf1, 0x51, 0xe4, 0xe2, 0xcb, 0x9d, 0x3f, 0x6f, 0x7a, 0xa7, 0xf1, 0x75, 0x35, 0xe1, 0x2b, 0x20, 0xf4, 0xad, 0x3e, 0x17, 0x47, 0xb6, 0x1e, 0xfc, 0x22, 0xeb, 0x78, 0x03, 0x01, 0x34, 0xaa, 0x8d, 0x53, 0x50, 0x04, 0xf3, 0x26, 0x8d, 0xa5, 0xd2, 0x08, 0xf4, 0x49, 0x8e, 0xae, 0xe1, 0x91, 0xb6, 0xd0, 0x59, 0x13, 0xf1, 0x2f, 0x04, 0xfd, 0x31, 0xfd, 0x81, 0xa7, 0x53, 0x60, 0x44, 0x1b, 0x5f, 0xba, 0x71, 0x34, 0xb1, 0x30, 0x53, 0xfa, 0xd1, 0x7a, 0xe7, 0x72, 0x7f, 0x0a, 0xbe, 0x9a, 0xe4, 0xcf, 0x62, 0xac, 0x4e, 0x8c, 0xc6, 0xb9, 0xe0, 0x6f, 0x08, 0x4e, 0x34, 0xb7, 0x3f, 0x1e, 0x3f, 0x94, 0x2b, 0xe6, 0x4a, 0x97, 0xae, 0xa5, 0x54, 0x09, 0x1b, 0xf3, 0x9c, 0xf9, 0x36, 0x2e, 0x26, 0x31, 0x1b, 0x96, 0xb1, 0x90, 0xd4, 0x52, 0xde, 0x9d, 0xbb, 0x8e, 0xbf, 0x20, 0x38, 0xb9, 0x6f, 0x8e, 0x71, 0x3a, 0xa6, 0xb0, 0xb9, 0x26, 0xd2, 0xca, 0x84, 0x97, 0x5b, 0xdc, 0xcb, 0x14, 0x9e, 0x6c, 0xdb, 0x0b, 0x8b, 0x58, 0xd8, 0x41, 0x30, 0x10, 0x7f, 0x15, 0xe1, 0x9b, 0xe9, 0xa0, 0x5a, 0xba, 0x6d, 0xe6, 0xc8, 0xfa, 0x34, 0xd3, 0xe3, 0xb9, 0x8b, 0x76, 0xd8, 0x6c, 0xe9, 0xfb, 0x6e, 0x0e, 0x6d, 0xed, 0xe6, 0xd0, 0xef, 0xdd, 0x1c, 0x7a, 0xbd, 0x97, 0xeb, 0xd9, 0xda, 0xcb, 0xf5, 0xfc, 0xdc, 0xcb, 0xf5, 0x3c, 0x2c, 0x98, 0x96, 0xeb, 0x01, 0x55, 0xe9, 0xb2, 0xc8, 0x6a, 0x13, 0x77, 0x95, 0x3a, 0x8b, 0x4d, 0x7b, 0x3c, 0x0b, 0x77, 0xa9, 0x1c, 0xe3, 0xdf, 0xfb, 0x63, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xe6, 0xa7, 0xcd, 0xc5, 0x0c, 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 { // Allowance returns granted allowance to the grantee by the granter. Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) // Allowances returns all the grants for the given grantee address. Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address. AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) // DIDAllowance returns granted allowance to the DID by the granter. DIDAllowance(ctx context.Context, in *QueryDIDAllowanceRequest, opts ...grpc.CallOption) (*QueryDIDAllowanceResponse, error) // DIDAllowances returns all the DID grants for the given grantee DID. DIDAllowances(ctx context.Context, in *QueryDIDAllowancesRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesResponse, error) // DIDAllowancesByGranter returns all the DID grants given by an address. DIDAllowancesByGranter(ctx context.Context, in *QueryDIDAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesByGranterResponse, error) } type queryClient struct { cc grpc1.ClientConn } func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } func (c *queryClient) Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) { out := new(QueryAllowanceResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Query/Allowance", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) { out := new(QueryAllowancesResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Query/Allowances", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) { out := new(QueryAllowancesByGranterResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Query/AllowancesByGranter", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) DIDAllowance(ctx context.Context, in *QueryDIDAllowanceRequest, opts ...grpc.CallOption) (*QueryDIDAllowanceResponse, error) { out := new(QueryDIDAllowanceResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Query/DIDAllowance", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) DIDAllowances(ctx context.Context, in *QueryDIDAllowancesRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesResponse, error) { out := new(QueryDIDAllowancesResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Query/DIDAllowances", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) DIDAllowancesByGranter(ctx context.Context, in *QueryDIDAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryDIDAllowancesByGranterResponse, error) { out := new(QueryDIDAllowancesByGranterResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Query/DIDAllowancesByGranter", in, out, opts...) if err != nil { return nil, err } return out, nil } // QueryServer is the server API for Query service. type QueryServer interface { // Allowance returns granted allowance to the grantee by the granter. Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) // Allowances returns all the grants for the given grantee address. Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address. AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) // DIDAllowance returns granted allowance to the DID by the granter. DIDAllowance(context.Context, *QueryDIDAllowanceRequest) (*QueryDIDAllowanceResponse, error) // DIDAllowances returns all the DID grants for the given grantee DID. DIDAllowances(context.Context, *QueryDIDAllowancesRequest) (*QueryDIDAllowancesResponse, error) // DIDAllowancesByGranter returns all the DID grants given by an address. DIDAllowancesByGranter(context.Context, *QueryDIDAllowancesByGranterRequest) (*QueryDIDAllowancesByGranterResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } func (*UnimplementedQueryServer) Allowance(ctx context.Context, req *QueryAllowanceRequest) (*QueryAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allowance not implemented") } func (*UnimplementedQueryServer) Allowances(ctx context.Context, req *QueryAllowancesRequest) (*QueryAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allowances not implemented") } func (*UnimplementedQueryServer) AllowancesByGranter(ctx context.Context, req *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllowancesByGranter not implemented") } func (*UnimplementedQueryServer) DIDAllowance(ctx context.Context, req *QueryDIDAllowanceRequest) (*QueryDIDAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DIDAllowance not implemented") } func (*UnimplementedQueryServer) DIDAllowances(ctx context.Context, req *QueryDIDAllowancesRequest) (*QueryDIDAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DIDAllowances not implemented") } func (*UnimplementedQueryServer) DIDAllowancesByGranter(ctx context.Context, req *QueryDIDAllowancesByGranterRequest) (*QueryDIDAllowancesByGranterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DIDAllowancesByGranter not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } func _Query_Allowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Allowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Query/Allowance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Allowance(ctx, req.(*QueryAllowanceRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Allowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowancesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Allowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Query/Allowances", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Allowances(ctx, req.(*QueryAllowancesRequest)) } return interceptor(ctx, in, info, handler) } func _Query_AllowancesByGranter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllowancesByGranterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).AllowancesByGranter(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Query/AllowancesByGranter", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AllowancesByGranter(ctx, req.(*QueryAllowancesByGranterRequest)) } return interceptor(ctx, in, info, handler) } func _Query_DIDAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDIDAllowanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).DIDAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Query/DIDAllowance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DIDAllowance(ctx, req.(*QueryDIDAllowanceRequest)) } return interceptor(ctx, in, info, handler) } func _Query_DIDAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDIDAllowancesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).DIDAllowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Query/DIDAllowances", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DIDAllowances(ctx, req.(*QueryDIDAllowancesRequest)) } return interceptor(ctx, in, info, handler) } func _Query_DIDAllowancesByGranter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryDIDAllowancesByGranterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).DIDAllowancesByGranter(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Query/DIDAllowancesByGranter", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DIDAllowancesByGranter(ctx, req.(*QueryDIDAllowancesByGranterRequest)) } return interceptor(ctx, in, info, handler) } var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.feegrant.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Allowance", Handler: _Query_Allowance_Handler, }, { MethodName: "Allowances", Handler: _Query_Allowances_Handler, }, { MethodName: "AllowancesByGranter", Handler: _Query_AllowancesByGranter_Handler, }, { MethodName: "DIDAllowance", Handler: _Query_DIDAllowance_Handler, }, { MethodName: "DIDAllowances", Handler: _Query_DIDAllowances_Handler, }, { MethodName: "DIDAllowancesByGranter", Handler: _Query_DIDAllowancesByGranter_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/feegrant/v1beta1/query.proto", } func (m *QueryAllowanceRequest) 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 *QueryAllowanceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Grantee) > 0 { i -= len(m.Grantee) copy(dAtA[i:], m.Grantee) i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryAllowanceResponse) 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 *QueryAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Allowance != nil { { size, err := m.Allowance.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 (m *QueryAllowancesRequest) 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 *QueryAllowancesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAllowancesRequest) 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.Grantee) > 0 { i -= len(m.Grantee) copy(dAtA[i:], m.Grantee) i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryAllowancesResponse) 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 *QueryAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAllowancesResponse) 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.Allowances) > 0 { for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Allowances[iNdEx].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 (m *QueryAllowancesByGranterRequest) 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 *QueryAllowancesByGranterRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAllowancesByGranterRequest) 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.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryAllowancesByGranterResponse) 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 *QueryAllowancesByGranterResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryAllowancesByGranterResponse) 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.Allowances) > 0 { for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Allowances[iNdEx].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 (m *QueryDIDAllowanceRequest) 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 *QueryDIDAllowanceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryDIDAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintQuery(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryDIDAllowanceResponse) 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 *QueryDIDAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryDIDAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Allowance != nil { { size, err := m.Allowance.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 (m *QueryDIDAllowancesRequest) 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 *QueryDIDAllowancesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryDIDAllowancesRequest) 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.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintQuery(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryDIDAllowancesResponse) 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 *QueryDIDAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryDIDAllowancesResponse) 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.Allowances) > 0 { for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Allowances[iNdEx].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 (m *QueryDIDAllowancesByGranterRequest) 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 *QueryDIDAllowancesByGranterRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryDIDAllowancesByGranterRequest) 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.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryDIDAllowancesByGranterResponse) 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 *QueryDIDAllowancesByGranterResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryDIDAllowancesByGranterResponse) 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.Allowances) > 0 { for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Allowances[iNdEx].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 *QueryAllowanceRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } l = len(m.Grantee) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Allowance != nil { l = m.Allowance.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryAllowancesRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Grantee) 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 *QueryAllowancesResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Allowances) > 0 { for _, e := range m.Allowances { 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 (m *QueryAllowancesByGranterRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) 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 *QueryAllowancesByGranterResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Allowances) > 0 { for _, e := range m.Allowances { 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 (m *QueryDIDAllowanceRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } l = len(m.GranteeDid) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryDIDAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Allowance != nil { l = m.Allowance.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *QueryDIDAllowancesRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.GranteeDid) 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 *QueryDIDAllowancesResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Allowances) > 0 { for _, e := range m.Allowances { 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 (m *QueryDIDAllowancesByGranterRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) 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 *QueryDIDAllowancesByGranterResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Allowances) > 0 { for _, e := range m.Allowances { 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 } func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *QueryAllowanceRequest) 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: QueryAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Grantee = string(dAtA[iNdEx:postIndex]) 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 *QueryAllowanceResponse) 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: QueryAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowance", 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.Allowance == nil { m.Allowance = &Grant{} } if err := m.Allowance.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 *QueryAllowancesRequest) 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: QueryAllowancesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAllowancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Grantee = string(dAtA[iNdEx:postIndex]) 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 *QueryAllowancesResponse) 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: QueryAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowances", 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.Allowances = append(m.Allowances, &Grant{}) if err := m.Allowances[len(m.Allowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *QueryAllowancesByGranterRequest) 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: QueryAllowancesByGranterRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAllowancesByGranterRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) 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 *QueryAllowancesByGranterResponse) 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: QueryAllowancesByGranterResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryAllowancesByGranterResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowances", 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.Allowances = append(m.Allowances, &Grant{}) if err := m.Allowances[len(m.Allowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *QueryDIDAllowanceRequest) 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: QueryDIDAllowanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryDIDAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.GranteeDid = string(dAtA[iNdEx:postIndex]) 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 *QueryDIDAllowanceResponse) 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: QueryDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryDIDAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowance", 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.Allowance == nil { m.Allowance = &Grant{} } if err := m.Allowance.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 *QueryDIDAllowancesRequest) 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: QueryDIDAllowancesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryDIDAllowancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.GranteeDid = string(dAtA[iNdEx:postIndex]) 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 *QueryDIDAllowancesResponse) 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: QueryDIDAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryDIDAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowances", 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.Allowances = append(m.Allowances, &Grant{}) if err := m.Allowances[len(m.Allowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *QueryDIDAllowancesByGranterRequest) 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: QueryDIDAllowancesByGranterRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryDIDAllowancesByGranterRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Granter = string(dAtA[iNdEx:postIndex]) 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 *QueryDIDAllowancesByGranterResponse) 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: QueryDIDAllowancesByGranterResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryDIDAllowancesByGranterResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowances", 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.Allowances = append(m.Allowances, &Grant{}) if err := m.Allowances[len(m.Allowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 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") ) ================================================ FILE: x/feegrant/query.pb.gw.go ================================================ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // source: sourcehub/feegrant/v1beta1/query.proto /* Package feegrant is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ package feegrant 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_Allowance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllowanceRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } val, ok = pathParams["grantee"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") } protoReq.Grantee, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) } msg, err := client.Allowance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Allowance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllowanceRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } val, ok = pathParams["grantee"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") } protoReq.Grantee, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) } msg, err := server.Allowance(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_Allowances_0 = &utilities.DoubleArray{Encoding: map[string]int{"grantee": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_Allowances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllowancesRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["grantee"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") } protoReq.Grantee, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Allowances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Allowances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Allowances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllowancesRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["grantee"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") } protoReq.Grantee, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Allowances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.Allowances(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_AllowancesByGranter_0 = &utilities.DoubleArray{Encoding: map[string]int{"granter": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_AllowancesByGranter_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllowancesByGranterRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllowancesByGranter_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.AllowancesByGranter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_AllowancesByGranter_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllowancesByGranterRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllowancesByGranter_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.AllowancesByGranter(ctx, &protoReq) return msg, metadata, err } func request_Query_DIDAllowance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDIDAllowanceRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } val, ok = pathParams["grantee_did"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee_did") } protoReq.GranteeDid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee_did", err) } msg, err := client.DIDAllowance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_DIDAllowance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDIDAllowanceRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } val, ok = pathParams["grantee_did"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee_did") } protoReq.GranteeDid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee_did", err) } msg, err := server.DIDAllowance(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_DIDAllowances_0 = &utilities.DoubleArray{Encoding: map[string]int{"grantee_did": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_DIDAllowances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDIDAllowancesRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["grantee_did"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee_did") } protoReq.GranteeDid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee_did", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DIDAllowances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.DIDAllowances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_DIDAllowances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDIDAllowancesRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["grantee_did"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee_did") } protoReq.GranteeDid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee_did", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DIDAllowances_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.DIDAllowances(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_DIDAllowancesByGranter_0 = &utilities.DoubleArray{Encoding: map[string]int{"granter": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_DIDAllowancesByGranter_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDIDAllowancesByGranterRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DIDAllowancesByGranter_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.DIDAllowancesByGranter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_DIDAllowancesByGranter_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDIDAllowancesByGranterRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["granter"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") } protoReq.Granter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DIDAllowancesByGranter_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.DIDAllowancesByGranter(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_Allowance_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_Allowance_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_Allowance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Allowances_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_Allowances_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_Allowances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_AllowancesByGranter_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_AllowancesByGranter_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_AllowancesByGranter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_DIDAllowance_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_DIDAllowance_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_DIDAllowance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_DIDAllowances_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_DIDAllowances_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_DIDAllowances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_DIDAllowancesByGranter_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_DIDAllowancesByGranter_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_DIDAllowancesByGranter_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_Allowance_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_Allowance_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_Allowance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Allowances_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_Allowances_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_Allowances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_AllowancesByGranter_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_AllowancesByGranter_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_AllowancesByGranter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_DIDAllowance_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_DIDAllowance_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_DIDAllowance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_DIDAllowances_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_DIDAllowances_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_DIDAllowances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_DIDAllowancesByGranter_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_DIDAllowancesByGranter_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_DIDAllowancesByGranter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } var ( pattern_Query_Allowance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcehub", "feegrant", "v1beta1", "allowance", "granter", "grantee"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Allowances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcehub", "feegrant", "v1beta1", "allowances", "grantee"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_AllowancesByGranter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcehub", "feegrant", "v1beta1", "issued", "granter"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_DIDAllowance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcehub", "feegrant", "v1beta1", "did_allowance", "granter", "grantee_did"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_DIDAllowances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcehub", "feegrant", "v1beta1", "did_allowances", "grantee_did"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_DIDAllowancesByGranter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcehub", "feegrant", "v1beta1", "did_issued", "granter"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Query_Allowance_0 = runtime.ForwardResponseMessage forward_Query_Allowances_0 = runtime.ForwardResponseMessage forward_Query_AllowancesByGranter_0 = runtime.ForwardResponseMessage forward_Query_DIDAllowance_0 = runtime.ForwardResponseMessage forward_Query_DIDAllowances_0 = runtime.ForwardResponseMessage forward_Query_DIDAllowancesByGranter_0 = runtime.ForwardResponseMessage ) ================================================ FILE: x/feegrant/simulation/decoder.go ================================================ package simulation import ( "bytes" "fmt" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's // Value to the corresponding feegrant type. func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { return func(kvA, kvB kv.Pair) string { switch { case bytes.Equal(kvA.Key[:1], feegrant.FeeAllowanceKeyPrefix): var grantA, grantB feegrant.Grant cdc.MustUnmarshal(kvA.Value, &grantA) cdc.MustUnmarshal(kvB.Value, &grantB) return fmt.Sprintf("%v\n%v", grantA, grantB) default: panic(fmt.Sprintf("invalid feegrant key %X", kvA.Key)) } } } ================================================ FILE: x/feegrant/simulation/decoder_test.go ================================================ package simulation_test import ( "fmt" "testing" "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/module" "github.com/sourcenetwork/sourcehub/x/feegrant/simulation" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) var ( granterPk = ed25519.GenPrivKey().PubKey() granterAddr = sdk.AccAddress(granterPk.Address()) granteeAddr = sdk.AccAddress(granterPk.Address()) ) func TestDecodeStore(t *testing.T) { encodingConfig := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) cdc := encodingConfig.Codec dec := simulation.NewDecodeStore(cdc) grant, err := feegrant.NewGrant(granterAddr, granteeAddr, &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewCoin("foo", sdkmath.NewInt(100))), }) require.NoError(t, err) grantBz, err := cdc.Marshal(&grant) require.NoError(t, err) kvPairs := kv.Pairs{ Pairs: []kv.Pair{ {Key: feegrant.FeeAllowanceKeyPrefix, Value: grantBz}, {Key: []byte{0x99}, Value: []byte{0x99}}, }, } tests := []struct { name string expectedLog string }{ {"Grant", fmt.Sprintf("%v\n%v", grant, grant)}, {"other", ""}, } for i, tt := range tests { i, tt := i, tt t.Run(tt.name, func(t *testing.T) { switch i { case len(tests) - 1: require.Panics(t, func() { dec(kvPairs.Pairs[i], kvPairs.Pairs[i]) }, tt.name) default: require.Equal(t, tt.expectedLog, dec(kvPairs.Pairs[i], kvPairs.Pairs[i]), tt.name) } }) } } ================================================ FILE: x/feegrant/simulation/genesis.go ================================================ package simulation import ( "math/rand" "time" "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/x/feegrant" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) // genFeeGrants returns a slice of randomly generated allowances. func genFeeGrants(r *rand.Rand, accounts []simtypes.Account) []feegrant.Grant { allowances := make([]feegrant.Grant, len(accounts)-1) for i := 0; i < len(accounts)-1; i++ { granter := accounts[i].Address grantee := accounts[i+1].Address allowances[i] = generateRandomAllowances(granter, grantee, r) } return allowances } func generateRandomAllowances(granter, grantee sdk.AccAddress, r *rand.Rand) feegrant.Grant { allowances := make([]feegrant.Grant, 3) spendLimit := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(100))) periodSpendLimit := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(10))) basic := feegrant.BasicAllowance{ SpendLimit: spendLimit, } basicAllowance, err := feegrant.NewGrant(granter, grantee, &basic) if err != nil { panic(err) } allowances[0] = basicAllowance periodicAllowance, err := feegrant.NewGrant(granter, grantee, &feegrant.PeriodicAllowance{ Basic: basic, PeriodSpendLimit: periodSpendLimit, Period: time.Hour, }) if err != nil { panic(err) } allowances[1] = periodicAllowance filteredAllowance, err := feegrant.NewGrant(granter, grantee, &feegrant.AllowedMsgAllowance{ Allowance: basicAllowance.GetAllowance(), AllowedMessages: []string{"/cosmos.gov.v1.MsgSubmitProposal"}, }) if err != nil { panic(err) } allowances[2] = filteredAllowance return allowances[r.Intn(len(allowances))] } // RandomizedGenState generates a random GenesisState for feegrant func RandomizedGenState(simState *module.SimulationState) { var feegrants []feegrant.Grant simState.AppParams.GetOrGenerate( "feegrant", &feegrants, simState.Rand, func(r *rand.Rand) { feegrants = genFeeGrants(r, simState.Accounts) }, ) feegrantGenesis := feegrant.NewGenesisState(feegrants) bz, err := simState.Cdc.MarshalJSON(feegrantGenesis) if err != nil { panic(err) } simState.GenState[feegrant.ModuleName] = bz } ================================================ FILE: x/feegrant/simulation/genesis_test.go ================================================ package simulation_test import ( "encoding/json" "math/rand" "testing" "github.com/stretchr/testify/require" "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/module" "github.com/sourcenetwork/sourcehub/x/feegrant/simulation" moduletypes "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) func TestRandomizedGenState(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) s := rand.NewSource(1) r := rand.New(s) accounts := simtypes.RandomAccounts(r, 3) simState := moduletypes.SimulationState{ AppParams: make(simtypes.AppParams), Cdc: encCfg.Codec, Rand: r, NumBonded: 3, Accounts: accounts, InitialStake: math.NewInt(1000), GenState: make(map[string]json.RawMessage), } simulation.RandomizedGenState(&simState) var feegrantGenesis feegrant.GenesisState simState.Cdc.MustUnmarshalJSON(simState.GenState[feegrant.ModuleName], &feegrantGenesis) require.Len(t, feegrantGenesis.Allowances, len(accounts)-1) } ================================================ FILE: x/feegrant/simulation/operations.go ================================================ package simulation import ( "math/rand" "cosmossdk.io/core/address" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" "github.com/cosmos/cosmos-sdk/baseapp" "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" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" ) // Simulation operation weights constants const ( OpWeightMsgGrantAllowance = "op_weight_msg_grant_fee_allowance" OpWeightMsgRevokeAllowance = "op_weight_msg_grant_revoke_allowance" DefaultWeightGrantAllowance int = 100 DefaultWeightRevokeAllowance int = 100 ) var ( TypeMsgGrantAllowance = sdk.MsgTypeURL(&feegrant.MsgGrantAllowance{}) TypeMsgRevokeAllowance = sdk.MsgTypeURL(&feegrant.MsgRevokeAllowance{}) ) func WeightedOperations( registry codectypes.InterfaceRegistry, appParams simtypes.AppParams, cdc codec.JSONCodec, txConfig client.TxConfig, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, k keeper.Keeper, ac address.Codec, ) simulation.WeightedOperations { var ( weightMsgGrantAllowance int weightMsgRevokeAllowance int ) appParams.GetOrGenerate(OpWeightMsgGrantAllowance, &weightMsgGrantAllowance, nil, func(_ *rand.Rand) { weightMsgGrantAllowance = DefaultWeightGrantAllowance }, ) appParams.GetOrGenerate(OpWeightMsgRevokeAllowance, &weightMsgRevokeAllowance, nil, func(_ *rand.Rand) { weightMsgRevokeAllowance = DefaultWeightRevokeAllowance }, ) pCdc := codec.NewProtoCodec(registry) return simulation.WeightedOperations{ simulation.NewWeightedOperation( weightMsgGrantAllowance, SimulateMsgGrantAllowance(pCdc, txConfig, ak, bk, k), ), simulation.NewWeightedOperation( weightMsgRevokeAllowance, SimulateMsgRevokeAllowance(pCdc, txConfig, ak, bk, k, ac), ), } } // SimulateMsgGrantAllowance generates MsgGrantAllowance with random values. func SimulateMsgGrantAllowance( cdc *codec.ProtoCodec, txConfig client.TxConfig, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, k keeper.Keeper, ) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { granter, _ := simtypes.RandomAcc(r, accs) grantee, _ := simtypes.RandomAcc(r, accs) if grantee.Address.String() == granter.Address.String() { return simtypes.NoOpMsg(feegrant.ModuleName, TypeMsgGrantAllowance, "grantee and granter cannot be same"), nil, nil } if f, _ := k.GetAllowance(ctx, granter.Address, grantee.Address); f != nil { return simtypes.NoOpMsg(feegrant.ModuleName, TypeMsgGrantAllowance, "fee allowance exists"), nil, nil } account := ak.GetAccount(ctx, granter.Address) spendableCoins := bk.SpendableCoins(ctx, account.GetAddress()) if spendableCoins.Empty() { return simtypes.NoOpMsg(feegrant.ModuleName, TypeMsgGrantAllowance, "unable to grant empty coins as SpendLimit"), nil, nil } oneYear := ctx.BlockTime().AddDate(1, 0, 0) msg, err := feegrant.NewMsgGrantAllowance(&feegrant.BasicAllowance{ SpendLimit: spendableCoins, Expiration: &oneYear, }, granter.Address, grantee.Address) if err != nil { return simtypes.NoOpMsg(feegrant.ModuleName, TypeMsgGrantAllowance, err.Error()), nil, err } txCtx := simulation.OperationInput{ R: r, App: app, TxGen: txConfig, Cdc: nil, Msg: msg, Context: ctx, SimAccount: granter, AccountKeeper: ak, Bankkeeper: bk, ModuleName: feegrant.ModuleName, CoinsSpentInMsg: spendableCoins, } return simulation.GenAndDeliverTxWithRandFees(txCtx) } } // SimulateMsgRevokeAllowance generates a MsgRevokeAllowance with random values. func SimulateMsgRevokeAllowance( cdc *codec.ProtoCodec, txConfig client.TxConfig, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, k keeper.Keeper, ac address.Codec, ) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { hasGrant := false var granterAddr sdk.AccAddress var granteeAddr sdk.AccAddress k.IterateAllFeeAllowances(ctx, func(grant feegrant.Grant) bool { granter, err := ac.StringToBytes(grant.Granter) if err != nil { panic(err) } grantee, err := ac.StringToBytes(grant.Grantee) if err != nil { panic(err) } granterAddr = granter granteeAddr = grantee hasGrant = true return true }) if !hasGrant { return simtypes.NoOpMsg(feegrant.ModuleName, TypeMsgRevokeAllowance, "no grants"), nil, nil } granter, ok := simtypes.FindAccount(accs, granterAddr) if !ok { return simtypes.NoOpMsg(feegrant.ModuleName, TypeMsgRevokeAllowance, "Account not found"), nil, nil } account := ak.GetAccount(ctx, granter.Address) spendableCoins := bk.SpendableCoins(ctx, account.GetAddress()) msg := feegrant.NewMsgRevokeAllowance(granterAddr, granteeAddr) txCtx := simulation.OperationInput{ R: r, App: app, TxGen: txConfig, Cdc: nil, Msg: &msg, Context: ctx, SimAccount: granter, AccountKeeper: ak, Bankkeeper: bk, ModuleName: feegrant.ModuleName, CoinsSpentInMsg: spendableCoins, } return simulation.GenAndDeliverTxWithRandFees(txCtx) } } ================================================ FILE: x/feegrant/simulation/operations_test.go ================================================ package simulation_test import ( "math/rand" "testing" "time" abci "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" _ "github.com/sourcenetwork/sourcehub/x/feegrant/module" "github.com/sourcenetwork/sourcehub/x/feegrant/simulation" appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" "cosmossdk.io/core/appconfig" feegrantmodulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/feegrant/module/v1" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" _ "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" _ "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" _ "github.com/cosmos/cosmos-sdk/x/consensus" _ "github.com/cosmos/cosmos-sdk/x/genutil" _ "github.com/cosmos/cosmos-sdk/x/mint" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" ) type SimTestSuite struct { suite.Suite app *runtime.App ctx sdk.Context feegrantKeeper keeper.Keeper interfaceRegistry codectypes.InterfaceRegistry txConfig client.TxConfig accountKeeper authkeeper.AccountKeeper bankKeeper bankkeeper.Keeper cdc codec.Codec legacyAmino *codec.LegacyAmino } var FeegrantModule = func() configurator.ModuleOption { return func(config *configurator.Config) { config.ModuleConfigs[feegrant.ModuleName] = &appv1alpha1.ModuleConfig{ Name: feegrant.ModuleName, Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), } } } func (suite *SimTestSuite) SetupTest() { var err error suite.app, err = simtestutil.Setup( depinject.Configs( configurator.NewAppConfig( configurator.AuthModule(), configurator.BankModule(), configurator.StakingModule(), configurator.TxModule(), configurator.ConsensusModule(), configurator.ParamsModule(), configurator.GenutilModule(), FeegrantModule(), ), depinject.Supply(log.NewNopLogger()), ), &suite.feegrantKeeper, &suite.bankKeeper, &suite.accountKeeper, &suite.interfaceRegistry, &suite.txConfig, &suite.cdc, &suite.legacyAmino, ) suite.Require().NoError(err) suite.ctx = suite.app.BaseApp.NewContextLegacy(false, cmtproto.Header{Time: time.Now()}) } func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts for _, account := range accounts { err := banktestutil.FundAccount(suite.ctx, suite.bankKeeper, account.Address, initCoins) suite.Require().NoError(err) } return accounts } func (suite *SimTestSuite) TestWeightedOperations() { require := suite.Require() suite.ctx.WithChainID("test-chain") appParams := make(simtypes.AppParams) weightedOps := simulation.WeightedOperations( suite.interfaceRegistry, appParams, suite.cdc, suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.feegrantKeeper, codecaddress.NewBech32Codec("cosmos"), ) s := rand.NewSource(1) r := rand.New(s) accs := suite.getTestingAccounts(r, 3) expected := []struct { weight int opMsgRoute string opMsgName string }{ { simulation.DefaultWeightGrantAllowance, feegrant.ModuleName, sdk.MsgTypeURL(&feegrant.MsgGrantAllowance{}), }, { simulation.DefaultWeightRevokeAllowance, feegrant.ModuleName, sdk.MsgTypeURL(&feegrant.MsgRevokeAllowance{}), }, } for i, w := range weightedOps { operationMsg, _, err := w.Op()(r, suite.app.BaseApp, suite.ctx, accs, suite.ctx.ChainID()) require.NoError(err) // the following checks are very much dependent from the ordering of the output given // by WeightedOperations. if the ordering in WeightedOperations changes some tests // will fail require.Equal(expected[i].weight, w.Weight(), "weight should be the same") require.Equal(expected[i].opMsgRoute, operationMsg.Route, "route should be the same") require.Equal(expected[i].opMsgName, operationMsg.Name, "operation Msg name should be the same") } } func (suite *SimTestSuite) TestSimulateMsgGrantAllowance() { app, ctx := suite.app, suite.ctx require := suite.Require() s := rand.NewSource(1) r := rand.New(s) accounts := suite.getTestingAccounts(r, 3) // new block _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: app.LastBlockHeight() + 1}) require.NoError(err) // execute operation op := simulation.SimulateMsgGrantAllowance(codec.NewProtoCodec(suite.interfaceRegistry), suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.feegrantKeeper) operationMsg, futureOperations, err := op(r, app.BaseApp, ctx, accounts, "") require.NoError(err) var msg feegrant.MsgGrantAllowance err = proto.Unmarshal(operationMsg.Msg, &msg) require.NoError(err) require.True(operationMsg.OK) require.Equal(accounts[2].Address.String(), msg.Granter) require.Equal(accounts[1].Address.String(), msg.Grantee) require.Len(futureOperations, 0) } func (suite *SimTestSuite) TestSimulateMsgRevokeAllowance() { app, ctx := suite.app, suite.ctx require := suite.Require() s := rand.NewSource(1) r := rand.New(s) accounts := suite.getTestingAccounts(r, 3) // begin a new block app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: suite.app.LastBlockHeight() + 1, Hash: suite.app.LastCommitID().Hash}) feeAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) feeCoins := sdk.NewCoins(sdk.NewCoin("foo", feeAmt)) granter, grantee := accounts[0], accounts[1] oneYear := ctx.BlockTime().AddDate(1, 0, 0) err := suite.feegrantKeeper.GrantAllowance( ctx, granter.Address, grantee.Address, &feegrant.BasicAllowance{ SpendLimit: feeCoins, Expiration: &oneYear, }, ) require.NoError(err) // execute operation op := simulation.SimulateMsgRevokeAllowance(codec.NewProtoCodec(suite.interfaceRegistry), suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.feegrantKeeper, codecaddress.NewBech32Codec("cosmos")) operationMsg, futureOperations, err := op(r, app.BaseApp, ctx, accounts, "") require.NoError(err) var msg feegrant.MsgRevokeAllowance err = proto.Unmarshal(operationMsg.Msg, &msg) require.NoError(err) require.True(operationMsg.OK) require.Equal(granter.Address.String(), msg.Granter) require.Equal(grantee.Address.String(), msg.Grantee) require.Len(futureOperations, 0) } func TestSimTestSuite(t *testing.T) { suite.Run(t, new(SimTestSuite)) } ================================================ FILE: x/feegrant/testutil/expected_keepers_mocks.go ================================================ // Code generated by MockGen. DO NOT EDIT. // Source: x/feegrant/expected_keepers.go // Package testutil is a generated GoMock package. package testutil import ( context "context" reflect "reflect" address "cosmossdk.io/core/address" types "github.com/cosmos/cosmos-sdk/types" gomock "github.com/golang/mock/gomock" ) // MockAccountKeeper is a mock of AccountKeeper interface. type MockAccountKeeper struct { ctrl *gomock.Controller recorder *MockAccountKeeperMockRecorder } // MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. type MockAccountKeeperMockRecorder struct { mock *MockAccountKeeper } // NewMockAccountKeeper creates a new mock instance. func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { mock := &MockAccountKeeper{ctrl: ctrl} mock.recorder = &MockAccountKeeperMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { return m.recorder } // AddressCodec mocks base method. func (m *MockAccountKeeper) AddressCodec() address.Codec { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AddressCodec") ret0, _ := ret[0].(address.Codec) return ret0 } // AddressCodec indicates an expected call of AddressCodec. func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddressCodec", reflect.TypeOf((*MockAccountKeeper)(nil).AddressCodec)) } // GetAccount mocks base method. func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) ret0, _ := ret[0].(types.AccountI) return ret0 } // GetAccount indicates an expected call of GetAccount. func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) } // GetModuleAccount mocks base method. func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types.ModuleAccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) ret0, _ := ret[0].(types.ModuleAccountI) return ret0 } // GetModuleAccount indicates an expected call of GetModuleAccount. func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName) } // GetModuleAddress mocks base method. func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) ret0, _ := ret[0].(types.AccAddress) return ret0 } // GetModuleAddress indicates an expected call of GetModuleAddress. func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName) } // NewAccountWithAddress mocks base method. func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "NewAccountWithAddress", ctx, addr) ret0, _ := ret[0].(types.AccountI) return ret0 } // NewAccountWithAddress indicates an expected call of NewAccountWithAddress. func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr) } // SetAccount mocks base method. func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types.AccountI) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetAccount", ctx, acc) } // SetAccount indicates an expected call of SetAccount. func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc) } // MockBankKeeper is a mock of BankKeeper interface. type MockBankKeeper struct { ctrl *gomock.Controller recorder *MockBankKeeperMockRecorder } // MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. type MockBankKeeperMockRecorder struct { mock *MockBankKeeper } // NewMockBankKeeper creates a new mock instance. func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { mock := &MockBankKeeper{ctrl: ctrl} mock.recorder = &MockBankKeeperMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { return m.recorder } // BlockedAddr mocks base method. func (m *MockBankKeeper) BlockedAddr(addr types.AccAddress) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BlockedAddr", addr) ret0, _ := ret[0].(bool) return ret0 } // BlockedAddr indicates an expected call of BlockedAddr. func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr) } // SendCoinsFromAccountToModule mocks base method. func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) ret0, _ := ret[0].(error) return ret0 } // SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) } // SpendableCoins mocks base method. func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) ret0, _ := ret[0].(types.Coins) return ret0 } // SpendableCoins indicates an expected call of SpendableCoins. func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) } ================================================ FILE: x/feegrant/tx.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/feegrant/v1beta1/tx.proto package feegrant import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 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. 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 // MsgGrantAllowance adds permission for Grantee to spend up to Allowance // of fees from the account of Granter. type MsgGrantAllowance struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *types.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (m *MsgGrantAllowance) Reset() { *m = MsgGrantAllowance{} } func (m *MsgGrantAllowance) String() string { return proto.CompactTextString(m) } func (*MsgGrantAllowance) ProtoMessage() {} func (*MsgGrantAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{0} } func (m *MsgGrantAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgGrantAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgGrantAllowance.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 *MsgGrantAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgGrantAllowance.Merge(m, src) } func (m *MsgGrantAllowance) XXX_Size() int { return m.Size() } func (m *MsgGrantAllowance) XXX_DiscardUnknown() { xxx_messageInfo_MsgGrantAllowance.DiscardUnknown(m) } var xxx_messageInfo_MsgGrantAllowance proto.InternalMessageInfo func (m *MsgGrantAllowance) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *MsgGrantAllowance) GetGrantee() string { if m != nil { return m.Grantee } return "" } func (m *MsgGrantAllowance) GetAllowance() *types.Any { if m != nil { return m.Allowance } return nil } // MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. type MsgGrantAllowanceResponse struct { } func (m *MsgGrantAllowanceResponse) Reset() { *m = MsgGrantAllowanceResponse{} } func (m *MsgGrantAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*MsgGrantAllowanceResponse) ProtoMessage() {} func (*MsgGrantAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{1} } func (m *MsgGrantAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgGrantAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgGrantAllowanceResponse.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 *MsgGrantAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgGrantAllowanceResponse.Merge(m, src) } func (m *MsgGrantAllowanceResponse) XXX_Size() int { return m.Size() } func (m *MsgGrantAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgGrantAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgGrantAllowanceResponse proto.InternalMessageInfo // MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. type MsgRevokeAllowance struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` } func (m *MsgRevokeAllowance) Reset() { *m = MsgRevokeAllowance{} } func (m *MsgRevokeAllowance) String() string { return proto.CompactTextString(m) } func (*MsgRevokeAllowance) ProtoMessage() {} func (*MsgRevokeAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{2} } func (m *MsgRevokeAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRevokeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRevokeAllowance.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 *MsgRevokeAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRevokeAllowance.Merge(m, src) } func (m *MsgRevokeAllowance) XXX_Size() int { return m.Size() } func (m *MsgRevokeAllowance) XXX_DiscardUnknown() { xxx_messageInfo_MsgRevokeAllowance.DiscardUnknown(m) } var xxx_messageInfo_MsgRevokeAllowance proto.InternalMessageInfo func (m *MsgRevokeAllowance) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *MsgRevokeAllowance) GetGrantee() string { if m != nil { return m.Grantee } return "" } // MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. type MsgRevokeAllowanceResponse struct { } func (m *MsgRevokeAllowanceResponse) Reset() { *m = MsgRevokeAllowanceResponse{} } func (m *MsgRevokeAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*MsgRevokeAllowanceResponse) ProtoMessage() {} func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{3} } func (m *MsgRevokeAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRevokeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRevokeAllowanceResponse.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 *MsgRevokeAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRevokeAllowanceResponse.Merge(m, src) } func (m *MsgRevokeAllowanceResponse) XXX_Size() int { return m.Size() } func (m *MsgRevokeAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgRevokeAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgRevokeAllowanceResponse proto.InternalMessageInfo // MsgPruneAllowances prunes expired fee allowances. type MsgPruneAllowances struct { // pruner is the address of the user pruning expired allowances. Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` } func (m *MsgPruneAllowances) Reset() { *m = MsgPruneAllowances{} } func (m *MsgPruneAllowances) String() string { return proto.CompactTextString(m) } func (*MsgPruneAllowances) ProtoMessage() {} func (*MsgPruneAllowances) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{4} } func (m *MsgPruneAllowances) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgPruneAllowances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgPruneAllowances.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 *MsgPruneAllowances) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgPruneAllowances.Merge(m, src) } func (m *MsgPruneAllowances) XXX_Size() int { return m.Size() } func (m *MsgPruneAllowances) XXX_DiscardUnknown() { xxx_messageInfo_MsgPruneAllowances.DiscardUnknown(m) } var xxx_messageInfo_MsgPruneAllowances proto.InternalMessageInfo func (m *MsgPruneAllowances) GetPruner() string { if m != nil { return m.Pruner } return "" } // MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. type MsgPruneAllowancesResponse struct { } func (m *MsgPruneAllowancesResponse) Reset() { *m = MsgPruneAllowancesResponse{} } func (m *MsgPruneAllowancesResponse) String() string { return proto.CompactTextString(m) } func (*MsgPruneAllowancesResponse) ProtoMessage() {} func (*MsgPruneAllowancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{5} } func (m *MsgPruneAllowancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgPruneAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgPruneAllowancesResponse.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 *MsgPruneAllowancesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgPruneAllowancesResponse.Merge(m, src) } func (m *MsgPruneAllowancesResponse) XXX_Size() int { return m.Size() } func (m *MsgPruneAllowancesResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgPruneAllowancesResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgPruneAllowancesResponse proto.InternalMessageInfo // MsgGrantDIDAllowance adds permission for a DID to spend up to Allowance // of fees from the account of Granter. type MsgGrantDIDAllowance struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` // allowance can be any of basic, periodic, allowed fee allowance. Allowance *types.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` } func (m *MsgGrantDIDAllowance) Reset() { *m = MsgGrantDIDAllowance{} } func (m *MsgGrantDIDAllowance) String() string { return proto.CompactTextString(m) } func (*MsgGrantDIDAllowance) ProtoMessage() {} func (*MsgGrantDIDAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{6} } func (m *MsgGrantDIDAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgGrantDIDAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgGrantDIDAllowance.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 *MsgGrantDIDAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgGrantDIDAllowance.Merge(m, src) } func (m *MsgGrantDIDAllowance) XXX_Size() int { return m.Size() } func (m *MsgGrantDIDAllowance) XXX_DiscardUnknown() { xxx_messageInfo_MsgGrantDIDAllowance.DiscardUnknown(m) } var xxx_messageInfo_MsgGrantDIDAllowance proto.InternalMessageInfo func (m *MsgGrantDIDAllowance) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *MsgGrantDIDAllowance) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } func (m *MsgGrantDIDAllowance) GetAllowance() *types.Any { if m != nil { return m.Allowance } return nil } // MsgGrantDIDAllowanceResponse defines the Msg/GrantDIDAllowanceResponse response type. type MsgGrantDIDAllowanceResponse struct { } func (m *MsgGrantDIDAllowanceResponse) Reset() { *m = MsgGrantDIDAllowanceResponse{} } func (m *MsgGrantDIDAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*MsgGrantDIDAllowanceResponse) ProtoMessage() {} func (*MsgGrantDIDAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{7} } func (m *MsgGrantDIDAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgGrantDIDAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgGrantDIDAllowanceResponse.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 *MsgGrantDIDAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgGrantDIDAllowanceResponse.Merge(m, src) } func (m *MsgGrantDIDAllowanceResponse) XXX_Size() int { return m.Size() } func (m *MsgGrantDIDAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgGrantDIDAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgGrantDIDAllowanceResponse proto.InternalMessageInfo // MsgExpireDIDAllowance expires an existing DID allowance by setting the expiration to current PeriodReset. type MsgExpireDIDAllowance struct { // granter is the address of the user who granted the allowance. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID whose allowance should be expired. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (m *MsgExpireDIDAllowance) Reset() { *m = MsgExpireDIDAllowance{} } func (m *MsgExpireDIDAllowance) String() string { return proto.CompactTextString(m) } func (*MsgExpireDIDAllowance) ProtoMessage() {} func (*MsgExpireDIDAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{8} } func (m *MsgExpireDIDAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgExpireDIDAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExpireDIDAllowance.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 *MsgExpireDIDAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExpireDIDAllowance.Merge(m, src) } func (m *MsgExpireDIDAllowance) XXX_Size() int { return m.Size() } func (m *MsgExpireDIDAllowance) XXX_DiscardUnknown() { xxx_messageInfo_MsgExpireDIDAllowance.DiscardUnknown(m) } var xxx_messageInfo_MsgExpireDIDAllowance proto.InternalMessageInfo func (m *MsgExpireDIDAllowance) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *MsgExpireDIDAllowance) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } // MsgExpireDIDAllowanceResponse defines the Msg/ExpireDIDAllowanceResponse response type. type MsgExpireDIDAllowanceResponse struct { } func (m *MsgExpireDIDAllowanceResponse) Reset() { *m = MsgExpireDIDAllowanceResponse{} } func (m *MsgExpireDIDAllowanceResponse) String() string { return proto.CompactTextString(m) } func (*MsgExpireDIDAllowanceResponse) ProtoMessage() {} func (*MsgExpireDIDAllowanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{9} } func (m *MsgExpireDIDAllowanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgExpireDIDAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExpireDIDAllowanceResponse.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 *MsgExpireDIDAllowanceResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExpireDIDAllowanceResponse.Merge(m, src) } func (m *MsgExpireDIDAllowanceResponse) XXX_Size() int { return m.Size() } func (m *MsgExpireDIDAllowanceResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgExpireDIDAllowanceResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgExpireDIDAllowanceResponse proto.InternalMessageInfo // EventGrantDIDAllowance is emitted when a DID allowance is granted. type EventGrantDIDAllowance struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID being granted an allowance of another user's funds. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (m *EventGrantDIDAllowance) Reset() { *m = EventGrantDIDAllowance{} } func (m *EventGrantDIDAllowance) String() string { return proto.CompactTextString(m) } func (*EventGrantDIDAllowance) ProtoMessage() {} func (*EventGrantDIDAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{10} } func (m *EventGrantDIDAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventGrantDIDAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EventGrantDIDAllowance.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 *EventGrantDIDAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_EventGrantDIDAllowance.Merge(m, src) } func (m *EventGrantDIDAllowance) XXX_Size() int { return m.Size() } func (m *EventGrantDIDAllowance) XXX_DiscardUnknown() { xxx_messageInfo_EventGrantDIDAllowance.DiscardUnknown(m) } var xxx_messageInfo_EventGrantDIDAllowance proto.InternalMessageInfo func (m *EventGrantDIDAllowance) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *EventGrantDIDAllowance) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } // EventExpireDIDAllowance is emitted when a DID allowance is expired. type EventExpireDIDAllowance struct { // granter is the address of the user expiring an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee_did is the DID whose allowance is being expired. GranteeDid string `protobuf:"bytes,2,opt,name=grantee_did,json=granteeDid,proto3" json:"grantee_did,omitempty"` } func (m *EventExpireDIDAllowance) Reset() { *m = EventExpireDIDAllowance{} } func (m *EventExpireDIDAllowance) String() string { return proto.CompactTextString(m) } func (*EventExpireDIDAllowance) ProtoMessage() {} func (*EventExpireDIDAllowance) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{11} } func (m *EventExpireDIDAllowance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventExpireDIDAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EventExpireDIDAllowance.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 *EventExpireDIDAllowance) XXX_Merge(src proto.Message) { xxx_messageInfo_EventExpireDIDAllowance.Merge(m, src) } func (m *EventExpireDIDAllowance) XXX_Size() int { return m.Size() } func (m *EventExpireDIDAllowance) XXX_DiscardUnknown() { xxx_messageInfo_EventExpireDIDAllowance.DiscardUnknown(m) } var xxx_messageInfo_EventExpireDIDAllowance proto.InternalMessageInfo func (m *EventExpireDIDAllowance) GetGranter() string { if m != nil { return m.Granter } return "" } func (m *EventExpireDIDAllowance) GetGranteeDid() string { if m != nil { return m.GranteeDid } return "" } // MsgPruneDIDAllowances prunes expired DID fee allowances. type MsgPruneDIDAllowances struct { // pruner is the address of the user pruning expired DID allowances. Pruner string `protobuf:"bytes,1,opt,name=pruner,proto3" json:"pruner,omitempty"` } func (m *MsgPruneDIDAllowances) Reset() { *m = MsgPruneDIDAllowances{} } func (m *MsgPruneDIDAllowances) String() string { return proto.CompactTextString(m) } func (*MsgPruneDIDAllowances) ProtoMessage() {} func (*MsgPruneDIDAllowances) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{12} } func (m *MsgPruneDIDAllowances) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgPruneDIDAllowances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgPruneDIDAllowances.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 *MsgPruneDIDAllowances) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgPruneDIDAllowances.Merge(m, src) } func (m *MsgPruneDIDAllowances) XXX_Size() int { return m.Size() } func (m *MsgPruneDIDAllowances) XXX_DiscardUnknown() { xxx_messageInfo_MsgPruneDIDAllowances.DiscardUnknown(m) } var xxx_messageInfo_MsgPruneDIDAllowances proto.InternalMessageInfo func (m *MsgPruneDIDAllowances) GetPruner() string { if m != nil { return m.Pruner } return "" } // MsgPruneDIDAllowancesResponse defines the Msg/PruneDIDAllowancesResponse response type. type MsgPruneDIDAllowancesResponse struct { } func (m *MsgPruneDIDAllowancesResponse) Reset() { *m = MsgPruneDIDAllowancesResponse{} } func (m *MsgPruneDIDAllowancesResponse) String() string { return proto.CompactTextString(m) } func (*MsgPruneDIDAllowancesResponse) ProtoMessage() {} func (*MsgPruneDIDAllowancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_26a0653b3586ef57, []int{13} } func (m *MsgPruneDIDAllowancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgPruneDIDAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgPruneDIDAllowancesResponse.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 *MsgPruneDIDAllowancesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgPruneDIDAllowancesResponse.Merge(m, src) } func (m *MsgPruneDIDAllowancesResponse) XXX_Size() int { return m.Size() } func (m *MsgPruneDIDAllowancesResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgPruneDIDAllowancesResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgPruneDIDAllowancesResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgGrantAllowance)(nil), "sourcehub.feegrant.v1beta1.MsgGrantAllowance") proto.RegisterType((*MsgGrantAllowanceResponse)(nil), "sourcehub.feegrant.v1beta1.MsgGrantAllowanceResponse") proto.RegisterType((*MsgRevokeAllowance)(nil), "sourcehub.feegrant.v1beta1.MsgRevokeAllowance") proto.RegisterType((*MsgRevokeAllowanceResponse)(nil), "sourcehub.feegrant.v1beta1.MsgRevokeAllowanceResponse") proto.RegisterType((*MsgPruneAllowances)(nil), "sourcehub.feegrant.v1beta1.MsgPruneAllowances") proto.RegisterType((*MsgPruneAllowancesResponse)(nil), "sourcehub.feegrant.v1beta1.MsgPruneAllowancesResponse") proto.RegisterType((*MsgGrantDIDAllowance)(nil), "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowance") proto.RegisterType((*MsgGrantDIDAllowanceResponse)(nil), "sourcehub.feegrant.v1beta1.MsgGrantDIDAllowanceResponse") proto.RegisterType((*MsgExpireDIDAllowance)(nil), "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowance") proto.RegisterType((*MsgExpireDIDAllowanceResponse)(nil), "sourcehub.feegrant.v1beta1.MsgExpireDIDAllowanceResponse") proto.RegisterType((*EventGrantDIDAllowance)(nil), "sourcehub.feegrant.v1beta1.EventGrantDIDAllowance") proto.RegisterType((*EventExpireDIDAllowance)(nil), "sourcehub.feegrant.v1beta1.EventExpireDIDAllowance") proto.RegisterType((*MsgPruneDIDAllowances)(nil), "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowances") proto.RegisterType((*MsgPruneDIDAllowancesResponse)(nil), "sourcehub.feegrant.v1beta1.MsgPruneDIDAllowancesResponse") } func init() { proto.RegisterFile("sourcehub/feegrant/v1beta1/tx.proto", fileDescriptor_26a0653b3586ef57) } var fileDescriptor_26a0653b3586ef57 = []byte{ // 686 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x4f, 0x13, 0x41, 0x14, 0x67, 0x20, 0x62, 0x18, 0x12, 0x91, 0x4d, 0x85, 0xb2, 0xc2, 0x96, 0xac, 0x17, 0x42, 0xdc, 0x99, 0x6d, 0x0d, 0x46, 0x7b, 0x83, 0x80, 0x84, 0x43, 0x13, 0x53, 0x8c, 0x07, 0x2f, 0xb8, 0xed, 0x0e, 0xeb, 0x06, 0xba, 0xd3, 0xec, 0x6c, 0x17, 0x38, 0x69, 0x38, 0x1a, 0x0f, 0xfa, 0x05, 0xf8, 0x04, 0x1e, 0x38, 0xf4, 0x43, 0x18, 0x4e, 0x84, 0x93, 0x47, 0x03, 0x87, 0x7e, 0x0b, 0x63, 0xba, 0x7f, 0xdb, 0xd9, 0xad, 0xdb, 0x4a, 0xe4, 0xd2, 0x66, 0xde, 0xfc, 0xde, 0x7b, 0xbf, 0xdf, 0x6f, 0x66, 0x5e, 0x16, 0x3e, 0x61, 0xb4, 0x65, 0xd7, 0xc9, 0x87, 0x56, 0x0d, 0xef, 0x13, 0x62, 0xd8, 0x9a, 0xe5, 0x60, 0xb7, 0x58, 0x23, 0x8e, 0x56, 0xc4, 0xce, 0x31, 0x6a, 0xda, 0xd4, 0xa1, 0x82, 0x18, 0x81, 0x50, 0x08, 0x42, 0x01, 0x48, 0x5c, 0x30, 0x28, 0x35, 0x0e, 0x09, 0xf6, 0x90, 0xb5, 0xd6, 0x3e, 0xd6, 0xac, 0x13, 0x3f, 0x4d, 0x5c, 0xa8, 0x53, 0xd6, 0xa0, 0x6c, 0xcf, 0x5b, 0x61, 0x7f, 0x11, 0x6c, 0xcd, 0xfb, 0x2b, 0xdc, 0x60, 0x06, 0x76, 0x8b, 0xdd, 0xbf, 0x60, 0x63, 0x56, 0x6b, 0x98, 0x16, 0xc5, 0xde, 0xaf, 0x1f, 0x92, 0xbf, 0x8c, 0xc3, 0xd9, 0x0a, 0x33, 0xb6, 0xbb, 0x6d, 0xd7, 0x0f, 0x0f, 0xe9, 0x91, 0x66, 0xd5, 0x89, 0x50, 0x82, 0xf7, 0x3d, 0x22, 0xc4, 0xce, 0x83, 0x65, 0xb0, 0x32, 0xb5, 0x91, 0xbf, 0x6a, 0x2b, 0xb9, 0xa0, 0xc9, 0xba, 0xae, 0xdb, 0x84, 0xb1, 0x5d, 0xc7, 0x36, 0x2d, 0xa3, 0x1a, 0x02, 0xe3, 0x1c, 0x92, 0x1f, 0x1f, 0x2e, 0x87, 0x08, 0xef, 0xe1, 0x94, 0x16, 0x36, 0xcd, 0x4f, 0x2c, 0x83, 0x95, 0xe9, 0x52, 0x0e, 0xf9, 0x9a, 0x51, 0xa8, 0x19, 0xad, 0x5b, 0x27, 0x1b, 0x4f, 0x2f, 0xda, 0xca, 0xca, 0x60, 0xa3, 0xd0, 0x2b, 0x42, 0x22, 0xf6, 0x3b, 0xd5, 0xb8, 0x68, 0x59, 0x39, 0xed, 0x9c, 0xaf, 0x86, 0x1c, 0x3f, 0x77, 0xce, 0x57, 0x17, 0x7d, 0x46, 0x0a, 0xd3, 0x0f, 0x70, 0x42, 0xb8, 0xfc, 0x18, 0x2e, 0x24, 0x82, 0x55, 0xc2, 0x9a, 0xd4, 0x62, 0x44, 0xfe, 0x0e, 0xa0, 0x50, 0x61, 0x46, 0x95, 0xb8, 0xf4, 0x80, 0xdc, 0xb9, 0x59, 0x65, 0xc4, 0x4b, 0x59, 0xea, 0x97, 0xc2, 0xf1, 0x92, 0x17, 0xa1, 0x98, 0x8c, 0x46, 0x62, 0x0c, 0x4f, 0xcb, 0x6b, 0xbb, 0x65, 0xc5, 0x9b, 0x4c, 0x50, 0xe1, 0x64, 0xb3, 0x1b, 0xca, 0x96, 0x12, 0xe0, 0xca, 0x85, 0xab, 0xb6, 0xf2, 0x30, 0x26, 0xb2, 0xec, 0xaa, 0x68, 0x4d, 0xed, 0x32, 0x0d, 0x00, 0x72, 0xc9, 0xa3, 0xc1, 0x35, 0x0a, 0x69, 0x94, 0x73, 0x69, 0xe9, 0xf2, 0x6f, 0x00, 0x73, 0xe1, 0x39, 0x6c, 0xee, 0x6c, 0xde, 0xce, 0xeb, 0x02, 0x9c, 0x0e, 0x2c, 0xdc, 0xd3, 0x4d, 0xdd, 0xf7, 0xbb, 0x0a, 0x83, 0xd0, 0xa6, 0xa9, 0xdf, 0xc1, 0x2d, 0xc4, 0xfc, 0xd1, 0x49, 0xf1, 0x64, 0x48, 0xd3, 0x29, 0x4b, 0x70, 0x31, 0x2d, 0x1e, 0x9d, 0xde, 0x19, 0x80, 0x8f, 0x2a, 0xcc, 0xd8, 0x3a, 0x6e, 0x9a, 0x36, 0xf9, 0xef, 0x0e, 0x95, 0x55, 0x9e, 0x7f, 0xa1, 0x8f, 0x7f, 0x92, 0x86, 0x5c, 0x80, 0x4b, 0xa9, 0x1b, 0x91, 0x82, 0x5d, 0x38, 0xb7, 0xe5, 0x12, 0xcb, 0x49, 0x9e, 0x71, 0x9e, 0x53, 0x30, 0x3c, 0x4f, 0xf9, 0x0d, 0x9c, 0xf7, 0x8a, 0xa6, 0xf8, 0x72, 0x8b, 0xaa, 0x6f, 0x3d, 0xaf, 0xbd, 0x1b, 0xdc, 0x5b, 0xf2, 0x5f, 0x5e, 0xcb, 0x74, 0xef, 0xcb, 0xf0, 0x3d, 0x4a, 0xd6, 0x0d, 0x3d, 0x2a, 0x9d, 0x4d, 0xc2, 0x89, 0x0a, 0x33, 0x04, 0x17, 0x3e, 0xe0, 0x06, 0xb4, 0x82, 0xfe, 0x72, 0x0d, 0x13, 0x13, 0x4c, 0x5c, 0x1b, 0x09, 0x1e, 0xf6, 0x17, 0x4e, 0xe0, 0x0c, 0x3f, 0xec, 0x50, 0x46, 0x25, 0x0e, 0x2f, 0x3e, 0x1f, 0x0d, 0x1f, 0xb5, 0xfe, 0x06, 0xe0, 0x0c, 0x3f, 0x9c, 0xb2, 0x7a, 0x73, 0xf8, 0xcc, 0xde, 0x03, 0x66, 0x92, 0x3c, 0x77, 0xd1, 0x56, 0x04, 0x7e, 0x26, 0x21, 0x55, 0xf8, 0x08, 0x67, 0x93, 0xb7, 0x55, 0x1d, 0xc6, 0xda, 0xde, 0x0c, 0xf1, 0xc5, 0xa8, 0x19, 0x91, 0x29, 0xa7, 0x00, 0x0a, 0x29, 0x57, 0xbb, 0x98, 0x51, 0x30, 0x99, 0x22, 0xbe, 0x1c, 0x39, 0xa5, 0x8f, 0x44, 0xca, 0x5b, 0x28, 0x0e, 0x63, 0x76, 0x5f, 0x4a, 0x26, 0x89, 0xc1, 0x2f, 0x43, 0xbc, 0xf7, 0xa9, 0x73, 0xbe, 0x0a, 0x36, 0xb6, 0x7f, 0x5c, 0x4b, 0xe0, 0xf2, 0x5a, 0x02, 0xbf, 0xae, 0x25, 0xf0, 0xf5, 0x46, 0x1a, 0xbb, 0xbc, 0x91, 0xc6, 0x7e, 0xde, 0x48, 0x63, 0xef, 0x14, 0xc3, 0x74, 0xba, 0x75, 0xeb, 0xb4, 0x81, 0xfd, 0x2e, 0x16, 0x71, 0x8e, 0xa8, 0x7d, 0x80, 0xe3, 0xc9, 0x75, 0x1c, 0x7d, 0x95, 0xd5, 0x26, 0xbd, 0x39, 0xff, 0xec, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x2a, 0x61, 0x97, 0xb2, 0x09, 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 { // GrantAllowance grants fee allowance to the grantee on the granter's // account with the provided expiration time. GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) // GrantDIDAllowance grants fee allowance to a DID on the granter's account. GrantDIDAllowance(ctx context.Context, in *MsgGrantDIDAllowance, opts ...grpc.CallOption) (*MsgGrantDIDAllowanceResponse, error) // ExpireDIDAllowance expires a fee allowance by setting the expiration to current PeriodReset. // This allows the allowance to be automatically pruned when the current period expires. ExpireDIDAllowance(ctx context.Context, in *MsgExpireDIDAllowance, opts ...grpc.CallOption) (*MsgExpireDIDAllowanceResponse, error) // PruneDIDAllowances prunes expired DID fee allowances, currently up to 75 at a time. PruneDIDAllowances(ctx context.Context, in *MsgPruneDIDAllowances, opts ...grpc.CallOption) (*MsgPruneDIDAllowancesResponse, error) } type msgClient struct { cc grpc1.ClientConn } func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } func (c *msgClient) GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) { out := new(MsgGrantAllowanceResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Msg/GrantAllowance", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) { out := new(MsgRevokeAllowanceResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Msg/RevokeAllowance", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) PruneAllowances(ctx context.Context, in *MsgPruneAllowances, opts ...grpc.CallOption) (*MsgPruneAllowancesResponse, error) { out := new(MsgPruneAllowancesResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Msg/PruneAllowances", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) GrantDIDAllowance(ctx context.Context, in *MsgGrantDIDAllowance, opts ...grpc.CallOption) (*MsgGrantDIDAllowanceResponse, error) { out := new(MsgGrantDIDAllowanceResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Msg/GrantDIDAllowance", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) ExpireDIDAllowance(ctx context.Context, in *MsgExpireDIDAllowance, opts ...grpc.CallOption) (*MsgExpireDIDAllowanceResponse, error) { out := new(MsgExpireDIDAllowanceResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Msg/ExpireDIDAllowance", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) PruneDIDAllowances(ctx context.Context, in *MsgPruneDIDAllowances, opts ...grpc.CallOption) (*MsgPruneDIDAllowancesResponse, error) { out := new(MsgPruneDIDAllowancesResponse) err := c.cc.Invoke(ctx, "/sourcehub.feegrant.v1beta1.Msg/PruneDIDAllowances", in, out, opts...) if err != nil { return nil, err } return out, nil } // MsgServer is the server API for Msg service. type MsgServer interface { // GrantAllowance grants fee allowance to the grantee on the granter's // account with the provided expiration time. GrantAllowance(context.Context, *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) // PruneAllowances prunes expired fee allowances, currently up to 75 at a time. PruneAllowances(context.Context, *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) // GrantDIDAllowance grants fee allowance to a DID on the granter's account. GrantDIDAllowance(context.Context, *MsgGrantDIDAllowance) (*MsgGrantDIDAllowanceResponse, error) // ExpireDIDAllowance expires a fee allowance by setting the expiration to current PeriodReset. // This allows the allowance to be automatically pruned when the current period expires. ExpireDIDAllowance(context.Context, *MsgExpireDIDAllowance) (*MsgExpireDIDAllowanceResponse, error) // PruneDIDAllowances prunes expired DID fee allowances, currently up to 75 at a time. PruneDIDAllowances(context.Context, *MsgPruneDIDAllowances) (*MsgPruneDIDAllowancesResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } func (*UnimplementedMsgServer) GrantAllowance(ctx context.Context, req *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GrantAllowance not implemented") } func (*UnimplementedMsgServer) RevokeAllowance(ctx context.Context, req *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") } func (*UnimplementedMsgServer) PruneAllowances(ctx context.Context, req *MsgPruneAllowances) (*MsgPruneAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneAllowances not implemented") } func (*UnimplementedMsgServer) GrantDIDAllowance(ctx context.Context, req *MsgGrantDIDAllowance) (*MsgGrantDIDAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GrantDIDAllowance not implemented") } func (*UnimplementedMsgServer) ExpireDIDAllowance(ctx context.Context, req *MsgExpireDIDAllowance) (*MsgExpireDIDAllowanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExpireDIDAllowance not implemented") } func (*UnimplementedMsgServer) PruneDIDAllowances(ctx context.Context, req *MsgPruneDIDAllowances) (*MsgPruneDIDAllowancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneDIDAllowances not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } func _Msg_GrantAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgGrantAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).GrantAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Msg/GrantAllowance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).GrantAllowance(ctx, req.(*MsgGrantAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRevokeAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RevokeAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Msg/RevokeAllowance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RevokeAllowance(ctx, req.(*MsgRevokeAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_PruneAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgPruneAllowances) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).PruneAllowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Msg/PruneAllowances", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).PruneAllowances(ctx, req.(*MsgPruneAllowances)) } return interceptor(ctx, in, info, handler) } func _Msg_GrantDIDAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgGrantDIDAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).GrantDIDAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Msg/GrantDIDAllowance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).GrantDIDAllowance(ctx, req.(*MsgGrantDIDAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_ExpireDIDAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgExpireDIDAllowance) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).ExpireDIDAllowance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Msg/ExpireDIDAllowance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).ExpireDIDAllowance(ctx, req.(*MsgExpireDIDAllowance)) } return interceptor(ctx, in, info, handler) } func _Msg_PruneDIDAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgPruneDIDAllowances) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).PruneDIDAllowances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.feegrant.v1beta1.Msg/PruneDIDAllowances", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).PruneDIDAllowances(ctx, req.(*MsgPruneDIDAllowances)) } return interceptor(ctx, in, info, handler) } var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.feegrant.v1beta1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GrantAllowance", Handler: _Msg_GrantAllowance_Handler, }, { MethodName: "RevokeAllowance", Handler: _Msg_RevokeAllowance_Handler, }, { MethodName: "PruneAllowances", Handler: _Msg_PruneAllowances_Handler, }, { MethodName: "GrantDIDAllowance", Handler: _Msg_GrantDIDAllowance_Handler, }, { MethodName: "ExpireDIDAllowance", Handler: _Msg_ExpireDIDAllowance_Handler, }, { MethodName: "PruneDIDAllowances", Handler: _Msg_PruneDIDAllowances_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/feegrant/v1beta1/tx.proto", } func (m *MsgGrantAllowance) 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 *MsgGrantAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgGrantAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Allowance != nil { { size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.Grantee) > 0 { i -= len(m.Grantee) copy(dAtA[i:], m.Grantee) i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgGrantAllowanceResponse) 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 *MsgGrantAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgGrantAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgRevokeAllowance) 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 *MsgRevokeAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRevokeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Grantee) > 0 { i -= len(m.Grantee) copy(dAtA[i:], m.Grantee) i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgRevokeAllowanceResponse) 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 *MsgRevokeAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRevokeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgPruneAllowances) 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 *MsgPruneAllowances) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgPruneAllowances) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Pruner) > 0 { i -= len(m.Pruner) copy(dAtA[i:], m.Pruner) i = encodeVarintTx(dAtA, i, uint64(len(m.Pruner))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgPruneAllowancesResponse) 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 *MsgPruneAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgPruneAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgGrantDIDAllowance) 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 *MsgGrantDIDAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgGrantDIDAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Allowance != nil { { size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintTx(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgGrantDIDAllowanceResponse) 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 *MsgGrantDIDAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgGrantDIDAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgExpireDIDAllowance) 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 *MsgExpireDIDAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgExpireDIDAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintTx(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgExpireDIDAllowanceResponse) 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 *MsgExpireDIDAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgExpireDIDAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *EventGrantDIDAllowance) 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 *EventGrantDIDAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EventGrantDIDAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintTx(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *EventExpireDIDAllowance) 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 *EventExpireDIDAllowance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EventExpireDIDAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.GranteeDid) > 0 { i -= len(m.GranteeDid) copy(dAtA[i:], m.GranteeDid) i = encodeVarintTx(dAtA, i, uint64(len(m.GranteeDid))) i-- dAtA[i] = 0x12 } if len(m.Granter) > 0 { i -= len(m.Granter) copy(dAtA[i:], m.Granter) i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgPruneDIDAllowances) 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 *MsgPruneDIDAllowances) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgPruneDIDAllowances) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Pruner) > 0 { i -= len(m.Pruner) copy(dAtA[i:], m.Pruner) i = encodeVarintTx(dAtA, i, uint64(len(m.Pruner))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgPruneDIDAllowancesResponse) 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 *MsgPruneDIDAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgPruneDIDAllowancesResponse) 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 *MsgGrantAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Grantee) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.Allowance != nil { l = m.Allowance.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgGrantAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgRevokeAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Grantee) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgRevokeAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgPruneAllowances) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Pruner) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgPruneAllowancesResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgGrantDIDAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.GranteeDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.Allowance != nil { l = m.Allowance.Size() n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgGrantDIDAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgExpireDIDAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.GranteeDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgExpireDIDAllowanceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *EventGrantDIDAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.GranteeDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *EventExpireDIDAllowance) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Granter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.GranteeDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgPruneDIDAllowances) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Pruner) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgPruneDIDAllowancesResponse) 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 *MsgGrantAllowance) 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: MsgGrantAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgGrantAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowance", 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.Allowance == nil { m.Allowance = &types.Any{} } if err := m.Allowance.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 *MsgGrantAllowanceResponse) 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: MsgGrantAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgGrantAllowanceResponse: 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 (m *MsgRevokeAllowance) 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: MsgRevokeAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRevokeAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) 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 *MsgRevokeAllowanceResponse) 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: MsgRevokeAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRevokeAllowanceResponse: 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 (m *MsgPruneAllowances) 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: MsgPruneAllowances: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgPruneAllowances: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pruner", 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.Pruner = string(dAtA[iNdEx:postIndex]) 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 *MsgPruneAllowancesResponse) 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: MsgPruneAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgPruneAllowancesResponse: 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 (m *MsgGrantDIDAllowance) 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: MsgGrantDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgGrantDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", 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.GranteeDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Allowance", 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.Allowance == nil { m.Allowance = &types.Any{} } if err := m.Allowance.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 *MsgGrantDIDAllowanceResponse) 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: MsgGrantDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgGrantDIDAllowanceResponse: 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 (m *MsgExpireDIDAllowance) 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: MsgExpireDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgExpireDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", 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.GranteeDid = string(dAtA[iNdEx:postIndex]) 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 *MsgExpireDIDAllowanceResponse) 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: MsgExpireDIDAllowanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgExpireDIDAllowanceResponse: 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 (m *EventGrantDIDAllowance) 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: EventGrantDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EventGrantDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", 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.GranteeDid = string(dAtA[iNdEx:postIndex]) 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 *EventExpireDIDAllowance) 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: EventExpireDIDAllowance: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EventExpireDIDAllowance: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GranteeDid", 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.GranteeDid = string(dAtA[iNdEx:postIndex]) 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 *MsgPruneDIDAllowances) 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: MsgPruneDIDAllowances: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgPruneDIDAllowances: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pruner", 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.Pruner = string(dAtA[iNdEx:postIndex]) 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 *MsgPruneDIDAllowancesResponse) 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: MsgPruneDIDAllowancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgPruneDIDAllowancesResponse: 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") ) ================================================ FILE: x/hub/keeper/abci.go ================================================ package keeper import ( "context" "time" "github.com/cosmos/cosmos-sdk/telemetry" "github.com/sourcenetwork/sourcehub/app/metrics" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // EndBlocker checks for expired JWS tokens and marks them as invalid. func (k *Keeper) EndBlocker(ctx context.Context) error { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) if err := k.CheckAndUpdateExpiredTokens(ctx); err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, telemetry.MetricKeyEndBlocker, err) k.Logger().Error("Failed to check and update expired JWS tokens", "error", err) } return nil } ================================================ FILE: x/hub/keeper/chain_config.go ================================================ package keeper import ( "context" "github.com/cosmos/cosmos-sdk/runtime" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // SetChainConfig sets the immutable chain config // specified at genesis func (k *Keeper) SetChainConfig(ctx context.Context, cfg types.ChainConfig) error { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := storeAdapter.Get(types.ChainConfigKey) if bz != nil { return types.ErrConfigSet } bz = k.cdc.MustMarshal(&cfg) storeAdapter.Set(types.ChainConfigKey, bz) return nil } func (k *Keeper) GetChainConfig(ctx context.Context) types.ChainConfig { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := storeAdapter.Get(types.ChainConfigKey) if bz == nil { return types.DefaultGenesis().ChainConfig } cfg := types.ChainConfig{} k.cdc.MustUnmarshal(bz, &cfg) return cfg } ================================================ FILE: x/hub/keeper/chain_config_test.go ================================================ package keeper import ( "testing" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func TestChainConfig_SetGetConfig_ReturnsSetConfig(t *testing.T) { ctx, k, _ := setupKeeper(t) cfg := types.ChainConfig{ AllowZeroFeeTxs: true, IgnoreBearerAuth: true, } err := k.SetChainConfig(ctx, cfg) require.NoError(t, err) got := k.GetChainConfig(ctx) require.Equal(t, cfg, got) } func TestChainConfig_SetWithConfigAlreadyInitialized_ReturnError(t *testing.T) { ctx, k, _ := setupKeeper(t) cfg := types.ChainConfig{ AllowZeroFeeTxs: true, IgnoreBearerAuth: true, } err := k.SetChainConfig(ctx, cfg) require.NoError(t, err) cfg2 := types.ChainConfig{ AllowZeroFeeTxs: false, IgnoreBearerAuth: true, } err = k.SetChainConfig(ctx, cfg2) require.ErrorIs(t, err, types.ErrConfigSet) } func TestChainConfig_GetWhileNotSet_ReturnsDefaultConfig(t *testing.T) { ctx, k, _ := setupKeeper(t) cfg := types.DefaultGenesis().ChainConfig got := k.GetChainConfig(ctx) require.Equal(t, cfg, got) } ================================================ FILE: x/hub/keeper/grpc_query.go ================================================ package keeper import ( "github.com/sourcenetwork/sourcehub/x/hub/types" ) var _ types.QueryServer = &Keeper{} ================================================ FILE: x/hub/keeper/ica_connection.go ================================================ package keeper import ( "strings" errorsmod "cosmossdk.io/errors" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types" tmtypes "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // icaConnectionStore returns a prefix store for ICA connections. func (k *Keeper) icaConnectionStore(ctx sdk.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, types.ICAConnectionKeyPrefix) } // SetICAConnection stores an ICA connection. func (k *Keeper) SetICAConnection(ctx sdk.Context, icaAddress, controllerAddress, controllerChainID, connectionID string) error { if icaAddress == "" { return errorsmod.Wrap(types.ErrInvalidInput, "ICA address cannot be empty") } connection := types.ICAConnection{ IcaAddress: icaAddress, ControllerAddress: controllerAddress, ControllerChainId: controllerChainID, ConnectionId: connectionID, } bz, err := k.cdc.Marshal(&connection) if err != nil { return errorsmod.Wrapf(err, "marshal ICA connection for address %s", icaAddress) } store := k.icaConnectionStore(ctx) store.Set([]byte(icaAddress), bz) return nil } // GetICAConnection retrieves an ICA connection by address. func (k *Keeper) GetICAConnection(ctx sdk.Context, icaAddress string) (types.ICAConnection, bool) { store := k.icaConnectionStore(ctx) bz := store.Get([]byte(icaAddress)) if bz == nil { return types.ICAConnection{}, false } var connection types.ICAConnection k.cdc.MustUnmarshal(bz, &connection) return connection, true } // GetAllICAConnections retrieves all ICA connections. func (k *Keeper) GetAllICAConnections(ctx sdk.Context) []types.ICAConnection { var connections []types.ICAConnection connectionsCallback := func(icaAddress string, connection types.ICAConnection) { connections = append(connections, connection) } k.mustIterateICAConnections(ctx, connectionsCallback) return connections } // mustIterateICAConnections iterates over all ICA connections in the store and performs the provided callback function. func (k *Keeper) mustIterateICAConnections(ctx sdk.Context, cb func(icaAddress string, connection types.ICAConnection)) { store := k.icaConnectionStore(ctx) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var connection types.ICAConnection k.cdc.MustUnmarshal(iterator.Value(), &connection) icaAddress := string(iterator.Key()) cb(icaAddress, connection) } } // HandleICAChannelOpen processes ICA channel opening and stores connection information. func (k *Keeper) HandleICAChannelOpen( ctx sdk.Context, connectionID, controllerPortID string, icaHostKeeper types.ICAHostKeeper, connectionKeeper types.ConnectionKeeper, clientKeeper types.ClientKeeper, ) error { // Get ICA address (should exist after OnChanOpenTry) icaAddr, found := icaHostKeeper.GetInterchainAccountAddress(ctx, connectionID, controllerPortID) if !found { return errorsmod.Wrapf( types.ErrInvalidInput, "ICA address not found for connection_id %s and controller_port_id %s", connectionID, controllerPortID, ) } // Check if connection already exists to avoid duplicates if _, exists := k.GetICAConnection(ctx, icaAddr); exists { return errorsmod.Wrapf(types.ErrInvalidInput, "ICA connection already exists for ica_address %s", icaAddr) } // Extract controller address from port ID (icacontroller-{address}) if !strings.HasPrefix(controllerPortID, icatypes.ControllerPortPrefix) { return errorsmod.Wrapf( types.ErrInvalidInput, "invalid controller port ID prefix: %s, expected prefix: %s", controllerPortID, icatypes.ControllerPortPrefix, ) } // Get controller chain ID from connection conn, found := connectionKeeper.GetConnection(ctx, connectionID) if !found { return errorsmod.Wrapf(types.ErrInvalidInput, "connection not found: %s", connectionID) } clientState, ok := clientKeeper.GetClientState(ctx, conn.ClientId) if !ok { return errorsmod.Wrapf(types.ErrInvalidInput, "client state not found: %s", conn.ClientId) } // Extract chain ID from Tendermint client state tmClientState, ok := clientState.(*tmtypes.ClientState) if !ok { return errorsmod.Wrapf( types.ErrInvalidInput, "client state is not Tendermint type for client_id %s, got type %T", conn.ClientId, clientState, ) } controllerChainID := tmClientState.GetChainID() if controllerChainID == "" { return errorsmod.Wrapf(types.ErrInvalidInput, "controller chain ID is empty for client_id %s", conn.ClientId) } controllerAddr := strings.TrimPrefix(controllerPortID, icatypes.ControllerPortPrefix) if err := k.SetICAConnection(ctx, icaAddr, controllerAddr, controllerChainID, connectionID); err != nil { return errorsmod.Wrapf(err, "failed to store ICA connection for ica_address %s", icaAddr) } return nil } ================================================ FILE: x/hub/keeper/ica_connection_test.go ================================================ package keeper import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" connectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types" ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" tmtypes "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" "github.com/sourcenetwork/sourcehub/x/hub/types" "github.com/stretchr/testify/require" ) type mockICAHostKeeper struct { icaAddress string found bool } func (m *mockICAHostKeeper) GetInterchainAccountAddress(ctx sdk.Context, connectionID, portID string) (string, bool) { return m.icaAddress, m.found } type mockConnectionKeeper struct { connection connectiontypes.ConnectionEnd found bool } func (m *mockConnectionKeeper) GetConnection(ctx sdk.Context, connectionID string) (connectiontypes.ConnectionEnd, bool) { return m.connection, m.found } type mockClientKeeper struct { clientState ibcexported.ClientState found bool } func (m *mockClientKeeper) GetClientState(ctx sdk.Context, clientID string) (ibcexported.ClientState, bool) { return m.clientState, m.found } func TestSetAndGetICAConnection(t *testing.T) { ctx, k, _ := setupKeeper(t) icaAddress := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" controllerAddress := "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" controllerChainID := "shinzo-1" connectionID := "connection-0" err := k.SetICAConnection(ctx, icaAddress, controllerAddress, controllerChainID, connectionID) require.NoError(t, err) connection, found := k.GetICAConnection(ctx, icaAddress) require.True(t, found) require.Equal(t, icaAddress, connection.IcaAddress) require.Equal(t, controllerAddress, connection.ControllerAddress) require.Equal(t, controllerChainID, connection.ControllerChainId) require.Equal(t, connectionID, connection.ConnectionId) } func TestGetICAConnectionNotFound(t *testing.T) { ctx, k, _ := setupKeeper(t) icaAddress := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" connection, found := k.GetICAConnection(ctx, icaAddress) require.False(t, found) require.Equal(t, types.ICAConnection{}, connection) } func TestGetAllICAConnections(t *testing.T) { ctx, k, _ := setupKeeper(t) icaAddress1 := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" controllerAddress1 := "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" controllerChainID1 := "shinzo-1" connectionID1 := "connection-0" icaAddress2 := "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy" controllerAddress2 := "shinzo1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" controllerChainID2 := "shinzo-2" connectionID2 := "connection-1" err := k.SetICAConnection(ctx, icaAddress1, controllerAddress1, controllerChainID1, connectionID1) require.NoError(t, err) err = k.SetICAConnection(ctx, icaAddress2, controllerAddress2, controllerChainID2, connectionID2) require.NoError(t, err) connections := k.GetAllICAConnections(ctx) require.Len(t, connections, 2) var connection1, connection2 types.ICAConnection for _, conn := range connections { if conn.IcaAddress == icaAddress1 { connection1 = conn } else if conn.IcaAddress == icaAddress2 { connection2 = conn } } require.Equal(t, icaAddress1, connection1.IcaAddress) require.Equal(t, controllerAddress1, connection1.ControllerAddress) require.Equal(t, controllerChainID1, connection1.ControllerChainId) require.Equal(t, connectionID1, connection1.ConnectionId) require.Equal(t, icaAddress2, connection2.IcaAddress) require.Equal(t, controllerAddress2, connection2.ControllerAddress) require.Equal(t, controllerChainID2, connection2.ControllerChainId) require.Equal(t, connectionID2, connection2.ConnectionId) } func TestMustIterateICAConnections(t *testing.T) { ctx, k, _ := setupKeeper(t) icaAddress := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" controllerAddress := "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" controllerChainID := "shinzo-1" connectionID := "connection-0" err := k.SetICAConnection(ctx, icaAddress, controllerAddress, controllerChainID, connectionID) require.NoError(t, err) count := 0 k.mustIterateICAConnections(ctx, func(iterIcaAddress string, connection types.ICAConnection) { require.Equal(t, icaAddress, iterIcaAddress) require.Equal(t, icaAddress, connection.IcaAddress) require.Equal(t, controllerAddress, connection.ControllerAddress) require.Equal(t, controllerChainID, connection.ControllerChainId) require.Equal(t, connectionID, connection.ConnectionId) count++ }) require.Equal(t, 1, count) } func TestSetICAConnectionOverwrite(t *testing.T) { ctx, k, _ := setupKeeper(t) icaAddress := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" originalControllerAddress := "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" originalControllerChainID := "shinzo-1" originalConnectionID := "connection-0" updatedControllerAddress := "shinzo1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" updatedControllerChainID := "shinzo-2" updatedConnectionID := "connection-1" // Set original connection err := k.SetICAConnection(ctx, icaAddress, originalControllerAddress, originalControllerChainID, originalConnectionID) require.NoError(t, err) // Overwrite with updated values err = k.SetICAConnection(ctx, icaAddress, updatedControllerAddress, updatedControllerChainID, updatedConnectionID) require.NoError(t, err) // Verify updated values connection, found := k.GetICAConnection(ctx, icaAddress) require.True(t, found) require.Equal(t, icaAddress, connection.IcaAddress) require.Equal(t, updatedControllerAddress, connection.ControllerAddress) require.Equal(t, updatedControllerChainID, connection.ControllerChainId) require.Equal(t, updatedConnectionID, connection.ConnectionId) } func TestSetICAConnectionEmptyAddress(t *testing.T) { ctx, k, _ := setupKeeper(t) err := k.SetICAConnection(ctx, "", "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", "shinzo-1", "connection-0") require.Error(t, err) require.Contains(t, err.Error(), "ICA address cannot be empty") // Verify no connection was stored connection, found := k.GetICAConnection(ctx, "") require.False(t, found) require.Equal(t, types.ICAConnection{}, connection) } func TestHandleICAChannelOpen(t *testing.T) { ctx, k, _ := setupKeeper(t) icaHostKeeper := &mockICAHostKeeper{ icaAddress: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", found: true, } connectionKeeper := &mockConnectionKeeper{ connection: connectiontypes.ConnectionEnd{ ClientId: "07-tendermint-0", }, found: true, } clientKeeper := &mockClientKeeper{ clientState: &tmtypes.ClientState{ ChainId: "shinzo-1", }, found: true, } connectionID := "connection-0" controllerPortID := "icacontroller-source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme" err := k.HandleICAChannelOpen(ctx, connectionID, controllerPortID, icaHostKeeper, connectionKeeper, clientKeeper) require.NoError(t, err) // Verify the connection was stored connection, found := k.GetICAConnection(ctx, icaHostKeeper.icaAddress) require.True(t, found) require.Equal(t, icaHostKeeper.icaAddress, connection.IcaAddress) require.Equal(t, "source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme", connection.ControllerAddress) require.Equal(t, "shinzo-1", connection.ControllerChainId) require.Equal(t, connectionID, connection.ConnectionId) } ================================================ FILE: x/hub/keeper/jws_token.go ================================================ package keeper import ( "context" "fmt" "time" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // jwsTokenStore returns the prefix store for JWS tokens. func (k *Keeper) jwsTokenStore(ctx context.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, types.JWSTokenKeyPrefix) } // jwsTokenByDIDStore returns the prefix store for JWS tokens indexed by DID. func (k *Keeper) jwsTokenByDIDStore(ctx context.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, types.JWSTokenByDIDKeyPrefix) } // jwsTokenByAccountStore returns the prefix store for JWS tokens indexed by account. func (k *Keeper) jwsTokenByAccountStore(ctx context.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, types.JWSTokenByAccountKeyPrefix) } // SetJWSToken stores a JWS token record and updates secondary indices. func (k *Keeper) SetJWSToken(ctx context.Context, record *types.JWSTokenRecord) error { if record == nil { return fmt.Errorf("JWS token record cannot be nil") } if record.TokenHash == "" { return fmt.Errorf("token hash cannot be empty") } if record.IssuerDid == "" { return fmt.Errorf("issuer DID cannot be empty") } // Validate authorized account if provided if record.AuthorizedAccount != "" { if _, err := sdk.AccAddressFromBech32(record.AuthorizedAccount); err != nil { return fmt.Errorf("invalid authorized account address: %w", err) } } else if !k.GetChainConfig(ctx).IgnoreBearerAuth { return fmt.Errorf("authorized account is required when bearer auth is enabled") } bz, err := k.cdc.Marshal(record) if err != nil { return fmt.Errorf("failed to marshal JWS token record: %w", err) } store := k.jwsTokenStore(ctx) store.Set([]byte(record.TokenHash), bz) // Store in DID index didStore := k.jwsTokenByDIDStore(ctx) didKey := types.JWSTokenByDIDKey(record.IssuerDid, record.TokenHash) // Remove the prefix since we're already in the DID prefix store didKeyWithoutPrefix := didKey[len(types.JWSTokenByDIDKeyPrefix):] didStore.Set(didKeyWithoutPrefix, []byte{0x01}) // Just a marker, actual data is in primary store // Store in account index only if authorized account is provided if record.AuthorizedAccount != "" { accountStore := k.jwsTokenByAccountStore(ctx) accountKey := types.JWSTokenByAccountKey(record.AuthorizedAccount, record.TokenHash) // Remove the prefix since we're already in the account prefix store accountKeyWithoutPrefix := accountKey[len(types.JWSTokenByAccountKeyPrefix):] accountStore.Set(accountKeyWithoutPrefix, []byte{0x01}) // Just a marker } return nil } // GetJWSToken retrieves a JWS token record by its hash. // Returns the record and true if found, or nil and false if not found or unmarshal fails. func (k *Keeper) GetJWSToken(ctx context.Context, tokenHash string) (*types.JWSTokenRecord, bool) { store := k.jwsTokenStore(ctx) bz := store.Get([]byte(tokenHash)) if bz == nil { return nil, false } var record types.JWSTokenRecord if err := k.cdc.Unmarshal(bz, &record); err != nil { k.Logger().Error("failed to unmarshal JWS token record", "hash", tokenHash, "error", err) return nil, false } return &record, true } // DeleteJWSToken removes a JWS token record and its indices. func (k *Keeper) DeleteJWSToken(ctx context.Context, tokenHash string) error { // First, get the record to access DID and account for index cleanup record, found := k.GetJWSToken(ctx, tokenHash) if !found { return fmt.Errorf("JWS token not found: %s", tokenHash) } // Delete from primary store store := k.jwsTokenStore(ctx) store.Delete([]byte(tokenHash)) // Delete from DID index didStore := k.jwsTokenByDIDStore(ctx) didKey := types.JWSTokenByDIDKey(record.IssuerDid, tokenHash) didKeyWithoutPrefix := didKey[len(types.JWSTokenByDIDKeyPrefix):] didStore.Delete(didKeyWithoutPrefix) // Delete from account index only if authorized account was provided if record.AuthorizedAccount != "" { accountStore := k.jwsTokenByAccountStore(ctx) accountKey := types.JWSTokenByAccountKey(record.AuthorizedAccount, tokenHash) accountKeyWithoutPrefix := accountKey[len(types.JWSTokenByAccountKeyPrefix):] accountStore.Delete(accountKeyWithoutPrefix) } return nil } // IterateJWSTokens iterates over all JWS token records. func (k *Keeper) IterateJWSTokens(ctx context.Context, cb func(record *types.JWSTokenRecord) (stop bool)) error { store := k.jwsTokenStore(ctx) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var record types.JWSTokenRecord if err := k.cdc.Unmarshal(iterator.Value(), &record); err != nil { return fmt.Errorf("failed to unmarshal JWS token record: %w", err) } if cb(&record) { break } } return nil } // GetJWSTokensByDID retrieves all JWS tokens for a specific DID. func (k *Keeper) GetJWSTokensByDID(ctx context.Context, did string) ([]*types.JWSTokenRecord, error) { var records []*types.JWSTokenRecord didStore := k.jwsTokenByDIDStore(ctx) prefix := types.JWSTokenDIDPrefix(did) prefixWithoutMain := prefix[len(types.JWSTokenByDIDKeyPrefix):] iterator := storetypes.KVStorePrefixIterator(didStore, prefixWithoutMain) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { _, tokenHash, err := types.ParseJWSTokenByDIDKey(iterator.Key()) if err != nil { k.Logger().Error("failed to parse JWS token by DID key", "error", err) continue } record, found := k.GetJWSToken(ctx, tokenHash) if found { records = append(records, record) } } return records, nil } // GetJWSTokensByAccount retrieves all JWS tokens for a specific authorized account. func (k *Keeper) GetJWSTokensByAccount(ctx context.Context, account string) ([]*types.JWSTokenRecord, error) { var records []*types.JWSTokenRecord accountStore := k.jwsTokenByAccountStore(ctx) prefix := types.JWSTokenAccountPrefix(account) prefixWithoutMain := prefix[len(types.JWSTokenByAccountKeyPrefix):] iterator := storetypes.KVStorePrefixIterator(accountStore, prefixWithoutMain) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { _, tokenHash, err := types.ParseJWSTokenByAccountKey(iterator.Key()) if err != nil { k.Logger().Error("failed to parse JWS token by account key", "error", err) continue } record, found := k.GetJWSToken(ctx, tokenHash) if found { records = append(records, record) } } return records, nil } // GetAllJWSTokens retrieves all JWS token records. func (k *Keeper) GetAllJWSTokens(ctx context.Context) ([]*types.JWSTokenRecord, error) { var records []*types.JWSTokenRecord err := k.IterateJWSTokens(ctx, func(record *types.JWSTokenRecord) bool { records = append(records, record) return false }) return records, err } // UpdateJWSTokenStatus updates the status of a JWS token. func (k *Keeper) UpdateJWSTokenStatus(ctx context.Context, tokenHash string, status types.JWSTokenStatus, invalidatedBy string) error { if tokenHash == "" { return fmt.Errorf("token hash cannot be empty") } record, found := k.GetJWSToken(ctx, tokenHash) if !found { return fmt.Errorf("JWS token not found: %s", tokenHash) } record.Status = status if status == types.JWSTokenStatus_STATUS_INVALID { now := time.Now() record.InvalidatedAt = &now if invalidatedBy != "" { record.InvalidatedBy = invalidatedBy } } return k.SetJWSToken(ctx, record) } // RecordJWSTokenUsage updates the last used timestamp for a JWS token. func (k *Keeper) RecordJWSTokenUsage(ctx context.Context, tokenHash string) error { if tokenHash == "" { return fmt.Errorf("token hash cannot be empty") } record, found := k.GetJWSToken(ctx, tokenHash) if !found { return fmt.Errorf("JWS token not found: %s", tokenHash) } now := time.Now() if record.FirstUsedAt == nil { record.FirstUsedAt = &now } record.LastUsedAt = &now return k.SetJWSToken(ctx, record) } // CheckAndUpdateExpiredTokens iterates through all tokens and marks expired ones as invalid. func (k *Keeper) CheckAndUpdateExpiredTokens(ctx context.Context) error { sdkCtx := sdk.UnwrapSDKContext(ctx) currentTime := sdkCtx.BlockTime() return k.IterateJWSTokens(ctx, func(record *types.JWSTokenRecord) bool { // Skip already invalid tokens if record.Status == types.JWSTokenStatus_STATUS_INVALID { return false } // Check if token is expired if record.ExpiresAt.Before(currentTime) { // Mark as invalid if err := k.UpdateJWSTokenStatus(ctx, record.TokenHash, types.JWSTokenStatus_STATUS_INVALID, ""); err != nil { k.Logger().Error("failed to update expired token status", "hash", record.TokenHash, "error", err) } } return false }) } // StoreOrUpdateJWSToken stores a new JWS token or updates an existing one. // This is the main method called from the ante handler. func (k *Keeper) StoreOrUpdateJWSToken( ctx context.Context, bearerToken string, issuerDid string, authorizedAccount string, issuedAt time.Time, expiresAt time.Time, ) error { tokenHash := types.HashJWSToken(bearerToken) // Check if token already exists _, found := k.GetJWSToken(ctx, tokenHash) if found { // Token exists, update usage timestamp return k.RecordJWSTokenUsage(ctx, tokenHash) } // Validate that new tokens aren't already expired if !expiresAt.IsZero() && expiresAt.Before(sdk.UnwrapSDKContext(ctx).BlockTime()) { return fmt.Errorf("cannot create token with expiration time in the past") } // Create new token record now := time.Now() record := &types.JWSTokenRecord{ TokenHash: tokenHash, BearerToken: bearerToken, IssuerDid: issuerDid, AuthorizedAccount: authorizedAccount, IssuedAt: issuedAt, ExpiresAt: expiresAt, Status: types.JWSTokenStatus_STATUS_VALID, FirstUsedAt: &now, LastUsedAt: &now, } return k.SetJWSToken(ctx, record) } ================================================ FILE: x/hub/keeper/keeper.go ================================================ package keeper import ( "fmt" "cosmossdk.io/core/store" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/hub/types" ) type ( Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService logger log.Logger // the address capable of executing a MsgUpdateParams message. // Typically, this should be the x/gov module account. authority string } ) func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, ) Keeper { if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic(fmt.Sprintf("invalid authority address: %s", authority)) } return Keeper{ cdc: cdc, storeService: storeService, authority: authority, logger: logger, } } // GetAuthority returns the module's authority. func (k *Keeper) GetAuthority() string { return k.authority } // Logger returns a module-specific logger. func (k *Keeper) Logger() log.Logger { return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) } ================================================ FILE: x/hub/keeper/keeper_common_test.go ================================================ package keeper import ( "testing" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func setupKeeper(t testing.TB) (sdk.Context, Keeper, types.MsgServer) { storeKey := storetypes.NewKVStoreKey(types.StoreKey) db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForAccount("source", "sourcepub") k := NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) // Initialize params if err := k.SetParams(ctx, types.DefaultParams()); err != nil { panic(err) } return ctx, k, &k } ================================================ FILE: x/hub/keeper/msg_invalidate_jws.go ================================================ package keeper import ( "context" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // InvalidateJWS handles the MsgInvalidateJWS message. // It allows a user to invalidate a JWS token if: // - The transaction has a JWS extension option with matching DID, or // - The message creator matches the token's authorized account. func (k *Keeper) InvalidateJWS(goCtx context.Context, req *types.MsgInvalidateJWS) (*types.MsgInvalidateJWSResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Get the JWS token record record, found := k.GetJWSToken(goCtx, req.TokenHash) if !found { return nil, errorsmod.Wrapf(types.ErrJWSTokenNotFound, "token hash: %s", req.TokenHash) } // Check if token is already invalid if record.Status == types.JWSTokenStatus_STATUS_INVALID { return nil, errorsmod.Wrapf(types.ErrJWSTokenAlreadyInvalid, "token hash: %s", req.TokenHash) } // Get the DID from the context extractedDID := "" if did, ok := ctx.Value(appparams.ExtractedDIDContextKey).(string); ok { extractedDID = did } // Check authorization authorized := false if extractedDID != "" && extractedDID == record.IssuerDid { // Authorization via matching DID authorized = true } else if req.Creator == record.AuthorizedAccount { // Authorization via matching creator account authorized = true } if !authorized { return nil, errorsmod.Wrapf( types.ErrUnauthorizedInvalidation, "creator %s is not authorized to invalidate token for DID %s and account %s", req.Creator, record.IssuerDid, record.AuthorizedAccount, ) } // Update token status to invalid if err := k.UpdateJWSTokenStatus(goCtx, req.TokenHash, types.JWSTokenStatus_STATUS_INVALID, req.Creator); err != nil { return nil, errorsmod.Wrap(types.ErrFailedToInvalidateToken, err.Error()) } if err := ctx.EventManager().EmitTypedEvent(&types.EventJWSTokenInvalidated{ TokenHash: req.TokenHash, IssuerDid: record.IssuerDid, AuthorizedAccount: record.AuthorizedAccount, InvalidatedBy: req.Creator, }); err != nil { return nil, err } return &types.MsgInvalidateJWSResponse{Success: true}, nil } ================================================ FILE: x/hub/keeper/msg_invalidate_jws_test.go ================================================ package keeper_test import ( "testing" "time" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func TestMsgInvalidateJWS(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) issuerDID := "did:example:alice" issuerDID2 := "did:example:bob" authorizedAccount := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" unauthorizedAccount := "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" bearerToken1 := "test.bearer.token1" bearerToken2 := "test.bearer.token2" bearerToken3 := "test.bearer.token3" bearerToken4 := "test.bearer.token4" tokenHash1 := types.HashJWSToken(bearerToken1) tokenHash2 := types.HashJWSToken(bearerToken2) tokenHash3 := types.HashJWSToken(bearerToken3) tokenHash4 := types.HashJWSToken(bearerToken4) // Store valid tokens err := k.StoreOrUpdateJWSToken( sdkCtx, bearerToken1, issuerDID, authorizedAccount, time.Now(), time.Now().Add(1*time.Hour), ) require.NoError(t, err) err = k.StoreOrUpdateJWSToken( sdkCtx, bearerToken2, issuerDID2, authorizedAccount, time.Now(), time.Now().Add(1*time.Hour), ) require.NoError(t, err) err = k.StoreOrUpdateJWSToken( sdkCtx, bearerToken3, issuerDID, authorizedAccount, time.Now(), time.Now().Add(1*time.Hour), ) require.NoError(t, err) err = k.StoreOrUpdateJWSToken( sdkCtx, bearerToken4, issuerDID, authorizedAccount, time.Now(), time.Now().Add(1*time.Hour), ) require.NoError(t, err) // Mark token3 as invalid err = k.UpdateJWSTokenStatus(sdkCtx, tokenHash3, types.JWSTokenStatus_STATUS_INVALID, "someone") require.NoError(t, err) testCases := []struct { name string setupCtx func(sdk.Context) sdk.Context input *types.MsgInvalidateJWS expErr bool expErrMsg string verifyFunc func(*testing.T, *types.MsgInvalidateJWSResponse) }{ { name: "valid - authorized account invalidates token", setupCtx: func(ctx sdk.Context) sdk.Context { return ctx }, input: &types.MsgInvalidateJWS{ Creator: authorizedAccount, TokenHash: tokenHash1, }, expErr: false, verifyFunc: func(t *testing.T, resp *types.MsgInvalidateJWSResponse) { require.True(t, resp.Success) record, found := k.GetJWSToken(sdkCtx, tokenHash1) require.True(t, found) require.Equal(t, types.JWSTokenStatus_STATUS_INVALID, record.Status) require.Equal(t, authorizedAccount, record.InvalidatedBy) require.NotNil(t, record.InvalidatedAt) }, }, { name: "valid - matching DID in context invalidates token", setupCtx: func(ctx sdk.Context) sdk.Context { return ctx.WithValue(appparams.ExtractedDIDContextKey, issuerDID2) }, input: &types.MsgInvalidateJWS{ Creator: unauthorizedAccount, TokenHash: tokenHash2, }, expErr: false, verifyFunc: func(t *testing.T, resp *types.MsgInvalidateJWSResponse) { require.True(t, resp.Success) record, found := k.GetJWSToken(sdkCtx, tokenHash2) require.True(t, found) require.Equal(t, types.JWSTokenStatus_STATUS_INVALID, record.Status) }, }, { name: "invalid - token not found", setupCtx: func(ctx sdk.Context) sdk.Context { return ctx }, input: &types.MsgInvalidateJWS{ Creator: authorizedAccount, TokenHash: "nonexistenthash", }, expErr: true, expErrMsg: "token not found", }, { name: "invalid - token already invalid", setupCtx: func(ctx sdk.Context) sdk.Context { return ctx }, input: &types.MsgInvalidateJWS{ Creator: authorizedAccount, TokenHash: tokenHash3, }, expErr: true, expErrMsg: "already invalid", }, { name: "invalid - unauthorized (neither DID nor account matches)", setupCtx: func(ctx sdk.Context) sdk.Context { return ctx.WithValue(appparams.ExtractedDIDContextKey, "did:example:different") }, input: &types.MsgInvalidateJWS{ Creator: unauthorizedAccount, TokenHash: tokenHash4, }, expErr: true, expErrMsg: "not authorized to invalidate", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { testCtx := tc.setupCtx(sdkCtx) resp, err := ms.InvalidateJWS(testCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) require.Nil(t, resp) } else { require.NoError(t, err) require.NotNil(t, resp) if tc.verifyFunc != nil { tc.verifyFunc(t, resp) } } }) } } func TestMsgInvalidateJWS_Idempotency(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) issuerDID := "did:example:charlie" authorizedAccount := "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4" bearerToken := "test.bearer.charlie" tokenHash := types.HashJWSToken(bearerToken) err := k.StoreOrUpdateJWSToken( sdkCtx, bearerToken, issuerDID, authorizedAccount, time.Now(), time.Now().Add(1*time.Hour), ) require.NoError(t, err) msg := &types.MsgInvalidateJWS{ Creator: authorizedAccount, TokenHash: tokenHash, } // First invalidation should succeed resp, err := ms.InvalidateJWS(sdkCtx, msg) require.NoError(t, err) require.True(t, resp.Success) // Second attempt should fail cause it is already invalid resp, err = ms.InvalidateJWS(sdkCtx, msg) require.Error(t, err) require.Contains(t, err.Error(), "already invalid") require.Nil(t, resp) } ================================================ FILE: x/hub/keeper/msg_server.go ================================================ package keeper import ( "github.com/sourcenetwork/sourcehub/x/hub/types" ) var _ types.MsgServer = &Keeper{} ================================================ FILE: x/hub/keeper/msg_server_test.go ================================================ package keeper_test import ( "context" "testing" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/hub/keeper" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func setupMsgServer(t testing.TB) (keeper.Keeper, types.MsgServer, context.Context) { k, ctx := keepertest.HubKeeper(t) return k, &k, ctx } func TestMsgServer(t *testing.T) { k, ms, ctx := setupMsgServer(t) require.NotNil(t, ms) require.NotNil(t, ctx) require.NotEmpty(t, k) } ================================================ FILE: x/hub/keeper/msg_update_params.go ================================================ package keeper import ( "context" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func (k *Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if k.GetAuthority() != req.Authority { return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), req.Authority) } ctx := sdk.UnwrapSDKContext(goCtx) if err := k.SetParams(ctx, req.Params); err != nil { return nil, err } return &types.MsgUpdateParamsResponse{}, nil } ================================================ FILE: x/hub/keeper/msg_update_params_test.go ================================================ package keeper_test import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func TestMsgUpdateParams(t *testing.T) { k, ms, ctx := setupMsgServer(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) wctx := sdk.UnwrapSDKContext(ctx) // 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: k.GetAuthority(), Params: types.Params{}, }, expErr: false, }, { name: "all good", input: &types.MsgUpdateParams{ Authority: k.GetAuthority(), Params: params, }, expErr: false, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { _, err := ms.UpdateParams(wctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } ================================================ FILE: x/hub/keeper/params.go ================================================ package keeper import ( "context" "github.com/cosmos/cosmos-sdk/runtime" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // GetParams get all parameters as types.Params. func (k Keeper) GetParams(ctx context.Context) (params types.Params) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.ParamsKey) if bz == nil { return params } k.cdc.MustUnmarshal(bz, ¶ms) return params } // SetParams set the params. func (k Keeper) SetParams(ctx context.Context, params types.Params) error { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz, err := k.cdc.Marshal(¶ms) if err != nil { return err } store.Set(types.ParamsKey, bz) return nil } ================================================ FILE: x/hub/keeper/params_test.go ================================================ package keeper_test import ( "testing" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func TestGetParams(t *testing.T) { k, ctx := keepertest.HubKeeper(t) params := types.DefaultParams() require.NoError(t, k.SetParams(ctx, params)) require.EqualValues(t, params, k.GetParams(ctx)) } ================================================ FILE: x/hub/keeper/query_params.go ================================================ package keeper import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func (k *Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil } ================================================ FILE: x/hub/keeper/query_params_test.go ================================================ package keeper_test import ( "testing" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/hub/types" ) func TestParamsQuery(t *testing.T) { keeper, ctx := keepertest.HubKeeper(t) params := types.DefaultParams() require.NoError(t, keeper.SetParams(ctx, params)) response, err := keeper.Params(ctx, &types.QueryParamsRequest{}) require.NoError(t, err) require.Equal(t, &types.QueryParamsResponse{Params: params}, response) } ================================================ FILE: x/hub/module/autocli.go ================================================ package hub import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/hub" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Params", Use: "params", Short: "Shows the parameters of the module", }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.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 }, }, }, } } ================================================ FILE: x/hub/module/genesis.go ================================================ package hub import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/hub/keeper" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState) { if err := k.SetParams(ctx, genState.Params); err != nil { panic(err) } // Initialize ica connections for _, icaConnection := range genState.IcaConnections { if err := k.SetICAConnection( ctx, icaConnection.IcaAddress, icaConnection.ControllerAddress, icaConnection.ControllerChainId, icaConnection.ConnectionId, ); err != nil { panic(err) } } // Initialize JWS tokens for i := range genState.JwsTokens { if err := k.SetJWSToken(ctx, &genState.JwsTokens[i]); err != nil { panic(err) } } if err := k.SetChainConfig(ctx, genState.ChainConfig); err != nil { panic(err) } } // ExportGenesis returns the module's exported genesis. func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) // Export ica connections genesis.IcaConnections = k.GetAllICAConnections(ctx) // Export JWS tokens jwsTokens, err := k.GetAllJWSTokens(ctx) if err != nil { panic(err) } genesis.JwsTokens = make([]types.JWSTokenRecord, 0, len(jwsTokens)) for _, token := range jwsTokens { if token != nil { genesis.JwsTokens = append(genesis.JwsTokens, *token) } } genesis.ChainConfig = k.GetChainConfig(ctx) return genesis } ================================================ FILE: x/hub/module/genesis_test.go ================================================ package hub_test import ( "testing" "time" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/testutil/nullify" hub "github.com/sourcenetwork/sourcehub/x/hub/module" "github.com/sourcenetwork/sourcehub/x/hub/types" "github.com/stretchr/testify/require" ) func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), IcaConnections: []types.ICAConnection{ { IcaAddress: "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", ControllerAddress: "shinzo1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ControllerChainId: "shinzo-1", ConnectionId: "connection-0", }, { IcaAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ControllerAddress: "shinzo18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", ControllerChainId: "shinzo-1", ConnectionId: "connection-1", }, { IcaAddress: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ControllerAddress: "shinzo1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ControllerChainId: "shinzo-1", ConnectionId: "connection-2", }, }, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) require.Equal(t, len(genesisState.IcaConnections), len(got.IcaConnections)) for i, connection := range genesisState.IcaConnections { require.Equal(t, connection.IcaAddress, got.IcaConnections[i].IcaAddress) require.Equal(t, connection.ControllerAddress, got.IcaConnections[i].ControllerAddress) require.Equal(t, connection.ControllerChainId, got.IcaConnections[i].ControllerChainId) require.Equal(t, connection.ConnectionId, got.IcaConnections[i].ConnectionId) } nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithEmptyIcaConnections(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), IcaConnections: []types.ICAConnection{}, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) require.Equal(t, 0, len(got.IcaConnections)) nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithMultipleIdenticalIcaConnections(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), IcaConnections: []types.ICAConnection{ { IcaAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ControllerAddress: "shinzo1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ControllerChainId: "shinzo-1", ConnectionId: "connection-0", }, { IcaAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ControllerAddress: "shinzo1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", ControllerChainId: "shinzo-1", ConnectionId: "connection-1", }, }, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) // Multiple connections with identical ICA addresses should overwrite each other require.Equal(t, 1, len(got.IcaConnections)) require.Equal(t, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", got.IcaConnections[0].IcaAddress) require.Equal(t, "shinzo1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", got.IcaConnections[0].ControllerAddress) require.Equal(t, "connection-1", got.IcaConnections[0].ConnectionId) nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithDifferentChainIds(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), IcaConnections: []types.ICAConnection{ { IcaAddress: "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", ControllerAddress: "shinzo1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme", ControllerChainId: "shinzo-1", ConnectionId: "connection-0", }, { IcaAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ControllerAddress: "cosmos1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme", ControllerChainId: "cosmoshub-4", ConnectionId: "connection-1", }, { IcaAddress: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ControllerAddress: "osmosis1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme", ControllerChainId: "osmosis-1", ConnectionId: "connection-2", }, }, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) require.Equal(t, len(genesisState.IcaConnections), len(got.IcaConnections)) // Verify all connections are preserved with different chain IDs for i, connection := range genesisState.IcaConnections { require.Equal(t, connection.IcaAddress, got.IcaConnections[i].IcaAddress) require.Equal(t, connection.ControllerAddress, got.IcaConnections[i].ControllerAddress) require.Equal(t, connection.ControllerChainId, got.IcaConnections[i].ControllerChainId) require.Equal(t, connection.ConnectionId, got.IcaConnections[i].ConnectionId) } nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithEmptyStrings(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), IcaConnections: []types.ICAConnection{ { IcaAddress: "", ControllerAddress: "", ControllerChainId: "", ConnectionId: "", }, }, } k, ctx := keepertest.HubKeeper(t) // Genesis initialization should panic with invalid ICA connections require.Panics(t, func() { hub.InitGenesis(ctx, &k, genesisState) }) } func TestGenesisWithJWSTokens(t *testing.T) { now := time.Now() later := now.Add(24 * time.Hour) genesisState := types.GenesisState{ Params: types.DefaultParams(), JwsTokens: []types.JWSTokenRecord{ { TokenHash: "hash1", BearerToken: "token1", IssuerDid: "did:key:alice", AuthorizedAccount: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", IssuedAt: now, ExpiresAt: later, Status: types.JWSTokenStatus_STATUS_VALID, FirstUsedAt: &now, LastUsedAt: &now, }, { TokenHash: "hash2", BearerToken: "token2", IssuerDid: "did:key:bob", AuthorizedAccount: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", IssuedAt: now, ExpiresAt: later, Status: types.JWSTokenStatus_STATUS_VALID, FirstUsedAt: &now, LastUsedAt: &now, }, { TokenHash: "hash3", BearerToken: "token3", IssuerDid: "did:key:charlie", AuthorizedAccount: "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", IssuedAt: now, ExpiresAt: later, Status: types.JWSTokenStatus_STATUS_INVALID, FirstUsedAt: &now, LastUsedAt: &now, InvalidatedAt: &now, InvalidatedBy: "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", }, }, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) require.Equal(t, len(genesisState.JwsTokens), len(got.JwsTokens)) // Verify all tokens are preserved for i, token := range genesisState.JwsTokens { require.Equal(t, token.TokenHash, got.JwsTokens[i].TokenHash) require.Equal(t, token.BearerToken, got.JwsTokens[i].BearerToken) require.Equal(t, token.IssuerDid, got.JwsTokens[i].IssuerDid) require.Equal(t, token.AuthorizedAccount, got.JwsTokens[i].AuthorizedAccount) require.Equal(t, token.Status, got.JwsTokens[i].Status) require.Equal(t, token.IssuedAt.Unix(), got.JwsTokens[i].IssuedAt.Unix()) require.Equal(t, token.ExpiresAt.Unix(), got.JwsTokens[i].ExpiresAt.Unix()) } nullify.Fill(&genesisState) nullify.Fill(got) } func TestGenesisWithEmptyJWSTokens(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), JwsTokens: []types.JWSTokenRecord{}, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) require.Equal(t, 0, len(got.JwsTokens)) nullify.Fill(&genesisState) nullify.Fill(got) } func TestGenesisWithInvalidJWSToken(t *testing.T) { now := time.Now() later := now.Add(24 * time.Hour) genesisState := types.GenesisState{ Params: types.DefaultParams(), JwsTokens: []types.JWSTokenRecord{ { TokenHash: "", BearerToken: "token1", IssuerDid: "did:key:alice", AuthorizedAccount: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", IssuedAt: now, ExpiresAt: later, Status: types.JWSTokenStatus_STATUS_VALID, }, }, } k, ctx := keepertest.HubKeeper(t) // Should panic with empty token hash require.Panics(t, func() { hub.InitGenesis(ctx, &k, genesisState) }) } func TestGenesisWithMultipleTokensSameDID(t *testing.T) { now := time.Now() later := now.Add(24 * time.Hour) genesisState := types.GenesisState{ Params: types.DefaultParams(), JwsTokens: []types.JWSTokenRecord{ { TokenHash: "hash1", BearerToken: "token1", IssuerDid: "did:key:alice", AuthorizedAccount: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", IssuedAt: now, ExpiresAt: later, Status: types.JWSTokenStatus_STATUS_VALID, FirstUsedAt: &now, LastUsedAt: &now, }, { TokenHash: "hash2", BearerToken: "token2", IssuerDid: "did:key:alice", AuthorizedAccount: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", IssuedAt: now, ExpiresAt: later, Status: types.JWSTokenStatus_STATUS_VALID, FirstUsedAt: &now, LastUsedAt: &now, }, }, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, 2, len(got.JwsTokens)) // Both tokens should be preserved (different hashes) tokenHashes := make(map[string]bool) for _, token := range got.JwsTokens { tokenHashes[token.TokenHash] = true } require.True(t, tokenHashes["hash1"]) require.True(t, tokenHashes["hash2"]) nullify.Fill(&genesisState) nullify.Fill(got) } func TestGenesisWithJWSTokensAndICAConnections(t *testing.T) { now := time.Now() later := now.Add(24 * time.Hour) genesisState := types.GenesisState{ Params: types.DefaultParams(), IcaConnections: []types.ICAConnection{ { IcaAddress: "source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4", ControllerAddress: "shinzo1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ControllerChainId: "shinzo-1", ConnectionId: "connection-0", }, }, JwsTokens: []types.JWSTokenRecord{ { TokenHash: "hash1", BearerToken: "token1", IssuerDid: "did:key:alice", AuthorizedAccount: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", IssuedAt: now, ExpiresAt: later, Status: types.JWSTokenStatus_STATUS_VALID, FirstUsedAt: &now, LastUsedAt: &now, }, }, } k, ctx := keepertest.HubKeeper(t) hub.InitGenesis(ctx, &k, genesisState) got := hub.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) require.Equal(t, 1, len(got.IcaConnections)) require.Equal(t, 1, len(got.JwsTokens)) // Verify ICA connection require.Equal(t, genesisState.IcaConnections[0].IcaAddress, got.IcaConnections[0].IcaAddress) // Verify JWS token require.Equal(t, genesisState.JwsTokens[0].TokenHash, got.JwsTokens[0].TokenHash) require.Equal(t, genesisState.JwsTokens[0].IssuerDid, got.JwsTokens[0].IssuerDid) nullify.Fill(&genesisState) nullify.Fill(got) } ================================================ FILE: x/hub/module/module.go ================================================ package hub import ( "context" "encoding/json" "fmt" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" modulev1 "github.com/sourcenetwork/sourcehub/api/sourcehub/hub/module" "github.com/sourcenetwork/sourcehub/app/metrics" "github.com/sourcenetwork/sourcehub/x/hub/keeper" "github.com/sourcenetwork/sourcehub/x/hub/types" ) var ( _ module.AppModuleBasic = (*AppModule)(nil) _ module.AppModuleSimulation = (*AppModule)(nil) _ module.HasGenesis = (*AppModule)(nil) _ module.HasInvariants = (*AppModule)(nil) _ module.HasConsensusVersion = (*AppModule)(nil) _ appmodule.AppModule = (*AppModule)(nil) _ appmodule.HasBeginBlocker = (*AppModule)(nil) _ appmodule.HasEndBlocker = (*AppModule)(nil) ) // ---------------------------------------------------------------------------- // AppModuleBasic // ---------------------------------------------------------------------------- // AppModuleBasic implements the AppModuleBasic interface that defines the // independent methods a Cosmos SDK module needs to implement. type AppModuleBasic struct { cdc codec.BinaryCodec } func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } // Name returns the name of the module as a string. func (AppModuleBasic) Name() string { return types.ModuleName } // RegisterLegacyAminoCodec registers the amino codec for the module, which is used // to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } // 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 (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesis()) } // ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } return genState.Validate() } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { panic(err) } } // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- // AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement. type AppModule struct { AppModuleBasic keeper *keeper.Keeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper } func NewAppModule( cdc codec.Codec, keeper *keeper.Keeper, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, accountKeeper: accountKeeper, bankKeeper: bankKeeper, } } // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { // Inject instrumentation into msg service handler descriptor := metrics.WrapMsgServerServiceDescriptor(types.ModuleName, types.Msg_serviceDesc) cfg.MsgServer().RegisterService(&descriptor, am.keeper) // Inject instrumentation into query service handler descriptor = metrics.WrapQueryServiceDescriptor(types.ModuleName, types.Query_serviceDesc) cfg.QueryServer().RegisterService(&descriptor, am.keeper) } // RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the module's genesis initialization. It returns no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { var genState types.GenesisState // Initialize global index to index in genesis state cdc.MustUnmarshalJSON(gs, &genState) InitGenesis(ctx, am.keeper, genState) } // ExportGenesis returns the module's exported genesis state as raw JSON bytes. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { genState := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(genState) } // 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(ctx context.Context) error { return am.keeper.EndBlocker(ctx) } // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} // ---------------------------------------------------------------------------- // App Wiring Setup // ---------------------------------------------------------------------------- func init() { appmodule.Register( &modulev1.Module{}, appmodule.Provide(ProvideModule), ) } type ModuleInputs struct { depinject.In StoreService store.KVStoreService Cdc codec.Codec Config *modulev1.Module Logger log.Logger AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper } type ModuleOutputs struct { depinject.Out HubKeeper *keeper.Keeper Module appmodule.AppModule } func ProvideModule(in ModuleInputs) ModuleOutputs { // default to governance authority if not provided authority := authtypes.NewModuleAddress(govtypes.ModuleName) if in.Config.Authority != "" { authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) } k := keeper.NewKeeper( in.Cdc, in.StoreService, in.Logger, authority.String(), ) m := NewAppModule( in.Cdc, &k, in.AccountKeeper, in.BankKeeper, ) return ModuleOutputs{HubKeeper: &k, Module: m} } ================================================ FILE: x/hub/module/simulation.go ================================================ package hub import ( "math/rand" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/sourcenetwork/sourcehub/testutil/sample" icasimulation "github.com/sourcenetwork/sourcehub/x/hub/simulation" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // avoid unused import issue var ( _ = icasimulation.FindAccount _ = rand.Rand{} _ = sample.AccAddress _ = sdk.AccAddress{} _ = simulation.MsgEntryKind ) // 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() } icaGenesis := types.GenesisState{ Params: types.DefaultParams(), } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&icaGenesis) } // 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{} } ================================================ FILE: x/hub/simulation/helpers.go ================================================ package simulation import ( sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) // FindAccount find a specific address from an account list. func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { creator, err := sdk.AccAddressFromBech32(address) if err != nil { panic(err) } return simtypes.FindAccount(accs, creator) } ================================================ FILE: x/hub/testutil/hub_keeper.go ================================================ package testutil import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/hub/types" ) // HubKeeperStub is a stub implementation of the ICA keeper for testing. type HubKeeperStub struct { connections map[string]types.ICAConnection } func NewHubKeeperStub() *HubKeeperStub { return &HubKeeperStub{ connections: make(map[string]types.ICAConnection), } } func (iks *HubKeeperStub) GetICAConnection(ctx sdk.Context, icaAddress string) (types.ICAConnection, bool) { connection, found := iks.connections[icaAddress] return connection, found } func (iks *HubKeeperStub) SetICAConnection(ctx sdk.Context, icaAddress, controllerAddress, controllerChainID, connectionID string) error { iks.connections[icaAddress] = types.ICAConnection{ IcaAddress: icaAddress, ControllerAddress: controllerAddress, ControllerChainId: controllerChainID, ConnectionId: connectionID, } return nil } ================================================ FILE: x/hub/types/chain_config.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/hub/chain_config.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 // ChainConfig specifies flags and parameters which // tune the chain behavior during genesis creation type ChainConfig struct { // allow_zero_fee_txs if true configures the ante handler // to not reject txs with 0 fees AllowZeroFeeTxs bool `protobuf:"varint,1,opt,name=allow_zero_fee_txs,json=allowZeroFeeTxs,proto3" json:"allow_zero_fee_txs,omitempty"` // ignore_bearer_auth if true ignores the `authorized_account` // field in the Bearer JWS from Extension Options IgnoreBearerAuth bool `protobuf:"varint,2,opt,name=ignore_bearer_auth,json=ignoreBearerAuth,proto3" json:"ignore_bearer_auth,omitempty"` } func (m *ChainConfig) Reset() { *m = ChainConfig{} } func (m *ChainConfig) String() string { return proto.CompactTextString(m) } func (*ChainConfig) ProtoMessage() {} func (*ChainConfig) Descriptor() ([]byte, []int) { return fileDescriptor_35e6d1a77540f0db, []int{0} } func (m *ChainConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ChainConfig.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 *ChainConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_ChainConfig.Merge(m, src) } func (m *ChainConfig) XXX_Size() int { return m.Size() } func (m *ChainConfig) XXX_DiscardUnknown() { xxx_messageInfo_ChainConfig.DiscardUnknown(m) } var xxx_messageInfo_ChainConfig proto.InternalMessageInfo func (m *ChainConfig) GetAllowZeroFeeTxs() bool { if m != nil { return m.AllowZeroFeeTxs } return false } func (m *ChainConfig) GetIgnoreBearerAuth() bool { if m != nil { return m.IgnoreBearerAuth } return false } func init() { proto.RegisterType((*ChainConfig)(nil), "sourcehub.hub.ChainConfig") } func init() { proto.RegisterFile("sourcehub/hub/chain_config.proto", fileDescriptor_35e6d1a77540f0db) } var fileDescriptor_35e6d1a77540f0db = []byte{ // 254 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x07, 0xe1, 0xe4, 0x8c, 0xc4, 0xcc, 0xbc, 0xf8, 0xe4, 0xfc, 0xbc, 0xb4, 0xcc, 0x74, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x5e, 0xb8, 0x0a, 0xbd, 0x8c, 0xd2, 0x24, 0x29, 0xc1, 0xc4, 0xdc, 0xcc, 0xbc, 0x7c, 0x7d, 0x30, 0x09, 0x51, 0x21, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x66, 0xea, 0x83, 0x58, 0x10, 0x51, 0xa5, 0x1a, 0x2e, 0x6e, 0x67, 0x90, 0x69, 0xce, 0x60, 0xc3, 0x84, 0x8c, 0xb8, 0x84, 0x12, 0x73, 0x72, 0xf2, 0xcb, 0xe3, 0xab, 0x52, 0x8b, 0xf2, 0xe3, 0xd3, 0x52, 0x53, 0xe3, 0x4b, 0x2a, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9c, 0x58, 0x57, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0xc4, 0x0f, 0x56, 0x10, 0x95, 0x5a, 0x94, 0xef, 0x96, 0x9a, 0x1a, 0x52, 0x51, 0x2c, 0x64, 0xcc, 0x25, 0x94, 0x99, 0x9e, 0x97, 0x5f, 0x94, 0x1a, 0x9f, 0x94, 0x9a, 0x58, 0x94, 0x5a, 0x14, 0x9f, 0x58, 0x5a, 0x92, 0x21, 0xc1, 0x84, 0xac, 0x47, 0x00, 0xa2, 0xc0, 0x09, 0x2c, 0xef, 0x58, 0x5a, 0x92, 0x61, 0xc5, 0xf2, 0x62, 0x81, 0x3c, 0xa3, 0x93, 0xc7, 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, 0xe9, 0xa5, 0x67, 0x96, 0x80, 0x3c, 0x93, 0x9c, 0x9f, 0xab, 0x0f, 0xf1, 0x5a, 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0xb6, 0x3e, 0x22, 0x28, 0x2a, 0xc0, 0x81, 0x51, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0x8e, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x15, 0xdc, 0xb5, 0x2a, 0x01, 0x00, 0x00, } func (this *ChainConfig) Equal(that interface{}) bool { if that == nil { return this == nil } that1, ok := that.(*ChainConfig) if !ok { that2, ok := that.(ChainConfig) if ok { that1 = &that2 } else { return false } } if that1 == nil { return this == nil } else if this == nil { return false } if this.AllowZeroFeeTxs != that1.AllowZeroFeeTxs { return false } if this.IgnoreBearerAuth != that1.IgnoreBearerAuth { return false } return true } func (m *ChainConfig) 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 *ChainConfig) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.IgnoreBearerAuth { i-- if m.IgnoreBearerAuth { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if m.AllowZeroFeeTxs { i-- if m.AllowZeroFeeTxs { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintChainConfig(dAtA []byte, offset int, v uint64) int { offset -= sovChainConfig(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *ChainConfig) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.AllowZeroFeeTxs { n += 2 } if m.IgnoreBearerAuth { n += 2 } return n } func sovChainConfig(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozChainConfig(x uint64) (n int) { return sovChainConfig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *ChainConfig) 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 ErrIntOverflowChainConfig } 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: ChainConfig: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ChainConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AllowZeroFeeTxs", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChainConfig } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.AllowZeroFeeTxs = bool(v != 0) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IgnoreBearerAuth", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChainConfig } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.IgnoreBearerAuth = bool(v != 0) default: iNdEx = preIndex skippy, err := skipChainConfig(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthChainConfig } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipChainConfig(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, ErrIntOverflowChainConfig } 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, ErrIntOverflowChainConfig } 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, ErrIntOverflowChainConfig } 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, ErrInvalidLengthChainConfig } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupChainConfig } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthChainConfig } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthChainConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowChainConfig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupChainConfig = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/hub/types/codec.go ================================================ package types import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParams{}, &MsgInvalidateJWS{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } ================================================ FILE: x/hub/types/errors.go ================================================ package types // DONTCOVER import ( sdkerrors "cosmossdk.io/errors" ) // x/hub module sentinel errors. var ( ErrInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") ErrSample = sdkerrors.Register(ModuleName, 1101, "sample error") ErrInvalidInput = sdkerrors.Register(ModuleName, 1102, "invalid input") ErrJWSTokenNotFound = sdkerrors.Register(ModuleName, 1103, "JWS token not found") ErrJWSTokenAlreadyInvalid = sdkerrors.Register(ModuleName, 1104, "JWS token is already invalid") ErrUnauthorizedInvalidation = sdkerrors.Register(ModuleName, 1105, "unauthorized to invalidate JWS token") ErrFailedToInvalidateToken = sdkerrors.Register(ModuleName, 1106, "failed to invalidate JWS token") ErrJWSTokenExpired = sdkerrors.Register(ModuleName, 1107, "JWS token has expired") ErrJWSTokenInvalid = sdkerrors.Register(ModuleName, 1108, "JWS token is invalid") ErrConfigSet = sdkerrors.Register(ModuleName, 1109, "ChainConfig already initialized: config is immutable and can only be set at genesis") ) ================================================ FILE: x/hub/types/expected_keepers.go ================================================ package types import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" connectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types" ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" ) // AccountKeeper defines the expected interface for the Account module. type AccountKeeper interface { GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation // Methods imported from account should be defined here } // BankKeeper defines the expected interface for the Bank module. type BankKeeper interface { SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins // Methods imported from bank should be defined here } // ParamSubspace defines the expected Subspace interface for parameters. type ParamSubspace interface { Get(context.Context, []byte, interface{}) Set(context.Context, []byte, interface{}) } // ICAHostKeeper defines the expected ICA host keeper interface. type ICAHostKeeper interface { GetInterchainAccountAddress(ctx sdk.Context, connectionID, portID string) (string, bool) } // ConnectionKeeper defines the expected connection keeper interface. type ConnectionKeeper interface { GetConnection(ctx sdk.Context, connectionID string) (connectiontypes.ConnectionEnd, bool) } // ClientKeeper defines the expected client keeper interface. type ClientKeeper interface { GetClientState(ctx sdk.Context, clientID string) (ibcexported.ClientState, bool) } ================================================ FILE: x/hub/types/genesis.go ================================================ package types // DefaultIndex is the default global index const DefaultIndex uint64 = 1 // DefaultGenesis returns the default genesis state. func DefaultGenesis() *GenesisState { return &GenesisState{ Params: DefaultParams(), IcaConnections: []ICAConnection{}, ChainConfig: ChainConfig{ AllowZeroFeeTxs: false, IgnoreBearerAuth: false, }, } } // Validate performs basic genesis state validation returning an error upon any failure. func (gs GenesisState) Validate() error { return gs.Params.Validate() } ================================================ FILE: x/hub/types/genesis.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/hub/genesis.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 // GenesisState defines the hub 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"` // ica_connections defines the list of ICA connections. IcaConnections []ICAConnection `protobuf:"bytes,2,rep,name=ica_connections,json=icaConnections,proto3" json:"ica_connections"` // jws_tokens defines the list of JWS token records. JwsTokens []JWSTokenRecord `protobuf:"bytes,3,rep,name=jws_tokens,json=jwsTokens,proto3" json:"jws_tokens"` ChainConfig ChainConfig `protobuf:"bytes,4,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config"` } 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_848db870e8494d54, []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 (m *GenesisState) GetIcaConnections() []ICAConnection { if m != nil { return m.IcaConnections } return nil } func (m *GenesisState) GetJwsTokens() []JWSTokenRecord { if m != nil { return m.JwsTokens } return nil } func (m *GenesisState) GetChainConfig() ChainConfig { if m != nil { return m.ChainConfig } return ChainConfig{} } func init() { proto.RegisterType((*GenesisState)(nil), "sourcehub.hub.GenesisState") } func init() { proto.RegisterFile("sourcehub/hub/genesis.proto", fileDescriptor_848db870e8494d54) } var fileDescriptor_848db870e8494d54 = []byte{ // 351 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x31, 0x4f, 0xf2, 0x40, 0x18, 0xc7, 0x5b, 0x20, 0x24, 0x1c, 0xbc, 0xaf, 0xb1, 0xd1, 0xa4, 0xa9, 0x52, 0x09, 0x13, 0x71, 0x68, 0x13, 0x5c, 0x5c, 0xa5, 0x83, 0xa8, 0x8b, 0x01, 0x13, 0x13, 0x17, 0x72, 0x9c, 0x67, 0x39, 0x08, 0xf7, 0x90, 0xde, 0x11, 0xf4, 0x5b, 0xf8, 0x1d, 0x5c, 0x1c, 0xfd, 0x18, 0x8c, 0x8c, 0x4e, 0xc6, 0xc0, 0xe0, 0xd7, 0x30, 0x77, 0xad, 0xc0, 0x31, 0xb4, 0xb9, 0x3c, 0xff, 0x5f, 0x7e, 0x79, 0xfe, 0x0f, 0x3a, 0x12, 0x30, 0x4d, 0x08, 0x1d, 0x4c, 0xfb, 0xa1, 0xfa, 0x62, 0xca, 0xa9, 0x60, 0x22, 0x98, 0x24, 0x20, 0xc1, 0xf9, 0xb7, 0x0e, 0x83, 0xc1, 0xb4, 0xef, 0xed, 0xe3, 0x31, 0xe3, 0x10, 0xea, 0x7f, 0x4a, 0x78, 0x07, 0x31, 0xc4, 0xa0, 0x9f, 0xa1, 0x7a, 0x65, 0x53, 0xcf, 0x94, 0x4e, 0x70, 0x82, 0xc7, 0x99, 0xd3, 0xab, 0x9b, 0x19, 0x23, 0xb8, 0x47, 0x80, 0x73, 0x4a, 0x24, 0x03, 0x9e, 0x31, 0x55, 0x93, 0x19, 0xce, 0x44, 0x4f, 0xc2, 0x88, 0xfe, 0xc5, 0x35, 0x33, 0x26, 0x03, 0xcc, 0xb8, 0x92, 0x3c, 0xb1, 0x38, 0x25, 0xea, 0x6f, 0x39, 0x54, 0xb9, 0x4c, 0xab, 0x74, 0x25, 0x96, 0xd4, 0x39, 0x47, 0xc5, 0x74, 0x0b, 0xd7, 0xae, 0xd9, 0x8d, 0x72, 0xf3, 0x30, 0x30, 0xaa, 0x05, 0xb7, 0x3a, 0x6c, 0x95, 0xe6, 0x5f, 0x27, 0xd6, 0xfb, 0xcf, 0xc7, 0xa9, 0xdd, 0xc9, 0x78, 0xe7, 0x06, 0xed, 0x99, 0x3b, 0x0a, 0x37, 0x57, 0xcb, 0x37, 0xca, 0xcd, 0xe3, 0x1d, 0xc5, 0x55, 0x74, 0x11, 0xad, 0xa1, 0x56, 0x41, 0x99, 0x3a, 0xff, 0x19, 0xc1, 0x9b, 0xa1, 0x70, 0x5a, 0x08, 0xad, 0xcb, 0x08, 0x37, 0xaf, 0x3d, 0xd5, 0x1d, 0xcf, 0xf5, 0x7d, 0xf7, 0x4e, 0xe5, 0x1d, 0x4a, 0x20, 0x79, 0xcc, 0x44, 0xa5, 0xe1, 0x4c, 0xe8, 0xa9, 0x70, 0xda, 0xa8, 0xb2, 0xdd, 0xd8, 0x2d, 0xe8, 0x42, 0xde, 0x8e, 0x25, 0x52, 0x48, 0xa4, 0x89, 0xed, 0x56, 0x65, 0xb2, 0x35, 0x6f, 0xcf, 0x97, 0xbe, 0xbd, 0x58, 0xfa, 0xf6, 0xf7, 0xd2, 0xb7, 0x5f, 0x57, 0xbe, 0xb5, 0x58, 0xf9, 0xd6, 0xe7, 0xca, 0xb7, 0x1e, 0x82, 0x98, 0x49, 0x65, 0x21, 0x30, 0x0e, 0x53, 0x2f, 0xa7, 0x72, 0x06, 0xc9, 0x28, 0xdc, 0x9c, 0xfe, 0x59, 0x1f, 0x5f, 0xbe, 0x4c, 0xa8, 0xe8, 0x17, 0xf5, 0xd9, 0xcf, 0x7e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x03, 0x6a, 0x91, 0x8d, 0x4e, 0x02, 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.ChainConfig.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 if len(m.JwsTokens) > 0 { for iNdEx := len(m.JwsTokens) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.JwsTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if len(m.IcaConnections) > 0 { for iNdEx := len(m.IcaConnections) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.IcaConnections[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 { 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)) if len(m.IcaConnections) > 0 { for _, e := range m.IcaConnections { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.JwsTokens) > 0 { for _, e := range m.JwsTokens { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } l = m.ChainConfig.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 case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IcaConnections", 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.IcaConnections = append(m.IcaConnections, ICAConnection{}) if err := m.IcaConnections[len(m.IcaConnections)-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 JwsTokens", 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.JwsTokens = append(m.JwsTokens, JWSTokenRecord{}) if err := m.JwsTokens[len(m.JwsTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", 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.ChainConfig.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") ) ================================================ FILE: x/hub/types/genesis_test.go ================================================ package types_test import ( "testing" "github.com/sourcenetwork/sourcehub/x/hub/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) } }) } } ================================================ FILE: x/hub/types/ica_connection.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/hub/ica_connection.proto package types import ( fmt "fmt" 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 // ICAConnection represents an interchain account connection between a controller and host chain. type ICAConnection struct { // ica_address is the interchain account address generated on the host chain. IcaAddress string `protobuf:"bytes,1,opt,name=ica_address,json=icaAddress,proto3" json:"ica_address,omitempty"` // controller_address is the address of the controlling account on the controller chain. ControllerAddress string `protobuf:"bytes,2,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"` // controller_chain_id is the chain ID of the controller chain. ControllerChainId string `protobuf:"bytes,3,opt,name=controller_chain_id,json=controllerChainId,proto3" json:"controller_chain_id,omitempty"` // connection_id is the IBC connection ID used for this interchain account. ConnectionId string `protobuf:"bytes,4,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` } func (m *ICAConnection) Reset() { *m = ICAConnection{} } func (m *ICAConnection) String() string { return proto.CompactTextString(m) } func (*ICAConnection) ProtoMessage() {} func (*ICAConnection) Descriptor() ([]byte, []int) { return fileDescriptor_9235a030182ad704, []int{0} } func (m *ICAConnection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ICAConnection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ICAConnection.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 *ICAConnection) XXX_Merge(src proto.Message) { xxx_messageInfo_ICAConnection.Merge(m, src) } func (m *ICAConnection) XXX_Size() int { return m.Size() } func (m *ICAConnection) XXX_DiscardUnknown() { xxx_messageInfo_ICAConnection.DiscardUnknown(m) } var xxx_messageInfo_ICAConnection proto.InternalMessageInfo func (m *ICAConnection) GetIcaAddress() string { if m != nil { return m.IcaAddress } return "" } func (m *ICAConnection) GetControllerAddress() string { if m != nil { return m.ControllerAddress } return "" } func (m *ICAConnection) GetControllerChainId() string { if m != nil { return m.ControllerChainId } return "" } func (m *ICAConnection) GetConnectionId() string { if m != nil { return m.ConnectionId } return "" } func init() { proto.RegisterType((*ICAConnection)(nil), "sourcehub.hub.ICAConnection") } func init() { proto.RegisterFile("sourcehub/hub/ica_connection.proto", fileDescriptor_9235a030182ad704) } var fileDescriptor_9235a030182ad704 = []byte{ // 231 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2a, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x07, 0xe1, 0xcc, 0xe4, 0xc4, 0xf8, 0xe4, 0xfc, 0xbc, 0xbc, 0xd4, 0xe4, 0x92, 0xcc, 0xfc, 0x3c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x5e, 0xb8, 0x1a, 0xbd, 0x8c, 0xd2, 0x24, 0xa5, 0x2d, 0x8c, 0x5c, 0xbc, 0x9e, 0xce, 0x8e, 0xce, 0x70, 0x65, 0x42, 0xf2, 0x5c, 0xdc, 0x20, 0x8d, 0x89, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x5c, 0x99, 0xc9, 0x89, 0x8e, 0x10, 0x11, 0x21, 0x5d, 0x2e, 0xa1, 0xe4, 0xfc, 0xbc, 0x92, 0xa2, 0xfc, 0x9c, 0x9c, 0xd4, 0x22, 0xb8, 0x3a, 0x26, 0xb0, 0x3a, 0x41, 0x84, 0x0c, 0x4c, 0xb9, 0x1e, 0x97, 0x30, 0x92, 0xf2, 0xe4, 0x8c, 0xc4, 0xcc, 0xbc, 0xf8, 0xcc, 0x14, 0x09, 0x66, 0x74, 0xf5, 0xce, 0x20, 0x19, 0xcf, 0x14, 0x21, 0x65, 0x2e, 0x5e, 0x84, 0xa3, 0x41, 0x2a, 0x59, 0xc0, 0x2a, 0x79, 0x10, 0x82, 0x9e, 0x29, 0x4e, 0x1e, 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, 0xa5, 0x97, 0x9e, 0x59, 0x02, 0xf2, 0x5c, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0xab, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0xfa, 0x88, 0xc0, 0xa9, 0x00, 0x07, 0x4f, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x58, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xf7, 0xaa, 0xe4, 0x3c, 0x01, 0x00, 0x00, } func (m *ICAConnection) 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 *ICAConnection) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ICAConnection) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) i = encodeVarintIcaConnection(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0x22 } if len(m.ControllerChainId) > 0 { i -= len(m.ControllerChainId) copy(dAtA[i:], m.ControllerChainId) i = encodeVarintIcaConnection(dAtA, i, uint64(len(m.ControllerChainId))) i-- dAtA[i] = 0x1a } if len(m.ControllerAddress) > 0 { i -= len(m.ControllerAddress) copy(dAtA[i:], m.ControllerAddress) i = encodeVarintIcaConnection(dAtA, i, uint64(len(m.ControllerAddress))) i-- dAtA[i] = 0x12 } if len(m.IcaAddress) > 0 { i -= len(m.IcaAddress) copy(dAtA[i:], m.IcaAddress) i = encodeVarintIcaConnection(dAtA, i, uint64(len(m.IcaAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintIcaConnection(dAtA []byte, offset int, v uint64) int { offset -= sovIcaConnection(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *ICAConnection) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.IcaAddress) if l > 0 { n += 1 + l + sovIcaConnection(uint64(l)) } l = len(m.ControllerAddress) if l > 0 { n += 1 + l + sovIcaConnection(uint64(l)) } l = len(m.ControllerChainId) if l > 0 { n += 1 + l + sovIcaConnection(uint64(l)) } l = len(m.ConnectionId) if l > 0 { n += 1 + l + sovIcaConnection(uint64(l)) } return n } func sovIcaConnection(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozIcaConnection(x uint64) (n int) { return sovIcaConnection(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *ICAConnection) 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 ErrIntOverflowIcaConnection } 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: ICAConnection: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ICAConnection: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IcaAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIcaConnection } 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 ErrInvalidLengthIcaConnection } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthIcaConnection } if postIndex > l { return io.ErrUnexpectedEOF } m.IcaAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ControllerAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIcaConnection } 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 ErrInvalidLengthIcaConnection } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthIcaConnection } if postIndex > l { return io.ErrUnexpectedEOF } m.ControllerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ControllerChainId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIcaConnection } 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 ErrInvalidLengthIcaConnection } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthIcaConnection } if postIndex > l { return io.ErrUnexpectedEOF } m.ControllerChainId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIcaConnection } 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 ErrInvalidLengthIcaConnection } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthIcaConnection } if postIndex > l { return io.ErrUnexpectedEOF } m.ConnectionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipIcaConnection(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIcaConnection } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipIcaConnection(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, ErrIntOverflowIcaConnection } 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, ErrIntOverflowIcaConnection } 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, ErrIntOverflowIcaConnection } 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, ErrInvalidLengthIcaConnection } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupIcaConnection } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthIcaConnection } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthIcaConnection = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIcaConnection = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupIcaConnection = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/hub/types/jws_token.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/hub/jws_token.proto package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // JWSTokenStatus represents the validity status of a JWS token. type JWSTokenStatus int32 const ( // STATUS_UNSPECIFIED is the default/invalid status. JWSTokenStatus_STATUS_UNSPECIFIED JWSTokenStatus = 0 // STATUS_VALID indicates the token is valid and can be used. JWSTokenStatus_STATUS_VALID JWSTokenStatus = 1 // STATUS_INVALID indicates the token has been invalidated. JWSTokenStatus_STATUS_INVALID JWSTokenStatus = 2 ) var JWSTokenStatus_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "STATUS_VALID", 2: "STATUS_INVALID", } var JWSTokenStatus_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_VALID": 1, "STATUS_INVALID": 2, } func (x JWSTokenStatus) String() string { return proto.EnumName(JWSTokenStatus_name, int32(x)) } func (JWSTokenStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_9cf48ac1bca5ef47, []int{0} } // JWSTokenRecord represents a stored JWS token with its metadata. // The bearer_token field contains sensitive credentials and should not be exposed via public endpoints. type JWSTokenRecord struct { // token_hash is the unique identifier of the JWS token TokenHash string `protobuf:"bytes,1,opt,name=token_hash,json=tokenHash,proto3" json:"token_hash,omitempty"` // bearer_token is the full JWS token string. BearerToken string `protobuf:"bytes,2,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` // issuer_did is the DID that issued/signed the token. IssuerDid string `protobuf:"bytes,3,opt,name=issuer_did,json=issuerDid,proto3" json:"issuer_did,omitempty"` // authorized_account is the account authorized to use this token. AuthorizedAccount string `protobuf:"bytes,4,opt,name=authorized_account,json=authorizedAccount,proto3" json:"authorized_account,omitempty"` // issued_at is when the token was created. IssuedAt time.Time `protobuf:"bytes,5,opt,name=issued_at,json=issuedAt,proto3,stdtime" json:"issued_at"` // expires_at is when the token expires. ExpiresAt time.Time `protobuf:"bytes,6,opt,name=expires_at,json=expiresAt,proto3,stdtime" json:"expires_at"` // status is the current validity status of the token. Status JWSTokenStatus `protobuf:"varint,7,opt,name=status,proto3,enum=sourcehub.hub.JWSTokenStatus" json:"status,omitempty"` // first_used_at is when the token was first used in a transaction. FirstUsedAt *time.Time `protobuf:"bytes,8,opt,name=first_used_at,json=firstUsedAt,proto3,stdtime" json:"first_used_at,omitempty"` // last_used_at is when the token was last used in a transaction. LastUsedAt *time.Time `protobuf:"bytes,9,opt,name=last_used_at,json=lastUsedAt,proto3,stdtime" json:"last_used_at,omitempty"` // invalidated_at is when the token was manually invalidated (if applicable). InvalidatedAt *time.Time `protobuf:"bytes,10,opt,name=invalidated_at,json=invalidatedAt,proto3,stdtime" json:"invalidated_at,omitempty"` // invalidated_by is the account that invalidated the token (if applicable). InvalidatedBy string `protobuf:"bytes,11,opt,name=invalidated_by,json=invalidatedBy,proto3" json:"invalidated_by,omitempty"` } func (m *JWSTokenRecord) Reset() { *m = JWSTokenRecord{} } func (m *JWSTokenRecord) String() string { return proto.CompactTextString(m) } func (*JWSTokenRecord) ProtoMessage() {} func (*JWSTokenRecord) Descriptor() ([]byte, []int) { return fileDescriptor_9cf48ac1bca5ef47, []int{0} } func (m *JWSTokenRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JWSTokenRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_JWSTokenRecord.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 *JWSTokenRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_JWSTokenRecord.Merge(m, src) } func (m *JWSTokenRecord) XXX_Size() int { return m.Size() } func (m *JWSTokenRecord) XXX_DiscardUnknown() { xxx_messageInfo_JWSTokenRecord.DiscardUnknown(m) } var xxx_messageInfo_JWSTokenRecord proto.InternalMessageInfo func (m *JWSTokenRecord) GetTokenHash() string { if m != nil { return m.TokenHash } return "" } func (m *JWSTokenRecord) GetBearerToken() string { if m != nil { return m.BearerToken } return "" } func (m *JWSTokenRecord) GetIssuerDid() string { if m != nil { return m.IssuerDid } return "" } func (m *JWSTokenRecord) GetAuthorizedAccount() string { if m != nil { return m.AuthorizedAccount } return "" } func (m *JWSTokenRecord) GetIssuedAt() time.Time { if m != nil { return m.IssuedAt } return time.Time{} } func (m *JWSTokenRecord) GetExpiresAt() time.Time { if m != nil { return m.ExpiresAt } return time.Time{} } func (m *JWSTokenRecord) GetStatus() JWSTokenStatus { if m != nil { return m.Status } return JWSTokenStatus_STATUS_UNSPECIFIED } func (m *JWSTokenRecord) GetFirstUsedAt() *time.Time { if m != nil { return m.FirstUsedAt } return nil } func (m *JWSTokenRecord) GetLastUsedAt() *time.Time { if m != nil { return m.LastUsedAt } return nil } func (m *JWSTokenRecord) GetInvalidatedAt() *time.Time { if m != nil { return m.InvalidatedAt } return nil } func (m *JWSTokenRecord) GetInvalidatedBy() string { if m != nil { return m.InvalidatedBy } return "" } // EventJWSTokenInvalidated is emitted when a JWS token is invalidated. type EventJWSTokenInvalidated struct { // token_hash is the unique identifier of the invalidated token. TokenHash string `protobuf:"bytes,1,opt,name=token_hash,json=tokenHash,proto3" json:"token_hash,omitempty"` // issuer_did is the DID that issued the token. IssuerDid string `protobuf:"bytes,2,opt,name=issuer_did,json=issuerDid,proto3" json:"issuer_did,omitempty"` // authorized_account is the account that was authorized to use this token. AuthorizedAccount string `protobuf:"bytes,3,opt,name=authorized_account,json=authorizedAccount,proto3" json:"authorized_account,omitempty"` // invalidated_by is the account that invalidated the token. InvalidatedBy string `protobuf:"bytes,4,opt,name=invalidated_by,json=invalidatedBy,proto3" json:"invalidated_by,omitempty"` } func (m *EventJWSTokenInvalidated) Reset() { *m = EventJWSTokenInvalidated{} } func (m *EventJWSTokenInvalidated) String() string { return proto.CompactTextString(m) } func (*EventJWSTokenInvalidated) ProtoMessage() {} func (*EventJWSTokenInvalidated) Descriptor() ([]byte, []int) { return fileDescriptor_9cf48ac1bca5ef47, []int{1} } func (m *EventJWSTokenInvalidated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventJWSTokenInvalidated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_EventJWSTokenInvalidated.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 *EventJWSTokenInvalidated) XXX_Merge(src proto.Message) { xxx_messageInfo_EventJWSTokenInvalidated.Merge(m, src) } func (m *EventJWSTokenInvalidated) XXX_Size() int { return m.Size() } func (m *EventJWSTokenInvalidated) XXX_DiscardUnknown() { xxx_messageInfo_EventJWSTokenInvalidated.DiscardUnknown(m) } var xxx_messageInfo_EventJWSTokenInvalidated proto.InternalMessageInfo func (m *EventJWSTokenInvalidated) GetTokenHash() string { if m != nil { return m.TokenHash } return "" } func (m *EventJWSTokenInvalidated) GetIssuerDid() string { if m != nil { return m.IssuerDid } return "" } func (m *EventJWSTokenInvalidated) GetAuthorizedAccount() string { if m != nil { return m.AuthorizedAccount } return "" } func (m *EventJWSTokenInvalidated) GetInvalidatedBy() string { if m != nil { return m.InvalidatedBy } return "" } func init() { proto.RegisterEnum("sourcehub.hub.JWSTokenStatus", JWSTokenStatus_name, JWSTokenStatus_value) proto.RegisterType((*JWSTokenRecord)(nil), "sourcehub.hub.JWSTokenRecord") proto.RegisterType((*EventJWSTokenInvalidated)(nil), "sourcehub.hub.EventJWSTokenInvalidated") } func init() { proto.RegisterFile("sourcehub/hub/jws_token.proto", fileDescriptor_9cf48ac1bca5ef47) } var fileDescriptor_9cf48ac1bca5ef47 = []byte{ // 526 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xdf, 0x8e, 0xd2, 0x4e, 0x14, 0xc7, 0x19, 0x96, 0x1f, 0x3f, 0x18, 0xfe, 0x04, 0x27, 0xc6, 0x34, 0x24, 0x14, 0xdc, 0xc4, 0x84, 0x98, 0xd8, 0x26, 0x6b, 0x7c, 0x80, 0xb2, 0xa0, 0x8b, 0x31, 0xc4, 0xf0, 0x47, 0x13, 0x6f, 0x9a, 0x29, 0x9d, 0x6d, 0xc7, 0x85, 0x0e, 0x99, 0x99, 0xee, 0x2e, 0x3e, 0xc5, 0x3e, 0x89, 0xcf, 0xb1, 0x97, 0x7b, 0xa9, 0x37, 0x6a, 0xe0, 0x45, 0x4c, 0x67, 0x8a, 0x40, 0xd4, 0x2c, 0x5e, 0x90, 0xd0, 0x73, 0xbe, 0xe7, 0x33, 0x73, 0xe6, 0x7c, 0x0f, 0x6c, 0x08, 0x16, 0xf3, 0x29, 0x09, 0x63, 0xcf, 0x4e, 0x7e, 0x1f, 0xaf, 0x84, 0x2b, 0xd9, 0x05, 0x89, 0xac, 0x05, 0x67, 0x92, 0xa1, 0xca, 0xaf, 0xb4, 0x15, 0xc6, 0x5e, 0xfd, 0x61, 0xc0, 0x02, 0xa6, 0x32, 0x76, 0xf2, 0x4f, 0x8b, 0xea, 0xcd, 0x80, 0xb1, 0x60, 0x46, 0x6c, 0xf5, 0xe5, 0xc5, 0xe7, 0xb6, 0xa4, 0x73, 0x22, 0x24, 0x9e, 0x2f, 0xb4, 0xe0, 0xf8, 0x6b, 0x0e, 0x56, 0x5f, 0xbf, 0x1f, 0x8d, 0x13, 0xf0, 0x90, 0x4c, 0x19, 0xf7, 0x51, 0x03, 0x42, 0x75, 0x8e, 0x1b, 0x62, 0x11, 0x1a, 0xa0, 0x05, 0xda, 0xc5, 0x61, 0x51, 0x45, 0xce, 0xb0, 0x08, 0xd1, 0x63, 0x58, 0xf6, 0x08, 0xe6, 0x84, 0xeb, 0xdb, 0x18, 0x59, 0x25, 0x28, 0xe9, 0x98, 0xe2, 0x24, 0x04, 0x2a, 0x44, 0x4c, 0xb8, 0xeb, 0x53, 0xdf, 0x38, 0xd2, 0x04, 0x1d, 0xe9, 0x52, 0x1f, 0x3d, 0x83, 0x08, 0xc7, 0x32, 0x64, 0x9c, 0x7e, 0x22, 0xbe, 0x8b, 0xa7, 0x53, 0x16, 0x47, 0xd2, 0xc8, 0x29, 0xd9, 0x83, 0x6d, 0xc6, 0xd1, 0x09, 0xe4, 0x40, 0x5d, 0xeb, 0xbb, 0x58, 0x1a, 0xff, 0xb5, 0x40, 0xbb, 0x74, 0x52, 0xb7, 0x74, 0x5f, 0xd6, 0xa6, 0x2f, 0x6b, 0xbc, 0xe9, 0xab, 0x53, 0xb8, 0xfd, 0xd6, 0xcc, 0xdc, 0x7c, 0x6f, 0x82, 0x61, 0x41, 0x97, 0x39, 0x12, 0x9d, 0x42, 0x48, 0xae, 0x17, 0x94, 0x13, 0x91, 0x30, 0xf2, 0xff, 0xc0, 0x28, 0xa6, 0x75, 0x8e, 0x44, 0x2f, 0x60, 0x5e, 0x48, 0x2c, 0x63, 0x61, 0xfc, 0xdf, 0x02, 0xed, 0xea, 0x49, 0xc3, 0xda, 0x9b, 0x80, 0xb5, 0x79, 0xc6, 0x91, 0x12, 0x0d, 0x53, 0x31, 0xea, 0xc2, 0xca, 0x39, 0xe5, 0x42, 0xba, 0xb1, 0xd0, 0x2d, 0x14, 0xee, 0x3d, 0x3e, 0xa7, 0x8e, 0x2e, 0xa9, 0xb2, 0x89, 0x50, 0x1d, 0x74, 0x60, 0x79, 0x86, 0x77, 0x20, 0xc5, 0x03, 0x21, 0x30, 0xa9, 0x4a, 0x19, 0xaf, 0x60, 0x95, 0x46, 0x97, 0x78, 0x46, 0x7d, 0x2c, 0x35, 0x05, 0x1e, 0x48, 0xa9, 0xec, 0xd4, 0x39, 0x12, 0x3d, 0xd9, 0x07, 0x79, 0x4b, 0xa3, 0xa4, 0x86, 0xb7, 0x2b, 0xeb, 0x2c, 0x8f, 0x3f, 0x03, 0x68, 0xf4, 0x2e, 0x49, 0x24, 0x37, 0x2f, 0xd3, 0xdf, 0xa6, 0xef, 0x73, 0xd9, 0xbe, 0x85, 0xb2, 0x87, 0x59, 0xe8, 0xe8, 0x6f, 0x16, 0xfa, 0xfd, 0xc2, 0xb9, 0x3f, 0x5c, 0xf8, 0xe9, 0x60, 0xbb, 0x0b, 0x7a, 0x88, 0xe8, 0x11, 0x44, 0xa3, 0xb1, 0x33, 0x9e, 0x8c, 0xdc, 0xc9, 0x60, 0xf4, 0xb6, 0x77, 0xda, 0x7f, 0xd9, 0xef, 0x75, 0x6b, 0x19, 0x54, 0x83, 0xe5, 0x34, 0xfe, 0xce, 0x79, 0xd3, 0xef, 0xd6, 0x00, 0x42, 0xb0, 0x9a, 0x46, 0xfa, 0x03, 0x1d, 0xcb, 0x76, 0xce, 0x6e, 0x57, 0x26, 0xb8, 0x5b, 0x99, 0xe0, 0xc7, 0xca, 0x04, 0x37, 0x6b, 0x33, 0x73, 0xb7, 0x36, 0x33, 0x5f, 0xd6, 0x66, 0xe6, 0x83, 0x15, 0x50, 0x99, 0x78, 0x66, 0xca, 0xe6, 0xb6, 0x76, 0x51, 0x44, 0xe4, 0x15, 0xe3, 0x17, 0xf6, 0x76, 0xe9, 0xaf, 0xd5, 0xda, 0xcb, 0xe5, 0x82, 0x08, 0x2f, 0xaf, 0x46, 0xf3, 0xfc, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x80, 0x03, 0x6d, 0x14, 0x04, 0x00, 0x00, } func (m *JWSTokenRecord) 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 *JWSTokenRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *JWSTokenRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.InvalidatedBy) > 0 { i -= len(m.InvalidatedBy) copy(dAtA[i:], m.InvalidatedBy) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.InvalidatedBy))) i-- dAtA[i] = 0x5a } if m.InvalidatedAt != nil { n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.InvalidatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.InvalidatedAt):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintJwsToken(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x52 } if m.LastUsedAt != nil { n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.LastUsedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.LastUsedAt):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintJwsToken(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x4a } if m.FirstUsedAt != nil { n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.FirstUsedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.FirstUsedAt):]) if err3 != nil { return 0, err3 } i -= n3 i = encodeVarintJwsToken(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x42 } if m.Status != 0 { i = encodeVarintJwsToken(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x38 } n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ExpiresAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExpiresAt):]) if err4 != nil { return 0, err4 } i -= n4 i = encodeVarintJwsToken(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x32 n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.IssuedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.IssuedAt):]) if err5 != nil { return 0, err5 } i -= n5 i = encodeVarintJwsToken(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x2a if len(m.AuthorizedAccount) > 0 { i -= len(m.AuthorizedAccount) copy(dAtA[i:], m.AuthorizedAccount) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.AuthorizedAccount))) i-- dAtA[i] = 0x22 } if len(m.IssuerDid) > 0 { i -= len(m.IssuerDid) copy(dAtA[i:], m.IssuerDid) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.IssuerDid))) i-- dAtA[i] = 0x1a } if len(m.BearerToken) > 0 { i -= len(m.BearerToken) copy(dAtA[i:], m.BearerToken) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.BearerToken))) i-- dAtA[i] = 0x12 } if len(m.TokenHash) > 0 { i -= len(m.TokenHash) copy(dAtA[i:], m.TokenHash) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.TokenHash))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *EventJWSTokenInvalidated) 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 *EventJWSTokenInvalidated) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *EventJWSTokenInvalidated) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.InvalidatedBy) > 0 { i -= len(m.InvalidatedBy) copy(dAtA[i:], m.InvalidatedBy) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.InvalidatedBy))) i-- dAtA[i] = 0x22 } if len(m.AuthorizedAccount) > 0 { i -= len(m.AuthorizedAccount) copy(dAtA[i:], m.AuthorizedAccount) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.AuthorizedAccount))) i-- dAtA[i] = 0x1a } if len(m.IssuerDid) > 0 { i -= len(m.IssuerDid) copy(dAtA[i:], m.IssuerDid) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.IssuerDid))) i-- dAtA[i] = 0x12 } if len(m.TokenHash) > 0 { i -= len(m.TokenHash) copy(dAtA[i:], m.TokenHash) i = encodeVarintJwsToken(dAtA, i, uint64(len(m.TokenHash))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintJwsToken(dAtA []byte, offset int, v uint64) int { offset -= sovJwsToken(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *JWSTokenRecord) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TokenHash) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } l = len(m.BearerToken) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } l = len(m.IssuerDid) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } l = len(m.AuthorizedAccount) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.IssuedAt) n += 1 + l + sovJwsToken(uint64(l)) l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExpiresAt) n += 1 + l + sovJwsToken(uint64(l)) if m.Status != 0 { n += 1 + sovJwsToken(uint64(m.Status)) } if m.FirstUsedAt != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.FirstUsedAt) n += 1 + l + sovJwsToken(uint64(l)) } if m.LastUsedAt != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.LastUsedAt) n += 1 + l + sovJwsToken(uint64(l)) } if m.InvalidatedAt != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.InvalidatedAt) n += 1 + l + sovJwsToken(uint64(l)) } l = len(m.InvalidatedBy) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } return n } func (m *EventJWSTokenInvalidated) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TokenHash) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } l = len(m.IssuerDid) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } l = len(m.AuthorizedAccount) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } l = len(m.InvalidatedBy) if l > 0 { n += 1 + l + sovJwsToken(uint64(l)) } return n } func sovJwsToken(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozJwsToken(x uint64) (n int) { return sovJwsToken(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *JWSTokenRecord) 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 ErrIntOverflowJwsToken } 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: JWSTokenRecord: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JWSTokenRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TokenHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.TokenHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BearerToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.BearerToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IssuerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.IssuerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AuthorizedAccount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.AuthorizedAccount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IssuedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthJwsToken } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.IssuedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthJwsToken } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ExpiresAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Status |= JWSTokenStatus(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FirstUsedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthJwsToken } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } if m.FirstUsedAt == nil { m.FirstUsedAt = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.FirstUsedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastUsedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthJwsToken } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } if m.LastUsedAt == nil { m.LastUsedAt = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.LastUsedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InvalidatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthJwsToken } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } if m.InvalidatedAt == nil { m.InvalidatedAt = new(time.Time) } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.InvalidatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InvalidatedBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.InvalidatedBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipJwsToken(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthJwsToken } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EventJWSTokenInvalidated) 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 ErrIntOverflowJwsToken } 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: EventJWSTokenInvalidated: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EventJWSTokenInvalidated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TokenHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.TokenHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IssuerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.IssuerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AuthorizedAccount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.AuthorizedAccount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InvalidatedBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowJwsToken } 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 ErrInvalidLengthJwsToken } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthJwsToken } if postIndex > l { return io.ErrUnexpectedEOF } m.InvalidatedBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipJwsToken(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthJwsToken } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipJwsToken(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, ErrIntOverflowJwsToken } 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, ErrIntOverflowJwsToken } 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, ErrIntOverflowJwsToken } 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, ErrInvalidLengthJwsToken } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupJwsToken } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthJwsToken } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthJwsToken = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowJwsToken = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupJwsToken = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/hub/types/keys.go ================================================ package types import ( "crypto/sha256" "encoding/hex" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" ) const ( // ModuleName defines the module name ModuleName = "hub" // StoreKey defines the primary module store key StoreKey = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_hub" ) var ( // ICAConnectionKeyPrefix is the key prefix for ICA connections ICAConnectionKeyPrefix = []byte{0x00} // JWSTokenKeyPrefix is the key prefix for JWS token records JWSTokenKeyPrefix = []byte{0x01} // JWSTokenByDIDKeyPrefix is the key prefix for JWS tokens indexed by DID JWSTokenByDIDKeyPrefix = []byte{0x02} // JWSTokenByAccountKeyPrefix is the key prefix for JWS tokens indexed by authorized account JWSTokenByAccountKeyPrefix = []byte{0x03} ParamsKey = []byte("p_hub") // ChainConfigKey stores Hub's chain config params // set at genesis ChainConfigKey = []byte("chain_config") ) // HashJWSToken returns the SHA256 hash of a JWS token string. func HashJWSToken(jwsToken string) string { hash := sha256.Sum256([]byte(jwsToken)) return hex.EncodeToString(hash[:]) } // JWSTokenKey returns the store key for a JWS token by its hash using length-prefixed encoding. func JWSTokenKey(tokenHash string) []byte { return append(JWSTokenKeyPrefix, address.MustLengthPrefix([]byte(tokenHash))...) } // JWSTokenByDIDKey returns the store key for a JWS token indexed by DID and hash using length-prefixed encoding. func JWSTokenByDIDKey(did, tokenHash string) []byte { key := append(JWSTokenByDIDKeyPrefix, address.MustLengthPrefix([]byte(did))...) return append(key, address.MustLengthPrefix([]byte(tokenHash))...) } // JWSTokenByAccountKey returns the store key for a JWS token indexed by account and hash using length-prefixed encoding. func JWSTokenByAccountKey(account, tokenHash string) []byte { key := append(JWSTokenByAccountKeyPrefix, address.MustLengthPrefix([]byte(account))...) return append(key, address.MustLengthPrefix([]byte(tokenHash))...) } // JWSTokenDIDPrefix returns the prefix for all tokens belonging to a DID. func JWSTokenDIDPrefix(did string) []byte { return append(JWSTokenByDIDKeyPrefix, address.MustLengthPrefix([]byte(did))...) } // JWSTokenAccountPrefix returns the prefix for all tokens belonging to an account. func JWSTokenAccountPrefix(account string) []byte { return append(JWSTokenByAccountKeyPrefix, address.MustLengthPrefix([]byte(account))...) } // ParseJWSTokenKey parses a JWS token key and returns the token hash. func ParseJWSTokenKey(key []byte) (tokenHash string, err error) { if len(key) == 0 { return "", fmt.Errorf("empty key") } tokenHashLen, tokenHashLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 0, 1) if len(tokenHashLen) == 0 { return "", fmt.Errorf("invalid key: missing token hash length") } tokenHashBz, _ := sdk.ParseLengthPrefixedBytes(key, tokenHashLenEndIndex+1, int(tokenHashLen[0])) return string(tokenHashBz), nil } // ParseJWSTokenByDIDKey parses a JWS token by DID key and returns the DID and token hash. func ParseJWSTokenByDIDKey(key []byte) (did, tokenHash string, err error) { if len(key) == 0 { return "", "", fmt.Errorf("empty key") } didLen, didLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 0, 1) if len(didLen) == 0 { return "", "", fmt.Errorf("invalid key: missing DID length") } didBz, tokenHashStartIndex := sdk.ParseLengthPrefixedBytes(key, didLenEndIndex+1, int(didLen[0])) tokenHashLen, tokenHashLenEndIndex := sdk.ParseLengthPrefixedBytes(key, tokenHashStartIndex+1, 1) if len(tokenHashLen) == 0 { return "", "", fmt.Errorf("invalid key: missing token hash length") } tokenHashBz, _ := sdk.ParseLengthPrefixedBytes(key, tokenHashLenEndIndex+1, int(tokenHashLen[0])) return string(didBz), string(tokenHashBz), nil } // ParseJWSTokenByAccountKey parses a JWS token by account key and returns the account and token hash. func ParseJWSTokenByAccountKey(key []byte) (account, tokenHash string, err error) { if len(key) == 0 { return "", "", fmt.Errorf("empty key") } accountLen, accountLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 0, 1) if len(accountLen) == 0 { return "", "", fmt.Errorf("invalid key: missing account length") } accountBz, tokenHashStartIndex := sdk.ParseLengthPrefixedBytes(key, accountLenEndIndex+1, int(accountLen[0])) tokenHashLen, tokenHashLenEndIndex := sdk.ParseLengthPrefixedBytes(key, tokenHashStartIndex+1, 1) if len(tokenHashLen) == 0 { return "", "", fmt.Errorf("invalid key: missing token hash length") } tokenHashBz, _ := sdk.ParseLengthPrefixedBytes(key, tokenHashLenEndIndex+1, int(tokenHashLen[0])) return string(accountBz), string(tokenHashBz), nil } ================================================ FILE: x/hub/types/msg_invalidate_jws.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgInvalidateJWS{} // ValidateBasic does a sanity check on the provided data. func (m *MsgInvalidateJWS) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { return errorsmod.Wrap(err, "invalid creator address") } if m.TokenHash == "" { return ErrInvalidInput.Wrapf("invalid token hash") } return nil } ================================================ FILE: x/hub/types/msg_update_params.go ================================================ package types import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgUpdateParams{} // ValidateBasic does a sanity check on the provided data. func (m *MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { return errorsmod.Wrap(err, "invalid authority address") } if err := m.Params.Validate(); err != nil { return err } return nil } ================================================ FILE: x/hub/types/params.go ================================================ package types import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) var _ paramtypes.ParamSet = (*Params)(nil) // ParamKeyTable the param key table for launch module. func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } // NewParams creates a new Params instance. func NewParams() Params { return Params{} } // DefaultParams returns a default set of parameters. func DefaultParams() Params { return NewParams() } // ParamSetPairs get the params.ParamSet. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{} } // Validate validates the set of params. func (p Params) Validate() error { return nil } ================================================ FILE: x/hub/types/params.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/hub/params.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 // 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_23e5f04c1d8b06a7, []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), "sourcehub.hub.Params") } func init() { proto.RegisterFile("sourcehub/hub/params.proto", fileDescriptor_23e5f04c1d8b06a7) } var fileDescriptor_23e5f04c1d8b06a7 = []byte{ // 168 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x07, 0xe1, 0x82, 0xc4, 0xa2, 0xc4, 0xdc, 0x62, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x5e, 0xb8, 0x9c, 0x5e, 0x46, 0x69, 0x92, 0x94, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0xa8, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, 0x88, 0xa8, 0x92, 0x26, 0x17, 0x5b, 0x00, 0xd8, 0x1c, 0x2b, 0xf9, 0x17, 0x0b, 0xe4, 0x19, 0xbb, 0x9e, 0x6f, 0xd0, 0x12, 0x43, 0x58, 0x53, 0x01, 0xb6, 0x08, 0xa2, 0xc0, 0xc9, 0xe3, 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, 0xf4, 0xd2, 0x33, 0x4b, 0x40, 0x36, 0x27, 0xe7, 0xe7, 0xea, 0x43, 0x34, 0xe7, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0xeb, 0xa3, 0x1b, 0x55, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xb6, 0xdb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x62, 0xf3, 0xf7, 0xd1, 0x00, 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") ) ================================================ FILE: x/hub/types/query.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/hub/query.proto package types import ( context "context" fmt "fmt" _ "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" 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 // 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_9940cfaa4a237fff, []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_9940cfaa4a237fff, []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), "sourcehub.hub.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "sourcehub.hub.QueryParamsResponse") } func init() { proto.RegisterFile("sourcehub/hub/query.proto", fileDescriptor_9940cfaa4a237fff) } var fileDescriptor_9940cfaa4a237fff = []byte{ // 283 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xcd, 0x28, 0x4d, 0xd2, 0x07, 0xe1, 0xc2, 0xd2, 0xd4, 0xa2, 0x4a, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x5e, 0xb8, 0x94, 0x5e, 0x46, 0x69, 0x92, 0x94, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0xa8, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, 0xa8, 0xa8, 0x4c, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x7e, 0x62, 0x41, 0xa6, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, 0x62, 0x49, 0x66, 0x7e, 0x5e, 0x31, 0x54, 0x56, 0x0a, 0xd5, 0xc2, 0x82, 0xc4, 0xa2, 0xc4, 0x5c, 0xa8, 0x9c, 0x92, 0x08, 0x97, 0x50, 0x20, 0xc8, 0x01, 0x01, 0x60, 0xc1, 0xa0, 0xd4, 0xc2, 0xd2, 0xd4, 0xe2, 0x12, 0x25, 0x7f, 0x2e, 0x61, 0x14, 0xd1, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x0b, 0x2e, 0x36, 0x88, 0x66, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x51, 0x3d, 0x14, 0xf7, 0xea, 0x41, 0x94, 0x3b, 0x71, 0x9e, 0xb8, 0x27, 0xcf, 0xb0, 0xe2, 0xf9, 0x06, 0x2d, 0xc6, 0x20, 0xa8, 0x7a, 0xa3, 0x56, 0x46, 0x2e, 0x56, 0xb0, 0x89, 0x42, 0x35, 0x5c, 0x6c, 0x10, 0x65, 0x42, 0x8a, 0x68, 0xba, 0x31, 0xdd, 0x21, 0xa5, 0x84, 0x4f, 0x09, 0xc4, 0x51, 0x4a, 0xda, 0x4d, 0x97, 0x9f, 0x4c, 0x66, 0x52, 0x15, 0x52, 0xd6, 0x87, 0xa8, 0xcd, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0xc7, 0xe6, 0x69, 0x27, 0x8f, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4b, 0xcf, 0x2c, 0x01, 0x59, 0x91, 0x9c, 0x9f, 0x8b, 0xd3, 0xa0, 0x0a, 0xb0, 0x51, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0xf0, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x59, 0x5b, 0x93, 0x7e, 0xce, 0x01, 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, "/sourcehub.hub.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: "/sourcehub.hub.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: "sourcehub.hub.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/hub/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") ) ================================================ FILE: x/hub/types/query.pb.gw.go ================================================ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // source: sourcehub/hub/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}, []string{"sourcenetwork", "sourcehub", "hub", "params"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage ) ================================================ FILE: x/hub/types/tx.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/hub/tx.proto package types import ( context "context" fmt "fmt" _ "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" 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 // 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_437f12beac18b559, []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_437f12beac18b559, []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 // MsgInvalidateJWS is the Msg/InvalidateJWS request type. // This message allows a user to invalidate a JWS token: // - By providing a JWS extension option with matching DID. // - By being the creator/signer of the message with matching authorized account. type MsgInvalidateJWS struct { // creator is the address of the message signer. Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` // token_hash is the hash/identifier of the JWS token to invalidate. TokenHash string `protobuf:"bytes,2,opt,name=token_hash,json=tokenHash,proto3" json:"token_hash,omitempty"` } func (m *MsgInvalidateJWS) Reset() { *m = MsgInvalidateJWS{} } func (m *MsgInvalidateJWS) String() string { return proto.CompactTextString(m) } func (*MsgInvalidateJWS) ProtoMessage() {} func (*MsgInvalidateJWS) Descriptor() ([]byte, []int) { return fileDescriptor_437f12beac18b559, []int{2} } func (m *MsgInvalidateJWS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgInvalidateJWS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInvalidateJWS.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 *MsgInvalidateJWS) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInvalidateJWS.Merge(m, src) } func (m *MsgInvalidateJWS) XXX_Size() int { return m.Size() } func (m *MsgInvalidateJWS) XXX_DiscardUnknown() { xxx_messageInfo_MsgInvalidateJWS.DiscardUnknown(m) } var xxx_messageInfo_MsgInvalidateJWS proto.InternalMessageInfo func (m *MsgInvalidateJWS) GetCreator() string { if m != nil { return m.Creator } return "" } func (m *MsgInvalidateJWS) GetTokenHash() string { if m != nil { return m.TokenHash } return "" } // MsgInvalidateJWSResponse defines the response structure for executing a MsgInvalidateJWS message. type MsgInvalidateJWSResponse struct { // success indicates whether the invalidation was successful. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } func (m *MsgInvalidateJWSResponse) Reset() { *m = MsgInvalidateJWSResponse{} } func (m *MsgInvalidateJWSResponse) String() string { return proto.CompactTextString(m) } func (*MsgInvalidateJWSResponse) ProtoMessage() {} func (*MsgInvalidateJWSResponse) Descriptor() ([]byte, []int) { return fileDescriptor_437f12beac18b559, []int{3} } func (m *MsgInvalidateJWSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgInvalidateJWSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInvalidateJWSResponse.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 *MsgInvalidateJWSResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInvalidateJWSResponse.Merge(m, src) } func (m *MsgInvalidateJWSResponse) XXX_Size() int { return m.Size() } func (m *MsgInvalidateJWSResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgInvalidateJWSResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgInvalidateJWSResponse proto.InternalMessageInfo func (m *MsgInvalidateJWSResponse) GetSuccess() bool { if m != nil { return m.Success } return false } func init() { proto.RegisterType((*MsgUpdateParams)(nil), "sourcehub.hub.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.hub.MsgUpdateParamsResponse") proto.RegisterType((*MsgInvalidateJWS)(nil), "sourcehub.hub.MsgInvalidateJWS") proto.RegisterType((*MsgInvalidateJWSResponse)(nil), "sourcehub.hub.MsgInvalidateJWSResponse") } func init() { proto.RegisterFile("sourcehub/hub/tx.proto", fileDescriptor_437f12beac18b559) } var fileDescriptor_437f12beac18b559 = []byte{ // 456 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xcf, 0x6b, 0xd4, 0x40, 0x18, 0xcd, 0x28, 0xb6, 0x66, 0xb4, 0xa8, 0xa1, 0xda, 0x34, 0x60, 0x76, 0xc9, 0x41, 0xcb, 0x82, 0x09, 0x8d, 0x22, 0xd2, 0x9b, 0x7b, 0xaa, 0xc2, 0x82, 0xa4, 0xa8, 0xe8, 0xa5, 0xcc, 0x66, 0x87, 0x49, 0xa8, 0xc9, 0x84, 0xf9, 0x26, 0xb5, 0xbd, 0x89, 0x47, 0x4f, 0x1e, 0xfd, 0x13, 0x3c, 0xee, 0x41, 0xf0, 0xe8, 0xb5, 0xc7, 0xe2, 0xc9, 0x93, 0xc8, 0xee, 0x61, 0xff, 0x0d, 0x99, 0x49, 0xd2, 0x25, 0x51, 0xda, 0x43, 0x7e, 0x7c, 0xef, 0xbd, 0x79, 0xf3, 0xbe, 0x6f, 0x06, 0xdf, 0x01, 0x5e, 0x8a, 0x98, 0x26, 0xe5, 0x38, 0x50, 0x8f, 0x3c, 0xf2, 0x0b, 0xc1, 0x25, 0xb7, 0xd6, 0xce, 0x70, 0x3f, 0x29, 0xc7, 0xce, 0x2d, 0x92, 0xa5, 0x39, 0x0f, 0xf4, 0xbb, 0x52, 0x38, 0x1b, 0x31, 0x87, 0x8c, 0x43, 0x90, 0x01, 0x0b, 0x0e, 0xb7, 0xd5, 0xa7, 0x26, 0x36, 0x2b, 0x62, 0x5f, 0x57, 0x41, 0x55, 0xd4, 0xd4, 0x3a, 0xe3, 0x8c, 0x57, 0xb8, 0xfa, 0xab, 0x51, 0xa7, 0x9d, 0xa1, 0x20, 0x82, 0x64, 0xf5, 0x0a, 0xef, 0x3b, 0xc2, 0x37, 0x46, 0xc0, 0x5e, 0x16, 0x13, 0x22, 0xe9, 0x0b, 0xcd, 0x58, 0x8f, 0xb1, 0x49, 0x4a, 0x99, 0x70, 0x91, 0xca, 0x63, 0x1b, 0xf5, 0xd1, 0x96, 0x39, 0xb4, 0x7f, 0x7e, 0x7b, 0xb0, 0x5e, 0x6f, 0xf5, 0x74, 0x32, 0x11, 0x14, 0x60, 0x4f, 0x8a, 0x34, 0x67, 0xd1, 0x52, 0x6a, 0x3d, 0xc1, 0x2b, 0x95, 0xb7, 0x7d, 0xa9, 0x8f, 0xb6, 0xae, 0x85, 0xb7, 0xfd, 0x56, 0x93, 0x7e, 0x65, 0x3f, 0x34, 0x4f, 0x7e, 0xf7, 0x8c, 0xaf, 0x8b, 0xe9, 0x00, 0x45, 0xb5, 0x7e, 0x27, 0xfc, 0xb8, 0x98, 0x0e, 0x96, 0x4e, 0x9f, 0x16, 0xd3, 0x41, 0x6f, 0x19, 0xfa, 0x48, 0xc7, 0xee, 0xa4, 0xf4, 0x36, 0xf1, 0x46, 0x07, 0x8a, 0x28, 0x14, 0x3c, 0x07, 0xea, 0x7d, 0x41, 0xf8, 0xe6, 0x08, 0xd8, 0xb3, 0xfc, 0x90, 0xbc, 0x4b, 0x15, 0xff, 0xfc, 0xf5, 0x9e, 0x15, 0xe2, 0xd5, 0x58, 0x50, 0x22, 0xb9, 0xb8, 0xb0, 0xa7, 0x46, 0x68, 0xdd, 0xc5, 0x58, 0xf2, 0x03, 0x9a, 0xef, 0x27, 0x04, 0x12, 0xdd, 0x95, 0x19, 0x99, 0x1a, 0xd9, 0x25, 0x90, 0xec, 0x6c, 0xab, 0xd8, 0x8d, 0x58, 0x85, 0xee, 0xff, 0x27, 0x74, 0x2b, 0x85, 0xf7, 0x08, 0xdb, 0x5d, 0xac, 0x89, 0x6d, 0xd9, 0x78, 0x15, 0xca, 0x38, 0xa6, 0x00, 0x3a, 0xe1, 0xd5, 0xa8, 0x29, 0xc3, 0x1f, 0x08, 0x5f, 0x1e, 0x01, 0xb3, 0x5e, 0xe1, 0xeb, 0xad, 0x93, 0x72, 0x3b, 0x13, 0xee, 0x0c, 0xc4, 0xb9, 0x77, 0x3e, 0x7f, 0xb6, 0xf3, 0x1b, 0xbc, 0xd6, 0x1e, 0x56, 0xef, 0xdf, 0x85, 0x2d, 0x81, 0x73, 0xff, 0x02, 0x41, 0x63, 0xed, 0x5c, 0xf9, 0xa0, 0x4e, 0x7a, 0xb8, 0x7b, 0x32, 0x73, 0xd1, 0xe9, 0xcc, 0x45, 0x7f, 0x66, 0x2e, 0xfa, 0x3c, 0x77, 0x8d, 0xd3, 0xb9, 0x6b, 0xfc, 0x9a, 0xbb, 0xc6, 0x5b, 0x9f, 0xa5, 0x52, 0x39, 0xc4, 0x3c, 0x0b, 0x2a, 0xcf, 0x9c, 0xca, 0xf7, 0x5c, 0x1c, 0x04, 0xdd, 0x61, 0xca, 0xe3, 0x82, 0xc2, 0x78, 0x45, 0x5f, 0xdc, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x5c, 0xab, 0xda, 0x5a, 0x03, 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) // InvalidateJWS allows a user to manually invalidate a JWS token // that they own (same DID) or are authorized to use (same creator account). InvalidateJWS(ctx context.Context, in *MsgInvalidateJWS, opts ...grpc.CallOption) (*MsgInvalidateJWSResponse, 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, "/sourcehub.hub.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) InvalidateJWS(ctx context.Context, in *MsgInvalidateJWS, opts ...grpc.CallOption) (*MsgInvalidateJWSResponse, error) { out := new(MsgInvalidateJWSResponse) err := c.cc.Invoke(ctx, "/sourcehub.hub.Msg/InvalidateJWS", 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) // InvalidateJWS allows a user to manually invalidate a JWS token // that they own (same DID) or are authorized to use (same creator account). InvalidateJWS(context.Context, *MsgInvalidateJWS) (*MsgInvalidateJWSResponse, 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 (*UnimplementedMsgServer) InvalidateJWS(ctx context.Context, req *MsgInvalidateJWS) (*MsgInvalidateJWSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidateJWS 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: "/sourcehub.hub.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_InvalidateJWS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgInvalidateJWS) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).InvalidateJWS(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.hub.Msg/InvalidateJWS", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).InvalidateJWS(ctx, req.(*MsgInvalidateJWS)) } return interceptor(ctx, in, info, handler) } var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.hub.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "InvalidateJWS", Handler: _Msg_InvalidateJWS_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/hub/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 (m *MsgInvalidateJWS) 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 *MsgInvalidateJWS) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgInvalidateJWS) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.TokenHash) > 0 { i -= len(m.TokenHash) copy(dAtA[i:], m.TokenHash) i = encodeVarintTx(dAtA, i, uint64(len(m.TokenHash))) 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 *MsgInvalidateJWSResponse) 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 *MsgInvalidateJWSResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgInvalidateJWSResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Success { i-- if m.Success { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } 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 (m *MsgInvalidateJWS) 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.TokenHash) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgInvalidateJWSResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Success { n += 2 } 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 (m *MsgInvalidateJWS) 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: MsgInvalidateJWS: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgInvalidateJWS: 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 TokenHash", 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.TokenHash = string(dAtA[iNdEx:postIndex]) 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 *MsgInvalidateJWSResponse) 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: MsgInvalidateJWSResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgInvalidateJWSResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Success = bool(v != 0) 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") ) ================================================ FILE: x/hub/types/types.go ================================================ package types ================================================ FILE: x/tier/keeper/abci.go ================================================ package keeper import ( "context" "time" "github.com/cosmos/cosmos-sdk/telemetry" "github.com/sourcenetwork/sourcehub/app/metrics" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // BeginBlocker handles slashing events and processes tier module staking rewards. func (k *Keeper) BeginBlocker(ctx context.Context) error { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) k.handleSlashingEvents(ctx) err := k.processRewards(ctx) if err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, telemetry.MetricKeyBeginBlocker, err) k.Logger().Error("Failed to process rewards", "error", err) } return nil } ================================================ FILE: x/tier/keeper/abci_test.go ================================================ package keeper import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) func TestBeginBlocker(t *testing.T) { k, ctx := setupKeeper(t) tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) insurancePoolBalance := math.NewInt(500_000) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initialDelegatorBalance := math.NewInt(20_000_000_000_000) initializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initialValidatorBalance := math.NewInt(10_000_000_000_000) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) mintCoinsToModule(t, &k, ctx, types.InsurancePoolName, insurancePoolBalance) // set initial block height and time ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) tierDelegation, err := k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) require.Error(t, err) // lock valid amount err = k.Lock(ctx, delAddr, valAddr, initialDelegatorBalance) require.NoError(t, err) tierDelegation, err = k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) require.NoError(t, err) require.Equal(t, math.LegacyNewDecFromInt(initialDelegatorBalance), tierDelegation.Shares) balance := k.GetBankKeeper().GetBalance(ctx, insurancePoolAddr, appparams.DefaultBondDenom) require.Equal(t, insurancePoolBalance, balance.Amount) // verify that lockup was added lockedAmt := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, initialDelegatorBalance, lockedAmt) // advance to block at height 1000 ctx = ctx.WithBlockHeight(1000).WithBlockTime(time.Now().Add(time.Hour)) err = k.BeginBlocker(ctx) require.NoError(t, err) } func TestHandleSlashingEvents(t *testing.T) { k, ctx := setupKeeper(t) tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initialDelegatorBalance := math.NewInt(200_000) initialDelegatorBalance2 := math.NewInt(800_000) initialValidatorBalance := math.NewInt(1_000_000) insurancePoolBalance := math.NewInt(500_000) missingSignatureSlashAmount := math.NewInt(100_000) doubleSignSlashAmount := math.NewInt(200_000) initializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initializeDelegator(t, &k, ctx, delAddr2, initialDelegatorBalance2) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) mintCoinsToModule(t, &k, ctx, types.InsurancePoolName, insurancePoolBalance) validator, err := k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) require.Equal(t, initialValidatorBalance, validator.Tokens) _, err = k.stakingKeeper.Delegate(ctx, delAddr2, initialDelegatorBalance2, stakingtypes.Unbonded, validator, true) err = k.Lock(ctx, delAddr, valAddr, initialDelegatorBalance) require.NoError(t, err) balance := k.GetBankKeeper().GetBalance(ctx, insurancePoolAddr, appparams.DefaultBondDenom) require.Equal(t, insurancePoolBalance, balance.Amount) ctx = ctx.WithBlockHeight(10).WithBlockTime(time.Now().Add(time.Minute)) expectedTotalStake := initialValidatorBalance.Add(initialDelegatorBalance).Add(initialDelegatorBalance2) validator, err = k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) require.Equal(t, expectedTotalStake, validator.Tokens) // emit missing_signature slashing event ctx.EventManager().EmitEvent(sdk.NewEvent( "slash", sdk.NewAttribute("address", valAddr.String()), sdk.NewAttribute("reason", slashingtypes.AttributeValueMissingSignature), sdk.NewAttribute("burned", missingSignatureSlashAmount.String()), )) // total validator stake remains unchanged since we just emit the event without burning tokens validator, err = k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) require.Equal(t, expectedTotalStake, validator.Tokens) // tier stake should be equal to initial delegator balance tierDelegation, err := k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) require.NoError(t, err) tierStake := validator.TokensFromSharesTruncated(tierDelegation.Shares) require.Equal(t, initialDelegatorBalance, tierStake.RoundInt()) // no insurance pool delegation at this point _, err = k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.Error(t, err) // total lockups amount should be equal to initial delegator balance at this point totalLockupsAmount := k.GetTotalLockupsAmount(ctx) require.Equal(t, initialDelegatorBalance, totalLockupsAmount) // handle missing_signature event (cover slashed tier module stake) k.handleSlashingEvents(ctx) // slashed tier module amount is 200_000 / (1_000_000 + 800_000 + 200_000) * 100_000 = 10_000 missingSigTierSlashedAmt := math.NewInt(10_000) // verify insurance pool balance expectedRemainingInsurancePoolBalance := insurancePoolBalance.Sub(missingSigTierSlashedAmt) newInsurancePoolBalance := k.GetBankKeeper().GetBalance(ctx, insurancePoolAddr, appparams.DefaultBondDenom) require.Equal(t, expectedRemainingInsurancePoolBalance, newInsurancePoolBalance.Amount) // slashed tier module amount is delegated back to the slashed validator validator, err = k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) require.Equal(t, expectedTotalStake.Add(missingSigTierSlashedAmt), validator.Tokens) // tier stake should be equal to initial delegator balance tierDelegation, err = k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) require.NoError(t, err) tierStake = validator.TokensFromSharesTruncated(tierDelegation.Shares) require.Equal(t, initialDelegatorBalance, tierStake.RoundInt()) // insurance pool should have delegation equal to the slashed amount insurancePoolDelegation, err := k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.NoError(t, err) insurancePoolStake := validator.TokensFromSharesTruncated(insurancePoolDelegation.Shares) require.Equal(t, missingSigTierSlashedAmt, insurancePoolStake.RoundInt()) // total lockups amount should be reduced by the slashed amount totalLockupsAmount = k.GetTotalLockupsAmount(ctx) require.Equal(t, initialDelegatorBalance.Sub(missingSigTierSlashedAmt), totalLockupsAmount) // insured amount should be equal to the slashed amount since it had enough balance insuredAmount := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, missingSigTierSlashedAmt, insuredAmount) // reset event manager ctx = ctx.WithBlockHeight(2).WithEventManager(sdk.NewEventManager()) // and emit double_sign slashing event ctx.EventManager().EmitEvent(sdk.NewEvent( "slash", sdk.NewAttribute("address", valAddr.String()), sdk.NewAttribute("reason", slashingtypes.AttributeValueDoubleSign), sdk.NewAttribute("burned", doubleSignSlashAmount.String()), )) // handle double_sign event (no insurance) k.handleSlashingEvents(ctx) // slashed tier module amount is 190_000 / (1_000_000 + 800_000 + 200_000 + 10_000) * 200_000 = 18906 doubleSignSlashedAmount := math.NewInt(18_906) // verify insurance pool balance newInsurancePoolBalance = k.GetBankKeeper().GetBalance(ctx, insurancePoolAddr, appparams.DefaultBondDenom) require.Equal(t, expectedRemainingInsurancePoolBalance, newInsurancePoolBalance.Amount) // tier stake should be equal to initial delegator balance tierDelegation, err = k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) require.NoError(t, err) tierStake = validator.TokensFromSharesTruncated(tierDelegation.Shares) require.Equal(t, initialDelegatorBalance, tierStake.RoundInt()) // total validator stake remains the same as it was after missing_signature event validator, err = k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) require.Equal(t, expectedTotalStake.Add(missingSigTierSlashedAmt), validator.Tokens) // total lockups amount should be reduced by the slashed amount totalLockupsAmount = k.GetTotalLockupsAmount(ctx) require.Equal(t, initialDelegatorBalance.Sub(missingSigTierSlashedAmt).Sub(doubleSignSlashedAmount), totalLockupsAmount) // insured amount should not change because double_sign events are not covered insuredAmount = k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, missingSigTierSlashedAmt, insuredAmount) } ================================================ FILE: x/tier/keeper/calculate_credit.go ================================================ package keeper import ( "time" "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // calculateCredit calculates the reward earned on the lockingAmt. // lockingAmt is stacked up on top of the lockedAmt to earn at the highest eligible reward. func calculateCredit(rateList []types.Rate, lockedAmt, lockingAmt math.Int) math.Int { credit := math.ZeroInt() stakedAmt := lockedAmt.Add(lockingAmt) // Iterate from the highest reward rate to the lowest. for _, r := range rateList { // Continue if the total lock does not reach the current rate requirement. if stakedAmt.LT(r.Amount) { continue } lower := math.MaxInt(r.Amount, lockedAmt) diff := stakedAmt.Sub(lower) diffDec := math.LegacyNewDecFromInt(diff) rateDec := math.LegacyNewDec(r.Rate) // rateDec MUST have 2 decimals of precision for the calculation to be correct. amt := diffDec.Mul(rateDec).Quo(math.LegacyNewDec(100)) credit = credit.Add(amt.TruncateInt()) // Subtract the lock that has been rewarded. stakedAmt = stakedAmt.Sub(diff) lockingAmt = lockingAmt.Sub(diff) // Break if all the new lock has been rewarded. if lockingAmt.IsZero() { break } } return credit } func calculateProratedCredit( rates []types.Rate, lockedAmt, lockingAmt math.Int, currentEpochStartTime, currentBlockTime time.Time, epochDuration time.Duration, ) math.Int { // Calculate the reward credits earned on the new lock. credit := calculateCredit(rates, lockedAmt, lockingAmt) // Prorate the credit based on the time elapsed in the current epoch. sinceCurrentEpoch := currentBlockTime.Sub(currentEpochStartTime).Milliseconds() epochDurationMs := epochDuration.Milliseconds() if epochDurationMs == 0 { return math.ZeroInt() } // This check is required because is possible that sinceCurrentEpoch can be greater than epochDuration // (e.g. chain paused for longer than the epoch duration or misconfigured epoch duration). if sinceCurrentEpoch < epochDurationMs { credit = credit.MulRaw(sinceCurrentEpoch).QuoRaw(epochDurationMs) } return credit } ================================================ FILE: x/tier/keeper/calculate_credit_test.go ================================================ package keeper import ( "fmt" "reflect" "testing" "time" "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestCalculateCredit(t *testing.T) { rateList := []types.Rate{ {Amount: math.NewInt(300), Rate: 150}, {Amount: math.NewInt(200), Rate: 120}, {Amount: math.NewInt(100), Rate: 110}, {Amount: math.NewInt(0), Rate: 100}, } tests := []struct { lockedAmt int64 lockingAmt int64 want int64 }{ { lockedAmt: 100, lockingAmt: 0, want: 0, }, { lockedAmt: 250, lockingAmt: 0, want: 0, }, { lockedAmt: 0, lockingAmt: 100, want: 100, }, { lockedAmt: 0, lockingAmt: 200, want: (100 * 1.0) + (100 * 1.1), }, { lockedAmt: 0, lockingAmt: 250, want: (100 * 1.0) + (100 * 1.1) + (50 * 1.2), }, { lockedAmt: 0, lockingAmt: 300, want: (100 * 1.0) + (100 * 1.1) + (100 * 1.2), }, { lockedAmt: 0, lockingAmt: 350, want: (100 * 1.0) + (100 * 1.1) + (100 * 1.2) + (50 * 1.5), }, { lockedAmt: 0, lockingAmt: 600, want: (100 * 1.0) + (100 * 1.1) + (100 * 1.2) + (300 * 1.5), }, { lockedAmt: 100, lockingAmt: 100, want: (100 * 1.1), }, { lockedAmt: 200, lockingAmt: 100, want: (100 * 1.2), }, { lockedAmt: 150, lockingAmt: 150, want: (50 * 1.1) + (100 * 1.2), }, { lockedAmt: 50, lockingAmt: 400, want: (50 * 1.0) + (100 * 1.1) + (100 * 1.2) + (150 * 1.5), }, } for _, tt := range tests { name := fmt.Sprintf("%d adds %d", tt.lockedAmt, tt.lockingAmt) oldLock := math.NewInt(tt.lockedAmt) newLock := math.NewInt(tt.lockingAmt) want := math.NewInt(tt.want) t.Run(name, func(t *testing.T) { if got := calculateCredit(rateList, oldLock, newLock); !reflect.DeepEqual(got, want) { t.Errorf("calculateCredit() = %v, want %v", got, tt.want) } }) } } func TestCalculateProratedCredit(t *testing.T) { baseTime := time.Date(2024, 1, 1, 12, 0, 0, 0, time.UTC) tests := []struct { name string lockedAmt int64 insuredAmt int64 lockingAmt int64 epochStartTime time.Time epochDuration time.Duration expectedCredit int64 }{ { /* Default rate for locking 300+ tokens is 150, but since the reward rates are tiered: - 0-100 tokens are prorated at a rate of 1.0 (100%). - 100-200 tokens are prorated at a rate of 1.1 (110%). - 200-300 tokens are prorated at a rate of 1.2 (120%). - 300+ tokens are prorated at a rate of 1.5 (150%). For a locking amount of 10,000,000, the total is 14,999,550 + 100 + 110 + 120 = 14,999,880. After 2 minutes in a 5-minute epoch, the expected credit amount should be: 14,999,880 * 120,000 ms / 300,000 ms = 14,999,880 * 0.4 = 5,999,952. */ name: "Large amount in the middle of the epoch", lockedAmt: 0, lockingAmt: 10_000_000, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 5_999_952, }, { name: "Large amount at the first second of the epoch", lockedAmt: 0, lockingAmt: 10_000_000, epochStartTime: baseTime.Add(-5 * time.Minute).Add(1 * time.Second), epochDuration: time.Minute * 5, expectedCredit: 14_949_880, }, { name: "Large amount at the last second of the epoch", lockedAmt: 0, lockingAmt: 10_000_000, epochStartTime: baseTime.Add(-1 * time.Second), epochDuration: time.Minute * 5, expectedCredit: 49_999, }, { name: "At the beginning of an epoch", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime.Add(-5 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 100, }, { name: "In the middle of an epoch", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 40, }, { name: "At the end of an epoch", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime, epochDuration: time.Minute * 5, expectedCredit: 0, }, { name: "Negative locking amount", lockedAmt: 0, lockingAmt: -100, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 0, }, { name: "Zero locking amount", lockedAmt: 0, lockingAmt: 0, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 0, }, { name: "Locking amount with 1.1 rate", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime.Add(-4 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 80, }, { name: "Locking amount with 1.2 rate", lockedAmt: 0, lockingAmt: 200, epochStartTime: baseTime.Add(-3 * time.Minute), epochDuration: time.Minute * 6, expectedCredit: 105, }, { name: "Locking amount with 1.5 rate", lockedAmt: 0, lockingAmt: 300, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 132, }, { name: "Zero epoch duration", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime, epochDuration: 0, expectedCredit: 0, }, { name: "Short epoch duration", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime.Add(-30 * time.Second), epochDuration: time.Minute * 1, expectedCredit: 50, }, { name: "Long epoch duration", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime.Add(-15 * 24 * time.Hour), epochDuration: time.Hour * 24 * 30, expectedCredit: 50, }, { name: "Epoch duration less than sinceCurrentEpoch", lockedAmt: 0, lockingAmt: 100, epochStartTime: baseTime.Add(-10 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 100, }, { name: "Small locking amount and short epoch", lockedAmt: 0, lockingAmt: 9, epochStartTime: baseTime.Add(-3 * time.Second), epochDuration: time.Second * 10, expectedCredit: 2, }, { name: "Small locking amount and long epoch", lockedAmt: 0, lockingAmt: 11, epochStartTime: baseTime.Add(-10 * time.Minute), epochDuration: time.Hour * 2, expectedCredit: 0, }, { name: "Large locking amount and short epoch", lockedAmt: 0, lockingAmt: 1_000_003, epochStartTime: baseTime.Add(-1 * time.Second), epochDuration: time.Second * 5, expectedCredit: 299_976, }, { name: "Large locking amount and long epoch", lockedAmt: 0, lockingAmt: 1_000_003, epochStartTime: baseTime.Add(-1 * time.Hour), epochDuration: time.Hour * 5, expectedCredit: 299_976, }, { name: "Locking amount causing uneven division", lockedAmt: 0, lockingAmt: 7, epochStartTime: baseTime.Add(-10 * time.Second), epochDuration: time.Second * 33, expectedCredit: 2, }, { name: "Epoch duration causing uneven division", lockedAmt: 0, lockingAmt: 1234, epochStartTime: baseTime.Add(-4 * time.Second), epochDuration: time.Second * 9, expectedCredit: 769, }, { name: "Locking amount with 1.0 rate and previously locked amount", lockedAmt: 40, lockingAmt: 40, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 16, // 40 * 1.0 * 2/5 }, { name: "Locking amount with 1.1 rate and previously locked amount", lockedAmt: 100, lockingAmt: 100, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 44, // 100 * 1.1 * 2/5 }, { name: "Locking amount with 1.5 rate and previously locked amount", lockedAmt: 300, lockingAmt: 300, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 180, // 300 * 1.5 * 2/5 }, { name: "Locking amount with 1.2 + 1.1 rate and previously locked amount", lockedAmt: 150, lockingAmt: 150, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 70, // ((100 * 1.2) + (50 * 1.1)) * 2/5 }, { name: "Locking amount with 1.5 + 1.2 rate and previously locked amount", lockedAmt: 200, lockingAmt: 200, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 108, // ((100 * 1.5) + (100 * 1.2)) * 2/5 }, { name: "Locking amount with 1.5 + 1.2 + 1.1 + 1.0 rate and previously locked amount", lockedAmt: 50, lockingAmt: 350, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 172, // ((100 * 1.5) + (100 * 1.2) + (100 * 1.1) + (50 * 1.0)) * 2/5 }, { name: "Locking small amount with large previously locked amount", lockedAmt: 1_000_000, lockingAmt: 100, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 60, // 100 * 1.5 * 2/5 }, { name: "Locking large amount with large previously locked amount", lockedAmt: 1_000_000, lockingAmt: 10_000_000, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 6_000_000, // 10,000,000 * 1.5 * 2/5 }, { name: "Locking large amount with large previously locked and insured amount", lockedAmt: 1_000_000, insuredAmt: 100_000, lockingAmt: 10_000_000, epochStartTime: baseTime.Add(-2 * time.Minute), epochDuration: time.Minute * 5, expectedCredit: 6_000_000, // 10,000,000 * 1.5 * 2/5 }, } rates := []types.Rate{ {Amount: math.NewInt(300), Rate: 150}, {Amount: math.NewInt(200), Rate: 120}, {Amount: math.NewInt(100), Rate: 110}, {Amount: math.NewInt(0), Rate: 100}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { lockedAmt := math.NewInt(tt.lockedAmt) lockingAmt := math.NewInt(tt.lockingAmt) credit := calculateProratedCredit( rates, lockedAmt, lockingAmt, tt.epochStartTime, baseTime, tt.epochDuration, ) if !credit.Equal(math.NewInt(tt.expectedCredit)) { t.Errorf("calculateProratedCredit() = %v, expected %v", credit, tt.expectedCredit) } }) } } ================================================ FILE: x/tier/keeper/credit.go ================================================ package keeper import ( "context" "errors" "fmt" "time" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/app/metrics" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // getTotalCreditAmount retrieves the total credit amount from the store. func (k *Keeper) getTotalCreditAmount(ctx context.Context) (total math.Int) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.TotalCreditsKey) if bz == nil { return math.ZeroInt() } err := total.Unmarshal(bz) if err != nil { return math.ZeroInt() } if total.IsNegative() { return math.ZeroInt() } return total } // setTotalCreditAmount updates the total credit amount in the store. func (k *Keeper) setTotalCreditAmount(ctx context.Context, total math.Int) error { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz, err := total.Marshal() if err != nil { return errorsmod.Wrapf(err, "marshal total credit amount") } store.Set(types.TotalCreditsKey, bz) // Update total credit amount gauge if we are not resetting the total if total.IsPositive() { telemetry.ModuleSetGauge( types.ModuleName, float32(total.Int64()), metrics.TotalCredits, ) } return nil } // mintCredit mints ucredit amount and sends it to the specified address. func (k *Keeper) mintCredit(ctx context.Context, addr sdk.AccAddress, amount math.Int) error { if _, err := sdk.AccAddressFromBech32(addr.String()); err != nil { return errorsmod.Wrap(err, "invalid address") } if amount.LTE(math.ZeroInt()) { return errors.New("invalid amount") } coins := sdk.NewCoins(sdk.NewCoin(appparams.MicroCreditDenom, amount)) err := k.bankKeeper.MintCoins(ctx, types.ModuleName, coins) if err != nil { return errorsmod.Wrap(err, "mint coins") } err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, addr, coins) if err != nil { return errorsmod.Wrap(err, "send coins from module to account") } return nil } // proratedCredit calculates the credits earned on the lockingAmt. func (k *Keeper) proratedCredit(ctx context.Context, delAddr sdk.AccAddress, lockingAmt math.Int) math.Int { rates := k.GetParams(ctx).RewardRates epochInfo := k.epochsKeeper.GetEpochInfo(ctx, types.EpochIdentifier) lockedAmt := k.totalLockedAmountByAddr(ctx, delAddr) insuredAmt := k.totalInsuredAmountByAddr(ctx, delAddr) totalAmt := lockedAmt.Add(insuredAmt) return calculateProratedCredit( rates, totalAmt, lockingAmt, epochInfo.CurrentEpochStartTime, sdk.UnwrapSDKContext(ctx).BlockTime(), epochInfo.Duration, ) } // burnAllCredits burns all the reward credits in the system. // It is called at the end of each epoch. func (k *Keeper) burnAllCredits(ctx context.Context, epochNumber int64) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.BurnAllCredits, start, err, []metrics.Label{ metrics.NewLabel(metrics.Epoch, fmt.Sprintf("%d", epochNumber)), }, ) }() // Track unused credits to calculate credit utilization unusedCredits := math.ZeroInt() // Iterating over the lockup records directly is safe because credits are non-transferable. cb := func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { coin := k.bankKeeper.GetBalance(ctx, delAddr, appparams.MicroCreditDenom) // Return if ucredit amount is not positive if !coin.Amount.IsPositive() { return } coins := sdk.NewCoins(coin) // Send ucredits from delegator address to the tier module account err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, delAddr, types.ModuleName, coins) if err != nil { err = errorsmod.Wrapf(err, "send %s ucredit from %s to module", coins, delAddr) return } // Burn ucredits from the tier module account err = k.bankKeeper.BurnCoins(ctx, types.ModuleName, coins) if err != nil { err = errorsmod.Wrapf(err, "burn %s ucredit", coins) return } // Update the unused credit amount unusedCredits = unusedCredits.Add(coin.Amount) } k.mustIterateLockups(ctx, cb) totalCredits := k.getTotalCreditAmount(ctx) if totalCredits.IsPositive() { creditUtilization, err := unusedCredits.ToLegacyDec().Quo(totalCredits.ToLegacyDec()).Float64() if err != nil { return errorsmod.Wrap(err, "calculate credit utilization") } // Update credit utilization gauge telemetry.ModuleSetGauge( types.ModuleName, float32(creditUtilization), metrics.CreditUtilization, fmt.Sprintf("%s_%d", metrics.Epoch, epochNumber), ) } // Reset total credit amount to 0 after burning k.setTotalCreditAmount(ctx, math.ZeroInt()) return err } // resetAllCredits resets all the credits in the system. func (k *Keeper) resetAllCredits(ctx context.Context, epochNumber int64) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.ResetAllCredits, start, err, []metrics.Label{ metrics.NewLabel(metrics.Epoch, fmt.Sprintf("%d", epochNumber)), }, ) }() // Reward to a delegator is calculated based on the total locked amount to all validators. // Since each lockup entry only records locked amount for a single validator, // we need to iterate through all the lockups to calculate the total locked amount for each delegator. lockedAmts := make(map[string]math.Int) cb := func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { amt, ok := lockedAmts[delAddr.String()] if !ok { amt = math.ZeroInt() } // Include associated insurance lockup amounts to allocate credits correctly insuranceLockupAmount := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) lockedAmts[delAddr.String()] = amt.Add(lockup.Amount).Add(insuranceLockupAmount) } k.mustIterateLockups(ctx, cb) rates := k.GetParams(ctx).RewardRates totalCredit := math.ZeroInt() for delStrAddr, amount := range lockedAmts { delAddr := sdk.MustAccAddressFromBech32(delStrAddr) credit := calculateCredit(rates, math.ZeroInt(), amount) err = k.mintCredit(ctx, delAddr, credit) if err != nil { return errorsmod.Wrapf(err, "mint %s ucredit to %s", credit, delAddr) } totalCredit.Add(credit) } // Set total credit amount err = k.setTotalCreditAmount(ctx, totalCredit) if err != nil { return errorsmod.Wrap(err, "set total credit amount") } return nil } ================================================ FILE: x/tier/keeper/credit_test.go ================================================ package keeper import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" appparams "github.com/sourcenetwork/sourcehub/app/params" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestSetAndGetTotalCreditAmount(t *testing.T) { k, ctx := setupKeeper(t) total := k.getTotalCreditAmount(ctx) require.True(t, total.IsZero(), "Initial total credit amount should be zero") expectedTotal := math.NewInt(1500) err := k.setTotalCreditAmount(ctx, expectedTotal) require.NoError(t, err, "Setting total credit amount should succeed") total = k.getTotalCreditAmount(ctx) require.Equal(t, expectedTotal, total, "Total credit amount should be 1500") } func TestMintCredit(t *testing.T) { tests := []struct { name string addr string amt int64 wantErr bool }{ { name: "Mint valid credit", addr: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", amt: 100, wantErr: false, }, { name: "Mint zero credit", addr: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", amt: 0, wantErr: true, }, { name: "Invalid address", addr: "", amt: 100, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { addr := sdk.AccAddress{} if tt.addr != "" { addr = sdk.MustAccAddressFromBech32(tt.addr) } amt := math.NewInt(tt.amt) k, ctx := setupKeeper(t) err := k.mintCredit(ctx, addr, amt) if (err != nil) != tt.wantErr { t.Errorf("mintCredit() error = %v, wantErr %v", err, tt.wantErr) } }) } } func TestProratedCredit(t *testing.T) { k, ctx := setupKeeper(t) baseTime := time.Date(2024, 1, 1, 12, 0, 0, 0, time.UTC) cases := []struct { name string locked int64 insured int64 locking int64 remainingMs int64 totalMs int64 want int64 }{ { name: "Large amount in the middle of the epoch", locked: 0, locking: 10_000_000, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 5_999_952, }, { name: "Large amount at the first second of the epoch", locked: 0, locking: 10_000_000, remainingMs: 299_000, // 4 minutes 59 seconds totalMs: 300_000, // 5 minutes want: 14_949_880, }, { name: "Large amount at the last second of the epoch", locked: 0, locking: 10_000_000, remainingMs: 1000, // 1 second totalMs: 300_000, // 5 minutes want: 49_999, }, { name: "At the beginning of an epoch", locked: 0, locking: 100, remainingMs: 300_000, // 5 minutes totalMs: 300_000, // 5 minutes want: 100, }, { name: "In the middle of an epoch", locked: 0, locking: 100, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 40, }, { name: "At the end of an epoch", locked: 0, locking: 100, remainingMs: 0, totalMs: 300_000, // 5 minutes want: 0, }, { name: "Negative locking amount", locked: 0, locking: -100, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 0, }, { name: "Zero locking amount", locked: 0, locking: 0, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 0, }, { name: "Locking amount with 1.1 rate", locked: 0, locking: 100, remainingMs: 240_000, // 4 minutes totalMs: 300_000, // 5 minutes want: 80, }, { name: "Locking amount with 1.2 rate", locked: 0, locking: 200, remainingMs: 180_000, // 3 minutes totalMs: 360_000, // 6 minutes want: 105, }, { name: "Locking amount with 1.5 rate", locked: 0, locking: 300, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 132, }, { name: "Zero epoch duration", locked: 0, locking: 100, remainingMs: 0, totalMs: 0, want: 0, }, { name: "Short epoch duration", locked: 0, locking: 100, remainingMs: 30_000, // 30 seconds totalMs: 60_000, // 1 minute want: 50, }, { name: "Long epoch duration", locked: 0, locking: 100, remainingMs: 1_296_000_000, // 15 days totalMs: 2_592_000_000, // 30 days want: 50, }, { name: "Epoch duration less than sinceCurrentEpoch", locked: 0, locking: 100, remainingMs: 600_000, // 10 minutes totalMs: 300_000, // 5 minutes want: 100, }, { name: "Small locking amount and short epoch", locked: 0, locking: 9, remainingMs: 3000, // 3 seconds totalMs: 10_000, // 10 seconds want: 2, }, { name: "Small locking amount and long epoch", locked: 0, locking: 11, remainingMs: 600_000, // 10 minutes totalMs: 7_200_000, // 2 hours want: 0, }, { name: "Large locking amount and short epoch", locked: 0, locking: 1_000_003, remainingMs: 1000, // 1 second totalMs: 5000, // 5 seconds want: 299_976, }, { name: "Large locking amount and long epoch", locked: 0, locking: 1_000_003, remainingMs: 3_600_000, // 1 hour totalMs: 18_000_000, // 5 hours want: 299_976, }, { name: "Locking amount causing uneven division", locked: 0, locking: 7, remainingMs: 10_000, // 10 seconds totalMs: 33_000, // 33 seconds want: 2, }, { name: "Epoch duration causing uneven division", locked: 0, locking: 1234, remainingMs: 4000, // 4 seconds totalMs: 9000, // 9 seconds want: 769, }, { name: "Locking amount with 1.0 rate and previously locked amount", locked: 40, locking: 40, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 16, // 40 * 1.0 * 2/5 }, { name: "Locking amount with 1.1 rate and previously locked amount", locked: 100, locking: 100, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 44, // 100 * 1.1 * 2/5 }, { name: "Locking amount with 1.5 rate and previously locked amount", locked: 300, locking: 300, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 180, // 300 * 1.5 * 2/5 }, { name: "Locking amount with 1.2 + 1.1 rate and previously locked amount", locked: 150, locking: 150, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 70, // ((100 * 1.2) + (50 * 1.1)) * 2/5 }, { name: "Locking amount with 1.5 + 1.2 rate and previously locked amount", locked: 200, locking: 200, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 108, // ((100 * 1.5) + (100 * 1.2)) * 2/5 }, { name: "Locking amount with 1.5 + 1.2 + 1.1 + 1.0 rate and previously locked amount", locked: 50, locking: 350, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 172, // ((100 * 1.5) + (100 * 1.2) + (100 * 1.1) + (50 * 1.0)) * 2/5 }, { name: "Locking small amount with large previously locked amount", locked: 1_000_000, locking: 100, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 60, // 100 * 1.5 * 2/5 }, { name: "Locking large amount with large previously locked amount", locked: 1_000_000, locking: 10_000_000, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 6_000_000, // 10,000,000 * 1.5 * 2/5 }, { name: "Locking large amount with previously locked and insured amount", locked: 1_000_000, insured: 100_000, locking: 10_000_000, remainingMs: 120_000, // 2 minutes totalMs: 300_000, // 5 minutes want: 6_000_000, // 10,000,000 * 1.5 * 2/5 }, } p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) delAddr := sdk.MustAccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { ctx = ctx.WithBlockTime(baseTime).WithBlockHeight(1) epochInfo := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: baseTime.Add(-time.Duration(tc.remainingMs) * time.Millisecond), Duration: time.Duration(tc.totalMs) * time.Millisecond, } k.epochsKeeper.SetEpochInfo(ctx, epochInfo) k.removeLockup(ctx, delAddr, valAddr) if tc.locked > 0 { err = k.AddLockup(ctx, delAddr, valAddr, math.NewInt(tc.locked)) require.NoError(t, err) } if tc.insured > 0 { k.AddInsuranceLockup(ctx, delAddr, valAddr, math.NewInt(tc.insured)) } got := k.proratedCredit(ctx, delAddr, math.NewInt(tc.locking)) require.Equal(t, tc.want, got.Int64()) }) } } func TestBurnAllCredits(t *testing.T) { tests := []struct { name string lockups map[string]int64 openBalances map[string]int64 wantErr bool }{ { name: "Burn all credits successfully (single address)", lockups: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 100, }, openBalances: map[string]int64{}, wantErr: false, }, { name: "No addresses have credits", lockups: map[string]int64{}, openBalances: map[string]int64{}, wantErr: false, }, { name: "Multiple addresses with credits", lockups: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 50, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": 150, }, openBalances: map[string]int64{}, wantErr: false, }, { name: "Burn credits when addresses also hold uopen", lockups: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 80, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": 200, }, openBalances: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 9999, "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": 888, }, wantErr: false, }, } valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { k, ctx := setupKeeper(t) err := k.SetParams(ctx, types.DefaultParams()) require.NoError(t, err) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(10_000_000)) // Add lockups for addrStr, lockupAmount := range tt.lockups { addr := sdk.MustAccAddressFromBech32(addrStr) amt := math.NewInt(lockupAmount) initializeDelegator(t, &k, ctx, addr, amt) err = k.Lock(ctx, addr, valAddr, amt) require.NoError(t, err) } // Mint and distribute uopen for addrStr, balance := range tt.openBalances { addr := sdk.MustAccAddressFromBech32(addrStr) initializeDelegator(t, &k, ctx, addr, math.NewInt(balance)) } // Burn all credits err = k.burnAllCredits(ctx, 1) if (err != nil) != tt.wantErr { t.Errorf("burnAllCredits() error = %v, wantErr %v", err, tt.wantErr) } // Verify that all ucredit balances are zero for addrStr := range tt.lockups { addr := sdk.MustAccAddressFromBech32(addrStr) creditBalance := k.GetBankKeeper().GetBalance(ctx, addr, appparams.MicroCreditDenom) if !creditBalance.IsZero() { t.Errorf("Expected all ucredit to be burned for %s, still found = %v", addrStr, creditBalance.Amount) } } // Verify that uopen balances are unchanged for addrStr, expectedBalance := range tt.openBalances { addr := sdk.MustAccAddressFromBech32(addrStr) openBalance := k.GetBankKeeper().GetBalance(ctx, addr, appparams.MicroOpenDenom) if !openBalance.Amount.Equal(math.NewInt(expectedBalance)) { t.Errorf("Should not burn uopen. For %s, got = %v, expected = %v", addrStr, openBalance.Amount, expectedBalance) } } }) } } func TestResetAllCredits(t *testing.T) { tests := []struct { name string lockups map[string][]int64 insuranceLockups map[string][]int64 expectedCredit map[string]int64 wantErr bool }{ { name: "Reset all credits successfully (single address, single lockup)", lockups: map[string][]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": {100}, }, expectedCredit: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 100, }, wantErr: false, }, { name: "No lockups", lockups: map[string][]int64{}, expectedCredit: map[string]int64{}, wantErr: false, }, { name: "Multiple addresses with multiple lockups", lockups: map[string][]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": {50, 50}, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": {10, 20}, "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": {10, 10, 30}, "source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme": {}, }, expectedCredit: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 100, // 50 + 50 "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": 30, // 10 + 20 "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": 50, // 10 + 10 + 30 }, wantErr: false, }, { name: "Multiple addresses with multiple lockups (with reward rates)", lockups: map[string][]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": {100, 100}, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": {100, 200, 300}, "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": {500, 1000}, "source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme": {}, }, expectedCredit: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 210, // 100 + 100 + (10 rewards) "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": 780, // 100 + 200 + 300 + (180 rewards) "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": 2130, // 500 + 1000 + (630 rewards) }, wantErr: false, }, { name: "Multiple addresses with multiple lockups (with reward rates) and insurance lockups", lockups: map[string][]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": {100, 100}, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": {100, 200, 300}, "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": {500, 1000}, "source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme": {}, }, insuranceLockups: map[string][]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": {10}, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": {20}, "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": {30}, "source1cy0p47z24ejzvq55pu3lesxwf73xnrnd0lyxme": {}, }, expectedCredit: map[string]int64{ "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et": 222, // 100 + 100 + 10 + (12 rewards) "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9": 810, // 100 + 200 + 300 + 20 + (190 rewards) "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy": 2175, // 500 + 1000 + 30 (645 rewards) }, wantErr: false, }, } valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { k, ctx := setupKeeper(t) // Set default params err := k.SetParams(ctx, types.DefaultParams()) require.NoError(t, err) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(10_000_000)) // Add lockups for addrStr, lockupAmounts := range tt.lockups { addr := sdk.MustAccAddressFromBech32(addrStr) for _, amt := range lockupAmounts { initializeDelegator(t, &k, ctx, addr, math.NewInt(amt)) err = k.Lock(ctx, addr, valAddr, math.NewInt(amt)) require.NoError(t, err) } } // Add insurance lockups for addrStr, insuranceLockupAmounts := range tt.insuranceLockups { addr := sdk.MustAccAddressFromBech32(addrStr) for _, amt := range insuranceLockupAmounts { k.AddInsuranceLockup(ctx, addr, valAddr, math.NewInt(amt)) } } err = k.burnAllCredits(ctx, 1) if (err != nil) != tt.wantErr { t.Errorf("burnAllCredits() error = %v, wantErr %v", err, tt.wantErr) } // Reset all credits err = k.resetAllCredits(ctx, 1) if (err != nil) != tt.wantErr { t.Errorf("resetAllCredits() error = %v, wantErr %v", err, tt.wantErr) } // Check expected credits for addrStr, expected := range tt.expectedCredit { addr := sdk.MustAccAddressFromBech32(addrStr) bal := k.GetBankKeeper().GetBalance(ctx, addr, appparams.MicroCreditDenom) if !bal.Amount.Equal(math.NewInt(expected)) { t.Errorf("Incorrect ucredit balance for %s, got = %v, expected = %v", addrStr, bal.Amount, expected) } } // Addresses not in expectedCredit should have zero ucredit for addrStr := range tt.lockups { if _, ok := tt.expectedCredit[addrStr]; !ok { addr := sdk.MustAccAddressFromBech32(addrStr) bal := k.GetBankKeeper().GetBalance(ctx, addr, appparams.MicroCreditDenom) if !bal.IsZero() { t.Errorf("Address %s was not in expectedCredit, but has ucredit = %v", addrStr, bal.Amount) } } } }) } } ================================================ FILE: x/tier/keeper/epoch_hook.go ================================================ package keeper import ( "context" errorsmod "cosmossdk.io/errors" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func (k *Keeper) EpochHooks() epochstypes.EpochHooks { return EpochHooks{k} } type EpochHooks struct { keeper *Keeper } var _ epochstypes.EpochHooks = EpochHooks{} // GetModuleName implements types.EpochHooks. func (EpochHooks) GetModuleName() string { return types.ModuleName } // BeforeEpochStart is the epoch start hook. func (h EpochHooks) BeforeEpochStart(ctx context.Context, epochIdentifier string, epochNumber int64) error { if epochIdentifier != types.EpochIdentifier { return nil } h.keeper.Logger().Info("resetting all credits", "epochID", epochIdentifier, "epochNumber", epochNumber) err := h.keeper.burnAllCredits(ctx, epochNumber) if err != nil { return errorsmod.Wrapf(err, "burn all credits") } err = h.keeper.resetAllCredits(ctx, epochNumber) if err != nil { return errorsmod.Wrapf(err, "reset all credits") } // Check if all developers have enough lockups to cover credits for all registered users and optionally auto-lock err = h.keeper.checkDeveloperCredits(ctx, epochNumber) if err != nil { return errorsmod.Wrapf(err, "check and lock developer credits") } return nil } func (h EpochHooks) AfterEpochEnd(ctx context.Context, epochIdentifier string, epochNumber int64) error { if epochIdentifier != types.EpochIdentifier { return nil } h.keeper.Logger().Info("completing unlocking stakes", "epochID", epochIdentifier, "epochNumber", epochNumber) err := h.keeper.CompleteUnlocking(ctx) if err != nil { return errorsmod.Wrapf(err, "complete unlocking stakes") } return nil } ================================================ FILE: x/tier/keeper/grpc_query.go ================================================ package keeper import ( "context" "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/sourcenetwork/sourcehub/x/tier/types" ) var _ types.QueryServer = &Keeper{} // Params query returns tier module params. func (k *Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil } // Lockup query returns a lockup based on delegator address and validator address. func (k *Keeper) Lockup(ctx context.Context, req *types.LockupRequest) (*types.LockupResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) if err != nil { return nil, status.Error(codes.InvalidArgument, "invalid delegator address") } valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) if err != nil { return nil, status.Error(codes.InvalidArgument, "invalid validator address") } lockup := k.GetLockup(ctx, delAddr, valAddr) if lockup == nil { return nil, status.Error(codes.NotFound, "lockup does not exist") } return &types.LockupResponse{Lockup: *lockup}, nil } // Lockups query returns all delegator lockups with pagination. func (k *Keeper) Lockups(ctx context.Context, req *types.LockupsRequest) (*types.LockupsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) if err != nil { return nil, status.Error(codes.InvalidArgument, "invalid delegator address") } lockups, pageRes, err := k.getLockupsPaginated(ctx, delAddr, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.LockupsResponse{Lockups: lockups, Pagination: pageRes}, nil } // UnlockingLockup query returns an unlocking lockup based on delAddr, valAddr, and creationHeight. func (k *Keeper) UnlockingLockup(ctx context.Context, req *types.UnlockingLockupRequest) ( *types.UnlockingLockupResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) if err != nil { return nil, status.Error(codes.InvalidArgument, "invalid delegator address") } valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) if err != nil { return nil, status.Error(codes.InvalidArgument, "invalid validator address") } unlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, req.CreationHeight) if unlockingLockup == nil { return nil, status.Error(codes.NotFound, "unlocking lockup does not exist") } return &types.UnlockingLockupResponse{UnlockingLockup: *unlockingLockup}, nil } // UnlockingLockup query returns all delegator unlocking lockups with pagination. func (k *Keeper) UnlockingLockups(ctx context.Context, req *types.UnlockingLockupsRequest) ( *types.UnlockingLockupsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) if err != nil { return nil, status.Error(codes.InvalidArgument, "invalid delegator address") } lockups, pageRes, err := k.getUnlockingLockupsPaginated(ctx, delAddr, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.UnlockingLockupsResponse{UnlockingLockups: lockups, Pagination: pageRes}, nil } // Developers query returns all registered developers. func (k *Keeper) Developers(ctx context.Context, req *types.DevelopersRequest) (*types.DevelopersResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } developers, pageRes, err := k.getDevelopersPaginated(ctx, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.DevelopersResponse{ Developers: developers, Pagination: pageRes, }, nil } // UserSubscriptions query returns all user subscriptions for a specific developer. func (k *Keeper) UserSubscriptions(ctx context.Context, req *types.UserSubscriptionsRequest) (*types.UserSubscriptionsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } developerAddr, err := sdk.AccAddressFromBech32(req.Developer) if err != nil { return nil, status.Error(codes.InvalidArgument, "invalid developer address") } userSubscriptions, pageRes, err := k.getUserSubscriptionsPaginated(ctx, developerAddr, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.UserSubscriptionsResponse{ UserSubscriptions: userSubscriptions, Pagination: pageRes, }, nil } // getLockupsPaginated returns delegator lockups with pagination. func (k *Keeper) getLockupsPaginated(ctx context.Context, delAddr sdk.AccAddress, page *query.PageRequest) ( []types.Lockup, *query.PageResponse, error) { var lockups []types.Lockup baseStore := k.lockupStore(ctx, false) addrPrefix := append(delAddr.Bytes(), '/') store := prefix.NewStore(baseStore, addrPrefix) onResult := func(key []byte, value []byte) error { var lockup types.Lockup k.cdc.MustUnmarshal(value, &lockup) lockups = append(lockups, lockup) return nil } pageRes, err := query.Paginate(store, page, onResult) if err != nil { return nil, nil, status.Error(codes.Internal, err.Error()) } return lockups, pageRes, nil } // getUnlockingLockupsPaginated returns delegator unlocking lockups with pagination. func (k *Keeper) getUnlockingLockupsPaginated(ctx context.Context, delAddr sdk.AccAddress, page *query.PageRequest) ( []types.UnlockingLockup, *query.PageResponse, error) { var unlockingLockups []types.UnlockingLockup baseStore := k.lockupStore(ctx, true) addrPrefix := append(delAddr.Bytes(), '/') store := prefix.NewStore(baseStore, addrPrefix) onResult := func(key []byte, value []byte) error { var unlockingLockup types.UnlockingLockup k.cdc.MustUnmarshal(value, &unlockingLockup) unlockingLockups = append(unlockingLockups, unlockingLockup) return nil } pageRes, err := query.Paginate(store, page, onResult) if err != nil { return nil, nil, status.Error(codes.Internal, err.Error()) } return unlockingLockups, pageRes, nil } // getDevelopersPaginated returns all registered developers with pagination. func (k *Keeper) getDevelopersPaginated(ctx context.Context, page *query.PageRequest) ( []types.Developer, *query.PageResponse, error) { var developers []types.Developer store := k.developerStore(ctx) onResult := func(key []byte, value []byte) error { var developer types.Developer k.cdc.MustUnmarshal(value, &developer) developers = append(developers, developer) return nil } pageRes, err := query.Paginate(store, page, onResult) if err != nil { return nil, nil, status.Error(codes.Internal, err.Error()) } return developers, pageRes, nil } // getUserSubscriptionsPaginated returns user subscriptions for a developer with pagination. func (k *Keeper) getUserSubscriptionsPaginated(ctx context.Context, developerAddr sdk.AccAddress, page *query.PageRequest) ( []types.UserSubscription, *query.PageResponse, error) { var userSubscriptions []types.UserSubscription baseStore := k.userSubscriptionStore(ctx) addrPrefix := append(developerAddr.Bytes(), '/') store := prefix.NewStore(baseStore, addrPrefix) onResult := func(key []byte, value []byte) error { var userSubscription types.UserSubscription k.cdc.MustUnmarshal(value, &userSubscription) userSubscriptions = append(userSubscriptions, userSubscription) return nil } pageRes, err := query.Paginate(store, page, onResult) if err != nil { return nil, nil, status.Error(codes.Internal, err.Error()) } return userSubscriptions, pageRes, nil } ================================================ FILE: x/tier/keeper/grpc_query_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestParamsQuery(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) response, err := k.Params(ctx, &types.QueryParamsRequest{}) require.NoError(t, err) require.Equal(t, &types.QueryParamsResponse{Params: params}, response) } func TestParamsQuery_InvalidRequest(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) response, err := k.Params(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, response) } func TestLockupQuery(t *testing.T) { k, ctx := keepertest.TierKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, amount) require.NoError(t, err) response, err := k.Lockup(ctx, &types.LockupRequest{ DelegatorAddress: delAddr.String(), ValidatorAddress: valAddr.String(), }) require.NoError(t, err) require.Equal(t, &types.LockupResponse{ Lockup: types.Lockup{ DelegatorAddress: delAddr.String(), ValidatorAddress: valAddr.String(), Amount: amount, }, }, response) } func TestLockupQuery_InvalidRequest(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) response, err := k.Lockup(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, response) } func TestLockupsQuery(t *testing.T) { k, ctx := keepertest.TierKeeper(t) amount1 := math.NewInt(1000) amount2 := math.NewInt(500) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, amount1) require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, amount2) require.NoError(t, err) response, err := k.Lockups(ctx, &types.LockupsRequest{ DelegatorAddress: delAddr.String(), }) require.NoError(t, err) require.Len(t, response.Lockups, 1) require.Equal(t, amount1.Add(amount2), response.Lockups[0].Amount) } func TestLockupsQuery_InvalidRequest(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) response, err := k.Lockups(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, response) } func TestUnlockingLockupQuery(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) epochDuration := *params.EpochDuration amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) completionTime := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) unlockTime := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) k.SetUnlockingLockup(ctx, delAddr, valAddr, int64(1), amount, completionTime, unlockTime) response, err := k.UnlockingLockup(ctx, &types.UnlockingLockupRequest{ DelegatorAddress: delAddr.String(), ValidatorAddress: valAddr.String(), CreationHeight: 1, }) require.NoError(t, err) require.Equal(t, &types.UnlockingLockupResponse{ UnlockingLockup: types.UnlockingLockup{ DelegatorAddress: delAddr.String(), ValidatorAddress: valAddr.String(), CreationHeight: 1, Amount: amount, CompletionTime: completionTime, UnlockTime: unlockTime, }, }, response) } func TestUnlockingLockupQuery_InvalidRequest(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) response, err := k.UnlockingLockup(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, response) } func TestUnlockingLockupsQuery(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) epochDuration := *params.EpochDuration amount1 := math.NewInt(1000) amount2 := math.NewInt(500) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) completionTime1 := ctx.BlockTime().Add(time.Hour * 24 * 21) unlockTime1 := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) k.SetUnlockingLockup(ctx, delAddr, valAddr, int64(1), amount1, completionTime1, unlockTime1) ctx = ctx.WithBlockHeight(2).WithBlockTime(ctx.BlockTime().Add(time.Second)) completionTime2 := ctx.BlockTime().Add(time.Hour * 24 * 21) unlockTime2 := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) k.SetUnlockingLockup(ctx, delAddr, valAddr, int64(2), amount2, completionTime2, unlockTime2) response, err := k.UnlockingLockups(ctx, &types.UnlockingLockupsRequest{ DelegatorAddress: delAddr.String(), }) require.NoError(t, err) require.Len(t, response.UnlockingLockups, 2) require.Equal(t, amount1, response.UnlockingLockups[0].Amount) require.Equal(t, int64(1), response.UnlockingLockups[0].CreationHeight) require.Equal(t, completionTime1, response.UnlockingLockups[0].CompletionTime) require.Equal(t, unlockTime1, response.UnlockingLockups[0].UnlockTime) require.Equal(t, amount2, response.UnlockingLockups[1].Amount) require.Equal(t, int64(2), response.UnlockingLockups[1].CreationHeight) require.Equal(t, completionTime2, response.UnlockingLockups[1].CompletionTime) require.Equal(t, unlockTime2, response.UnlockingLockups[1].UnlockTime) } func TestUnlockingLockupsQuery_InvalidRequest(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) response, err := k.UnlockingLockups(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, response) } func TestDevelopersQuery(t *testing.T) { k, ctx := keepertest.TierKeeper(t) dev1, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) dev2, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) require.NoError(t, k.CreateDeveloper(ctx, dev1, true)) require.NoError(t, k.CreateDeveloper(ctx, dev2, false)) resp, err := k.Developers(ctx, &types.DevelopersRequest{}) require.NoError(t, err) require.Len(t, resp.Developers, 2) page1, err := k.Developers(ctx, &types.DevelopersRequest{Pagination: &query.PageRequest{Limit: 1}}) require.NoError(t, err) require.Len(t, page1.Developers, 1) require.NotNil(t, page1.Pagination) require.NotEmpty(t, page1.Pagination.NextKey) page2, err := k.Developers(ctx, &types.DevelopersRequest{Pagination: &query.PageRequest{Key: page1.Pagination.NextKey, Limit: 1}}) require.NoError(t, err) require.Len(t, page2.Developers, 1) } func TestDevelopersQuery_InvalidRequest(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) resp, err := k.Developers(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, resp) } func TestUserSubscriptionsQuery(t *testing.T) { k, ctx := keepertest.TierKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) user1Did := "did:key:alice" user2Did := "did:key:bob" require.NoError(t, k.CreateDeveloper(ctx, developerAddr, true)) initialValidatorBalance := math.NewInt(1000) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) require.NoError(t, k.AddUserSubscription(ctx, developerAddr, user1Did, uint64(0), 0)) require.NoError(t, k.AddUserSubscription(ctx, developerAddr, user2Did, uint64(0), 0)) resp, err := k.UserSubscriptions(ctx, &types.UserSubscriptionsRequest{Developer: developerAddr.String()}) require.NoError(t, err) require.Len(t, resp.UserSubscriptions, 2) page1, err := k.UserSubscriptions(ctx, &types.UserSubscriptionsRequest{ Developer: developerAddr.String(), Pagination: &query.PageRequest{Limit: 1}, }) require.NoError(t, err) require.Len(t, page1.UserSubscriptions, 1) require.NotNil(t, page1.Pagination) require.NotEmpty(t, page1.Pagination.NextKey) page2, err := k.UserSubscriptions(ctx, &types.UserSubscriptionsRequest{ Developer: developerAddr.String(), Pagination: &query.PageRequest{Key: page1.Pagination.NextKey, Limit: 1}, }) require.NoError(t, err) require.Len(t, page2.UserSubscriptions, 1) } func TestUserSubscriptionsQuery_InvalidRequest(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) resp, err := k.UserSubscriptions(ctx, nil) require.Error(t, err) require.Contains(t, err.Error(), "invalid request") require.Nil(t, resp) } ================================================ FILE: x/tier/keeper/insurance.go ================================================ package keeper import ( "context" "cosmossdk.io/math" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // GetAllInsuranceLockups returns all insurance lockups in the store. func (k *Keeper) GetAllInsuranceLockups(ctx context.Context) []types.Lockup { var lockups []types.Lockup lockupsCallback := func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { lockups = append(lockups, lockup) } k.mustIterateInsuranceLockups(ctx, lockupsCallback) return lockups } // totalInsuredAmountByAddr returns the total insurance lockups amount associated with the provided delAddr. func (k *Keeper) totalInsuredAmountByAddr(ctx context.Context, delAddr sdk.AccAddress) math.Int { amount := math.ZeroInt() cb := func(d sdk.AccAddress, valAddr sdk.ValAddress, insuranceLockup types.Lockup) { if d.Equals(delAddr) { amount = amount.Add(insuranceLockup.Amount) } } k.mustIterateInsuranceLockups(ctx, cb) return amount } // AddInsuranceLockup adds provided amount to the existing insurance Lockup. func (k *Keeper) AddInsuranceLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount math.Int) { insuranceLockup := k.getInsuranceLockup(ctx, delAddr, valAddr) if insuranceLockup != nil { amount = amount.Add(insuranceLockup.Amount) } k.setInsuranceLockup(ctx, delAddr, valAddr, amount) } // getInsuranceLockup returns existing insurance lockup, or nil if not found. func (k *Keeper) getInsuranceLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) *types.Lockup { key := types.LockupKey(delAddr, valAddr) store := k.insuranceLockupStore(ctx) b := store.Get(key) if b == nil { return nil } var lockup types.Lockup k.cdc.MustUnmarshal(b, &lockup) return &lockup } // getInsuranceLockupAmount returns existing insurance lockup amount, or math.ZeroInt() if not found. func (k *Keeper) getInsuranceLockupAmount(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) math.Int { key := types.LockupKey(delAddr, valAddr) store := k.insuranceLockupStore(ctx) b := store.Get(key) if b == nil { return math.ZeroInt() } var insuranceLockup types.Lockup k.cdc.MustUnmarshal(b, &insuranceLockup) return insuranceLockup.Amount } // setInsuranceLockup sets an insurance lockup in the store based on the LockupKey. func (k *Keeper) setInsuranceLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount math.Int) { lockup := &types.Lockup{ DelegatorAddress: delAddr.String(), ValidatorAddress: valAddr.String(), Amount: amount, } key := types.LockupKey(delAddr, valAddr) b := k.cdc.MustMarshal(lockup) store := k.insuranceLockupStore(ctx) store.Set(key, b) } // removeInsuranceLockup removes existing insurance Lockup. func (k *Keeper) removeInsuranceLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { key := types.LockupKey(delAddr, valAddr) store := k.insuranceLockupStore(ctx) store.Delete(key) } // mustIterateInsuranceLockups iterates over all insurance lockups in the store and performs the provided callback function. func (k *Keeper) mustIterateInsuranceLockups(ctx context.Context, cb func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, insuranceLockup types.Lockup)) { store := k.insuranceLockupStore(ctx) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var insuranceLockup types.Lockup k.cdc.MustUnmarshal(iterator.Value(), &insuranceLockup) delAddr, valAddr := types.LockupKeyToAddresses(iterator.Key()) cb(delAddr, valAddr, insuranceLockup) } } // insuranceLockupStore returns a prefix store for insurance Lockup. func (k *Keeper) insuranceLockupStore(ctx context.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, []byte(types.InsuranceLockupKeyPrefix)) } ================================================ FILE: x/tier/keeper/insurance_test.go ================================================ package keeper import ( "testing" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) func TestGetAllInsuranceLockups(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.setInsuranceLockup(ctx, delAddr, valAddr, amount) lockups := k.GetAllInsuranceLockups(ctx) require.Len(t, lockups, 1) require.Equal(t, delAddr.String(), lockups[0].DelegatorAddress) require.Equal(t, valAddr.String(), lockups[0].ValidatorAddress) require.Equal(t, amount, lockups[0].Amount) } func TestAddInsuranceLockup_New(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(500) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.AddInsuranceLockup(ctx, delAddr, valAddr, amount) insuredAmt := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, amount, insuredAmt) } func TestAddInsuranceLockup_Append(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(800) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.setInsuranceLockup(ctx, delAddr, valAddr, math.NewInt(500)) k.AddInsuranceLockup(ctx, delAddr, valAddr, math.NewInt(300)) insuredAmt := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, amount, insuredAmt) } func TestGetInsuranceLockup(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.setInsuranceLockup(ctx, delAddr, valAddr, amount) lockup := k.getInsuranceLockup(ctx, delAddr, valAddr) require.NotNil(t, lockup) require.Equal(t, amount, lockup.Amount) } func TestGetInsuranceLockup_NotFound(t *testing.T) { k, ctx := setupKeeper(t) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) lockup := k.getInsuranceLockup(ctx, delAddr, valAddr) require.Nil(t, lockup) } func TestGetInsuranceLockupAmount_ZeroIfNotFound(t *testing.T) { k, ctx := setupKeeper(t) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) insuredAmt := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.True(t, insuredAmt.IsZero()) } func TestSetInsuranceLockup(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(1500) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.setInsuranceLockup(ctx, delAddr, valAddr, amount) insuredAmt := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, amount, insuredAmt) } func TestRemoveInsuranceLockup(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.setInsuranceLockup(ctx, delAddr, valAddr, amount) k.removeInsuranceLockup(ctx, delAddr, valAddr) lockup := k.getInsuranceLockup(ctx, delAddr, valAddr) require.Nil(t, lockup) } func TestTotalInsuredAmountByAddr(t *testing.T) { k, ctx := setupKeeper(t) amount1 := math.NewInt(300) amount2 := math.NewInt(500) amount3 := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr1, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) valAddr2, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) k.setInsuranceLockup(ctx, delAddr, valAddr1, amount1) k.setInsuranceLockup(ctx, delAddr, valAddr2, amount2) k.AddInsuranceLockup(ctx, delAddr, valAddr2, amount3) totalAmount := k.totalInsuredAmountByAddr(ctx, delAddr) require.Equal(t, amount1.Add(amount2).Add(amount3), totalAmount) } func TestMustIterateInsuranceLockups(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(5000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.setInsuranceLockup(ctx, delAddr, valAddr, amount) count := 0 k.mustIterateInsuranceLockups(ctx, func(d sdk.AccAddress, v sdk.ValAddress, lockup types.Lockup) { count++ require.Equal(t, delAddr.String(), lockup.DelegatorAddress) require.Equal(t, valAddr.String(), lockup.ValidatorAddress) require.Equal(t, amount, lockup.Amount) }) require.Equal(t, 1, count) } ================================================ FILE: x/tier/keeper/keeper.go ================================================ package keeper import ( "context" "fmt" "time" "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sourcenetwork/sourcehub/app/metrics" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/tier/types" ) type ( Keeper struct { cdc codec.BinaryCodec storeService store.KVStoreService logger log.Logger // the address capable of executing a MsgUpdateParams message. // Typically, this should be the x/gov module account. authority string bankKeeper types.BankKeeper stakingKeeper types.StakingKeeper epochsKeeper types.EpochsKeeper distributionKeeper types.DistributionKeeper feegrantKeeper types.FeegrantKeeper acpKeeper types.AcpKeeper } ) func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, epochsKeeper types.EpochsKeeper, distributionKeeper types.DistributionKeeper, feegrantKeeper types.FeegrantKeeper, acpKeeper types.AcpKeeper, ) Keeper { if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic(fmt.Sprintf("invalid authority address: %s", authority)) } return Keeper{ cdc: cdc, storeService: storeService, authority: authority, logger: logger, bankKeeper: bankKeeper, stakingKeeper: stakingKeeper, epochsKeeper: epochsKeeper, distributionKeeper: distributionKeeper, feegrantKeeper: feegrantKeeper, acpKeeper: acpKeeper, } } // GetAuthority returns the module's authority. func (k *Keeper) GetAuthority() string { return k.authority } // GetStakingKeeper returns the module's StakingKeeper. func (k *Keeper) GetStakingKeeper() types.StakingKeeper { return k.stakingKeeper } // GetBankKeeper returns the module's BankKeeper. func (k *Keeper) GetBankKeeper() types.BankKeeper { return k.bankKeeper } // GetEpochsKeeper returns the module's EpochsKeeper. func (k *Keeper) GetEpochsKeeper() types.EpochsKeeper { return k.epochsKeeper } // GetDistributionKeeper returns the module's DistributionKeeper. func (k *Keeper) GetDistributionKeeper() types.DistributionKeeper { return k.distributionKeeper } // GetFeegrantKeeper returns the module's FeegrantKeeper. func (k *Keeper) GetFeegrantKeeper() types.FeegrantKeeper { return k.feegrantKeeper } // GetAcpKeeper returns the module's AcpKeeper. func (k *Keeper) GetAcpKeeper() types.AcpKeeper { return k.acpKeeper } // Logger returns a module-specific logger. func (k *Keeper) Logger() log.Logger { return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) } // CompleteUnlocking completes the unlocking process for all lockups that have reached their unlock time. // It is called at the end of each Epoch. func (k *Keeper) CompleteUnlocking(ctx context.Context) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.CompleteUnlocking, start, err, nil, ) }() sdkCtx := sdk.UnwrapSDKContext(ctx) cb := func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, unlockingLockup types.UnlockingLockup) error { // Check both CompletionTime and UnlockTime so that CompleteUnlocking works correctly regardless of the // staking module Undelegate/Redelegate completion time and tier module EpochDuration/UnlockingEpochs params if sdkCtx.BlockTime().Before(unlockingLockup.CompletionTime) || sdkCtx.BlockTime().Before(unlockingLockup.UnlockTime) { fmt.Printf("Unlock time not reached for %s/%s\n", delAddr, valAddr) return nil } moduleBalance := k.bankKeeper.GetBalance(ctx, authtypes.NewModuleAddress(types.ModuleName), appparams.DefaultBondDenom) if moduleBalance.Amount.LT(unlockingLockup.Amount) { fmt.Printf("Module account balance is less than required amount. delAddr: %s, valAddr: %s\n", delAddr, valAddr) return nil } // Redeem the unlocked lockup for stake. coins := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, unlockingLockup.Amount)) err := k.bankKeeper.UndelegateCoinsFromModuleToAccount(ctx, types.ModuleName, delAddr, coins) if err != nil { return errorsmod.Wrapf(err, "undelegate coins to %s for amount %s", delAddr, coins) } k.removeUnlockingLockup(ctx, delAddr, valAddr, creationHeight) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeCompleteUnlocking, sdk.NewAttribute(stakingtypes.AttributeKeyDelegator, delAddr.String()), sdk.NewAttribute(stakingtypes.AttributeKeyValidator, valAddr.String()), sdk.NewAttribute(types.AttributeKeyCreationHeight, fmt.Sprintf("%d", creationHeight)), sdk.NewAttribute(sdk.AttributeKeyAmount, unlockingLockup.Amount.String()), ), ) return nil } err = k.iterateUnlockingLockups(ctx, cb) if err != nil { return errorsmod.Wrap(err, "iterate unlocking lockups") } return nil } // LockAuto locks the stake of a delegator to an automatically selected validator. // Selection logic: // 1. If the developer already has lockups, select the validator with the smallest existing lockup amount. // 2. If the developer has no existing lockups, select the validator with the smallest total delegation from the tier module. func (k *Keeper) LockAuto(ctx context.Context, delAddr sdk.AccAddress, amt math.Int) (valAddr sdk.ValAddress, err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.LockAuto, start, err, []metrics.Label{ metrics.NewLabel(metrics.Amount, amt.String()), metrics.NewLabel(metrics.Delegator, delAddr.String()), metrics.NewLabel(metrics.Validator, valAddr.String()), }, ) }() // Try to select validator from existing lockups first valAddr = k.selectValidatorFromExistingLockups(ctx, delAddr) if valAddr != nil { err = k.Lock(ctx, delAddr, valAddr, amt) if err != nil { return nil, err } return valAddr, nil } // Fall back to selecting validator with smallest tier module delegation valAddr, err = k.selectValidatorWithSmallestDelegation(ctx) if err != nil { return nil, err } err = k.Lock(ctx, delAddr, valAddr, amt) if err != nil { return nil, err } return valAddr, nil } // selectValidatorFromExistingLockups finds the bonded validator with the smallest existing lockup for the given delegator. func (k *Keeper) selectValidatorFromExistingLockups(ctx context.Context, delAddr sdk.AccAddress) sdk.ValAddress { type lockupInfo struct { valAddr sdk.ValAddress amount math.Int } var developerLockups []lockupInfo k.mustIterateLockups(ctx, func(d sdk.AccAddress, v sdk.ValAddress, lockup types.Lockup) { if d.Equals(delAddr) { developerLockups = append(developerLockups, lockupInfo{ valAddr: v, amount: lockup.Amount, }) } }) if len(developerLockups) == 0 { return nil } // Find the lockup with the smallest amount var minLockup *lockupInfo for i := range developerLockups { if minLockup == nil || developerLockups[i].amount.LT(minLockup.amount) { minLockup = &developerLockups[i] } } // Verify the validator is still bonded validator, err := k.stakingKeeper.GetValidator(ctx, minLockup.valAddr) if err != nil || !validator.IsBonded() { return nil } return minLockup.valAddr } // selectValidatorWithSmallestDelegation finds the bonded validator with the smallest // total delegation from the tier module. func (k *Keeper) selectValidatorWithSmallestDelegation(ctx context.Context) (sdk.ValAddress, error) { tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) type validatorDelegation struct { valAddr sdk.ValAddress delegation math.Int } var validatorDelegations []validatorDelegation err := k.stakingKeeper.IterateValidators(ctx, func(index int64, validator stakingtypes.ValidatorI) (stop bool) { if !validator.IsBonded() { return false } v := validator.(stakingtypes.Validator) vAddr, err := sdk.ValAddressFromBech32(v.OperatorAddress) if err != nil { return false } // Get tier module's delegation to this validator delegation, err := k.stakingKeeper.GetDelegation(ctx, tierModuleAddr, vAddr) delegationAmount := math.ZeroInt() if err == nil { delegationAmount = delegation.GetShares().TruncateInt() } validatorDelegations = append(validatorDelegations, validatorDelegation{ valAddr: vAddr, delegation: delegationAmount, }) return false }) if err != nil { return nil, types.ErrInvalidAddress.Wrap("failed to iterate validators") } if len(validatorDelegations) == 0 { return nil, types.ErrInvalidAddress.Wrap("no bonded validators available") } // Select validator with smallest delegation minDelegation := validatorDelegations[0] for i := 1; i < len(validatorDelegations); i++ { if validatorDelegations[i].delegation.LT(minDelegation.delegation) { minDelegation = validatorDelegations[i] } } return minDelegation.valAddr, nil } // Lock locks the stake of a delegator to a validator. func (k *Keeper) Lock(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.Lock, start, err, []metrics.Label{ metrics.NewLabel(metrics.Amount, amt.String()), metrics.NewLabel(metrics.Delegator, delAddr.String()), metrics.NewLabel(metrics.Validator, valAddr.String()), }, ) }() // Specified amt must be a positive integer if !amt.IsPositive() { return types.ErrInvalidAmount.Wrap("lock non-positive amount") } validator, err := k.stakingKeeper.GetValidator(ctx, valAddr) if err != nil { return types.ErrInvalidAddress.Wrapf("validator address %s: %s", valAddr, err) } // Move the stake from delegator to the module stake := sdk.NewCoin(appparams.DefaultBondDenom, amt) coins := sdk.NewCoins(stake) err = k.bankKeeper.DelegateCoinsFromAccountToModule(ctx, delAddr, types.ModuleName, coins) if err != nil { return errorsmod.Wrapf(err, "delegate %s from account to module", stake) } // Delegate the stake to the validator modAddr := authtypes.NewModuleAddress(types.ModuleName) _, err = k.stakingKeeper.Delegate(ctx, modAddr, stake.Amount, stakingtypes.Unbonded, validator, true) if err != nil { return errorsmod.Wrapf(err, "delegate %s", stake) } // Mint credits creditAmt := k.proratedCredit(ctx, delAddr, amt) err = k.mintCredit(ctx, delAddr, creditAmt) if err != nil { return errorsmod.Wrap(err, "mint credit") } // Record the lockup after minting credits err = k.AddLockup(ctx, delAddr, valAddr, stake.Amount) if err != nil { return errorsmod.Wrap(err, "add lockup") } // Update total credit amount totalCredits := k.getTotalCreditAmount(ctx) totalCredits = totalCredits.Add(creditAmt) err = k.setTotalCreditAmount(ctx, totalCredits) if err != nil { return errorsmod.Wrap(err, "set total credit amount") } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeLock, sdk.NewAttribute(stakingtypes.AttributeKeyDelegator, delAddr.String()), sdk.NewAttribute(stakingtypes.AttributeKeyValidator, valAddr.String()), sdk.NewAttribute(sdk.AttributeKeyAmount, amt.String()), sdk.NewAttribute(types.AttributeCreditAmount, creditAmt.String()), ), ) return nil } // Unlock initiates the unlocking of the specified lockup amount of a delegator from a validator. // The specified lockup amount will be unlocked in CompleteUnlocking after the unlocking period has passed. func (k *Keeper) Unlock( ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int, ) (creationHeight int64, completionTime, unlockTime time.Time, err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.Unlock, start, err, []metrics.Label{ metrics.NewLabel(metrics.Amount, amt.String()), metrics.NewLabel(metrics.Delegator, delAddr.String()), metrics.NewLabel(metrics.Validator, valAddr.String()), }, ) }() // Specified amt must be a positive integer if !amt.IsPositive() { return 0, time.Time{}, time.Time{}, types.ErrInvalidAmount.Wrap("unlock non-positive amount") } err = k.subtractLockup(ctx, delAddr, valAddr, amt) if err != nil { return 0, time.Time{}, time.Time{}, errorsmod.Wrap(err, "subtract lockup") } // Remove the associated insurance lockup record if the lockup was fully removed if !k.hasLockup(ctx, delAddr, valAddr) { k.removeInsuranceLockup(ctx, delAddr, valAddr) } modAddr := authtypes.NewModuleAddress(types.ModuleName) shares, err := k.stakingKeeper.ValidateUnbondAmount(ctx, modAddr, valAddr, amt) if err != nil { return 0, time.Time{}, time.Time{}, errorsmod.Wrap(err, "validate unbond amount") } if !shares.IsPositive() { return 0, time.Time{}, time.Time{}, errorsmod.Wrap(stakingtypes.ErrInsufficientShares, "shares are not positive") } completionTime, returnAmount, err := k.stakingKeeper.Undelegate(ctx, modAddr, valAddr, shares) if err != nil { return 0, time.Time{}, time.Time{}, errorsmod.Wrap(err, "undelegate") } // Adjust token amount to match the actual undelegated tokens if returnAmount.LT(amt) { amt = returnAmount } params := k.GetParams(ctx) sdkCtx := sdk.UnwrapSDKContext(ctx) creationHeight = sdkCtx.BlockHeight() unlockTime = sdkCtx.BlockTime().Add(*params.EpochDuration * time.Duration(params.UnlockingEpochs)) // Create unlocking lockup record at the current block height k.SetUnlockingLockup(ctx, delAddr, valAddr, creationHeight, amt, completionTime, unlockTime) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeUnlock, sdk.NewAttribute(stakingtypes.AttributeKeyDelegator, delAddr.String()), sdk.NewAttribute(stakingtypes.AttributeKeyValidator, valAddr.String()), sdk.NewAttribute(types.AttributeKeyCreationHeight, fmt.Sprintf("%d", creationHeight)), sdk.NewAttribute(sdk.AttributeKeyAmount, amt.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), sdk.NewAttribute(types.AttributeKeyUnlockTime, unlockTime.Format(time.RFC3339)), ), ) return creationHeight, completionTime, unlockTime, nil } // Redelegate redelegates the stake of a delegator from a source validator to a destination validator. // The redelegation will be completed after the unbonding period has passed (e.g. at completionTime). func (k *Keeper) Redelegate(ctx context.Context, delAddr sdk.AccAddress, srcValAddr, dstValAddr sdk.ValAddress, amt math.Int) (completionTime time.Time, err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.Redelegate, start, err, []metrics.Label{ metrics.NewLabel(metrics.Amount, amt.String()), metrics.NewLabel(metrics.Delegator, delAddr.String()), metrics.NewLabel(metrics.SrcValidator, srcValAddr.String()), metrics.NewLabel(metrics.DstValidator, dstValAddr.String()), }, ) }() // Specified amt must be a positive integer if !amt.IsPositive() { return time.Time{}, types.ErrInvalidAmount.Wrap("redelegate non-positive amount") } // Subtract the lockup from the source validator err = k.subtractLockup(ctx, delAddr, srcValAddr, amt) if err != nil { return time.Time{}, errorsmod.Wrap(err, "subtract lockup from source validator") } // Add the lockup to the destination validator err = k.AddLockup(ctx, delAddr, dstValAddr, amt) if err != nil { return time.Time{}, errorsmod.Wrap(err, "add lockup to destination validator") } // Redelegate the associated insurance lockup record if the lockup was fully redelegated if !k.hasLockup(ctx, delAddr, srcValAddr) { insuranceLockupAmount := k.getInsuranceLockupAmount(ctx, delAddr, srcValAddr) if insuranceLockupAmount.IsPositive() { k.removeInsuranceLockup(ctx, delAddr, srcValAddr) k.AddInsuranceLockup(ctx, delAddr, dstValAddr, insuranceLockupAmount) } } modAddr := authtypes.NewModuleAddress(types.ModuleName) shares, err := k.stakingKeeper.ValidateUnbondAmount(ctx, modAddr, srcValAddr, amt) if err != nil { return time.Time{}, errorsmod.Wrap(err, "validate unbond amount") } completionTime, err = k.stakingKeeper.BeginRedelegation(ctx, modAddr, srcValAddr, dstValAddr, shares) if err != nil { return time.Time{}, errorsmod.Wrap(err, "begin redelegation") } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeRedelegate, sdk.NewAttribute(stakingtypes.AttributeKeyDelegator, delAddr.String()), sdk.NewAttribute(types.AttributeKeySourceValidator, srcValAddr.String()), sdk.NewAttribute(types.AttributeKeyDestinationValidator, dstValAddr.String()), sdk.NewAttribute(sdk.AttributeKeyAmount, amt.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), ), ) return completionTime, nil } // CancelUnlocking effectively cancels the pending unlocking lockup partially or in full. // Reverts the specified amt if a valid value is provided (e.g. 0 < amt < unlocking lockup amount). func (k *Keeper) CancelUnlocking(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, amt math.Int) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.CancelUnlocking, start, err, []metrics.Label{ metrics.NewLabel(metrics.Amount, amt.String()), metrics.NewLabel(metrics.CreationHeight, fmt.Sprintf("%d", creationHeight)), metrics.NewLabel(metrics.Delegator, delAddr.String()), metrics.NewLabel(metrics.Validator, valAddr.String()), }, ) }() // Specified amt must be a positive integer if !amt.IsPositive() { return types.ErrInvalidAmount.Wrap("cancel unlocking non-positive amount") } validator, err := k.stakingKeeper.GetValidator(ctx, valAddr) if err != nil { return types.ErrInvalidAddress.Wrapf("validator address %s: %s", valAddr, err) } modAddr := authtypes.NewModuleAddress(types.ModuleName) ubd, err := k.stakingKeeper.GetUnbondingDelegation(ctx, modAddr, valAddr) if err != nil { return errorsmod.Wrapf(err, "unbonding delegation not found for delegator %s and validator %s", modAddr, valAddr) } sdkCtx := sdk.UnwrapSDKContext(ctx) // Find unbonding delegation entry by CreationHeight // TODO: handle edge case with 2+ messages at the same height var ( unbondEntryIndex int64 = -1 unbondEntry stakingtypes.UnbondingDelegationEntry ) for i, entry := range ubd.Entries { if entry.CreationHeight == creationHeight && entry.CompletionTime.After(sdkCtx.BlockTime()) { unbondEntryIndex = int64(i) unbondEntry = entry break } } if unbondEntryIndex == -1 { return errorsmod.Wrapf(stakingtypes.ErrNoUnbondingDelegation, "no valid entry for height %d", creationHeight) } if amt.GT(unbondEntry.Balance) { return types.ErrInvalidAmount.Wrap("cancel unlocking amount exceeds unbonding entry balance") } _, err = k.stakingKeeper.Delegate(ctx, modAddr, amt, stakingtypes.Unbonding, validator, false) if err != nil { return errorsmod.Wrap(err, "failed to delegate tokens back to validator") } // Update or remove the unbonding delegation entry remainingBalance := unbondEntry.Balance.Sub(amt) if remainingBalance.IsZero() { ubd.RemoveEntry(unbondEntryIndex) } else { unbondEntry.Balance = remainingBalance ubd.Entries[unbondEntryIndex] = unbondEntry } // update or remove the unbonding delegation in the store if len(ubd.Entries) == 0 { err = k.stakingKeeper.RemoveUnbondingDelegation(ctx, ubd) } else { err = k.stakingKeeper.SetUnbondingDelegation(ctx, ubd) } if err != nil { return errorsmod.Wrap(err, "failed to update unbonding delegation") } // Subtract the specified unlocking lockup amt err = k.subtractUnlockingLockup(ctx, delAddr, valAddr, creationHeight, amt) if err != nil { return errorsmod.Wrap(err, "subtract unlocking lockup") } // Add the specified amt back to existing lockup err = k.AddLockup(ctx, delAddr, valAddr, amt) if err != nil { return errorsmod.Wrap(err, "add lockup") } sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeCancelUnlocking, sdk.NewAttribute(stakingtypes.AttributeKeyDelegator, delAddr.String()), sdk.NewAttribute(stakingtypes.AttributeKeyValidator, valAddr.String()), sdk.NewAttribute(types.AttributeKeyCreationHeight, fmt.Sprintf("%d", creationHeight)), sdk.NewAttribute(sdk.AttributeKeyAmount, amt.String()), ), ) return nil } // CreateDeveloper creates a new developer record. // Returns an error if the developer already exists. func (k *Keeper) CreateDeveloper(ctx context.Context, developerAddr sdk.AccAddress, autoLockEnabled bool) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.CreateDeveloper, start, err, []metrics.Label{ metrics.NewLabel(metrics.Developer, developerAddr.String()), }, ) }() existingDev := k.GetDeveloper(ctx, developerAddr) if existingDev != nil { return types.ErrInvalidAddress.Wrapf("developer %s already exists", developerAddr.String()) } developer := &types.Developer{ Address: developerAddr.String(), AutoLockEnabled: autoLockEnabled, } k.SetDeveloper(ctx, developerAddr, developer) sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeDeveloperCreated, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyAutoLockEnabled, fmt.Sprintf("%t", autoLockEnabled)), ), ) return nil } // UpdateDeveloper updates an existing developer record. // Returns an error if the developer doesn't exist. func (k *Keeper) UpdateDeveloper(ctx context.Context, developerAddr sdk.AccAddress, autoLockEnabled bool) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.UpdateDeveloper, start, err, []metrics.Label{ metrics.NewLabel(metrics.Developer, developerAddr.String()), }, ) }() developer := k.GetDeveloper(ctx, developerAddr) if developer == nil { return types.ErrInvalidAddress.Wrapf("developer %s does not exist", developerAddr.String()) } developer.AutoLockEnabled = autoLockEnabled k.SetDeveloper(ctx, developerAddr, developer) sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeDeveloperUpdated, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyAutoLockEnabled, fmt.Sprintf("%t", autoLockEnabled)), ), ) return nil } // RemoveDeveloper removes the developer record and all associated user subscriptions. // All corresponding feegrant allowances are set to expire at the current period reset time. func (k *Keeper) RemoveDeveloper(ctx context.Context, developerAddr sdk.AccAddress) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.RemoveDeveloper, start, err, []metrics.Label{ metrics.NewLabel(metrics.Developer, developerAddr.String()), }, ) }() existingDev := k.GetDeveloper(ctx, developerAddr) if existingDev == nil { return types.ErrInvalidAddress.Wrapf("developer %s does not exist", developerAddr.String()) } var subscriptionsToRemove []struct { developerAddr sdk.AccAddress userDid string } k.mustIterateUserSubscriptionsForDeveloper(ctx, developerAddr, func(devAddr sdk.AccAddress, userDid string, userSubscription types.UserSubscription) { subscriptionsToRemove = append(subscriptionsToRemove, struct { developerAddr sdk.AccAddress userDid string }{devAddr, userDid}) }) for _, sub := range subscriptionsToRemove { err := k.RemoveUserSubscription(ctx, sub.developerAddr, sub.userDid) if err != nil { continue } } k.removeDeveloper(ctx, developerAddr) sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeDeveloperRemoved, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), ), ) return nil } // AddUserSubscription registers a user to a developer for receiving allowances. func (k *Keeper) AddUserSubscription( ctx context.Context, developerAddr sdk.AccAddress, userDid string, amount uint64, period uint64, ) (err error) { start := time.Now() if extractedDID, ok := ctx.Value(appparams.ExtractedDIDContextKey).(string); ok && extractedDID != "" { didAddr, err := k.GetAcpKeeper().GetAddressFromDID(sdk.UnwrapSDKContext(ctx), extractedDID) if err != nil { k.Logger().Error("Failed to convert DID to address", "did", extractedDID, "error", err) return errorsmod.Wrap(err, "convert DID to address") } developerAddr = didAddr } defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.AddUserSubscription, start, err, []metrics.Label{ metrics.NewLabel(metrics.Developer, developerAddr.String()), metrics.NewLabel(metrics.UserDid, userDid), metrics.NewLabel(metrics.SubscriptionAmount, fmt.Sprintf("%d", amount)), metrics.NewLabel(metrics.SubscriptionPeriod, fmt.Sprintf("%d", period)), }, ) }() amountInt := math.NewIntFromUint64(amount) existingSub := k.GetUserSubscription(ctx, developerAddr, userDid) if existingSub != nil { return types.ErrInvalidAddress.Wrapf("user %s is already subscribed to developer %s", userDid, developerAddr.String()) } developer := k.GetDeveloper(ctx, developerAddr) if developer == nil { return types.ErrInvalidAddress.Wrapf("developer %s not found", developerAddr.String()) } // Check if developer has enough available credits err = k.validateDeveloperCredits(ctx, developerAddr, amountInt) if err != nil { if !developer.AutoLockEnabled { return types.ErrInvalidAmount.Wrapf("insufficient credits and auto-lock disabled: %v", err) } // Convert required credits to uopen to lock using highest applicable rate params := k.GetParams(ctx) effectiveRate := int64(0) for _, r := range params.RewardRates { if amountInt.GTE(r.Amount) { effectiveRate = r.Rate break } } if effectiveRate <= 0 { last := params.RewardRates[len(params.RewardRates)-1] effectiveRate = last.Rate } lockNumerator := amountInt.MulRaw(100).AddRaw(effectiveRate - 1) lockAmt := lockNumerator.QuoRaw(effectiveRate) if !lockAmt.IsPositive() { lockAmt = math.OneInt() } // Try to add more lockup to cover the required amount err = k.addLockupForRegistration(ctx, developerAddr, lockAmt) if err != nil { return types.ErrInvalidAmount.Wrapf("auto-lock failed: %v", err) } } now := sdk.UnwrapSDKContext(ctx).BlockTime() userSubscription := &types.UserSubscription{ Developer: developerAddr.String(), UserDid: userDid, CreditAmount: amount, StartDate: now, Period: period, LastRenewed: now, } k.SetUserSubscription(ctx, developerAddr, userDid, userSubscription) // Grant or update periodic DID allowance via feegrant to the user DID from the developer spendLimit := sdk.NewCoins(sdk.NewCoin(appparams.MicroCreditDenom, amountInt)) grantPeriod := time.Duration(period) * time.Second if grantPeriod == 0 { params := k.GetParams(ctx) grantPeriod = *params.EpochDuration } if err := k.grantPeriodicDIDAllowance(ctx, developerAddr, userDid, spendLimit, grantPeriod); err != nil { return errorsmod.Wrap(err, "grant periodic DID allowance") } err = k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewIntFromUint64(userSubscription.CreditAmount), true) if err != nil { return types.ErrInvalidAmount.Wrapf("failed to update total granted amount: %v", err) } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeUserSubscriptionCreated, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyUserDid, userDid), sdk.NewAttribute(types.AttributeKeySubscriptionAmount, fmt.Sprintf("%d", amount)), sdk.NewAttribute(types.AttributeKeySubscriptionPeriod, fmt.Sprintf("%d", period)), ), ) return nil } // UpdateUserSubscription updates the user subscription. func (k *Keeper) UpdateUserSubscription( ctx context.Context, developerAddr sdk.AccAddress, userDid string, amount uint64, period uint64, ) (err error) { start := time.Now() if extractedDID, ok := ctx.Value(appparams.ExtractedDIDContextKey).(string); ok && extractedDID != "" { didAddr, err := k.GetAcpKeeper().GetAddressFromDID(sdk.UnwrapSDKContext(ctx), extractedDID) if err != nil { k.Logger().Error("Failed to convert DID to address", "did", extractedDID, "error", err) return errorsmod.Wrap(err, "convert DID to address") } developerAddr = didAddr } defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.UpdateUserSubscription, start, err, []metrics.Label{ metrics.NewLabel(metrics.Developer, developerAddr.String()), metrics.NewLabel(metrics.UserDid, userDid), metrics.NewLabel(metrics.SubscriptionAmount, fmt.Sprintf("%d", amount)), metrics.NewLabel(metrics.SubscriptionPeriod, fmt.Sprintf("%d", period)), }, ) }() userSubscription := k.GetUserSubscription(ctx, developerAddr, userDid) if userSubscription == nil { return types.ErrInvalidAddress.Wrapf("user %s is not subscribed to developer %s", userDid, developerAddr.String()) } oldAmount := userSubscription.CreditAmount if amount > oldAmount { delta := amount - oldAmount if err := k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewIntFromUint64(delta), true); err != nil { return err } } else if oldAmount > amount { delta := oldAmount - amount if err := k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewIntFromUint64(delta), false); err != nil { return err } } userSubscription.CreditAmount = amount userSubscription.Period = period userSubscription.LastRenewed = sdk.UnwrapSDKContext(ctx).BlockTime() k.SetUserSubscription(ctx, developerAddr, userDid, userSubscription) spendLimit := sdk.NewCoins(sdk.NewCoin(appparams.MicroCreditDenom, math.NewIntFromUint64(amount))) updatePeriod := time.Duration(period) * time.Second if updatePeriod == 0 { params := k.GetParams(ctx) updatePeriod = *params.EpochDuration } if err := k.grantPeriodicDIDAllowance(ctx, developerAddr, userDid, spendLimit, updatePeriod); err != nil { return errorsmod.Wrap(err, "grant periodic DID allowance") } sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeUserSubscriptionUpdated, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyUserDid, userDid), sdk.NewAttribute(types.AttributeKeySubscriptionAmount, fmt.Sprintf("%d", amount)), sdk.NewAttribute(types.AttributeKeySubscriptionPeriod, fmt.Sprintf("%d", period)), ), ) return nil } // RemoveUserSubscription removes the user subscription. // The corresponding feegrant allowance is set to expire at the current period reset time. func (k *Keeper) RemoveUserSubscription( ctx context.Context, developerAddr sdk.AccAddress, userDid string, ) (err error) { start := time.Now() if extractedDID, ok := ctx.Value(appparams.ExtractedDIDContextKey).(string); ok && extractedDID != "" { didAddr, err := k.GetAcpKeeper().GetAddressFromDID(sdk.UnwrapSDKContext(ctx), extractedDID) if err != nil { return errorsmod.Wrap(err, "convert DID to address") } developerAddr = didAddr } defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.RemoveUserSubscription, start, err, []metrics.Label{ metrics.NewLabel(metrics.Developer, developerAddr.String()), metrics.NewLabel(metrics.UserDid, userDid), }, ) }() existingSub := k.GetUserSubscription(ctx, developerAddr, userDid) if existingSub == nil { return types.ErrInvalidAddress.Wrapf("user %s is not subscribed to developer %s", userDid, developerAddr.String()) } if err := k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewIntFromUint64(existingSub.CreditAmount), false); err != nil { return err } k.removeUserSubscription(ctx, developerAddr, userDid) // Expire the DID allowance by setting the expiration to the current period reset // Ignore error if no allowance exists _ = k.feegrantKeeper.ExpireDIDAllowance(ctx, developerAddr, userDid) sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent( sdk.NewEvent( types.EventTypeUserSubscriptionRemoved, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyUserDid, userDid), ), ) return nil } ================================================ FILE: x/tier/keeper/keeper_common_test.go ================================================ package keeper import ( "testing" "time" cryptocdc "github.com/cosmos/cosmos-sdk/crypto/codec" cosmosed25519 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" appparams "github.com/sourcenetwork/sourcehub/app/params" testutil "github.com/sourcenetwork/sourcehub/testutil" "cosmossdk.io/log" "cosmossdk.io/math" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" epochskeeper "github.com/sourcenetwork/sourcehub/x/epochs/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/feegrant" feegrantkeeper "github.com/sourcenetwork/sourcehub/x/feegrant/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) // initializeValidator creates a validator and verifies that it was set correctly. func initializeValidator(t *testing.T, k *stakingkeeper.Keeper, ctx sdk.Context, valAddr sdk.ValAddress, initialTokens math.Int) { validator := testutil.CreateTestValidator(t, ctx, k, valAddr, cosmosed25519.GenPrivKey().PubKey(), initialTokens) gotValidator, err := k.GetValidator(ctx, valAddr) require.NoError(t, err) require.Equal(t, validator.OperatorAddress, gotValidator.OperatorAddress) } // initializeDelegator initializes a delegator with balance. func initializeDelegator(t *testing.T, k *Keeper, ctx sdk.Context, delAddr sdk.AccAddress, initialBalance math.Int) { initialDelegatorBalance := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, initialBalance)) err := k.GetBankKeeper().MintCoins(ctx, types.ModuleName, initialDelegatorBalance) require.NoError(t, err) err = k.GetBankKeeper().SendCoinsFromModuleToAccount(ctx, types.ModuleName, delAddr, initialDelegatorBalance) require.NoError(t, err) } // createAccount creates an account with no balance. func createAccount(t *testing.T, k *Keeper, ctx sdk.Context, addr sdk.AccAddress) { tempCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(1)) tempCoins := sdk.NewCoins(tempCoin) err := k.GetBankKeeper().MintCoins(ctx, types.ModuleName, tempCoins) require.NoError(t, err) err = k.GetBankKeeper().SendCoinsFromModuleToAccount(ctx, types.ModuleName, addr, tempCoins) require.NoError(t, err) err = k.GetBankKeeper().SendCoinsFromAccountToModule(ctx, addr, types.ModuleName, tempCoins) require.NoError(t, err) err = k.GetBankKeeper().BurnCoins(ctx, types.ModuleName, tempCoins) require.NoError(t, err) } // mintCoinsToModule mints given token amount and sends it to the specified module name. func mintCoinsToModule(t *testing.T, k *Keeper, ctx sdk.Context, moduleName string, amount math.Int) { coins := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, amount)) err := k.GetBankKeeper().MintCoins(ctx, types.ModuleName, coins) require.NoError(t, err) // No need to send if the specified moduleName is the tier module itself if moduleName != types.ModuleName { err = k.GetBankKeeper().SendCoinsFromModuleToModule(ctx, types.ModuleName, moduleName, coins) require.NoError(t, err) } } func setupKeeper(t testing.TB) (Keeper, sdk.Context) { storeKey := storetypes.NewKVStoreKey(types.StoreKey) authStoreKey := storetypes.NewKVStoreKey(authtypes.StoreKey) bankStoreKey := storetypes.NewKVStoreKey(banktypes.StoreKey) stakingStoreKey := storetypes.NewKVStoreKey(stakingtypes.StoreKey) distrStoreKey := storetypes.NewKVStoreKey(distrtypes.StoreKey) epochsStoreKey := storetypes.NewKVStoreKey(epochstypes.StoreKey) mintStoreKey := storetypes.NewKVStoreKey(minttypes.StoreKey) feegrantStoreKey := storetypes.NewKVStoreKey(feegrant.StoreKey) db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(authStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(bankStoreKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(stakingStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(distrStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(epochsStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(mintStoreKey, storetypes.StoreTypeDB, db) stateStore.MountStoreWithDB(feegrantStoreKey, storetypes.StoreTypeDB, db) require.NoError(t, stateStore.LoadLatestVersion()) registry := codectypes.NewInterfaceRegistry() cryptocdc.RegisterInterfaces(registry) authtypes.RegisterInterfaces(registry) banktypes.RegisterInterfaces(registry) stakingtypes.RegisterInterfaces(registry) distrtypes.RegisterInterfaces(registry) minttypes.RegisterInterfaces(registry) feegrant.RegisterInterfaces(registry) cdc := codec.NewProtoCodec(registry) authority := authtypes.NewModuleAddress(govtypes.ModuleName) bech32Prefix := "source" addressCodec := authcodec.NewBech32Codec(bech32Prefix) valOperCodec := authcodec.NewBech32Codec(bech32Prefix + "valoper") valConsCodec := authcodec.NewBech32Codec(bech32Prefix + "valcons") maccPerms := map[string][]string{ authtypes.FeeCollectorName: nil, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, distrtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, minttypes.ModuleName: {authtypes.Minter, authtypes.Burner}, types.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking}, types.InsurancePoolName: nil, types.DeveloperPoolName: nil, } authKeeper := authkeeper.NewAccountKeeper( cdc, runtime.NewKVStoreService(authStoreKey), authtypes.ProtoBaseAccount, maccPerms, addressCodec, bech32Prefix, authority.String(), ) blockedAddrs := make(map[string]bool) for acc := range maccPerms { blockedAddrs[authtypes.NewModuleAddress(acc).String()] = true } bankKeeper := bankkeeper.NewBaseKeeper( cdc, runtime.NewKVStoreService(bankStoreKey), authKeeper, blockedAddrs, authority.String(), log.NewNopLogger(), ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) ctx = ctx.WithBlockHeight(1).WithChainID("sourcehub").WithBlockTime(time.Unix(1000000000, 0)) bondedPool := authtypes.NewEmptyModuleAccount(stakingtypes.BondedPoolName, authtypes.Burner, authtypes.Staking) notBondedPool := authtypes.NewEmptyModuleAccount(stakingtypes.NotBondedPoolName, authtypes.Burner, authtypes.Staking) distrPool := authtypes.NewEmptyModuleAccount(distrtypes.ModuleName) mintAcc := authtypes.NewEmptyModuleAccount(minttypes.ModuleName) tierPool := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter, authtypes.Burner, authtypes.Staking) insurancePool := authtypes.NewEmptyModuleAccount(types.InsurancePoolName) developerPool := authtypes.NewEmptyModuleAccount(types.DeveloperPoolName) if authKeeper.GetModuleAccount(ctx, stakingtypes.BondedPoolName) == nil { authKeeper.SetModuleAccount(ctx, bondedPool) } if authKeeper.GetModuleAccount(ctx, stakingtypes.NotBondedPoolName) == nil { authKeeper.SetModuleAccount(ctx, notBondedPool) } if authKeeper.GetModuleAccount(ctx, types.ModuleName) == nil { authKeeper.SetModuleAccount(ctx, tierPool) } if authKeeper.GetModuleAccount(ctx, distrtypes.ModuleName) == nil { authKeeper.SetModuleAccount(ctx, distrPool) } if authKeeper.GetModuleAccount(ctx, minttypes.ModuleName) == nil { authKeeper.SetModuleAccount(ctx, mintAcc) } if authKeeper.GetModuleAccount(ctx, types.InsurancePoolName) == nil { authKeeper.SetModuleAccount(ctx, insurancePool) } if authKeeper.GetModuleAccount(ctx, types.DeveloperPoolName) == nil { authKeeper.SetModuleAccount(ctx, developerPool) } stakingKeeper := stakingkeeper.NewKeeper( cdc, runtime.NewKVStoreService(stakingStoreKey), authKeeper, bankKeeper, authority.String(), valOperCodec, valConsCodec, ) stakingParams := stakingtypes.DefaultParams() stakingParams.BondDenom = appparams.DefaultBondDenom require.NoError(t, stakingKeeper.SetParams(ctx, stakingParams)) distributionKeeper := distrkeeper.NewKeeper( cdc, runtime.NewKVStoreService(distrStoreKey), authKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName, authority.String(), ) epochsKeeper := epochskeeper.NewKeeper( runtime.NewKVStoreService(epochsStoreKey), log.NewNopLogger(), ) epoch := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: ctx.BlockTime().Add(-5 * time.Minute), Duration: 5 * time.Minute, } epochsKeeper.SetEpochInfo(ctx, epoch) feegrantKeeper := feegrantkeeper.NewKeeper( cdc, runtime.NewKVStoreService(feegrantStoreKey), authKeeper, ) k := NewKeeper( cdc, runtime.NewKVStoreService(storeKey), log.NewNopLogger(), authority.String(), bankKeeper, stakingKeeper, epochsKeeper, distributionKeeper, feegrantKeeper, nil, ) // Initialize params if err := k.SetParams(ctx, types.DefaultParams()); err != nil { panic(err) } return k, ctx } ================================================ FILE: x/tier/keeper/keeper_mock_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/golang/mock/gomock" appparams "github.com/sourcenetwork/sourcehub/app/params" test "github.com/sourcenetwork/sourcehub/testutil" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/suite" ) type KeeperTestSuite struct { suite.Suite authorityAccount sdk.AccAddress bankKeeper *test.MockBankKeeper stakingKeeper *test.MockStakingKeeper epochsKeeper *test.MockEpochsKeeper distrKeeper *test.MockDistributionKeeper feegrantKeeper *test.MockFeegrantKeeper tierKeeper keeper.Keeper encCfg test.EncodingConfig ctx sdk.Context key *storetypes.KVStoreKey valAddr sdk.ValAddress } // testDelegation is a minimal implementation of stakingtypes.DelegationI. type testDelegation struct { validatorAddr string } func (td testDelegation) GetValidatorAddr() string { return td.validatorAddr } func (td testDelegation) GetDelegatorAddr() string { return "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et" } func (td testDelegation) GetShares() math.LegacyDec { return math.LegacyOneDec() } func (td testDelegation) GetBondedTokens() math.Int { return math.ZeroInt() } func (td testDelegation) IsBonded() bool { return false } func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) SetupTest() { suite.encCfg = test.CreateTestEncodingConfig() suite.key = storetypes.NewKVStoreKey(types.StoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), suite.key, storetypes.NewTransientStoreKey("transient_test")) suite.ctx = testCtx.Ctx ctrl := gomock.NewController(suite.T()) suite.authorityAccount = authtypes.NewModuleAddress(govtypes.ModuleName) suite.bankKeeper = test.NewMockBankKeeper(ctrl) suite.stakingKeeper = test.NewMockStakingKeeper(ctrl) suite.epochsKeeper = test.NewMockEpochsKeeper(ctrl) suite.distrKeeper = test.NewMockDistributionKeeper(ctrl) suite.feegrantKeeper = test.NewMockFeegrantKeeper(ctrl) suite.tierKeeper = keeper.NewKeeper( suite.encCfg.Codec, runtime.NewKVStoreService(suite.key), log.NewNopLogger(), suite.authorityAccount.String(), suite.bankKeeper, suite.stakingKeeper, suite.epochsKeeper, suite.distrKeeper, suite.feegrantKeeper, nil, ) err := suite.tierKeeper.SetParams(suite.ctx, types.DefaultParams()) suite.Require().NoError(err) suite.valAddr, _ = sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") } // TestLock is using mock keepers to verify that required function calls are made as expected on Lock(). func (suite *KeeperTestSuite) TestLock() { amount := math.NewInt(1000) moduleName := types.ModuleName coins := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, amount)) creditCoins := sdk.NewCoins(sdk.NewCoin(appparams.MicroCreditDenom, math.NewInt(230))) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") suite.Require().NoError(err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") suite.Require().NoError(err) validator := stakingtypes.Validator{ OperatorAddress: valAddr.String(), Status: stakingtypes.Bonded, } epochInfo := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpochStartTime: suite.ctx.BlockTime().Add(-10 * time.Minute), Duration: time.Hour, } // confirm that keeper methods are called as expected suite.bankKeeper.EXPECT(). MintCoins(gomock.Any(), types.ModuleName, creditCoins). Return(nil).Times(1) suite.bankKeeper.EXPECT(). SendCoinsFromModuleToAccount(gomock.Any(), moduleName, delAddr, creditCoins). Return(nil).Times(1) suite.stakingKeeper.EXPECT(). GetValidator(gomock.Any(), valAddr). Return(validator, nil).Times(1) suite.bankKeeper.EXPECT(). DelegateCoinsFromAccountToModule(gomock.Any(), delAddr, types.ModuleName, coins). Return(nil).Times(1) suite.stakingKeeper.EXPECT(). Delegate(gomock.Any(), gomock.Any(), amount, stakingtypes.Unbonded, validator, true). Return(math.LegacyNewDecFromInt(amount), nil).Times(1) suite.epochsKeeper.EXPECT(). GetEpochInfo(gomock.Any(), types.EpochIdentifier). Return(epochInfo).Times(1) // perform lock and verify that lockup is set correctly err = suite.tierKeeper.Lock(suite.ctx, delAddr, valAddr, amount) suite.Require().NoError(err) lockedAmt := suite.tierKeeper.GetLockupAmount(suite.ctx, delAddr, valAddr) suite.Require().Equal(amount, lockedAmt) } // TestUnlock is using mock keepers to verify that required function calls are made as expected on Unlock(). func (suite *KeeperTestSuite) TestUnlock() { amount := math.NewInt(1000) moduleName := types.ModuleName unlockingEpochs := int64(2) epochDuration := time.Hour params := types.Params{ UnlockingEpochs: unlockingEpochs, EpochDuration: &epochDuration, } expectedCompletionTime := suite.ctx.BlockTime().Add(time.Hour * 24 * 21) expectedUnlockTime := suite.ctx.BlockTime().Add(time.Duration(params.UnlockingEpochs) * *params.EpochDuration) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") suite.Require().NoError(err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") suite.Require().NoError(err) // confirm that keeper methods are called as expected suite.bankKeeper.EXPECT(). GetBalance( gomock.Any(), authtypes.NewModuleAddress(moduleName), appparams.DefaultBondDenom, ).Return( sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(2000)), ).AnyTimes() suite.stakingKeeper.EXPECT(). ValidateUnbondAmount( gomock.Any(), authtypes.NewModuleAddress(moduleName), valAddr, amount, ).Return(math.LegacyNewDecFromInt(amount), nil).Times(1) suite.stakingKeeper.EXPECT(). Undelegate( gomock.Any(), authtypes.NewModuleAddress(moduleName), valAddr, math.LegacyNewDecFromInt(amount), ).Return(suite.ctx.BlockTime().Add(time.Hour*24*21), amount, nil).Times(1) suite.tierKeeper.SetParams(suite.ctx, params) // add a lockup and verify that it exists before trying to unlock err = suite.tierKeeper.AddLockup(suite.ctx, delAddr, valAddr, amount) suite.Require().NoError(err) lockedAmt := suite.tierKeeper.GetLockupAmount(suite.ctx, delAddr, valAddr) suite.Require().Equal(amount, lockedAmt, "expected lockup amount to be set") // perform unlock and verify that unlocking lockup is set correctly creationHeight, completionTime, unlockTime, err := suite.tierKeeper.Unlock(suite.ctx, delAddr, valAddr, amount) suite.Require().NoError(err) suite.Require().Equal(suite.ctx.BlockHeight(), creationHeight) suite.Require().Equal(expectedCompletionTime, completionTime) suite.Require().Equal(expectedUnlockTime, unlockTime) } // TestRedelegate is using mock keepers to verify that required function calls are made as expected on Redelegate(). func (suite *KeeperTestSuite) TestRedelegate() { amount := math.NewInt(1000) shares := math.LegacyNewDecFromInt(amount) expectedCompletionTime := suite.ctx.BlockTime().Add(time.Hour * 24 * 21) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") suite.Require().NoError(err) srcValAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") suite.Require().NoError(err) dstValAddr, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") suite.Require().NoError(err) // add initial lockup to the source validator err = suite.tierKeeper.AddLockup(suite.ctx, delAddr, srcValAddr, amount) suite.Require().NoError(err) suite.stakingKeeper.EXPECT(). ValidateUnbondAmount(gomock.Any(), authtypes.NewModuleAddress(types.ModuleName), srcValAddr, amount). Return(shares, nil).Times(1) suite.stakingKeeper.EXPECT(). BeginRedelegation(gomock.Any(), authtypes.NewModuleAddress(types.ModuleName), srcValAddr, dstValAddr, shares). Return(expectedCompletionTime, nil).Times(1) // perform redelegate and verify that lockups were updated successfully completionTime, err := suite.tierKeeper.Redelegate(suite.ctx, delAddr, srcValAddr, dstValAddr, amount) suite.Require().NoError(err) suite.Require().Equal(expectedCompletionTime, completionTime) srcLockedAmt := suite.tierKeeper.GetLockupAmount(suite.ctx, delAddr, srcValAddr) dstLockedAmt := suite.tierKeeper.GetLockupAmount(suite.ctx, delAddr, dstValAddr) suite.Require().Equal(math.ZeroInt(), srcLockedAmt, "source validator lockup should be zero") suite.Require().Equal(amount, dstLockedAmt, "destination validator lockup should match the redelegated amount") } func (suite *KeeperTestSuite) TestBeginBlock() { tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) delegation := testDelegation{validatorAddr: suite.valAddr.String()} totalReward := math.NewInt(100) rewardCoins := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, totalReward)) testCases := []struct { name string expectedDeveloperPool math.Int expectedInsurancePool math.Int expectedTimesSentToInsPool int }{ { name: "Insurance pool below threshold", expectedDeveloperPool: math.NewInt(2), expectedInsurancePool: math.NewInt(1), expectedTimesSentToInsPool: 1, }, { name: "Insurance pool is full", expectedDeveloperPool: math.NewInt(3), expectedInsurancePool: math.NewInt(100_000_000_000), expectedTimesSentToInsPool: 0, }, } suite.stakingKeeper. EXPECT(). IterateDelegations(suite.ctx, tierModuleAddr, gomock.Any()). DoAndReturn(func(ctx sdk.Context, delegator sdk.AccAddress, fn func(int64, stakingtypes.DelegationI) bool) error { fn(0, delegation) return nil }).Times(len(testCases)) suite.distrKeeper. EXPECT(). WithdrawDelegationRewards(suite.ctx, tierModuleAddr, suite.valAddr). Return(rewardCoins, nil).Times(len(testCases)) suite.bankKeeper. EXPECT(). SendCoinsFromModuleToModule(gomock.Any(), types.ModuleName, types.DeveloperPoolName, gomock.Any()). Return(nil).Times(len(testCases)) suite.bankKeeper. EXPECT(). BurnCoins(gomock.Any(), types.ModuleName, gomock.Any()). Return(nil).Times(len(testCases)) for _, tc := range testCases { suite.Run(tc.name, func() { suite.bankKeeper. EXPECT(). GetBalance(gomock.Any(), authtypes.NewModuleAddress(types.InsurancePoolName), appparams.DefaultBondDenom). Return(sdk.NewCoin(appparams.DefaultBondDenom, tc.expectedInsurancePool)). Times(tc.expectedTimesSentToInsPool + 1) suite.bankKeeper. EXPECT(). GetBalance(gomock.Any(), authtypes.NewModuleAddress(types.DeveloperPoolName), appparams.DefaultBondDenom). Return(sdk.NewCoin(appparams.DefaultBondDenom, tc.expectedDeveloperPool)). Times(1) suite.bankKeeper. EXPECT(). SendCoinsFromModuleToModule(gomock.Any(), types.ModuleName, types.InsurancePoolName, gomock.Any()). Return(nil).Times(tc.expectedTimesSentToInsPool) err := suite.tierKeeper.BeginBlocker(suite.ctx) suite.Require().NoError(err) }) } } ================================================ FILE: x/tier/keeper/keeper_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) // TestLock verifies that a valid lockup is created on keeper.Lock(). func TestLock(t *testing.T) { k, ctx := keepertest.TierKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initialDelegatorBalance := math.NewInt(2000) keepertest.InitializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initialValidatorBalance := math.NewInt(1000) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) // set initial block height and time ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) // initial lockup amount should be zero lockedAmt := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, math.ZeroInt(), lockedAmt) // locking invalid amounts should fail err = k.Lock(ctx, delAddr, valAddr, math.NewInt(-100)) require.Error(t, err) require.ErrorContains(t, err, "lock non-positive amount") err = k.Lock(ctx, delAddr, valAddr, math.ZeroInt()) require.Error(t, err) require.ErrorContains(t, err, "lock non-positive amount") err = k.Lock(ctx, delAddr, valAddr, math.NewInt(10_000_000)) require.Error(t, err) require.ErrorContains(t, err, "insufficient funds") // lock valid amount err = k.Lock(ctx, delAddr, valAddr, amount) require.NoError(t, err) // verify that lockup was added lockedAmt = k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, amount, lockedAmt) } // TestLockAuto verifies that a valid lockup is created with automatic validator selection on keeper.LockAuto(). func TestLockAuto(t *testing.T) { k, ctx := keepertest.TierKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr1, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) valAddr2, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) initialDelegatorBalance := math.NewInt(5000) keepertest.InitializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initialValidatorBalance := math.NewInt(1000) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr1, initialValidatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr2, initialValidatorBalance) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) // initial lockup amount should be zero for both validators lockedAmt1 := k.GetLockupAmount(ctx, delAddr, valAddr1) require.Equal(t, math.ZeroInt(), lockedAmt1) lockedAmt2 := k.GetLockupAmount(ctx, delAddr, valAddr2) require.Equal(t, math.ZeroInt(), lockedAmt2) // locking invalid amounts should fail _, err = k.LockAuto(ctx, delAddr, math.NewInt(-100)) require.Error(t, err) require.ErrorContains(t, err, "lock non-positive amount") _, err = k.LockAuto(ctx, delAddr, math.ZeroInt()) require.Error(t, err) require.ErrorContains(t, err, "lock non-positive amount") _, err = k.LockAuto(ctx, delAddr, math.NewInt(10_000_000)) require.Error(t, err) require.ErrorContains(t, err, "insufficient funds") // lock valid amount with auto validator selection (first lock - no existing lockups) selectedValAddr, err := k.LockAuto(ctx, delAddr, amount) require.NoError(t, err) require.NotNil(t, selectedValAddr) // verify that the selected validator is one of the bonded validators require.True(t, selectedValAddr.Equals(valAddr1) || selectedValAddr.Equals(valAddr2)) // verify that lockup was added to the selected validator lockedAmt := k.GetLockupAmount(ctx, delAddr, selectedValAddr) require.Equal(t, amount, lockedAmt) // second auto lock should go to the same validator (smallest existing lockup) selectedValAddr2, err := k.LockAuto(ctx, delAddr, math.NewInt(500)) require.NoError(t, err) require.True(t, selectedValAddr2.Equals(selectedValAddr), "second lock should go to same validator with smallest lockup") // verify lockup was updated lockedAmt = k.GetLockupAmount(ctx, delAddr, selectedValAddr) require.Equal(t, math.NewInt(1500), lockedAmt) // 1000 + 500 // manually lock a smaller amount to the other validator otherValAddr := valAddr1 if selectedValAddr.Equals(valAddr1) { otherValAddr = valAddr2 } err = k.Lock(ctx, delAddr, otherValAddr, math.NewInt(200)) require.NoError(t, err) // third auto lock should go to the validator with smallest lockup (200 < 1500) selectedValAddr3, err := k.LockAuto(ctx, delAddr, math.NewInt(100)) require.NoError(t, err) require.True(t, selectedValAddr3.Equals(otherValAddr), "third lock should go to validator with smallest lockup") // verify lockup was updated on the other validator lockedAmt = k.GetLockupAmount(ctx, delAddr, otherValAddr) require.Equal(t, math.NewInt(300), lockedAmt) // 200 + 100 } // TestUnlock verifies that a valid unlocking lockup is created on keeper.Unock(). func TestUnlock(t *testing.T) { k, ctx := keepertest.TierKeeper(t) lockAmount := math.NewInt(1000) unlockAmount := math.NewInt(500) invalidUnlockAmount := math.NewInt(-500) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initialDelegatorBalance := math.NewInt(2000) keepertest.InitializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initialValidatorBalance := math.NewInt(1000) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) // set initial block height and time ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.Lock(ctx, delAddr, valAddr, lockAmount) require.NoError(t, err) // verify that lockup was added lockedAmt := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, lockAmount, lockedAmt) // unlocking invalid amounts should fail _, _, _, err = k.Unlock(ctx, delAddr, valAddr, invalidUnlockAmount) require.Error(t, err) require.ErrorContains(t, err, "unlock non-positive amount") _, _, _, err = k.Unlock(ctx, delAddr, valAddr, math.ZeroInt()) require.Error(t, err) require.ErrorContains(t, err, "unlock non-positive amount") creationHeight, completionTime, unlockTime, err := k.Unlock(ctx, delAddr, valAddr, unlockAmount) require.NoError(t, err) // verify that lockup was updated lockedAmt = k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, lockAmount.Sub(unlockAmount), lockedAmt) // check the unlocking entry unlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup) require.Equal(t, unlockAmount, unlockingLockup.Amount) require.Equal(t, completionTime, unlockingLockup.CompletionTime) require.Equal(t, unlockTime, unlockingLockup.UnlockTime) } // TestRedelegate verifies that a locked amount is correctly redelegated on keeper.Redelegate(). func TestRedelegate(t *testing.T) { k, ctx := keepertest.TierKeeper(t) amount := math.NewInt(1000) invalidAmount := math.NewInt(-100) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) srcValAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) dstValAddr, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) initialDelegatorBalance := math.NewInt(2000) keepertest.InitializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initialValidatorBalance := math.NewInt(1000) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, srcValAddr, initialValidatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, dstValAddr, initialValidatorBalance) // set initial block height and time ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) // lock tokens with the source validator require.NoError(t, k.Lock(ctx, delAddr, srcValAddr, amount)) // redelegating invalid amounts should fail _, err = k.Redelegate(ctx, delAddr, srcValAddr, dstValAddr, invalidAmount) require.Error(t, err) require.ErrorContains(t, err, "redelegate non-positive amount") _, err = k.Redelegate(ctx, delAddr, srcValAddr, dstValAddr, math.ZeroInt()) require.Error(t, err) require.ErrorContains(t, err, "redelegate non-positive amount") // redelegate from the source validator to the destination validator completionTime, err := k.Redelegate(ctx, delAddr, srcValAddr, dstValAddr, math.NewInt(500)) require.NoError(t, err) // check lockup state srcLockup := k.GetLockupAmount(ctx, delAddr, srcValAddr) require.Equal(t, math.NewInt(500), srcLockup) dstLockup := k.GetLockupAmount(ctx, delAddr, dstValAddr) require.Equal(t, math.NewInt(500), dstLockup) // ensure completion time is set require.NotZero(t, completionTime) } // TestCompleteUnlocking verifies that 'fully unlocked' unlocking lockups are removed on keeper.CompleteUnlocking(). // Block time is advanced by 60 days from when keeper.Unlock() is called to make sure that the unlock time is in the past. func TestCompleteUnlocking(t *testing.T) { k, ctx := keepertest.TierKeeper(t) lockAmount := math.NewInt(123_456) unlockAmount := math.NewInt(123_456) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initialDelegatorBalance := math.NewInt(200_000) keepertest.InitializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initialValidatorBalance := math.NewInt(1_000_000) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) // set initial block height and time ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.Lock(ctx, delAddr, valAddr, lockAmount) require.NoError(t, err) lockup := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, lockAmount, lockup) balance := k.GetBankKeeper().GetBalance(ctx, delAddr, appparams.DefaultBondDenom) require.Equal(t, initialDelegatorBalance.Sub(lockAmount), balance.Amount) // unlock tokens creationHeight, completionTime, unlockTime, err := k.Unlock(ctx, delAddr, valAddr, unlockAmount) require.NoError(t, err) lockup = k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, math.ZeroInt(), lockup) unlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup) require.Equal(t, unlockAmount.Sub(math.OneInt()), unlockingLockup.Amount) // 123_455 require.Equal(t, completionTime, unlockingLockup.CompletionTime) require.Equal(t, unlockTime, unlockingLockup.UnlockTime) balance = k.GetBankKeeper().GetBalance(ctx, delAddr, appparams.DefaultBondDenom) require.Equal(t, initialDelegatorBalance.Sub(lockAmount), balance.Amount) // completing unlocking lockup should be skipped if unlock time was not reached err = k.CompleteUnlocking(ctx) require.NoError(t, err) balance = k.GetBankKeeper().GetBalance(ctx, delAddr, appparams.DefaultBondDenom) require.Equal(t, initialDelegatorBalance.Sub(unlockAmount), balance.Amount) // advance block time by 60 days ctx = ctx.WithBlockHeight(3600 * 24 * 60).WithBlockTime(ctx.BlockTime().Add(60 * 24 * time.Hour)) // completing unlocking lockup should be skipped if module balance is less than required amount err = k.CompleteUnlocking(ctx) require.NoError(t, err) balance = k.GetBankKeeper().GetBalance(ctx, delAddr, appparams.DefaultBondDenom) require.Equal(t, initialDelegatorBalance.Sub(unlockAmount), balance.Amount) // complete unbonding via the staking keeper modAddr := authtypes.NewModuleAddress(types.ModuleName) _, err = k.GetStakingKeeper().CompleteUnbonding(ctx, modAddr, valAddr) require.NoError(t, err) unlockingLockup = k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup) require.Equal(t, unlockAmount.Sub(math.OneInt()), unlockingLockup.Amount) // 123_455 require.Equal(t, completionTime, unlockingLockup.CompletionTime) require.Equal(t, unlockTime, unlockingLockup.UnlockTime) // complete unlocking of matured unlocking lockups err = k.CompleteUnlocking(ctx) require.NoError(t, err) // verify that the balance is correct balance = k.GetBankKeeper().GetBalance(ctx, delAddr, appparams.DefaultBondDenom) require.Equal(t, initialDelegatorBalance.Sub(math.OneInt()), balance.Amount) } // TestCancelUnlocking verifies that the unlocking lockup is removed on keeper.CancelUnlocking(). func TestCancelUnlocking(t *testing.T) { k, ctx := keepertest.TierKeeper(t) initialLockAmount := math.NewInt(1000) updatedLockAmount := math.NewInt(700) unlockAmount := math.NewInt(500) partialUnlockAmount := math.NewInt(200) remainingUnlockAmount := math.NewInt(300) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initialDelegatorBalance := math.NewInt(200_000) keepertest.InitializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initialValidatorBalance := math.NewInt(10_000_000) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) // set initial block height and time ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) // lock the initialAmount err = k.Lock(ctx, delAddr, valAddr, initialLockAmount) require.NoError(t, err) // verify that lockup was added lockedAmt := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, initialLockAmount, lockedAmt) // unlock the unlockAmount (partial unlock) creationHeight, completionTime, unlockTime, err := k.Unlock(ctx, delAddr, valAddr, unlockAmount) require.NoError(t, err) // verify that lockup was updated lockedAmt = k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, initialLockAmount.Sub(unlockAmount), lockedAmt) // 500 // check the unlocking entry based on adjusted unlock amount unlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup) require.Equal(t, unlockAmount.Sub(math.OneInt()), unlockingLockup.Amount) // 499 require.Equal(t, completionTime, unlockingLockup.CompletionTime) require.Equal(t, unlockTime, unlockingLockup.UnlockTime) err = k.CancelUnlocking(ctx, delAddr, valAddr, creationHeight, math.NewInt(-100)) require.Error(t, err) require.ErrorContains(t, err, "cancel unlocking non-positive amount") err = k.CancelUnlocking(ctx, delAddr, valAddr, creationHeight, math.ZeroInt()) require.Error(t, err) require.ErrorContains(t, err, "cancel unlocking non-positive amount") // partially cancel the unlocking lockup err = k.CancelUnlocking(ctx, delAddr, valAddr, creationHeight, partialUnlockAmount) require.NoError(t, err) // verify that lockup was updated lockupAmount := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, updatedLockAmount, lockupAmount) // 700 // check the unlocking entry unlockingLockup = k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup) require.Equal(t, remainingUnlockAmount.Sub(math.OneInt()), unlockingLockup.Amount) // 299 require.Equal(t, completionTime, unlockingLockup.CompletionTime) require.Equal(t, unlockTime, unlockingLockup.UnlockTime) // advance block height by 1 so that subsequent unlocking lockup is stored separately // otherwise, existing unlocking lockup is overrirden (e.g. delAddr/valAddr/creationHeight/) // TODO: handle edge case with 2+ messages at the same height ctx = ctx.WithBlockHeight(2).WithBlockTime(ctx.BlockTime().Add(time.Minute)) // add new unlocking lockup record at height 2 to fully unlock the remaining adjustedUnlockAmountFinal creationHeight2, completionTime2, unlockTime2, err := k.Unlock(ctx, delAddr, valAddr, remainingUnlockAmount) require.NoError(t, err) // verify that lockup was updated lockedAmt = k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, updatedLockAmount.Sub(remainingUnlockAmount), lockedAmt) // 400 // check the unlocking entry based on adjusted unlock amount unlockingLockup = k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight2) require.NotNil(t, unlockingLockup) require.Equal(t, remainingUnlockAmount.Sub(math.OneInt()), unlockingLockup.Amount) // 299 require.Equal(t, completionTime2, unlockingLockup.CompletionTime) require.Equal(t, unlockTime2, unlockingLockup.UnlockTime) // cancel (remove) the unlocking lockup at height 2 err = k.CancelUnlocking(ctx, delAddr, valAddr, creationHeight2, remainingUnlockAmount.Sub(math.OneInt())) // 299 require.NoError(t, err) // verify that lockup was updated lockupAmount = k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, updatedLockAmount.Sub(math.OneInt()), lockupAmount) // 699 // there is still a partial unlocking lockup at height 1 since we did not cancel it's whole amount unlockingLockup = k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup) require.Equal(t, remainingUnlockAmount.Sub(math.OneInt()), unlockingLockup.Amount) // 299 require.Equal(t, completionTime, unlockingLockup.CompletionTime) require.Equal(t, unlockTime, unlockingLockup.UnlockTime) // cancel (remove) the remaining unlocking lockup at height 1 err = k.CancelUnlocking(ctx, delAddr, valAddr, creationHeight, remainingUnlockAmount.Sub(math.OneInt())) // 299 require.NoError(t, err) // verify that lockup was updated lockupAmount = k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, initialLockAmount.Sub(math.NewInt(2)), lockupAmount) // 998 // confirm that unlocking lockup was removed if we cancel whole amount (e.g. use nil) unlockingLockup = k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.Nil(t, unlockingLockup) } // TestCreateDeveloper verifies that a developer can be created. func TestCreateDeveloper(t *testing.T) { k, ctx := keepertest.TierKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) err = k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) developer := k.GetDeveloper(ctx, developerAddr) require.NotNil(t, developer) require.Equal(t, developerAddr.String(), developer.Address) require.True(t, developer.AutoLockEnabled) err = k.CreateDeveloper(ctx, developerAddr, false) require.Error(t, err) require.ErrorContains(t, err, "already exists") } // TestUpdateDeveloper verifies that a developer can be updated. func TestUpdateDeveloper(t *testing.T) { k, ctx := keepertest.TierKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) err = k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) developer := k.GetDeveloper(ctx, developerAddr) require.NotNil(t, developer) require.Equal(t, developerAddr.String(), developer.Address) require.True(t, developer.AutoLockEnabled) err = k.UpdateDeveloper(ctx, developerAddr, false) require.NoError(t, err) developer = k.GetDeveloper(ctx, developerAddr) require.NotNil(t, developer) require.Equal(t, developerAddr.String(), developer.Address) require.False(t, developer.AutoLockEnabled) } // TestRemoveDeveloper verifies that a developer can be removed. func TestRemoveDeveloper(t *testing.T) { k, ctx := keepertest.TierKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) err = k.RemoveDeveloper(ctx, developerAddr) require.Error(t, err) require.ErrorContains(t, err, "does not exist") err = k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) developer := k.GetDeveloper(ctx, developerAddr) require.NotNil(t, developer) err = k.RemoveDeveloper(ctx, developerAddr) require.NoError(t, err) developer = k.GetDeveloper(ctx, developerAddr) require.Nil(t, developer) } // TestAddUserSubscription verifies that a user can be subscribed to a developer. func TestAddUserSubscription(t *testing.T) { k, ctx := keepertest.TierKeeper(t) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) userDid := "did:key:alice" keepertest.InitializeDelegator(t, &k, ctx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(ctx, developerAddr, false) require.NoError(t, err) require.NoError(t, k.Lock(ctx, developerAddr, valAddr, math.NewInt(1000))) amount := uint64(1000) period := uint64(3600) err = k.AddUserSubscription(ctx, developerAddr, userDid, amount, period) require.NoError(t, err) subscription := k.GetUserSubscription(ctx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, developerAddr.String(), subscription.Developer) require.Equal(t, userDid, subscription.UserDid) require.Equal(t, amount, subscription.CreditAmount) require.Equal(t, period, subscription.Period) err = k.AddUserSubscription(ctx, developerAddr, userDid, amount, period) require.Error(t, err) require.ErrorContains(t, err, "already subscribed") } // TestUpdateUserSubscription verifies that a user's subscription can be updated. func TestUpdateUserSubscription(t *testing.T) { k, ctx := keepertest.TierKeeper(t) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) userDid := "did:key:alice" keepertest.InitializeDelegator(t, &k, ctx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(ctx, developerAddr, false) require.NoError(t, err) require.NoError(t, k.Lock(ctx, developerAddr, valAddr, math.NewInt(1000))) initialAmount := uint64(1000) newAmount := uint64(2000) lowerAmount := uint64(500) err = k.UpdateUserSubscription(ctx, developerAddr, userDid, initialAmount, 7200) require.Error(t, err) require.ErrorContains(t, err, "is not subscribed") err = k.AddUserSubscription(ctx, developerAddr, userDid, initialAmount, 3600) require.NoError(t, err) err = k.UpdateUserSubscription(ctx, developerAddr, userDid, newAmount, 7200) require.NoError(t, err) subscription := k.GetUserSubscription(ctx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, newAmount, subscription.CreditAmount) require.Equal(t, uint64(7200), subscription.Period) err = k.UpdateUserSubscription(ctx, developerAddr, userDid, lowerAmount, 1800) require.NoError(t, err) subscription = k.GetUserSubscription(ctx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, lowerAmount, subscription.CreditAmount) require.Equal(t, uint64(1800), subscription.Period) } // TestRemoveUserSubscription verifies that a user's subscription can be removed. func TestRemoveUserSubscription(t *testing.T) { k, ctx := keepertest.TierKeeper(t) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) userDid := "did:key:alice" keepertest.InitializeDelegator(t, &k, ctx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.RemoveUserSubscription(ctx, developerAddr, userDid) require.Error(t, err) require.ErrorContains(t, err, "is not subscribed") err = k.CreateDeveloper(ctx, developerAddr, false) require.NoError(t, err) require.NoError(t, k.Lock(ctx, developerAddr, valAddr, math.NewInt(1000))) amount := uint64(1000) err = k.AddUserSubscription(ctx, developerAddr, userDid, amount, 3600) require.NoError(t, err) subscription := k.GetUserSubscription(ctx, developerAddr, userDid) require.NotNil(t, subscription) err = k.RemoveUserSubscription(ctx, developerAddr, userDid) require.NoError(t, err) subscription = k.GetUserSubscription(ctx, developerAddr, userDid) require.Nil(t, subscription) } // TestAddUserSubscriptionAutoLock verifies that a user can be subscribed to a developer with auto-lock enabled. func TestAddUserSubscriptionAutoLock(t *testing.T) { k, ctx := keepertest.TierKeeper(t) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) userDid := "did:key:alice" keepertest.InitializeDelegator(t, &k, ctx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(ctx, developerAddr, false) require.NoError(t, err) amount := uint64(1000) err = k.AddUserSubscription(ctx, developerAddr, userDid, amount, 3600) require.Error(t, err) require.ErrorContains(t, err, "insufficient credits and auto-lock disabled") err = k.UpdateDeveloper(ctx, developerAddr, true) require.NoError(t, err) err = k.AddUserSubscription(ctx, developerAddr, userDid, amount, 3600) require.NoError(t, err) subscription := k.GetUserSubscription(ctx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, developerAddr.String(), subscription.Developer) require.Equal(t, userDid, subscription.UserDid) require.Equal(t, amount, subscription.CreditAmount) require.Equal(t, uint64(3600), subscription.Period) } ================================================ FILE: x/tier/keeper/lockup.go ================================================ package keeper import ( "context" "time" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/app/metrics" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // GetAllLockups returns all lockups in the store. func (k *Keeper) GetAllLockups(ctx context.Context) []types.Lockup { var lockups []types.Lockup lockupsCallback := func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { lockups = append(lockups, lockup) } k.mustIterateLockups(ctx, lockupsCallback) return lockups } // GetAllUnlockingLockups returns all unlocking lockups in the store. func (k *Keeper) GetAllUnlockingLockups(ctx context.Context) []types.UnlockingLockup { var unlockingLockups []types.UnlockingLockup unlockingLockupsCallback := func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, lockup types.UnlockingLockup) { unlockingLockups = append(unlockingLockups, lockup) } k.mustIterateUnlockingLockups(ctx, unlockingLockupsCallback) return unlockingLockups } // setLockup sets a lockup in the store based on the LockupKey. func (k *Keeper) setLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount math.Int) { lockup := &types.Lockup{ DelegatorAddress: delAddr.String(), ValidatorAddress: valAddr.String(), Amount: amount, } key := types.LockupKey(delAddr, valAddr) b := k.cdc.MustMarshal(lockup) store := k.lockupStore(ctx, false) store.Set(key, b) } // SetUnlockingLockup sets an unlocking lockup in the store based on the UnlockingLockupKey. func (k *Keeper) SetUnlockingLockup( ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, amount math.Int, completionTime, unlockTime time.Time, ) { unlockingLockup := &types.UnlockingLockup{ DelegatorAddress: delAddr.String(), ValidatorAddress: valAddr.String(), CreationHeight: creationHeight, Amount: amount, CompletionTime: completionTime, UnlockTime: unlockTime, } key := types.UnlockingLockupKey(delAddr, valAddr, creationHeight) b := k.cdc.MustMarshal(unlockingLockup) store := k.lockupStore(ctx, true) store.Set(key, b) } // GetLockup returns a pointer to existing lockup, or nil if not found. func (k *Keeper) GetLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) *types.Lockup { key := types.LockupKey(delAddr, valAddr) store := k.lockupStore(ctx, false) b := store.Get(key) if b == nil { return nil } var lockup types.Lockup k.cdc.MustUnmarshal(b, &lockup) return &lockup } // GetLockupAmount returns existing lockup amount, or math.ZeroInt() if not found. func (k *Keeper) GetLockupAmount(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) math.Int { key := types.LockupKey(delAddr, valAddr) store := k.lockupStore(ctx, false) b := store.Get(key) if b == nil { return math.ZeroInt() } var lockup types.Lockup k.cdc.MustUnmarshal(b, &lockup) return lockup.Amount } // hasLockup checks if Lockup with specified delAddr/valAddr exists. func (k *Keeper) hasLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) bool { key := types.LockupKey(delAddr, valAddr) store := k.lockupStore(ctx, false) b := store.Get(key) return b != nil } // HasUnlockingLockup checks if UnlockingLockup with specified delAddr/valAddr/creationHeight exists. func (k *Keeper) HasUnlockingLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64) bool { key := types.UnlockingLockupKey(delAddr, valAddr, creationHeight) store := k.lockupStore(ctx, true) b := store.Get(key) return b != nil } // GetUnlockingLockup returns the UnlockingLockup if it exists, or nil otherwise. func (k *Keeper) GetUnlockingLockup( ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, ) *types.UnlockingLockup { key := types.UnlockingLockupKey(delAddr, valAddr, creationHeight) store := k.lockupStore(ctx, true) b := store.Get(key) if b == nil { return nil } var unlockingLockup types.UnlockingLockup k.cdc.MustUnmarshal(b, &unlockingLockup) return &unlockingLockup } // removeLockup removes existing Lockup (delAddr/valAddr/). func (k *Keeper) removeLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { key := types.LockupKey(delAddr, valAddr) store := k.lockupStore(ctx, false) store.Delete(key) } // removeUnlockingLockup removes existing unlocking lockup (delAddr/valAddr/creationHeight/). func (k *Keeper) removeUnlockingLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64) { key := types.UnlockingLockupKey(delAddr, valAddr, creationHeight) store := k.lockupStore(ctx, true) store.Delete(key) } // AddLockup adds provided amount to the existing Lockup. func (k *Keeper) AddLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount math.Int) error { total := k.GetTotalLockupsAmount(ctx) total = total.Add(amount) err := k.setTotalLockupsAmount(ctx, total) if err != nil { return err } lockup := k.GetLockup(ctx, delAddr, valAddr) if lockup != nil { amount = amount.Add(lockup.Amount) } k.setLockup(ctx, delAddr, valAddr, amount) return nil } // subtractLockup subtracts provided amount from the existing Lockup. func (k *Keeper) subtractLockup(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount math.Int) error { lockup := k.GetLockup(ctx, delAddr, valAddr) if lockup == nil { return types.ErrNotFound.Wrap("subtract lockup") } // Adjust the actual lockup amount by insurance lockup amount insuranceLockupAmount := math.ZeroInt() insuranceLockup := k.getInsuranceLockup(ctx, delAddr, valAddr) if insuranceLockup != nil { insuranceLockupAmount = insuranceLockup.Amount } // Subtracted amount plus insurance lockup amount must not be larger than the lockedAmt if amount.Add(insuranceLockupAmount).GT(lockup.Amount) { return types.ErrInvalidAmount.Wrap("subtract lockup") } total := k.GetTotalLockupsAmount(ctx) newTotal, err := total.SafeSub(amount) if err != nil { return errorsmod.Wrapf(err, "subtract %s from total lockups amount %s", amount, total) } err = k.setTotalLockupsAmount(ctx, newTotal) if err != nil { return err } // Remove lockup record completely if subtracted amount is equal to lockedAmt if amount.Equal(lockup.Amount) { k.removeLockup(ctx, delAddr, valAddr) return nil } // Subtract amount from the lockedAmt otherwise newAmt, err := lockup.Amount.SafeSub(amount) if err != nil { return errorsmod.Wrapf(err, "subtract %s from locked amount %s", amount, lockup.Amount) } k.setLockup(ctx, delAddr, valAddr, newAmt) return nil } // subtractUnlockingLockup subtracts provided amount from the existing UnlockingLockup. func (k *Keeper) subtractUnlockingLockup( ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, amount math.Int, ) error { unlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) if unlockingLockup == nil { return types.ErrNotFound.Wrap("subtract unlocking lockup") } // Subtracted amount must not be larger than the lockedAmt if amount.GT(unlockingLockup.Amount) { return types.ErrInvalidAmount.Wrap("subtract unlocking lockup") } // Remove lockup record completely if subtracted amount is equal to lockedAmt if amount.Equal(unlockingLockup.Amount) { k.removeUnlockingLockup(ctx, delAddr, valAddr, creationHeight) return nil } // Subtract amount from the lockedAmt otherwise newAmt, err := unlockingLockup.Amount.SafeSub(amount) if err != nil { return errorsmod.Wrapf(err, "subtract %s from unlocking lockup with amount %s", amount, unlockingLockup.Amount) } k.SetUnlockingLockup(ctx, delAddr, valAddr, creationHeight, newAmt, unlockingLockup.CompletionTime, unlockingLockup.UnlockTime) return nil } // totalLockedAmountByAddr returns the total lockup amount by the provided delAddr. func (k *Keeper) totalLockedAmountByAddr(ctx context.Context, delAddr sdk.AccAddress) math.Int { amount := math.ZeroInt() cb := func(d sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { if d.Equals(delAddr) { amount = amount.Add(lockup.Amount) } } k.mustIterateLockups(ctx, cb) return amount } // iterateUnlockingLockups iterates over all unlocking lockups in the store and performs the provided callback function. // The iterator itself doesn't return an error, but the callback does. // If the callback returns an error, the iteration stops and the error is returned. func (k *Keeper) iterateUnlockingLockups(ctx context.Context, cb func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, lockup types.UnlockingLockup) error) error { store := k.lockupStore(ctx, true) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var unlockingLockup types.UnlockingLockup k.cdc.MustUnmarshal(iterator.Value(), &unlockingLockup) delAddr, valAddr, creationHeight := types.UnlockingLockupKeyToAddressesAtHeight(iterator.Key()) err := cb(delAddr, valAddr, creationHeight, unlockingLockup) if err != nil { return errorsmod.Wrapf(err, "%s/%s/%d, amount: %s", delAddr, valAddr, creationHeight, unlockingLockup.Amount) } } return nil } // mustIterateLockups iterates over all lockups in the store and performs the provided callback function. func (k *Keeper) mustIterateLockups(ctx context.Context, cb func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup)) { store := k.lockupStore(ctx, false) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var lockup types.Lockup k.cdc.MustUnmarshal(iterator.Value(), &lockup) delAddr, valAddr := types.LockupKeyToAddresses(iterator.Key()) cb(delAddr, valAddr, lockup) } } // mustIterateUnlockingLockups iterates over all unlocking lockups in the store and performs the provided callback function. func (k *Keeper) mustIterateUnlockingLockups(ctx context.Context, cb func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, unlockingLockup types.UnlockingLockup)) { store := k.lockupStore(ctx, true) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var unlockingLockup types.UnlockingLockup k.cdc.MustUnmarshal(iterator.Value(), &unlockingLockup) delAddr, valAddr, creationHeight := types.UnlockingLockupKeyToAddressesAtHeight(iterator.Key()) cb(delAddr, valAddr, creationHeight, unlockingLockup) } } // lockupStore returns a prefix store for Lockup / UnlockingLockup. func (k *Keeper) lockupStore(ctx context.Context, unlocking bool) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) storePrefix := types.KeyPrefix(unlocking) return prefix.NewStore(storeAdapter, storePrefix) } // GetTotalLockupsAmount retrieves the total lockup amount from the store. func (k *Keeper) GetTotalLockupsAmount(ctx context.Context) (total math.Int) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.TotalLockupsKey) if bz == nil { return math.ZeroInt() } err := total.Unmarshal(bz) if err != nil { return math.ZeroInt() } if total.IsNegative() { return math.ZeroInt() } return total } // setTotalLockupsAmount updates the total lockup amount in the store. func (k *Keeper) setTotalLockupsAmount(ctx context.Context, total math.Int) error { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz, err := total.Marshal() if err != nil { return errorsmod.Wrapf(err, "marshal total lockups amount") } store.Set(types.TotalLockupsKey, bz) // Update total lockups amount gauge telemetry.ModuleSetGauge( types.ModuleName, float32(total.Int64()), metrics.TotalLocked, ) return nil } // adjustLockups iterates over existing lockups and adjusts them based on the provided slashingRate. // If non-zero coverageRate is provided, creates/updates associated insurance lockup records. func (k *Keeper) adjustLockups(ctx context.Context, validatorAddr sdk.ValAddress, slashingRate, coverageRate math.LegacyDec) error { store := k.lockupStore(ctx, false) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { delAddr, valAddr := types.LockupKeyToAddresses(iterator.Key()) if !valAddr.Equals(validatorAddr) { continue } err := k.adjustLockup(ctx, delAddr, valAddr, slashingRate, coverageRate) if err != nil { return err } } return nil } // adjustLockup adjusts the existing lockup amount based on the provided slashingRate. // If non-zero coverageRate is provided, creates/updates associated insurance lockup record. func (k *Keeper) adjustLockup( ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, slashingRate, coverageRate math.LegacyDec, ) error { lockup := k.GetLockup(ctx, delAddr, valAddr) if lockup == nil { return types.ErrNotFound.Wrap("adjust lockup") } // Calculate lockup amount after slashing, rounding down to ensure unlocks are handled correctly amountAfterSlashing := lockup.Amount.ToLegacyDec().Mul(slashingRate).TruncateInt() // No need to update the store if the amount after slashing equals to original lockup amount if amountAfterSlashing.Equal(lockup.Amount) { return nil } // Get existing total lockups amount and subtract lockup.Amount from it total := k.GetTotalLockupsAmount(ctx) newTotal, err := total.SafeSub(lockup.Amount) if err != nil { return errorsmod.Wrapf(err, "subtract %s from total lockups amount %s", lockup.Amount, total) } // Add amountAfterSlashing to newTotal and update the store newTotal = newTotal.Add(amountAfterSlashing) err = k.setTotalLockupsAmount(ctx, newTotal) if err != nil { return err } // Remove lockup record and associated insurance lockup if amount after slashing is zero if amountAfterSlashing.IsZero() { k.removeLockup(ctx, delAddr, valAddr) k.removeInsuranceLockup(ctx, delAddr, valAddr) return nil } // Update the lockup with amount after slashing otherwise k.setLockup(ctx, delAddr, valAddr, amountAfterSlashing) // Calculate covered amount and update insurance lockup if coverage rate is provided if coverageRate.IsPositive() { coveredAmount := lockup.Amount.ToLegacyDec().Mul(coverageRate).TruncateInt() insuranceLockup := k.getInsuranceLockup(ctx, delAddr, valAddr) if insuranceLockup != nil { coveredAmount = coveredAmount.Add(insuranceLockup.Amount) } k.setInsuranceLockup(ctx, delAddr, valAddr, coveredAmount) } return nil } ================================================ FILE: x/tier/keeper/lockup_test.go ================================================ package keeper import ( "errors" "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) func TestSetAndGetLockup(t *testing.T) { k, ctx := setupKeeper(t) now := time.Now() creationHeight := int64(10) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) ctx = ctx.WithBlockHeight(creationHeight).WithBlockTime(now) k.setLockup(ctx, delAddr, valAddr, amount) store := k.GetAllLockups(ctx) require.Len(t, store, 1) lockup := store[0] require.Equal(t, delAddr.String(), lockup.DelegatorAddress) require.Equal(t, valAddr.String(), lockup.ValidatorAddress) require.Equal(t, amount, lockup.Amount) } func TestAddLockup(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(500) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, amount) require.NoError(t, err) lockedAmt := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, amount, lockedAmt) } func TestSubtractLockup(t *testing.T) { k, ctx := setupKeeper(t) lockupAmount := math.NewInt(1000) partialSubtractAmount := math.NewInt(500) invalidSubtractAmount := math.NewInt(2000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, lockupAmount) require.NoError(t, err) // subtract a partial amount err = k.subtractLockup(ctx, delAddr, valAddr, partialSubtractAmount) require.NoError(t, err) lockedAmt := k.GetLockupAmount(ctx, delAddr, valAddr) require.Equal(t, partialSubtractAmount, lockedAmt) // attempt to subtract more than the locked amount err = k.subtractLockup(ctx, delAddr, valAddr, invalidSubtractAmount) require.Error(t, err) // subtract the remaining amount err = k.subtractLockup(ctx, delAddr, valAddr, partialSubtractAmount) require.NoError(t, err) // verify that the lockup has been removed lockedAmt = k.GetLockupAmount(ctx, delAddr, valAddr) require.True(t, lockedAmt.IsZero(), "remaining lockup amount should be zero") require.Nil(t, k.GetLockup(ctx, delAddr, valAddr), "lockup should be removed") } func TestGetAllLockups(t *testing.T) { k, ctx := setupKeeper(t) amount1 := math.NewInt(1000) amount2 := math.NewInt(500) delAddr1, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr1, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr2, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) k.setLockup(ctx, delAddr1, valAddr1, amount1) k.setLockup(ctx, delAddr2, valAddr2, amount2) lockups := k.GetAllLockups(ctx) require.Len(t, lockups, 2) require.Equal(t, delAddr1.String(), lockups[0].DelegatorAddress) require.Equal(t, valAddr1.String(), lockups[0].ValidatorAddress) require.Equal(t, amount1, lockups[0].Amount) require.Equal(t, delAddr2.String(), lockups[1].DelegatorAddress) require.Equal(t, valAddr2.String(), lockups[1].ValidatorAddress) require.Equal(t, amount2, lockups[1].Amount) } func TestGetAllUnlockingLockups(t *testing.T) { k, ctx := setupKeeper(t) creationHeight1 := int64(1) creationHeight2 := int64(2) timestamp1 := time.Date(2006, time.January, 2, 15, 4, 5, 1, time.UTC) timestamp2 := time.Date(2006, time.January, 2, 15, 4, 5, 2, time.UTC) amount1 := math.NewInt(1000) amount2 := math.NewInt(500) delAddr1, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr1, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr2, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) k.SetUnlockingLockup(ctx, delAddr1, valAddr1, creationHeight1, amount1, timestamp1, timestamp1) k.SetUnlockingLockup(ctx, delAddr2, valAddr2, creationHeight2, amount2, timestamp2, timestamp2) unlockingLockups := k.GetAllUnlockingLockups(ctx) require.Len(t, unlockingLockups, 2) require.Equal(t, delAddr1.String(), unlockingLockups[0].DelegatorAddress) require.Equal(t, valAddr1.String(), unlockingLockups[0].ValidatorAddress) require.Equal(t, creationHeight1, unlockingLockups[0].CreationHeight) require.Equal(t, amount1, unlockingLockups[0].Amount) require.Equal(t, timestamp1, unlockingLockups[0].CompletionTime) require.Equal(t, timestamp1, unlockingLockups[0].UnlockTime) require.Equal(t, delAddr2.String(), unlockingLockups[1].DelegatorAddress) require.Equal(t, valAddr2.String(), unlockingLockups[1].ValidatorAddress) require.Equal(t, creationHeight2, unlockingLockups[1].CreationHeight) require.Equal(t, amount2, unlockingLockups[1].Amount) require.Equal(t, timestamp2, unlockingLockups[1].CompletionTime) require.Equal(t, timestamp2, unlockingLockups[1].UnlockTime) } func TestMustIterateLockups(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, amount) require.NoError(t, err) count := 0 k.mustIterateLockups(ctx, func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { require.Equal(t, delAddr.String(), lockup.DelegatorAddress) require.Equal(t, valAddr.String(), lockup.ValidatorAddress) require.Equal(t, amount, lockup.Amount) count++ }) require.Equal(t, 1, count) } func TestMustIterateUnlockingLockups(t *testing.T) { k, ctx := setupKeeper(t) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) k.SetUnlockingLockup(ctx, delAddr, valAddr, 1, amount, time.Time{}, time.Time{}) count := 0 k.mustIterateUnlockingLockups(ctx, func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, lockup types.UnlockingLockup) { require.Equal(t, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", delAddr.String()) require.Equal(t, "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", valAddr.String()) require.Equal(t, creationHeight, lockup.CreationHeight) require.Equal(t, amount, lockup.Amount) count++ }) require.Equal(t, 1, count) } func TestIterateUnlockingLockups(t *testing.T) { k, ctx := setupKeeper(t) timestamp1 := time.Date(2006, time.January, 2, 15, 4, 5, 1, time.UTC) timestamp2 := time.Date(2006, time.January, 2, 15, 4, 5, 2, time.UTC) timestamp3 := time.Date(2006, time.January, 2, 15, 4, 5, 3, time.UTC) timestamp4 := time.Date(2006, time.January, 2, 15, 4, 5, 4, time.UTC) timestamp5 := time.Date(2006, time.January, 2, 15, 4, 5, 5, time.UTC) delAddr1, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr1, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr2, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) ctx = ctx.WithBlockHeight(1) k.SetUnlockingLockup(ctx, delAddr1, valAddr1, ctx.BlockHeight(), math.NewInt(1000), timestamp1, timestamp1) k.SetUnlockingLockup(ctx, delAddr2, valAddr2, ctx.BlockHeight(), math.NewInt(500), timestamp2, timestamp2) ctx = ctx.WithBlockHeight(2) k.SetUnlockingLockup(ctx, delAddr1, valAddr1, ctx.BlockHeight(), math.NewInt(200), timestamp3, timestamp3) ctx = ctx.WithBlockHeight(3) k.SetUnlockingLockup(ctx, delAddr1, valAddr1, ctx.BlockHeight(), math.NewInt(200), timestamp4, timestamp4) ctx = ctx.WithBlockHeight(4) k.SetUnlockingLockup(ctx, delAddr1, valAddr1, ctx.BlockHeight(), math.NewInt(200), timestamp5, timestamp5) unlockingLockupsCount := 0 err = k.iterateUnlockingLockups(ctx, func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, unlockingLockup types.UnlockingLockup) error { require.NotNil(t, delAddr) require.NotNil(t, valAddr) require.True(t, unlockingLockup.Amount.IsPositive()) require.NotZero(t, unlockingLockup.CompletionTime) require.NotZero(t, unlockingLockup.UnlockTime) unlockingLockupsCount++ return nil }) require.NoError(t, err) require.Equal(t, 5, unlockingLockupsCount) err = k.iterateUnlockingLockups(ctx, func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, lockup types.UnlockingLockup) error { return errors.New("not found") }) require.Error(t, err) } func TestTotalAmountByAddr(t *testing.T) { k, ctx := setupKeeper(t) delAddr1, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr1, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr2, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) err = k.AddLockup(ctx, delAddr1, valAddr1, math.NewInt(1000)) require.NoError(t, err) err = k.AddLockup(ctx, delAddr1, valAddr1, math.NewInt(500)) require.NoError(t, err) err = k.AddLockup(ctx, delAddr2, valAddr2, math.NewInt(700)) require.NoError(t, err) totalDel1 := k.totalLockedAmountByAddr(ctx, delAddr1) require.Equal(t, math.NewInt(1500), totalDel1, "delAddr1 should have a total of 1500") totalDel2 := k.totalLockedAmountByAddr(ctx, delAddr2) require.Equal(t, math.NewInt(700), totalDel2, "delAddr2 should have a total of 700") delAddr3, err := sdk.AccAddressFromBech32("source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy") require.NoError(t, err) totalDel3 := k.totalLockedAmountByAddr(ctx, delAddr3) require.True(t, totalDel3.IsZero(), "delAddr3 should have no lockups") } func TestHasLockup(t *testing.T) { k, ctx := setupKeeper(t) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) require.False(t, k.hasLockup(ctx, delAddr, valAddr)) k.AddLockup(ctx, delAddr, valAddr, math.NewInt(100)) require.True(t, k.hasLockup(ctx, delAddr, valAddr)) err = k.subtractLockup(ctx, delAddr, valAddr, math.NewInt(100)) require.NoError(t, err) require.False(t, k.hasLockup(ctx, delAddr, valAddr), "lockup should no longer exist after removing the entire amount") } func TestHasUnlockingLockup(t *testing.T) { k, ctx := setupKeeper(t) creationHeight := int64(1) timestamp := time.Date(2006, time.January, 2, 15, 4, 5, 1, time.UTC) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) require.False(t, k.HasUnlockingLockup(ctx, delAddr, valAddr, int64(1))) k.SetUnlockingLockup(ctx, delAddr, valAddr, creationHeight, math.NewInt(100), timestamp, timestamp) require.True(t, k.HasUnlockingLockup(ctx, delAddr, valAddr, creationHeight)) err = k.subtractUnlockingLockup(ctx, delAddr, valAddr, creationHeight, math.NewInt(100)) require.NoError(t, err) require.False(t, k.HasUnlockingLockup(ctx, delAddr, valAddr, creationHeight)) } func TestGetUnlockingLockup(t *testing.T) { k, ctx := setupKeeper(t) now := time.Now() params := k.GetParams(ctx) epochDuration := *params.EpochDuration creationHeight := int64(10) amount := math.NewInt(300) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) ctx = ctx.WithBlockHeight(creationHeight).WithBlockTime(now) expectedCompletionTime := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) expectedUnlockTime := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) k.SetUnlockingLockup(ctx, delAddr, valAddr, creationHeight, amount, expectedCompletionTime, expectedUnlockTime) unlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup, "unlocking lockup should not be nil") require.Equal(t, amount, unlockingLockup.Amount, "amount should match the one set") require.Equal(t, expectedUnlockTime, unlockingLockup.CompletionTime, "completionTime should match the one set") require.Equal(t, expectedUnlockTime, unlockingLockup.UnlockTime, "unlockTime should match the one set") invalidUnlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight+1) require.Nil(t, invalidUnlockingLockup, "this unlocking lockup does not exist") } func TestGetLockup(t *testing.T) { k, ctx := setupKeeper(t) now := time.Now() creationHeight := int64(10) amount := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) ctx = ctx.WithBlockHeight(creationHeight).WithBlockTime(now) k.setLockup(ctx, delAddr, valAddr, amount) lockup := k.GetLockup(ctx, delAddr, valAddr) require.NotNil(t, lockup, "lockup should exist") require.Equal(t, delAddr.String(), lockup.DelegatorAddress, "delegator address should match") require.Equal(t, valAddr.String(), lockup.ValidatorAddress, "validator address should match") require.Equal(t, amount, lockup.Amount, "amount should match") nonExistentValAddr, err := sdk.ValAddressFromBech32("sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f") require.NoError(t, err) nonExistentLockup := k.GetLockup(ctx, delAddr, nonExistentValAddr) require.Nil(t, nonExistentLockup, "lockup should not exist for the given validator") } func TestSubtractUnlockingLockup(t *testing.T) { k, ctx := setupKeeper(t) params := k.GetParams(ctx) epochDuration := *params.EpochDuration unlockingLockupAmount := math.NewInt(1000) cancelUnlockAmount := math.NewInt(500) cancelUnlockAmount2 := math.NewInt(2000) creationHeight := int64(10) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) ctx = ctx.WithBlockHeight(creationHeight).WithBlockTime(time.Now()) expectedCompletionTime := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) expectedUnlockTime := ctx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) k.SetUnlockingLockup(ctx, delAddr, valAddr, creationHeight, unlockingLockupAmount, expectedCompletionTime, expectedUnlockTime) // subtract partial amount err = k.subtractUnlockingLockup(ctx, delAddr, valAddr, creationHeight, cancelUnlockAmount) require.NoError(t, err) unlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.NotNil(t, unlockingLockup) require.Equal(t, cancelUnlockAmount, unlockingLockup.Amount) require.Equal(t, expectedCompletionTime, unlockingLockup.CompletionTime) require.Equal(t, expectedUnlockTime, unlockingLockup.UnlockTime) // try to subtract more than the locked amount err = k.subtractUnlockingLockup(ctx, delAddr, valAddr, creationHeight, cancelUnlockAmount2) require.Error(t, err) // subtract remaining amount err = k.subtractUnlockingLockup(ctx, delAddr, valAddr, creationHeight, cancelUnlockAmount) require.NoError(t, err) invalidUnlockingLockup := k.GetUnlockingLockup(ctx, delAddr, valAddr, creationHeight) require.Nil(t, invalidUnlockingLockup) } func TestSetAndGetTotalLockupsAmount(t *testing.T) { k, ctx := setupKeeper(t) total := k.GetTotalLockupsAmount(ctx) require.True(t, total.IsZero(), "Initial total lockups amount should be zero") expectedTotal := math.NewInt(1000) err := k.setTotalLockupsAmount(ctx, expectedTotal) require.NoError(t, err, "Setting total lockups amount should not fail") total = k.GetTotalLockupsAmount(ctx) require.Equal(t, expectedTotal, total, "Total lockups amount should be 1000") } func TestAddLockupUpdatesTotalLockups(t *testing.T) { k, ctx := setupKeeper(t) amount1 := math.NewInt(500) amount2 := math.NewInt(1000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, amount1) require.NoError(t, err, "Adding first lockup should not fail") total := k.GetTotalLockupsAmount(ctx) require.Equal(t, amount1, total, "Total lockups amount should be 500") err = k.AddLockup(ctx, delAddr, valAddr, amount2) require.NoError(t, err, "Adding another lockup should not fail") total = k.GetTotalLockupsAmount(ctx) require.Equal(t, amount1.Add(amount2), total, "Total lockups amount should be 1500") } func TestSubtractLockupUpdatesTotalLockups(t *testing.T) { k, ctx := setupKeeper(t) initialAmount := math.NewInt(5000) subtractAmount := math.NewInt(1500) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, initialAmount) require.NoError(t, err, "Adding lockup should not fail") total := k.GetTotalLockupsAmount(ctx) require.Equal(t, initialAmount, total, "Total lockups amount should be 5000") err = k.subtractLockup(ctx, delAddr, valAddr, subtractAmount) require.NoError(t, err, "Subtracting lockup should not fail") total = k.GetTotalLockupsAmount(ctx) require.Equal(t, initialAmount.Sub(subtractAmount), total, "Total lockups amount should be 3500") } func TestRemoveLockupUpdatesTotalLockups(t *testing.T) { k, ctx := setupKeeper(t) initialAmount := math.NewInt(5000) subtractAmount := math.NewInt(5000) delAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) err = k.AddLockup(ctx, delAddr, valAddr, initialAmount) require.NoError(t, err, "Adding lockup should not fail") total := k.GetTotalLockupsAmount(ctx) require.Equal(t, initialAmount, total, "Total lockups amount should be 5000") err = k.subtractLockup(ctx, delAddr, valAddr, subtractAmount) require.NoError(t, err, "Subtracting lockup should not fail") total = k.GetTotalLockupsAmount(ctx) require.Equal(t, math.ZeroInt(), total, "Total lockups amount should be 0") } ================================================ FILE: x/tier/keeper/main_test.go ================================================ package keeper_test import ( "os" "testing" "github.com/sourcenetwork/sourcehub/app" ) func TestMain(m *testing.M) { app.SetConfig(true) os.Exit(m.Run()) } ================================================ FILE: x/tier/keeper/msg_add_user_subscription_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgAddUserSubscription(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) user1Did := "did:key:alice" user2Did := "did:key:bob" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) validAmount := uint64(100) zeroAmount := uint64(0) testCases := []struct { name string input *types.MsgAddUserSubscription expErr bool expErrMsg string }{ { name: "valid add user subscription", input: &types.MsgAddUserSubscription{ Developer: validDeveloperAddr, UserDid: user1Did, Amount: validAmount, Period: 30, }, expErr: false, }, { name: "valid add user subscription with zero period", input: &types.MsgAddUserSubscription{ Developer: validDeveloperAddr, UserDid: user2Did, Amount: validAmount, Period: 0, }, expErr: true, expErrMsg: "invalid subscription period", }, { name: "invalid developer address", input: &types.MsgAddUserSubscription{ Developer: "invalid-developer-address", UserDid: user1Did, Amount: validAmount, Period: 30, }, expErr: true, expErrMsg: "delegator address", }, { name: "invalid user did", input: &types.MsgAddUserSubscription{ Developer: validDeveloperAddr, UserDid: "", Amount: validAmount, Period: 30, }, expErr: true, expErrMsg: "invalid DID", }, { name: "zero amount", input: &types.MsgAddUserSubscription{ Developer: validDeveloperAddr, UserDid: user1Did, Amount: zeroAmount, Period: 30, }, expErr: true, expErrMsg: "invalid amount", }, { name: "non-existent developer", input: &types.MsgAddUserSubscription{ Developer: "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", UserDid: user1Did, Amount: validAmount, Period: 30, }, expErr: true, expErrMsg: "add subscription", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.AddUserSubscription(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) developerAddr := sdk.MustAccAddressFromBech32(tc.input.Developer) subscription := k.GetUserSubscription(sdkCtx, developerAddr, tc.input.UserDid) require.NotNil(t, subscription, "User subscription should exist after creation") require.Equal(t, tc.input.Amount, subscription.CreditAmount, "Amount should match input") require.Equal(t, tc.input.Period, subscription.Period, "Period should match input") } }) } } func TestMsgAddUserSubscription_DuplicateSubscription(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) userDid := "did:key:alice" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) validAmount := uint64(100) msg := &types.MsgAddUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, Amount: validAmount, Period: 30, } resp, err := ms.AddUserSubscription(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) resp, err = ms.AddUserSubscription(sdkCtx, msg) require.Error(t, err) require.Contains(t, err.Error(), "add subscription") } func TestMsgAddUserSubscription_MultipleDifferentUsers(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) user1Did := "did:key:alice" user2Did := "did:key:bob" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) validAmount := uint64(100) msg1 := &types.MsgAddUserSubscription{ Developer: validDeveloperAddr, UserDid: user1Did, Amount: validAmount, Period: 30, } resp, err := ms.AddUserSubscription(sdkCtx, msg1) require.NoError(t, err) require.NotNil(t, resp) msg2 := &types.MsgAddUserSubscription{ Developer: validDeveloperAddr, UserDid: user2Did, Amount: uint64(200), Period: 60, } resp, err = ms.AddUserSubscription(sdkCtx, msg2) require.NoError(t, err) require.NotNil(t, resp) subscription1 := k.GetUserSubscription(sdkCtx, developerAddr, user1Did) require.NotNil(t, subscription1) require.Equal(t, validAmount, subscription1.CreditAmount) require.Equal(t, uint64(30), subscription1.Period) subscription2 := k.GetUserSubscription(sdkCtx, developerAddr, user2Did) require.NotNil(t, subscription2) require.Equal(t, uint64(200), subscription2.CreditAmount) require.Equal(t, uint64(60), subscription2.Period) } ================================================ FILE: x/tier/keeper/msg_cancel_unlocking_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) type TestCase struct { name string input *types.MsgCancelUnlocking expErr bool expErrMsg string expectedAmount math.Int } func runMsgTestCase(t *testing.T, tc TestCase, k keeper.Keeper, ms types.MsgServer, initState func() sdk.Context, delAddress sdk.AccAddress, valAddress sdk.ValAddress) { ctx := initState() err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.CancelUnlocking(ctx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp, "Response should not be nil for valid cancel unlocking") lockup := k.GetLockup(ctx, delAddress, valAddress) require.NotNil(t, lockup, "Lockup should not be nil after cancel unlocking") require.Equal(t, tc.expectedAmount, lockup.Amount, "Lockup amount should match expected after cancel unlocking") } } func TestMsgCancelUnlocking(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) epoch := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: sdkCtx.BlockTime().Add(-5 * time.Minute), Duration: 5 * time.Minute, } k.GetEpochsKeeper().SetEpochInfo(ctx, epoch) validCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(100)) validCoinRounded := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(100).Sub(math.OneInt())) partialCancelCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(50)) excessCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(500)) zeroCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.ZeroInt()) negativeAmount := math.NewInt(-100) initialDelegatorBalance := math.NewInt(2000) initialValidatorBalance := math.NewInt(1000) delAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" valAddr := "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" delAddress, err := sdk.AccAddressFromBech32(delAddr) require.NoError(t, err) valAddress, err := sdk.ValAddressFromBech32(valAddr) require.NoError(t, err) initState := func() sdk.Context { ctx, _ := sdkCtx.CacheContext() keepertest.InitializeDelegator(t, &k, ctx, delAddress, initialDelegatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddress, initialValidatorBalance) err = k.Lock(ctx, delAddress, valAddress, validCoin.Amount) require.NoError(t, err) _, _, _, err = k.Unlock(ctx, delAddress, valAddress, validCoin.Amount) require.NoError(t, err) return ctx } testCases := []TestCase{ { name: "invalid stake amount (zero)", input: &types.MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, CreationHeight: 1, Stake: zeroCoin, }, expErr: true, expErrMsg: "invalid amount", }, { name: "invalid stake amount (negative)", input: &types.MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, CreationHeight: 1, Stake: sdk.Coin{ Denom: appparams.DefaultBondDenom, Amount: negativeAmount, }, }, expErr: true, expErrMsg: "invalid amount", }, { name: "excess unlocking amount", input: &types.MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, CreationHeight: 1, Stake: excessCoin, }, expErr: true, expErrMsg: "invalid amount", }, { name: "non-existent unlocking", input: &types.MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, CreationHeight: 100, Stake: validCoin, }, expErr: true, expErrMsg: stakingtypes.ErrNoUnbondingDelegation.Error(), }, { name: "invalid delegator address", input: &types.MsgCancelUnlocking{ DelegatorAddress: "invalid-address", ValidatorAddress: valAddr, CreationHeight: 1, Stake: validCoin, }, expErr: true, expErrMsg: "delegator address", }, { name: "invalid validator address", input: &types.MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: "invalid-validator-address", CreationHeight: 1, Stake: validCoin, }, expErr: true, expErrMsg: "validator address", }, { name: "valid cancel unlocking (partial)", input: &types.MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, CreationHeight: 1, Stake: partialCancelCoin, }, expErr: false, expectedAmount: validCoin.Amount.Sub(partialCancelCoin.Amount), }, { name: "valid cancel unlocking (full)", input: &types.MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, CreationHeight: 1, Stake: validCoinRounded, }, expErr: false, expectedAmount: validCoinRounded.Amount, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { runMsgTestCase(t, tc, k, ms, initState, delAddress, valAddress) }) } } ================================================ FILE: x/tier/keeper/msg_create_developer_test.go ================================================ package keeper_test import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgCreateDeveloper(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" testCases := []struct { name string input *types.MsgCreateDeveloper expErr bool expErrMsg string }{ { name: "valid create developer with auto lock enabled", input: &types.MsgCreateDeveloper{ Developer: validDeveloperAddr, AutoLockEnabled: true, }, expErr: false, }, { name: "valid create developer with auto lock disabled", input: &types.MsgCreateDeveloper{ Developer: validDeveloperAddr, AutoLockEnabled: false, }, expErr: false, }, { name: "invalid developer address", input: &types.MsgCreateDeveloper{ Developer: "invalid-developer-address", AutoLockEnabled: true, }, expErr: true, expErrMsg: "delegator address", }, { name: "empty developer address", input: &types.MsgCreateDeveloper{ Developer: "", AutoLockEnabled: true, }, expErr: true, expErrMsg: "delegator address", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { k, ms, ctx = setupMsgServer(t) sdkCtx = sdk.UnwrapSDKContext(ctx) require.NoError(t, k.SetParams(ctx, p)) err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.CreateDeveloper(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) developerAddr := sdk.MustAccAddressFromBech32(tc.input.Developer) developer := k.GetDeveloper(sdkCtx, developerAddr) require.NotNil(t, developer, "Developer should exist after creation") require.Equal(t, tc.input.AutoLockEnabled, developer.AutoLockEnabled, "AutoLockEnabled should match input") } }) } } func TestMsgCreateDeveloper_DuplicateDeveloper(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" msg := &types.MsgCreateDeveloper{ Developer: validDeveloperAddr, AutoLockEnabled: true, } resp, err := ms.CreateDeveloper(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) resp, err = ms.CreateDeveloper(sdkCtx, msg) require.Error(t, err) require.Contains(t, err.Error(), "create developer") } ================================================ FILE: x/tier/keeper/msg_lock_auto_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgLockAuto(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) epoch := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: sdkCtx.BlockTime().Add(-5 * time.Minute), Duration: 5 * time.Minute, } k.GetEpochsKeeper().SetEpochInfo(ctx, epoch) validCoin1 := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(100)) validCoin2 := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(3000)) zeroCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.ZeroInt()) negativeAmount := math.NewInt(-1000) initialDelegatorBalance := math.NewInt(2000) initialValidatorBalance := math.NewInt(1000) delAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" valAddr1 := "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" valAddr2 := "sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f" delAddress, err := sdk.AccAddressFromBech32(delAddr) require.NoError(t, err) valAddress1, err := sdk.ValAddressFromBech32(valAddr1) require.NoError(t, err) valAddress2, err := sdk.ValAddressFromBech32(valAddr2) require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, delAddress, initialDelegatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddress1, initialValidatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddress2, initialValidatorBalance) testCases := []struct { name string input *types.MsgLockAuto expErr bool expErrMsg string }{ { name: "valid lock auto", input: &types.MsgLockAuto{ DelegatorAddress: delAddr, Stake: validCoin1, }, expErr: false, }, { name: "insufficient funds", input: &types.MsgLockAuto{ DelegatorAddress: delAddr, Stake: validCoin2, }, expErr: true, expErrMsg: "insufficient funds", }, { name: "invalid stake amount (zero)", input: &types.MsgLockAuto{ DelegatorAddress: delAddr, Stake: zeroCoin, }, expErr: true, expErrMsg: "invalid amount", }, { name: "invalid stake amount (negative)", input: &types.MsgLockAuto{ DelegatorAddress: delAddr, Stake: sdk.Coin{ Denom: appparams.DefaultBondDenom, Amount: negativeAmount, }, }, expErr: true, expErrMsg: "invalid amount", }, { name: "invalid delegator address", input: &types.MsgLockAuto{ DelegatorAddress: "invalid-delegator-address", Stake: validCoin1, }, expErr: true, expErrMsg: "delegator address", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.LockAuto(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) require.NotEmpty(t, resp.ValidatorAddress) // Verify the response contains a valid validator address _, err := sdk.ValAddressFromBech32(resp.ValidatorAddress) require.NoError(t, err) // Verify it's one of the bonded validators require.True(t, resp.ValidatorAddress == valAddr1 || resp.ValidatorAddress == valAddr2) } }) } } // TestMsgLockAutoValidatorSelection tests the validator selection logic in LockAuto. func TestMsgLockAutoValidatorSelection(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) epoch := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: sdkCtx.BlockTime().Add(-5 * time.Minute), Duration: 5 * time.Minute, } k.GetEpochsKeeper().SetEpochInfo(ctx, epoch) delAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" valAddr1 := "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" valAddr2 := "sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f" delAddress, err := sdk.AccAddressFromBech32(delAddr) require.NoError(t, err) valAddress1, err := sdk.ValAddressFromBech32(valAddr1) require.NoError(t, err) valAddress2, err := sdk.ValAddressFromBech32(valAddr2) require.NoError(t, err) initialDelegatorBalance := math.NewInt(5000) initialValidatorBalance := math.NewInt(1000) keepertest.InitializeDelegator(t, &k, sdkCtx, delAddress, initialDelegatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddress1, initialValidatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddress2, initialValidatorBalance) t.Run("first lock selects validator with smallest tier module delegation", func(t *testing.T) { // First lock should select validator with smallest delegation from tier module // Both validators have 0 delegation from tier module initially resp, err := ms.LockAuto(sdkCtx, &types.MsgLockAuto{ DelegatorAddress: delAddr, Stake: sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(100)), }) require.NoError(t, err) require.NotNil(t, resp) firstSelectedVal := resp.ValidatorAddress require.True(t, firstSelectedVal == valAddr1 || firstSelectedVal == valAddr2) // Verify lockup was created firstValAddr, err := sdk.ValAddressFromBech32(firstSelectedVal) require.NoError(t, err) lockup := k.GetLockup(ctx, delAddress, firstValAddr) require.NotNil(t, lockup) require.Equal(t, math.NewInt(100), lockup.Amount) }) t.Run("second lock to same developer selects validator with smallest existing lockup", func(t *testing.T) { // Lock 200 more, should go to the same validator as first lock (smallest existing lockup) resp, err := ms.LockAuto(sdkCtx, &types.MsgLockAuto{ DelegatorAddress: delAddr, Stake: sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(200)), }) require.NoError(t, err) require.NotNil(t, resp) // Get the first selected validator by checking both possible validators var firstSelectedVal sdk.ValAddress lockup1 := k.GetLockup(ctx, delAddress, valAddress1) lockup2 := k.GetLockup(ctx, delAddress, valAddress2) if lockup1 != nil && lockup2 == nil { firstSelectedVal = valAddress1 } else if lockup2 != nil && lockup1 == nil { firstSelectedVal = valAddress2 } else if lockup1 != nil && lockup2 != nil { // Both have lockups, find the one with smaller amount (from first lock) if lockup1.Amount.LT(lockup2.Amount) { firstSelectedVal = valAddress1 } else { firstSelectedVal = valAddress2 } } // Second lock should go to same validator (it had the smallest lockup) secondValAddr, err := sdk.ValAddressFromBech32(resp.ValidatorAddress) require.NoError(t, err) require.True(t, secondValAddr.Equals(firstSelectedVal)) // Verify lockup was updated lockup := k.GetLockup(ctx, delAddress, secondValAddr) require.NotNil(t, lockup) require.Equal(t, math.NewInt(300), lockup.Amount) // 100 + 200 }) t.Run("lock to different validator then select smallest for third lock", func(t *testing.T) { // Find which validator has the existing lockup lockup1 := k.GetLockup(ctx, delAddress, valAddress1) lockup2 := k.GetLockup(ctx, delAddress, valAddress2) var existingVal, otherVal sdk.ValAddress if lockup1 != nil && lockup2 == nil { existingVal = valAddress1 otherVal = valAddress2 } else if lockup2 != nil && lockup1 == nil { existingVal = valAddress2 otherVal = valAddress1 } else { // If both have lockups, find the smaller one if lockup1.Amount.LT(lockup2.Amount) { existingVal = valAddress1 otherVal = valAddress2 } else { existingVal = valAddress2 otherVal = valAddress1 } } // Lock a large amount to the other validator manually err = k.Lock(ctx, delAddress, otherVal, math.NewInt(500)) require.NoError(t, err) // Now auto lock should select the validator with smallest lockup (300 < 500) resp, err := ms.LockAuto(sdkCtx, &types.MsgLockAuto{ DelegatorAddress: delAddr, Stake: sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(50)), }) require.NoError(t, err) require.NotNil(t, resp) // Should select the validator with 300 (existing one) selectedVal, err := sdk.ValAddressFromBech32(resp.ValidatorAddress) require.NoError(t, err) require.True(t, selectedVal.Equals(existingVal)) // Verify the lockup amount lockup := k.GetLockup(ctx, delAddress, existingVal) require.NotNil(t, lockup) require.Equal(t, math.NewInt(350), lockup.Amount) // 300 + 50 }) } ================================================ FILE: x/tier/keeper/msg_lock_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgLock(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) epoch := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: sdkCtx.BlockTime().Add(-5 * time.Minute), Duration: 5 * time.Minute, } k.GetEpochsKeeper().SetEpochInfo(ctx, epoch) validCoin1 := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(100)) validCoin2 := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(3000)) zeroCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.ZeroInt()) negativeAmount := math.NewInt(-1000) initialDelegatorBalance := math.NewInt(2000) initialValidatorBalance := math.NewInt(1000) delAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" valAddr := "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" delAddress, err := sdk.AccAddressFromBech32(delAddr) require.NoError(t, err) valAddress, err := sdk.ValAddressFromBech32(valAddr) require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, delAddress, initialDelegatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddress, initialValidatorBalance) testCases := []struct { name string input *types.MsgLock expErr bool expErrMsg string }{ { name: "valid lock", input: &types.MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: validCoin1, }, expErr: false, }, { name: "insufficient funds", input: &types.MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: validCoin2, }, expErr: true, expErrMsg: "insufficient funds", }, { name: "invalid stake amount (zero)", input: &types.MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: zeroCoin, }, expErr: true, expErrMsg: "invalid amount", }, { name: "invalid stake amount (negative)", input: &types.MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: sdk.Coin{ Denom: appparams.DefaultBondDenom, Amount: negativeAmount, }, }, expErr: true, expErrMsg: "invalid amount", }, { name: "invalid delegator address", input: &types.MsgLock{ DelegatorAddress: "invalid-delegator-address", ValidatorAddress: valAddr, Stake: validCoin1, }, expErr: true, expErrMsg: "delegator address", }, { name: "invalid validator address", input: &types.MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: "invalid-validator-address", Stake: validCoin1, }, expErr: true, expErrMsg: "validator address", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } _, err = ms.Lock(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } ================================================ FILE: x/tier/keeper/msg_redelegate_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgRedelegate(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) epoch := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: sdkCtx.BlockTime().Add(-5 * time.Minute), Duration: 5 * time.Minute, } k.GetEpochsKeeper().SetEpochInfo(ctx, epoch) validCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(100)) zeroCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.ZeroInt()) negativeAmount := math.NewInt(-100) initialDelegatorBalance := math.NewInt(2000) initialSrcValidatorBalance := math.NewInt(1000) initialDstValidatorBalance := math.NewInt(500) delAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" srcValAddr := "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" dstValAddr := "sourcevaloper13fj7t2yptf9k6ad6fv38434znzay4s4pjk0r4f" delAddress, err := sdk.AccAddressFromBech32(delAddr) require.NoError(t, err) srcValAddress, err := sdk.ValAddressFromBech32(srcValAddr) require.NoError(t, err) dstValAddress, err := sdk.ValAddressFromBech32(dstValAddr) require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, delAddress, initialDelegatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, srcValAddress, initialSrcValidatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, dstValAddress, initialDstValidatorBalance) // lock some tokens to test redelegate logic err = k.Lock(ctx, delAddress, srcValAddress, validCoin.Amount) require.NoError(t, err) stakingParams, err := k.GetStakingKeeper().(*stakingkeeper.Keeper).GetParams(ctx) require.NoError(t, err) // expectedCompletionTime should match the default staking unbonding time (e.g. 21 days) expectedCompletionTime := sdkCtx.BlockTime().Add(stakingParams.UnbondingTime) testCases := []struct { name string input *types.MsgRedelegate expErr bool expErrMsg string }{ { name: "valid redelegate", input: &types.MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: srcValAddr, DstValidatorAddress: dstValAddr, Stake: validCoin, }, expErr: false, }, { name: "insufficient lockup", input: &types.MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: srcValAddr, DstValidatorAddress: dstValAddr, Stake: sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(500)), }, expErr: true, expErrMsg: "subtract lockup from source validator", }, { name: "invalid stake amount (zero)", input: &types.MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: srcValAddr, DstValidatorAddress: dstValAddr, Stake: zeroCoin, }, expErr: true, expErrMsg: "invalid amount", }, { name: "invalid stake amount (negative)", input: &types.MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: srcValAddr, DstValidatorAddress: dstValAddr, Stake: sdk.Coin{ Denom: appparams.DefaultBondDenom, Amount: negativeAmount, }, }, expErr: true, expErrMsg: "invalid amount", }, { name: "non-existent lockup", input: &types.MsgRedelegate{ DelegatorAddress: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", SrcValidatorAddress: srcValAddr, DstValidatorAddress: dstValAddr, Stake: validCoin, }, expErr: true, expErrMsg: "subtract lockup from source validator", }, { name: "source and destination validator are the same", input: &types.MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: srcValAddr, DstValidatorAddress: srcValAddr, Stake: validCoin, }, expErr: true, expErrMsg: "src and dst validator addresses are the same", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.Redelegate(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) srcLockup := k.GetLockupAmount(sdkCtx, delAddress, srcValAddress) require.Equal(t, math.ZeroInt(), srcLockup, "Source validator lockup should be zero after valid redelegate") dstLockup := k.GetLockupAmount(sdkCtx, delAddress, dstValAddress) require.Equal(t, validCoin.Amount, dstLockup, "Destination validator lockup should equal redelegated amount") require.WithinDuration(t, expectedCompletionTime, resp.CompletionTime, time.Second) } }) } } ================================================ FILE: x/tier/keeper/msg_remove_developer_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgRemoveDeveloper(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) err := k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) testCases := []struct { name string input *types.MsgRemoveDeveloper expErr bool expErrMsg string }{ { name: "valid remove developer", input: &types.MsgRemoveDeveloper{ Developer: validDeveloperAddr, }, expErr: false, }, { name: "invalid developer address", input: &types.MsgRemoveDeveloper{ Developer: "invalid-developer-address", }, expErr: true, expErrMsg: "delegator address", }, { name: "empty developer address", input: &types.MsgRemoveDeveloper{ Developer: "", }, expErr: true, expErrMsg: "delegator address", }, { name: "non-existent developer", input: &types.MsgRemoveDeveloper{ Developer: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", }, expErr: true, expErrMsg: "remove developer", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { if tc.name == "valid remove developer" { developer := k.GetDeveloper(sdkCtx, developerAddr) if developer == nil { err := k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) } } err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.RemoveDeveloper(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) developerAddr := sdk.MustAccAddressFromBech32(tc.input.Developer) developer := k.GetDeveloper(sdkCtx, developerAddr) require.Nil(t, developer, "Developer should not exist after removal") } }) } } func TestMsgRemoveDeveloper_WithSubscriptions(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) userDid := "did:key:alice" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(sdkCtx, developerAddr, true) require.NoError(t, err) amount := uint64(100) err = k.AddUserSubscription(sdkCtx, developerAddr, userDid, amount, 30) require.NoError(t, err) subscription := k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.NotNil(t, subscription) msg := &types.MsgRemoveDeveloper{ Developer: validDeveloperAddr, } resp, err := ms.RemoveDeveloper(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) developer := k.GetDeveloper(sdkCtx, developerAddr) require.Nil(t, developer, "Developer should not exist after removal") subscription = k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.Nil(t, subscription, "User subscriptions should be removed when developer is removed") } func TestMsgRemoveDeveloper_AlreadyRemoved(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) err := k.CreateDeveloper(ctx, developerAddr, true) require.NoError(t, err) err = k.RemoveDeveloper(ctx, developerAddr) require.NoError(t, err) msg := &types.MsgRemoveDeveloper{ Developer: validDeveloperAddr, } resp, err := ms.RemoveDeveloper(sdkCtx, msg) require.Error(t, err) require.Contains(t, err.Error(), "remove developer") require.Nil(t, resp) } ================================================ FILE: x/tier/keeper/msg_remove_user_subscription_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgRemoveUserSubscription(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) userDid := "did:key:alice" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(sdkCtx, developerAddr, true) require.NoError(t, err) amount := uint64(100) err = k.AddUserSubscription(sdkCtx, developerAddr, userDid, amount, 30) require.NoError(t, err) testCases := []struct { name string input *types.MsgRemoveUserSubscription expErr bool expErrMsg string }{ { name: "valid remove user subscription", input: &types.MsgRemoveUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, }, expErr: false, }, { name: "invalid developer address", input: &types.MsgRemoveUserSubscription{ Developer: "invalid-developer-address", UserDid: userDid, }, expErr: true, expErrMsg: "delegator address", }, { name: "empty developer address", input: &types.MsgRemoveUserSubscription{ Developer: "", UserDid: userDid, }, expErr: true, expErrMsg: "delegator address", }, { name: "empty user did", input: &types.MsgRemoveUserSubscription{ Developer: validDeveloperAddr, UserDid: "", }, expErr: true, expErrMsg: "invalid DID", }, { name: "non-existent subscription", input: &types.MsgRemoveUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, }, expErr: true, expErrMsg: "remove user subscription", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { if tc.name == "valid remove user subscription" { subscription := k.GetUserSubscription(sdkCtx, developerAddr, userDid) if subscription == nil { err := k.AddUserSubscription(ctx, developerAddr, userDid, amount, 30) require.NoError(t, err) } } err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.RemoveUserSubscription(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) developerAddr := sdk.MustAccAddressFromBech32(tc.input.Developer) subscription := k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.Nil(t, subscription, "User subscription should not exist after removal") } }) } } func TestMsgRemoveUserSubscription_MultipleSubscriptions(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) user1Did := "did:key:alice" user2Did := "did:key:bob" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(sdkCtx, developerAddr, true) require.NoError(t, err) amount1 := uint64(100) amount2 := uint64(200) err = k.AddUserSubscription(sdkCtx, developerAddr, user1Did, amount1, 30) require.NoError(t, err) err = k.AddUserSubscription(sdkCtx, developerAddr, user2Did, amount2, 60) require.NoError(t, err) subscription1 := k.GetUserSubscription(sdkCtx, developerAddr, user1Did) require.NotNil(t, subscription1) subscription2 := k.GetUserSubscription(sdkCtx, developerAddr, user2Did) require.NotNil(t, subscription2) msg := &types.MsgRemoveUserSubscription{ Developer: validDeveloperAddr, UserDid: user1Did, } resp, err := ms.RemoveUserSubscription(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) subscription1 = k.GetUserSubscription(sdkCtx, developerAddr, user1Did) require.Nil(t, subscription1, "User1's subscription should be removed") subscription2 = k.GetUserSubscription(sdkCtx, developerAddr, user2Did) require.NotNil(t, subscription2, "User2's subscription should still exist") msg.UserDid = user2Did resp, err = ms.RemoveUserSubscription(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) subscription1 = k.GetUserSubscription(sdkCtx, developerAddr, user1Did) require.Nil(t, subscription1, "User1's subscription should be removed") subscription2 = k.GetUserSubscription(sdkCtx, developerAddr, user2Did) require.Nil(t, subscription2, "User2's subscription should be removed") } func TestMsgRemoveUserSubscription_AlreadyRemoved(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) userDid := "did:key:alice" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(5000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(sdkCtx, developerAddr, true) require.NoError(t, err) amount := uint64(100) err = k.AddUserSubscription(sdkCtx, developerAddr, userDid, amount, 30) require.NoError(t, err) err = k.RemoveUserSubscription(sdkCtx, developerAddr, userDid) require.NoError(t, err) msg := &types.MsgRemoveUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, } resp, err := ms.RemoveUserSubscription(sdkCtx, msg) require.Error(t, err) require.Contains(t, err.Error(), "remove user subscription") require.Nil(t, resp) } func TestMsgRemoveUserSubscription_NonExistentDeveloper(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) nonExistentDeveloperAddr := "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy" userDid := "did:key:alice" msg := &types.MsgRemoveUserSubscription{ Developer: nonExistentDeveloperAddr, UserDid: userDid, } resp, err := ms.RemoveUserSubscription(sdkCtx, msg) require.Error(t, err) require.Contains(t, err.Error(), "remove user subscription") require.Nil(t, resp) } ================================================ FILE: x/tier/keeper/msg_server.go ================================================ package keeper import ( "context" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) type msgServer struct { *Keeper } var _ types.MsgServer = &msgServer{} func NewMsgServerImpl(keeper *Keeper) types.MsgServer { return &msgServer{Keeper: keeper} } func (m *msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { authority := m.Keeper.GetAuthority() if msg.Authority != authority { return nil, types.ErrUnauthorized.Wrapf("invalid authority: %s", msg.Authority) } err := msg.Params.Validate() if err != nil { return nil, types.ErrInvalidRequest.Wrapf("invalid params: %s", err) } err = m.Keeper.SetParams(ctx, msg.Params) if err != nil { return nil, types.ErrInvalidRequest.Wrapf("update params: %s", err) } return &types.MsgUpdateParamsResponse{}, nil } func (m *msgServer) Lock(ctx context.Context, msg *types.MsgLock) (*types.MsgLockResponse, error) { // Input validation has been done by ValidateBasic. delAddr := sdk.MustAccAddressFromBech32(msg.DelegatorAddress) valAddr := types.MustValAddressFromBech32(msg.ValidatorAddress) err := m.Keeper.Lock(ctx, delAddr, valAddr, msg.Stake.Amount) if err != nil { return nil, errorsmod.Wrap(err, "lock") } return &types.MsgLockResponse{}, nil } func (m *msgServer) LockAuto(ctx context.Context, msg *types.MsgLockAuto) (*types.MsgLockAutoResponse, error) { // Input validation has been done by ValidateBasic. delAddr := sdk.MustAccAddressFromBech32(msg.DelegatorAddress) valAddr, err := m.Keeper.LockAuto(ctx, delAddr, msg.Stake.Amount) if err != nil { return nil, errorsmod.Wrap(err, "lock auto") } return &types.MsgLockAutoResponse{ValidatorAddress: valAddr.String()}, nil } func (m *msgServer) Unlock(ctx context.Context, msg *types.MsgUnlock) (*types.MsgUnlockResponse, error) { // Input validation has been done by ValidateBasic. delAddr := sdk.MustAccAddressFromBech32(msg.DelegatorAddress) valAddr := types.MustValAddressFromBech32(msg.ValidatorAddress) creationHeight, completionTime, unlockTime, err := m.Keeper.Unlock(ctx, delAddr, valAddr, msg.Stake.Amount) if err != nil { return nil, errorsmod.Wrap(err, "undelegate") } return &types.MsgUnlockResponse{CreationHeight: creationHeight, CompletionTime: completionTime, UnlockTime: unlockTime}, nil } func (m *msgServer) CancelUnlocking(ctx context.Context, msg *types.MsgCancelUnlocking) (*types.MsgCancelUnlockingResponse, error) { // Input validation has been done by ValidateBasic. delAddr := sdk.MustAccAddressFromBech32(msg.DelegatorAddress) valAddr := types.MustValAddressFromBech32(msg.ValidatorAddress) err := m.Keeper.CancelUnlocking(ctx, delAddr, valAddr, msg.CreationHeight, msg.Stake.Amount) if err != nil { return nil, errorsmod.Wrap(err, "cancel unlocking") } return &types.MsgCancelUnlockingResponse{}, nil } func (m *msgServer) Redelegate(ctx context.Context, msg *types.MsgRedelegate) (*types.MsgRedelegateResponse, error) { // Input validation has been done by ValidateBasic. delAddr := sdk.MustAccAddressFromBech32(msg.DelegatorAddress) srcValAddr := types.MustValAddressFromBech32(msg.SrcValidatorAddress) dstValAddr := types.MustValAddressFromBech32(msg.DstValidatorAddress) completionTime, err := m.Keeper.Redelegate(ctx, delAddr, srcValAddr, dstValAddr, msg.Stake.Amount) if err != nil { return nil, errorsmod.Wrap(err, "redelegate") } return &types.MsgRedelegateResponse{CompletionTime: completionTime}, nil } func (m *msgServer) CreateDeveloper(ctx context.Context, msg *types.MsgCreateDeveloper) (*types.MsgCreateDeveloperResponse, error) { // Input validation has been done by ValidateBasic. developerAddr := sdk.MustAccAddressFromBech32(msg.Developer) err := m.Keeper.CreateDeveloper(ctx, developerAddr, msg.AutoLockEnabled) if err != nil { return nil, errorsmod.Wrap(err, "create developer") } return &types.MsgCreateDeveloperResponse{}, nil } func (m *msgServer) UpdateDeveloper(ctx context.Context, msg *types.MsgUpdateDeveloper) (*types.MsgUpdateDeveloperResponse, error) { // Input validation has been done by ValidateBasic. developerAddr := sdk.MustAccAddressFromBech32(msg.Developer) err := m.Keeper.UpdateDeveloper(ctx, developerAddr, msg.AutoLockEnabled) if err != nil { return nil, errorsmod.Wrap(err, "update developer") } return &types.MsgUpdateDeveloperResponse{}, nil } func (m *msgServer) RemoveDeveloper(ctx context.Context, msg *types.MsgRemoveDeveloper) (*types.MsgRemoveDeveloperResponse, error) { // Input validation has been done by ValidateBasic. developerAddr := sdk.MustAccAddressFromBech32(msg.Developer) err := m.Keeper.RemoveDeveloper(ctx, developerAddr) if err != nil { return nil, errorsmod.Wrap(err, "remove developer") } return &types.MsgRemoveDeveloperResponse{}, nil } func (m *msgServer) AddUserSubscription( ctx context.Context, msg *types.MsgAddUserSubscription, ) (*types.MsgAddUserSubscriptionResponse, error) { // Input validation has been done by ValidateBasic. developerAddr := sdk.MustAccAddressFromBech32(msg.Developer) err := m.Keeper.AddUserSubscription(ctx, developerAddr, msg.UserDid, msg.Amount, msg.Period) if err != nil { return nil, errorsmod.Wrap(err, "add subscription") } return &types.MsgAddUserSubscriptionResponse{}, nil } func (m *msgServer) UpdateUserSubscription( ctx context.Context, msg *types.MsgUpdateUserSubscription, ) (*types.MsgUpdateUserSubscriptionResponse, error) { // Input validation has been done by ValidateBasic. developerAddr := sdk.MustAccAddressFromBech32(msg.Developer) err := m.Keeper.UpdateUserSubscription(ctx, developerAddr, msg.UserDid, msg.Amount, msg.Period) if err != nil { return nil, errorsmod.Wrap(err, "update user subscription") } return &types.MsgUpdateUserSubscriptionResponse{}, nil } func (m *msgServer) RemoveUserSubscription( ctx context.Context, msg *types.MsgRemoveUserSubscription, ) (*types.MsgRemoveUserSubscriptionResponse, error) { // Input validation has been done by ValidateBasic. developerAddr := sdk.MustAccAddressFromBech32(msg.Developer) err := m.Keeper.RemoveUserSubscription(ctx, developerAddr, msg.UserDid) if err != nil { return nil, errorsmod.Wrap(err, "remove user subscription") } return &types.MsgRemoveUserSubscriptionResponse{}, nil } ================================================ FILE: x/tier/keeper/msg_server_test.go ================================================ package keeper_test import ( "context" "testing" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func setupMsgServer(t testing.TB) (keeper.Keeper, types.MsgServer, context.Context) { k, ctx := keepertest.TierKeeper(t) return k, keeper.NewMsgServerImpl(&k), ctx } func TestMsgServer(t *testing.T) { k, ms, ctx := setupMsgServer(t) require.NotNil(t, ms) require.NotNil(t, ctx) require.NotEmpty(t, k) } ================================================ FILE: x/tier/keeper/msg_unlock_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" appparams "github.com/sourcenetwork/sourcehub/app/params" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgUnlock(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) epoch := epochstypes.EpochInfo{ Identifier: types.EpochIdentifier, CurrentEpoch: 1, CurrentEpochStartTime: sdkCtx.BlockTime().Add(-5 * time.Minute), Duration: 5 * time.Minute, } k.GetEpochsKeeper().SetEpochInfo(ctx, epoch) validCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(100)) zeroCoin := sdk.NewCoin(appparams.DefaultBondDenom, math.ZeroInt()) negativeAmount := math.NewInt(-100) initialDelegatorBalance := math.NewInt(2000) initialValidatorBalance := math.NewInt(1000) delAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" valAddr := "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm" delAddress, err := sdk.AccAddressFromBech32(delAddr) require.NoError(t, err) valAddress, err := sdk.ValAddressFromBech32(valAddr) require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, delAddress, initialDelegatorBalance) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddress, initialValidatorBalance) // lock some tokens to test the unlock logic err = k.Lock(ctx, delAddress, valAddress, validCoin.Amount) require.NoError(t, err) // expectedUnlockTime should match the SetLockup logic for setting the unlock time params := k.GetParams(ctx) epochDuration := *params.EpochDuration expectedCompletionTime := sdkCtx.BlockTime().Add(time.Hour * 24 * 21) expectedUnlockTime := sdkCtx.BlockTime().Add(epochDuration * time.Duration(params.UnlockingEpochs)) testCases := []struct { name string input *types.MsgUnlock expErr bool expErrMsg string }{ { name: "valid unlock", input: &types.MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: validCoin, }, expErr: false, }, { name: "insufficient lockup", input: &types.MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: sdk.NewCoin(appparams.DefaultBondDenom, math.NewInt(500)), }, expErr: true, expErrMsg: "subtract lockup", }, { name: "invalid stake amount (zero)", input: &types.MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: zeroCoin, }, expErr: true, expErrMsg: "invalid amount", }, { name: "invalid stake amount (negative)", input: &types.MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: sdk.Coin{ Denom: appparams.DefaultBondDenom, Amount: negativeAmount, }, }, expErr: true, expErrMsg: "invalid amount", }, { name: "non-existent lockup", input: &types.MsgUnlock{ DelegatorAddress: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ValidatorAddress: valAddr, Stake: validCoin, }, expErr: true, expErrMsg: "subtract lockup", }, { name: "invalid delegator address", input: &types.MsgUnlock{ DelegatorAddress: "invalid-delegator-address", ValidatorAddress: valAddr, Stake: validCoin, }, expErr: true, expErrMsg: "delegator address", }, { name: "invalid validator address", input: &types.MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: "invalid-validator-address", Stake: validCoin, }, expErr: true, expErrMsg: "validator address", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.Unlock(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) lockup := k.GetLockup(sdkCtx, delAddress, valAddress) require.Nil(t, lockup, "Lockup should be nil after valid unlock") require.WithinDuration(t, expectedCompletionTime, resp.CompletionTime, time.Second) require.WithinDuration(t, expectedUnlockTime, resp.UnlockTime, time.Second) } }) } } ================================================ FILE: x/tier/keeper/msg_update_developer_test.go ================================================ package keeper_test import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgUpdateDeveloper(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) err := k.CreateDeveloper(ctx, developerAddr, false) require.NoError(t, err) testCases := []struct { name string input *types.MsgUpdateDeveloper expErr bool expErrMsg string }{ { name: "valid update developer - enable auto lock", input: &types.MsgUpdateDeveloper{ Developer: validDeveloperAddr, AutoLockEnabled: true, }, expErr: false, }, { name: "valid update developer - disable auto lock", input: &types.MsgUpdateDeveloper{ Developer: validDeveloperAddr, AutoLockEnabled: false, }, expErr: false, }, { name: "invalid developer address", input: &types.MsgUpdateDeveloper{ Developer: "invalid-developer-address", AutoLockEnabled: true, }, expErr: true, expErrMsg: "delegator address", }, { name: "empty developer address", input: &types.MsgUpdateDeveloper{ Developer: "", AutoLockEnabled: true, }, expErr: true, expErrMsg: "delegator address", }, { name: "non-existent developer (should fail)", input: &types.MsgUpdateDeveloper{ Developer: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", AutoLockEnabled: true, }, expErr: true, expErrMsg: "does not exist", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.UpdateDeveloper(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) developerAddr := sdk.MustAccAddressFromBech32(tc.input.Developer) developer := k.GetDeveloper(sdkCtx, developerAddr) require.NotNil(t, developer, "Developer should exist after update") require.Equal(t, tc.input.AutoLockEnabled, developer.AutoLockEnabled, "AutoLockEnabled should match updated value") } }) } } func TestMsgUpdateDeveloper_ToggleAutoLock(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) err := k.CreateDeveloper(ctx, developerAddr, false) require.NoError(t, err) developer := k.GetDeveloper(sdkCtx, developerAddr) require.NotNil(t, developer) require.False(t, developer.AutoLockEnabled) msg := &types.MsgUpdateDeveloper{ Developer: validDeveloperAddr, AutoLockEnabled: true, } resp, err := ms.UpdateDeveloper(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) developer = k.GetDeveloper(sdkCtx, developerAddr) require.NotNil(t, developer) require.True(t, developer.AutoLockEnabled) msg.AutoLockEnabled = false resp, err = ms.UpdateDeveloper(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) developer = k.GetDeveloper(sdkCtx, developerAddr) require.NotNil(t, developer) require.False(t, developer.AutoLockEnabled) } ================================================ FILE: x/tier/keeper/msg_update_params_test.go ================================================ package keeper_test import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgUpdateParams(t *testing.T) { k, ms, ctx := setupMsgServer(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) sdkCtx := sdk.UnwrapSDKContext(ctx) 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: "invalid params", input: &types.MsgUpdateParams{ Authority: k.GetAuthority(), Params: types.Params{}, }, expErr: true, expErrMsg: "invalid params", }, { name: "all good", input: &types.MsgUpdateParams{ Authority: k.GetAuthority(), Params: params, }, expErr: false, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { _, err := ms.UpdateParams(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) } }) } } ================================================ FILE: x/tier/keeper/msg_update_user_subscription_test.go ================================================ package keeper_test import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func TestMsgUpdateUserSubscription(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) userDid := "did:key:alice" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(10000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(sdkCtx, developerAddr, true) require.NoError(t, err) initialAmount := uint64(100) err = k.AddUserSubscription(sdkCtx, developerAddr, userDid, initialAmount, 30) require.NoError(t, err) validAmount := uint64(200) zeroAmount := uint64(0) testCases := []struct { name string input *types.MsgUpdateUserSubscription expErr bool expErrMsg string }{ { name: "valid update user subscription - change amount", input: &types.MsgUpdateUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, Amount: validAmount, Period: 30, }, expErr: false, }, { name: "valid update user subscription - change period", input: &types.MsgUpdateUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, Amount: validAmount, Period: 60, }, expErr: false, }, { name: "valid update user subscription - change both", input: &types.MsgUpdateUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, Amount: uint64(300), Period: 90, }, expErr: false, }, { name: "invalid developer address", input: &types.MsgUpdateUserSubscription{ Developer: "invalid-developer-address", UserDid: userDid, Amount: validAmount, Period: 30, }, expErr: true, expErrMsg: "delegator address", }, { name: "invalid user did", input: &types.MsgUpdateUserSubscription{ Developer: validDeveloperAddr, UserDid: "", Amount: validAmount, Period: 30, }, expErr: true, expErrMsg: "invalid DID", }, { name: "zero amount", input: &types.MsgUpdateUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, Amount: zeroAmount, Period: 30, }, expErr: true, expErrMsg: "invalid amount", }, { name: "non-existent subscription", input: &types.MsgUpdateUserSubscription{ Developer: validDeveloperAddr, UserDid: "did:key:nonexistent", Amount: validAmount, Period: 30, }, expErr: true, expErrMsg: "update user subscription", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.ValidateBasic() if err != nil { if tc.expErr { require.Contains(t, err.Error(), tc.expErrMsg) return } t.Fatalf("unexpected error in ValidateBasic: %v", err) } resp, err := ms.UpdateUserSubscription(sdkCtx, tc.input) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) } else { require.NoError(t, err) require.NotNil(t, resp) developerAddr := sdk.MustAccAddressFromBech32(tc.input.Developer) subscription := k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.NotNil(t, subscription, "User subscription should exist after update") require.Equal(t, tc.input.Amount, subscription.CreditAmount, "Amount should match updated value") require.Equal(t, tc.input.Period, subscription.Period, "Period should match updated value") } }) } } func TestMsgUpdateUserSubscription_ProgressiveUpdates(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) userDid := "did:key:alice" validDeveloperAddr := "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9" developerAddr := sdk.MustAccAddressFromBech32(validDeveloperAddr) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) keepertest.InitializeDelegator(t, &k, sdkCtx, developerAddr, math.NewInt(10000)) keepertest.InitializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), sdkCtx, valAddr, math.NewInt(1_000_000)) sdkCtx = sdkCtx.WithBlockHeight(1).WithBlockTime(time.Now()) err = k.CreateDeveloper(sdkCtx, developerAddr, true) require.NoError(t, err) initialAmount := uint64(100) err = k.AddUserSubscription(sdkCtx, developerAddr, userDid, initialAmount, 30) require.NoError(t, err) subscription := k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, initialAmount, subscription.CreditAmount) require.Equal(t, uint64(30), subscription.Period) msg := &types.MsgUpdateUserSubscription{ Developer: validDeveloperAddr, UserDid: userDid, Amount: uint64(200), Period: 30, } resp, err := ms.UpdateUserSubscription(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) subscription = k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, uint64(200), subscription.CreditAmount) require.Equal(t, uint64(30), subscription.Period) msg.Amount = uint64(200) msg.Period = 60 resp, err = ms.UpdateUserSubscription(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) subscription = k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, uint64(200), subscription.CreditAmount) require.Equal(t, uint64(60), subscription.Period) msg.Amount = uint64(500) msg.Period = 90 resp, err = ms.UpdateUserSubscription(sdkCtx, msg) require.NoError(t, err) require.NotNil(t, resp) subscription = k.GetUserSubscription(sdkCtx, developerAddr, userDid) require.NotNil(t, subscription) require.Equal(t, uint64(500), subscription.CreditAmount) require.Equal(t, uint64(90), subscription.Period) } func TestMsgUpdateUserSubscription_NonExistentDeveloper(t *testing.T) { k, ms, ctx := setupMsgServer(t) sdkCtx := sdk.UnwrapSDKContext(ctx) p := types.DefaultParams() require.NoError(t, k.SetParams(ctx, p)) nonExistentDeveloperAddr := "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy" userDid := "did:key:alice" validAmount := uint64(100) msg := &types.MsgUpdateUserSubscription{ Developer: nonExistentDeveloperAddr, UserDid: userDid, Amount: validAmount, Period: 30, } resp, err := ms.UpdateUserSubscription(sdkCtx, msg) require.Error(t, err) require.Contains(t, err.Error(), "update user subscription") require.Nil(t, resp) } ================================================ FILE: x/tier/keeper/params.go ================================================ package keeper import ( "context" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/runtime" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // GetParams get all parameters as types.Params func (k *Keeper) GetParams(ctx context.Context) (params types.Params) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.ParamsKey) if bz == nil { return params } k.cdc.MustUnmarshal(bz, ¶ms) return params } // SetParams set the params func (k *Keeper) SetParams(ctx context.Context, params types.Params) error { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz, err := k.cdc.Marshal(¶ms) if err != nil { return errorsmod.Wrapf(err, "marshal params") } store.Set(types.ParamsKey, bz) return nil } ================================================ FILE: x/tier/keeper/params_test.go ================================================ package keeper_test import ( "testing" "github.com/stretchr/testify/require" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" ) func TestGetParams(t *testing.T) { k, ctx := keepertest.TierKeeper(t) params := k.GetParams(ctx) require.NoError(t, k.SetParams(ctx, params)) require.EqualValues(t, params, k.GetParams(ctx)) } ================================================ FILE: x/tier/keeper/rewards.go ================================================ package keeper import ( "context" "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sourcenetwork/sourcehub/app/metrics" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // processRewards processes block rewards every ProcessRewardsInterval blocks. // 2% of the claimed rewards is sent to the developer pool (DeveloperPoolFee). // 1% is sent to the insurance pool (InsurancePoolFee) if insurance pool balance is below InsurancePoolThreshold, // otherwise the InsurancePoolFee (1%) is also sent to the developer pool. // Remaining 97% of the rewards is burned. func (k *Keeper) processRewards(ctx context.Context) error { params := k.GetParams(ctx) // Process rewards every N blocks height := sdk.UnwrapSDKContext(ctx).BlockHeight() if height%params.ProcessRewardsInterval != 0 { return nil } tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) // Iterate over all active delegations where the tier module account is the delegator // The max number of iterations is the number of validators it has delegated to err := k.GetStakingKeeper().IterateDelegations(ctx, tierModuleAddr, func(index int64, delegation stakingtypes.DelegationI) bool { // Claim rewards for the tier module from this validator valAddr := types.MustValAddressFromBech32(delegation.GetValidatorAddr()) rewards, err := k.GetDistributionKeeper().WithdrawDelegationRewards(ctx, tierModuleAddr, valAddr) if err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, metrics.ProcessRewards, err) k.Logger().Error("Failed to claim tier module staking rewards", "error", err) return false } // Proceed to the next record if there are no rewards if rewards.IsZero() { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, metrics.ProcessRewards, err) k.Logger().Info("No tier module staking rewards in validator", "validator", valAddr) return false } totalAmount := rewards.AmountOf(appparams.DefaultBondDenom) amountToDevPool := totalAmount.MulRaw(params.DeveloperPoolFee).QuoRaw(100) amountToInsurancePool := totalAmount.MulRaw(params.InsurancePoolFee).QuoRaw(100) amountToBurn := totalAmount.Sub(amountToDevPool).Sub(amountToInsurancePool) // Send InsurancePoolFee to the insurance pool if threshold not reached, update amountToDevPool otherwise if !amountToInsurancePool.IsZero() { insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) insurancePoolBalance := k.GetBankKeeper().GetBalance(ctx, insurancePoolAddr, appparams.DefaultBondDenom) if insurancePoolBalance.Amount.Add(amountToInsurancePool).LTE(math.NewInt(params.InsurancePoolThreshold)) { insuranceCoins := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, amountToInsurancePool)) err := k.GetBankKeeper().SendCoinsFromModuleToModule(ctx, types.ModuleName, types.InsurancePoolName, insuranceCoins) if err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, metrics.ProcessRewards, err) k.Logger().Error("Failed to send rewards to the insurance pool", "error", err) return false } else { // Update insurance pool balance gauge telemetry.ModuleSetGauge( types.ModuleName, float32(k.GetBankKeeper().GetBalance(ctx, insurancePoolAddr, appparams.DefaultBondDenom).Amount.Int64()), metrics.InsurancePoolBalance, ) } } else { amountToDevPool = amountToDevPool.Add(amountToInsurancePool) } } // Send DeveloperPoolFee to the developer pool if !amountToDevPool.IsZero() { devPoolCoins := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, amountToDevPool)) err := k.GetBankKeeper().SendCoinsFromModuleToModule(ctx, types.ModuleName, types.DeveloperPoolName, devPoolCoins) if err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, metrics.ProcessRewards, err) k.Logger().Error("Failed to send rewards to the developer pool", "error", err) return false } else { // Update developer pool balance gauge developerPoolAddr := authtypes.NewModuleAddress(types.DeveloperPoolName) telemetry.ModuleSetGauge( types.ModuleName, float32(k.GetBankKeeper().GetBalance(ctx, developerPoolAddr, appparams.DefaultBondDenom).Amount.Int64()), metrics.DeveloperPoolBalance, ) } } // Burn remaining tier module staking rewards if !amountToBurn.IsZero() { burnCoins := sdk.NewCoins(sdk.NewCoin(appparams.DefaultBondDenom, amountToBurn)) err := k.GetBankKeeper().BurnCoins(ctx, types.ModuleName, burnCoins) if err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, metrics.ProcessRewards, err) k.Logger().Error("Failed to burn tier module staking rewards", "error", err) return false } } return false }) return err } ================================================ FILE: x/tier/keeper/slashing.go ================================================ package keeper import ( "context" "fmt" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sourcenetwork/sourcehub/app/metrics" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // handleSlashingEvents monitors and handles slashing events. // In case of double_sign, existing lockup records are updated to reflect changes after slashing. // Otherwise, in addition to updating existing lockup records, slashed tokens are covered via insurance lockups. // Note: beginBlockers in app_config.go must have tier module after slashing for events to be handled correctly. func (k *Keeper) handleSlashingEvents(ctx context.Context) { sdkCtx := sdk.UnwrapSDKContext(ctx) events := sdkCtx.EventManager().Events() for _, event := range events { if event.Type == "slash" { var validatorAddr, reason, slashedAmount string for _, attr := range event.Attributes { switch string(attr.Key) { case "address": validatorAddr = string(attr.Value) case "reason": reason = string(attr.Value) case "burned": slashedAmount = string(attr.Value) } } if reason == slashingtypes.AttributeValueDoubleSign { err := k.handleDoubleSign(ctx, validatorAddr, slashedAmount) if err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, metrics.HandleDoubleSign, err) k.Logger().Error("Failed to handle double sign event", "error", err) } } else { err := k.handleMissingSignature(ctx, validatorAddr, slashedAmount) if err != nil { metrics.ModuleIncrInternalErrorCounter(types.ModuleName, metrics.HandleMissingSignature, err) k.Logger().Error("Failed to handle missing signature event", "error", err) } } } } } // handleDoubleSign adjusts existing lockup records based on the tier module share of the slashed amount. func (k *Keeper) handleDoubleSign(ctx context.Context, validatorAddr string, slashedAmount string) error { tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) valAddr, err := sdk.ValAddressFromBech32(validatorAddr) if err != nil { return err } // Get total slashed amount totalSlashed, err := math.LegacyNewDecFromStr(slashedAmount) if err != nil { return err } if totalSlashed.IsZero() { return fmt.Errorf("Total slashed amount is zero") } // Get the slashed validator validator, err := k.GetStakingKeeper().GetValidator(ctx, valAddr) if err != nil { return err } // Get the total stake of the slashed validator totalStake := validator.Tokens.ToLegacyDec() if totalStake.IsZero() { return fmt.Errorf("No stake for the validator: %s", validatorAddr) } // Get tier module delegation tierDelegation, err := k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) if err != nil { return err } // Get tier module delegation shares tierShares := tierDelegation.Shares if tierShares.IsZero() { return fmt.Errorf("No delegation from the tier module") } // Get tier module stake from the delegation shares tierStake := validator.TokensFromSharesTruncated(tierShares) // Calculate the amount slashed from the tier module stake tierStakeSlashed := totalSlashed.Mul(tierStake.Quo(totalStake)) if tierStakeSlashed.IsZero() { return fmt.Errorf("Tier module slashed amount is zero") } // Get the rate by which every individual lockup record should be adjusted slashingRate := tierStake.Sub(tierStakeSlashed).Quo(tierStake) // Adjust affected lockups based on the slashed amount (no insurance lockups created since coverageRate is 0) return k.adjustLockups(ctx, valAddr, slashingRate, math.LegacyZeroDec()) } // handleMissingSignature adjusts existing lockup records based on the tier module share of the slashed amount // and covers tier module share of the slashed tokens from the insurance pool. func (k *Keeper) handleMissingSignature(ctx context.Context, validatorAddr string, slashedAmount string) error { tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) valAddr, err := sdk.ValAddressFromBech32(validatorAddr) if err != nil { return err } // Get total slashed amount totalSlashed, err := math.LegacyNewDecFromStr(slashedAmount) if err != nil { return err } if totalSlashed.IsZero() { return fmt.Errorf("Total slashed amount is zero") } // Get the slashed validator validator, err := k.GetStakingKeeper().GetValidator(ctx, valAddr) if err != nil { return err } // Get the total stake of the slashed validator totalStake := validator.Tokens.ToLegacyDec() if totalStake.IsZero() { return fmt.Errorf("No stake for the validator: %s", validatorAddr) } // Get tier module delegation tierDelegation, err := k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) if err != nil { return err } // Get tier module delegation shares tierShares := tierDelegation.Shares if tierShares.IsZero() { return fmt.Errorf("No delegation from the tier module") } // Get tier module stake from the delegation shares tierStake := validator.TokensFromSharesTruncated(tierShares) // Calculate tier module share of the slashed amount tierStakeSlashed := totalSlashed.Mul(tierStake.Quo(totalStake)).Ceil().TruncateInt() if tierStakeSlashed.IsZero() { return fmt.Errorf("Tier module slashed amount is zero") } insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) insurancePoolBalance := k.GetBankKeeper().GetBalance(ctx, insurancePoolAddr, appparams.DefaultBondDenom) coveredAmount := tierStakeSlashed // If tierStakeSlashed exceeds insurancePoolBalance, cover as much as there is on the insurance pool balance if insurancePoolBalance.Amount.LT(tierStakeSlashed) { coveredAmount = insurancePoolBalance.Amount } // Delegate covered amount back to the same validator on behalf of the insurance pool module account _, err = k.GetStakingKeeper().Delegate( ctx, insurancePoolAddr, coveredAmount, stakingtypes.Unbonded, validator, true, ) if err != nil { return err } // Calculate the proportional rate to reduce each individual lockup after slashing slashingRate := tierStake.Sub(tierStakeSlashed.ToLegacyDec()).Quo(tierStake) // Calculate the fraction of the original tier stake that is covered by the insurance pool coverageRate := coveredAmount.ToLegacyDec().Quo(tierStake) // Adjust affected lockups based on the slashed amount and create/update associated insurance lockups based on the coverageRate return k.adjustLockups(ctx, valAddr, slashingRate, coverageRate) } ================================================ FILE: x/tier/keeper/slashing_test.go ================================================ package keeper import ( "fmt" "testing" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) func TestHandleSlashingEvents_NoEvent(t *testing.T) { k, ctx := setupKeeper(t) ctx = ctx.WithEventManager(sdk.NewEventManager()) k.handleSlashingEvents(ctx) } func TestHandleSlashingEvents_DoubleSign(t *testing.T) { k, ctx := setupKeeper(t) slashAmount := math.NewInt(10_000) initialDelegatorBalance := math.NewInt(100_000) initialValidatorBalance := math.NewInt(100_000) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) err = k.Lock(ctx, delAddr, valAddr, initialDelegatorBalance) require.NoError(t, err) ctx = ctx.WithEventManager(sdk.NewEventManager()) ctx.EventManager().EmitEvent(sdk.NewEvent( "slash", sdk.NewAttribute("address", valAddr.String()), sdk.NewAttribute("reason", slashingtypes.AttributeValueDoubleSign), sdk.NewAttribute("burned", slashAmount.String()), )) k.handleSlashingEvents(ctx) // initialDelegatorBalance - slashAmount * initialDelegatorBalance / totalStaked // 100_000 - (10_000 * 100_000 / 200_000) = 95_000 expectedTotalLockedAmount := math.NewInt(95_000) totalLockedAmount := k.GetTotalLockupsAmount(ctx) require.Equal(t, expectedTotalLockedAmount, totalLockedAmount) // insured amount should be zero because double_sign events are not covered insuredAmount := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, math.ZeroInt(), insuredAmount) // insurance pool should not have any delegation insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) _, err = k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.Error(t, err) } func TestHandleSlashingEvents_MissingSignature(t *testing.T) { k, ctx := setupKeeper(t) slashAmount := math.NewInt(10_000) insurancePoolBalance := math.NewInt(1_000_000) initialDelegatorBalance := math.NewInt(100_000) initialValidatorBalance := math.NewInt(100_000) delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) mintCoinsToModule(t, &k, ctx, types.InsurancePoolName, insurancePoolBalance) err = k.Lock(ctx, delAddr, valAddr, initialDelegatorBalance) require.NoError(t, err) ctx = ctx.WithEventManager(sdk.NewEventManager()) ctx.EventManager().EmitEvent(sdk.NewEvent( "slash", sdk.NewAttribute("address", valAddr.String()), sdk.NewAttribute("reason", slashingtypes.AttributeValueMissingSignature), sdk.NewAttribute("burned", slashAmount.String()), )) k.handleSlashingEvents(ctx) // initialDelegatorBalance - slashAmount * initialDelegatorBalance / totalStaked // 100_000 - (10_000 * 100_000 / 200_000) = 95_000 expectedTotalLockedAmount := math.NewInt(95_000) totalLockedAmount := k.GetTotalLockupsAmount(ctx) require.Equal(t, expectedTotalLockedAmount, totalLockedAmount) // slashAmount * initialDelegatorBalance / totalStaked // 10_000 * 100_000 / 200_000 = 5_000 expectedInsuredAmount := math.NewInt(5_000) insuredAmount := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, expectedInsuredAmount, insuredAmount) // insurance pool should have correct amount delegated insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) delegation, err := k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.NoError(t, err) require.Equal(t, expectedInsuredAmount, delegation.Shares.RoundInt()) } func TestHandleDoubleSign_MultipleDelegators(t *testing.T) { k, ctx := setupKeeper(t) slashAmount := math.NewInt(10_000) initialDelegatorBalance1 := math.NewInt(60_000) initialDelegatorBalance2 := math.NewInt(40_000) initialDelegatorBalance3 := math.NewInt(100_000) initialValidatorBalance := math.ZeroInt() totalTierStake := initialDelegatorBalance1.Add(initialDelegatorBalance2) delAddr1, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) delAddr3, err := sdk.AccAddressFromBech32("source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, delAddr1, initialDelegatorBalance1) initializeDelegator(t, &k, ctx, delAddr2, initialDelegatorBalance2) initializeDelegator(t, &k, ctx, delAddr3, initialDelegatorBalance3) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) // delAddr1 locks via tier module, will be affected require.NoError(t, k.Lock(ctx, delAddr1, valAddr, initialDelegatorBalance1)) // delAddr2 locks via tier module, will also be affected require.NoError(t, k.Lock(ctx, delAddr2, valAddr, initialDelegatorBalance2)) validator, err := k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) // delAddr3 delegates normally, will not be affected _, err = k.GetStakingKeeper().Delegate(ctx, delAddr3, initialDelegatorBalance3, stakingtypes.Unbonded, validator, true) require.NoError(t, err) ctx = ctx.WithEventManager(sdk.NewEventManager()) ctx.EventManager().EmitEvent(sdk.NewEvent( "slash", sdk.NewAttribute("address", valAddr.String()), sdk.NewAttribute("reason", slashingtypes.AttributeValueDoubleSign), sdk.NewAttribute("burned", slashAmount.String()), )) // handle double sign event require.NoError(t, k.handleDoubleSign(ctx, valAddr.String(), slashAmount.String())) // tier module stake = 100_000, total stake = 200_000, tier share of slash = 5_000 expectedSlashed := math.NewInt(5_000) require.Equal(t, totalTierStake.Sub(expectedSlashed), k.GetTotalLockupsAmount(ctx)) // insured amounts for all delegators should be zero because double_sign events are not covered insuredAmount := k.getInsuranceLockupAmount(ctx, delAddr1, valAddr) require.Equal(t, math.ZeroInt(), insuredAmount) insuredAmount = k.getInsuranceLockupAmount(ctx, delAddr2, valAddr) require.Equal(t, math.ZeroInt(), insuredAmount) insuredAmount = k.getInsuranceLockupAmount(ctx, delAddr3, valAddr) require.Equal(t, math.ZeroInt(), insuredAmount) // insurance pool should not have any delegation insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) _, err = k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.Error(t, err) } func TestHandleMissingSignature_PartialCoverage(t *testing.T) { k, ctx := setupKeeper(t) // slashed amount is greater than insurance pool balance slashAmount := math.NewInt(10_000) insuracePoolBalance := math.NewInt(3_000) initialDelegatorBalance := math.NewInt(100_000) initialValidatorBalance := math.ZeroInt() delAddr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, delAddr, initialDelegatorBalance) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) mintCoinsToModule(t, &k, ctx, types.InsurancePoolName, insuracePoolBalance) err = k.Lock(ctx, delAddr, valAddr, initialDelegatorBalance) require.NoError(t, err) validator, _ := k.GetStakingKeeper().GetValidator(ctx, valAddr) fmt.Println("Validator Tokens:", validator.Tokens) tierModuleAddr := authtypes.NewModuleAddress(types.ModuleName) delegation, _ := k.GetStakingKeeper().GetDelegation(ctx, tierModuleAddr, valAddr) fmt.Println("Tier Shares:", delegation.Shares) fmt.Println("Validator DelegatorShares:", validator.DelegatorShares) err = k.handleMissingSignature(ctx, valAddr.String(), slashAmount.String()) require.NoError(t, err) // slashed amount from tier stake = 10_000 * 100_000 / 100_000 = 10_000 expectedTierSlashed := math.NewInt(10_000) // lockups should be reduced by 10_000 totalLockedAmount := k.GetTotalLockupsAmount(ctx) require.Equal(t, initialDelegatorBalance.Sub(expectedTierSlashed), totalLockedAmount) // insured amount should be equal to insuracePoolBalance (3_000) insuredAmount := k.getInsuranceLockupAmount(ctx, delAddr, valAddr) require.Equal(t, insuracePoolBalance, insuredAmount) // insurance pool delegation should equal to covered amount insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) delegation, err = k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.NoError(t, err) require.Equal(t, insuracePoolBalance, delegation.Shares.RoundInt()) } func TestHandleMissingSignature_MultipleDelegators_PartialCoverage(t *testing.T) { k, ctx := setupKeeper(t) // slashed amount is greater than insurance pool balance slashAmount := math.NewInt(10_000) insurancePoolBalance := math.NewInt(1_000) initialDelegatorBalance1 := math.NewInt(60_000) initialDelegatorBalance2 := math.NewInt(40_000) initialDelegatorBalance3 := math.NewInt(100_000) initialValidatorBalance := math.ZeroInt() totalTierStake := initialDelegatorBalance1.Add(initialDelegatorBalance2) delAddr1, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) delAddr3, err := sdk.AccAddressFromBech32("source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, delAddr1, initialDelegatorBalance1) initializeDelegator(t, &k, ctx, delAddr2, initialDelegatorBalance2) initializeDelegator(t, &k, ctx, delAddr3, initialDelegatorBalance3) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) mintCoinsToModule(t, &k, ctx, types.InsurancePoolName, insurancePoolBalance) // delAddr1 locks via tier module, will be affected require.NoError(t, k.Lock(ctx, delAddr1, valAddr, initialDelegatorBalance1)) // delAddr2 locks via tier module, will also be affected require.NoError(t, k.Lock(ctx, delAddr2, valAddr, initialDelegatorBalance2)) validator, err := k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) // delAddr3 delegates normally, will not be affected _, err = k.GetStakingKeeper().Delegate(ctx, delAddr3, initialDelegatorBalance3, stakingtypes.Unbonded, validator, true) require.NoError(t, err) // handle missing signature event require.NoError(t, k.handleMissingSignature(ctx, valAddr.String(), slashAmount.String())) // tier module stake = 100_000, total stake = 200_000, tier share of slash = 5_000 expectedSlashed := math.NewInt(5_000) require.Equal(t, totalTierStake.Sub(expectedSlashed), k.GetTotalLockupsAmount(ctx)) // insurance lockup for delAddr1 should be 1_000 * 60_000 / 100_000 = 600 expectedInsuredAmount1 := math.NewInt(600) insuredAmount1 := k.getInsuranceLockupAmount(ctx, delAddr1, valAddr) require.Equal(t, expectedInsuredAmount1, insuredAmount1) // insurance lockup for delAddr2 should be 1_000 * 40_000 / 100_000 = 400 expectedInsuredAmount2 := math.NewInt(400) insuredAmount2 := k.getInsuranceLockupAmount(ctx, delAddr2, valAddr) require.Equal(t, expectedInsuredAmount2, insuredAmount2) // no insurance lockup for delAddr3 insuredAmount3 := k.getInsuranceLockupAmount(ctx, delAddr3, valAddr) require.True(t, insuredAmount3.IsZero()) // total insurance pool delegation should be equal to insurancePoolBalance insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) insuranceDelegation, err := k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.NoError(t, err) require.Equal(t, insurancePoolBalance, insuranceDelegation.Shares.RoundInt()) } func TestHandleMissingSignature_MultipleDelegators_FullCoverage(t *testing.T) { k, ctx := setupKeeper(t) slashAmount := math.NewInt(10_000) insurancePoolBalance := math.NewInt(100_000) initialDelegatorBalance1 := math.NewInt(60_000) initialDelegatorBalance2 := math.NewInt(40_000) initialDelegatorBalance3 := math.NewInt(100_000) initialValidatorBalance := math.ZeroInt() totalTierStake := initialDelegatorBalance1.Add(initialDelegatorBalance2) delAddr1, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) delAddr2, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) delAddr3, err := sdk.AccAddressFromBech32("source18jtkvj0995fy7lggqayg2f5syna92ndq5mkuv4") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, delAddr1, initialDelegatorBalance1) initializeDelegator(t, &k, ctx, delAddr2, initialDelegatorBalance2) initializeDelegator(t, &k, ctx, delAddr3, initialDelegatorBalance3) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, initialValidatorBalance) mintCoinsToModule(t, &k, ctx, types.InsurancePoolName, insurancePoolBalance) // delAddr1 locks via tier module, will be affected require.NoError(t, k.Lock(ctx, delAddr1, valAddr, initialDelegatorBalance1)) // delAddr2 locks via tier module, will also be affected require.NoError(t, k.Lock(ctx, delAddr2, valAddr, initialDelegatorBalance2)) validator, err := k.GetStakingKeeper().GetValidator(ctx, valAddr) require.NoError(t, err) // delAddr3 delegates normally, will not be affected _, err = k.GetStakingKeeper().Delegate(ctx, delAddr3, initialDelegatorBalance3, stakingtypes.Unbonded, validator, true) require.NoError(t, err) // handle missing signature event require.NoError(t, k.handleMissingSignature(ctx, valAddr.String(), slashAmount.String())) // tier module stake = 100_000, total stake = 200_000, tier share of slash = 5_000 expectedSlashed := math.NewInt(5_000) require.Equal(t, totalTierStake.Sub(expectedSlashed), k.GetTotalLockupsAmount(ctx)) // insurance lockup for delAddr1 should be 10_000 * 60_000 / 200_000 = 3_000 expectedInsuredAmount1 := math.NewInt(3_000) insuredAmount1 := k.getInsuranceLockupAmount(ctx, delAddr1, valAddr) require.Equal(t, expectedInsuredAmount1, insuredAmount1) // insurance lockup for delAddr2 should be 10_000 * 40_000 / 200_000 = 2_000 expectedInsuredAmount2 := math.NewInt(2_000) insuredAmount2 := k.getInsuranceLockupAmount(ctx, delAddr2, valAddr) require.Equal(t, expectedInsuredAmount2, insuredAmount2) // no insurance lockup for delAddr3 insuredAmount3 := k.getInsuranceLockupAmount(ctx, delAddr3, valAddr) require.True(t, insuredAmount3.IsZero()) // total insurance pool delegation should be equal to expectedSlashed insurancePoolAddr := authtypes.NewModuleAddress(types.InsurancePoolName) insuranceDelegation, err := k.GetStakingKeeper().GetDelegation(ctx, insurancePoolAddr, valAddr) require.NoError(t, err) require.Equal(t, expectedSlashed, insuranceDelegation.Shares.RoundInt()) } ================================================ FILE: x/tier/keeper/subscription.go ================================================ package keeper import ( "context" "fmt" "time" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/app/metrics" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // developerStore returns a prefix store for developer configurations. func (k *Keeper) developerStore(ctx context.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, []byte(types.DeveloperKeyPrefix)) } // GetAllDevelopers returns all developers in the store. func (k *Keeper) GetAllDevelopers(ctx context.Context) []types.Developer { var developers []types.Developer developersCallback := func(developerAddr sdk.AccAddress, developer types.Developer) { developers = append(developers, developer) } k.mustIterateDevelopers(ctx, developersCallback) return developers } // GetDeveloper returns a pointer to existing developer configuration, or nil if not found. func (k *Keeper) GetDeveloper(ctx context.Context, developerAddr sdk.AccAddress) *types.Developer { key := types.DeveloperKey(developerAddr) store := k.developerStore(ctx) b := store.Get(key) if b == nil { return nil } var developer types.Developer k.cdc.MustUnmarshal(b, &developer) return &developer } // SetDeveloper sets a developer configuration in the store. func (k *Keeper) SetDeveloper(ctx context.Context, developerAddr sdk.AccAddress, developer *types.Developer) { key := types.DeveloperKey(developerAddr) b := k.cdc.MustMarshal(developer) store := k.developerStore(ctx) store.Set(key, b) } // removeDeveloper removes existing Developer (developerAddr/). func (k *Keeper) removeDeveloper(ctx context.Context, developerAddr sdk.AccAddress) { key := types.DeveloperKey(developerAddr) store := k.developerStore(ctx) store.Delete(key) } // mustIterateDevelopers iterates through all developers and calls the callback function. func (k *Keeper) mustIterateDevelopers(ctx context.Context, cb func(developerAddr sdk.AccAddress, developer types.Developer)) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, []byte(types.DeveloperKeyPrefix)) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var developer types.Developer k.cdc.MustUnmarshal(iterator.Value(), &developer) developerAddr := types.DeveloperKeyToAddress(iterator.Key()) cb(developerAddr, developer) } } // userSubscriptionStore returns a prefix store for user subscriptions. func (k *Keeper) userSubscriptionStore(ctx context.Context) prefix.Store { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return prefix.NewStore(storeAdapter, []byte(types.UserSubscriptionKeyPrefix)) } // GetAllUserSubscriptions returns all user subscriptions in the store. func (k *Keeper) GetAllUserSubscriptions(ctx context.Context) []types.UserSubscription { var userSubscriptions []types.UserSubscription userSubscriptionsCallback := func(developerAddr sdk.AccAddress, userDid string, userSubscription types.UserSubscription) { userSubscriptions = append(userSubscriptions, userSubscription) } k.mustIterateUserSubscriptions(ctx, userSubscriptionsCallback) return userSubscriptions } // GetUserSubscription returns a pointer to existing user subscription, or nil if not found. func (k *Keeper) GetUserSubscription(ctx context.Context, developerAddr sdk.AccAddress, userDid string) *types.UserSubscription { key := types.UserSubscriptionKey(developerAddr, userDid) store := k.userSubscriptionStore(ctx) b := store.Get(key) if b == nil { return nil } var userSubscription types.UserSubscription k.cdc.MustUnmarshal(b, &userSubscription) return &userSubscription } // SetUserSubscription sets a user subscription in the store based on the UserSubscriptionKey. func (k *Keeper) SetUserSubscription(ctx context.Context, developerAddr sdk.AccAddress, userDid string, userSubscription *types.UserSubscription) { key := types.UserSubscriptionKey(developerAddr, userDid) b := k.cdc.MustMarshal(userSubscription) store := k.userSubscriptionStore(ctx) store.Set(key, b) } // removeUserSubscription removes existing UserSubscription (developerAddr/userDid/). func (k *Keeper) removeUserSubscription(ctx context.Context, developerAddr sdk.AccAddress, userDid string) { key := types.UserSubscriptionKey(developerAddr, userDid) store := k.userSubscriptionStore(ctx) store.Delete(key) } // mustIterateUserSubscriptions iterates through all user subscriptions and calls the callback function. func (k *Keeper) mustIterateUserSubscriptions(ctx context.Context, cb func(developerAddr sdk.AccAddress, userDid string, userSubscription types.UserSubscription)) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, []byte(types.UserSubscriptionKeyPrefix)) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var userSubscription types.UserSubscription k.cdc.MustUnmarshal(iterator.Value(), &userSubscription) developerAddr, userDid := types.UserSubscriptionKeyToAddresses(iterator.Key()) cb(developerAddr, userDid, userSubscription) } } // mustIterateUserSubscriptionsForDeveloper iterates through user subscriptions for a specific developer and calls the callback function. func (k *Keeper) mustIterateUserSubscriptionsForDeveloper(ctx context.Context, developerAddr sdk.AccAddress, cb func(developerAddr sdk.AccAddress, userDid string, userSubscription types.UserSubscription)) { storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store := prefix.NewStore(storeAdapter, []byte(types.UserSubscriptionKeyPrefix)) iterator := storetypes.KVStorePrefixIterator(store, developerAddr.Bytes()) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var userSubscription types.UserSubscription k.cdc.MustUnmarshal(iterator.Value(), &userSubscription) developerAddr, userDid := types.UserSubscriptionKeyToAddresses(iterator.Key()) cb(developerAddr, userDid, userSubscription) } } // checkDeveloperCredits checks if all developers have enough credits compared to total dev granted. // If developer does not have enough credits, we check the auto-lock setting. // If auto-lock is on and developer has enough "uopen", we perform auto-lock. // If auto-lock is off or developer does not have enough "uopen", we log corresponding event. func (k *Keeper) checkDeveloperCredits(ctx context.Context, epochNumber int64) (err error) { start := time.Now() defer func() { metrics.ModuleMeasureSinceWithCounter( types.ModuleName, metrics.CheckDeveloperCredits, start, err, []metrics.Label{ metrics.NewLabel(metrics.Epoch, fmt.Sprintf("%d", epochNumber)), }, ) }() // Track unique developers to avoid processing the same developer multiple times processedDevelopers := make(map[string]bool) k.mustIterateUserSubscriptions(ctx, func(developerAddr sdk.AccAddress, userDid string, userSubscription types.UserSubscription) { if processedDevelopers[developerAddr.String()] { return } processedDevelopers[developerAddr.String()] = true totalGranted, err := k.getTotalDevGranted(ctx, developerAddr) if err != nil { k.logger.Error("failed to get total granted amount", types.AttributeKeyDeveloper, developerAddr.String(), types.AttributeKeyError, err.Error()) return } // Developer has enough credits, no action needed creditBalance := k.bankKeeper.GetBalance(ctx, developerAddr, appparams.MicroCreditDenom) if creditBalance.Amount.GTE(totalGranted) { return } developer := k.GetDeveloper(ctx, developerAddr) sdkCtx := sdk.UnwrapSDKContext(ctx) // Auto-lock is off, log event that developer needs to lock if developer == nil || !developer.AutoLockEnabled { sdkCtx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeDeveloperInsufficientCredits, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyCurrentBalance, creditBalance.Amount.String()), sdk.NewAttribute(types.AttributeKeyTotalGranted, totalGranted.String()), sdk.NewAttribute(types.AttributeKeyAutoLockEnabled, "false"), )) return } // Auto-lock is on, check uopen balance for the actual lock amount lockAmount := totalGranted.Sub(creditBalance.Amount) uopenBalance := k.bankKeeper.GetBalance(ctx, developerAddr, appparams.DefaultBondDenom) if uopenBalance.Amount.LT(lockAmount) { sdkCtx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeDeveloperInsufficientOpenForAutoLock, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyCurrentBalance, creditBalance.Amount.String()), sdk.NewAttribute(types.AttributeKeyTotalGranted, totalGranted.String()), sdk.NewAttribute(types.AttributeKeyUopenBalance, uopenBalance.Amount.String()), sdk.NewAttribute(types.AttributeKeyRequiredLockAmount, lockAmount.String()), )) return } // Enough uopen balance, perform auto-lock err = k.autoLockDeveloperCredits(ctx, developerAddr, developer, lockAmount) if err != nil { sdkCtx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeDeveloperAutoLockFailed, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyError, err.Error()), )) } else { sdkCtx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeDeveloperAutoLockSuccess, sdk.NewAttribute(types.AttributeKeyDeveloper, developerAddr.String()), sdk.NewAttribute(types.AttributeKeyLockAmount, lockAmount.String()), )) } }) return nil } // autoLockDeveloperCredits automatically adds lockups to cover missing credits for a developer. func (k *Keeper) autoLockDeveloperCredits( ctx context.Context, developerAddr sdk.AccAddress, developer *types.Developer, lockAmount math.Int, ) error { if lockAmount.LTE(math.ZeroInt()) { return types.ErrInvalidAmount.Wrap("auto-lock amount must be positive") } // Try to reuse an existing validator lockup for this developer; prefer the largest lockup var ( chosenValAddr sdk.ValAddress found bool maxLockupAmt = math.ZeroInt() ) k.mustIterateLockups(ctx, func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { if !delAddr.Equals(developerAddr) { return } if !found || lockup.Amount.GT(maxLockupAmt) { found = true chosenValAddr = valAddr maxLockupAmt = lockup.Amount } }) if !found { validators, err := k.stakingKeeper.GetAllValidators(ctx) if err != nil { return types.ErrInvalidAmount.Wrapf("failed to get validators: %v", err) } if len(validators) == 0 { return types.ErrInvalidAmount.Wrap("no validators available for lockup") } validator := validators[0] valAddr, err := sdk.ValAddressFromBech32(validator.GetOperator()) if err != nil { return types.ErrInvalidAmount.Wrapf("invalid validator address: %v", err) } chosenValAddr = valAddr } if err := k.Lock(ctx, developerAddr, chosenValAddr, lockAmount); err != nil { return types.ErrInvalidAmount.Wrapf("failed to add lockup: %v", err) } k.logger.Info("auto-locked developer credits", types.AttributeKeyDeveloper, developerAddr.String(), types.AttributeKeyLockAmount, lockAmount.String(), types.AttributeKeyDestinationValidator, chosenValAddr.String()) return nil } // grantPeriodicDIDAllowance grants a periodic allowance from the developer to the user DID. func (k *Keeper) grantPeriodicDIDAllowance( ctx context.Context, granter sdk.AccAddress, granteeDID string, spendLimit sdk.Coins, period time.Duration, ) error { now := sdk.UnwrapSDKContext(ctx).BlockTime() basicAllowance := feegrant.BasicAllowance{ SpendLimit: spendLimit, } periodicAllowance := &feegrant.PeriodicAllowance{ Basic: basicAllowance, Period: period, PeriodSpendLimit: spendLimit, PeriodCanSpend: spendLimit, PeriodReset: now.Add(period), } // Try update first; if no existing grant, fall back to grant if err := k.feegrantKeeper.UpdateDIDAllowance(ctx, granter, granteeDID, periodicAllowance); err != nil { if err := k.feegrantKeeper.GrantDIDAllowance(ctx, granter, granteeDID, periodicAllowance); err != nil { return errorsmod.Wrapf(err, "failed to grant periodic DID allowance from %s to %s", granter, granteeDID) } } k.logger.Info("granted periodic DID allowance", types.AttributeKeyDeveloper, granter, types.AttributeKeyUserDid, granteeDID, types.AttributeKeySubscriptionAmount, spendLimit.String(), types.AttributeKeySubscriptionPeriod, period.String(), ) return nil } // validateDeveloperCredits checks if a developer has enough credits to grant the requested amount. func (k *Keeper) validateDeveloperCredits(ctx context.Context, developerAddr sdk.AccAddress, requestedAmount math.Int) error { totalGranted, err := k.getTotalDevGranted(ctx, developerAddr) if err != nil { return err } creditBalance := k.bankKeeper.GetBalance(ctx, developerAddr, appparams.MicroCreditDenom) availableCredits := creditBalance.Amount.Sub(totalGranted) if availableCredits.LT(requestedAmount) { return types.ErrInvalidAddress.Wrapf( "insufficient available credits: requested %s, available %s (balance: %s, already granted: %s)", requestedAmount.String(), availableCredits.String(), creditBalance.Amount.String(), totalGranted.String(), ) } return nil } // updateDeveloperTotalGranted adjusts stored total granted by delta; add=true adds, false subtracts. func (k *Keeper) updateDeveloperTotalGranted(ctx context.Context, developerAddr sdk.AccAddress, delta math.Int, add bool) error { current, err := k.getTotalDevGranted(ctx, developerAddr) if err != nil { return err } var newTotal math.Int if add { newTotal = current.Add(delta) } else { newTotal, err = current.SafeSub(delta) if err != nil { return errorsmod.Wrapf(err, "subtract %s from developer total granted %s", delta, current) } if newTotal.IsNegative() { return errorsmod.Wrapf(types.ErrInvalidAmount, "subtract %s from developer total granted %s would result in negative amount", delta, current) } } key := types.TotalDevGrantedKey(developerAddr) totalDevGranted := &types.TotalDevGranted{ Developer: developerAddr.String(), TotalGranted: newTotal.Uint64(), } b := k.cdc.MustMarshal(totalDevGranted) store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Set(key, b) // Update total dev granted amount gauge telemetry.ModuleSetGauge( types.ModuleName, float32(newTotal.Int64()), developerAddr.String(), metrics.TotalDevGranted, ) return nil } // getTotalDevGranted retrieves the stored total granted amount for a developer. func (k *Keeper) getTotalDevGranted(ctx context.Context, developerAddr sdk.AccAddress) (math.Int, error) { key := types.TotalDevGrantedKey(developerAddr) store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(key) if bz == nil { return math.ZeroInt(), nil } var totalDevGranted types.TotalDevGranted err := k.cdc.Unmarshal(bz, &totalDevGranted) if err != nil { return math.ZeroInt(), errorsmod.Wrapf(err, "unmarshal developer total granted amount") } return math.NewIntFromUint64(totalDevGranted.TotalGranted), nil } // addLockupForRegistration adds more lockup to cover the required amount for user registration. func (k *Keeper) addLockupForRegistration(ctx context.Context, developerAddr sdk.AccAddress, requiredAmount math.Int) error { currentTotal, err := k.getTotalDevGranted(ctx, developerAddr) if err != nil { return err } creditBalance := k.bankKeeper.GetBalance(ctx, developerAddr, appparams.MicroCreditDenom) availableCredits := creditBalance.Amount.Sub(currentTotal) additionalNeeded := requiredAmount.Sub(availableCredits) if additionalNeeded.LTE(math.ZeroInt()) { return nil } // Prefer adding to an existing validator where the developer already has lockups var ( chosenValAddr sdk.ValAddress found bool maxLockupAmt = math.ZeroInt() ) k.mustIterateLockups(ctx, func(delAddr sdk.AccAddress, valAddr sdk.ValAddress, lockup types.Lockup) { if !delAddr.Equals(developerAddr) { return } if !found || lockup.Amount.GT(maxLockupAmt) { found = true chosenValAddr = valAddr maxLockupAmt = lockup.Amount } }) if !found { validators, err := k.stakingKeeper.GetAllValidators(ctx) if err != nil { return types.ErrInvalidAmount.Wrapf("failed to get validators: %v", err) } if len(validators) == 0 { return types.ErrInvalidAmount.Wrap("no validators available for lockup") } valAddr, err := sdk.ValAddressFromBech32(validators[0].GetOperator()) if err != nil { return types.ErrInvalidAmount.Wrapf("invalid validator address: %v", err) } chosenValAddr = valAddr } err = k.Lock(ctx, developerAddr, chosenValAddr, additionalNeeded) if err != nil { return types.ErrInvalidAmount.Wrapf("failed to add lockup: %v", err) } return nil } ================================================ FILE: x/tier/keeper/subscription_test.go ================================================ package keeper import ( "testing" "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/x/feegrant" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) func TestGetAndSetDeveloper(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) developer := k.GetDeveloper(ctx, developerAddr) require.Nil(t, developer) expectedDeveloper := &types.Developer{ Address: developerAddr.String(), AutoLockEnabled: true, } k.SetDeveloper(ctx, developerAddr, expectedDeveloper) retrievedDeveloper := k.GetDeveloper(ctx, developerAddr) require.NotNil(t, retrievedDeveloper) require.Equal(t, expectedDeveloper.Address, retrievedDeveloper.Address) require.Equal(t, expectedDeveloper.AutoLockEnabled, retrievedDeveloper.AutoLockEnabled) } func TestRemoveDeveloper(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) developer := &types.Developer{ Address: developerAddr.String(), AutoLockEnabled: false, } k.SetDeveloper(ctx, developerAddr, developer) retrievedDeveloper := k.GetDeveloper(ctx, developerAddr) require.NotNil(t, retrievedDeveloper) k.removeDeveloper(ctx, developerAddr) retrievedDeveloper = k.GetDeveloper(ctx, developerAddr) require.Nil(t, retrievedDeveloper) } func TestGetAndSetUserSubscription(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) userDid := "did:key:alice" userSub := k.GetUserSubscription(ctx, developerAddr, userDid) require.Nil(t, userSub) sdkCtx := sdk.UnwrapSDKContext(ctx) now := sdkCtx.BlockTime() creditAmount := uint64(1000) expectedUserSub := &types.UserSubscription{ Developer: developerAddr.String(), UserDid: userDid, CreditAmount: creditAmount, Period: 3600, StartDate: now, LastRenewed: now, } k.SetUserSubscription(ctx, developerAddr, userDid, expectedUserSub) retrievedUserSub := k.GetUserSubscription(ctx, developerAddr, userDid) require.NotNil(t, retrievedUserSub) require.Equal(t, expectedUserSub.Developer, retrievedUserSub.Developer) require.Equal(t, expectedUserSub.UserDid, retrievedUserSub.UserDid) require.Equal(t, expectedUserSub.CreditAmount, retrievedUserSub.CreditAmount) require.Equal(t, expectedUserSub.Period, retrievedUserSub.Period) require.True(t, expectedUserSub.StartDate.Equal(retrievedUserSub.StartDate)) require.True(t, expectedUserSub.LastRenewed.Equal(retrievedUserSub.LastRenewed)) } func TestRemoveUserSubscription(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) userDid := "did:key:alice" creditAmount := uint64(500) sdkCtx := sdk.UnwrapSDKContext(ctx) now := sdkCtx.BlockTime() userSub := &types.UserSubscription{ Developer: developerAddr.String(), UserDid: userDid, CreditAmount: creditAmount, Period: 7200, StartDate: now, LastRenewed: now, } k.SetUserSubscription(ctx, developerAddr, userDid, userSub) retrievedUserSub := k.GetUserSubscription(ctx, developerAddr, userDid) require.NotNil(t, retrievedUserSub) k.removeUserSubscription(ctx, developerAddr, userDid) retrievedUserSub = k.GetUserSubscription(ctx, developerAddr, userDid) require.Nil(t, retrievedUserSub) } func TestMustIterateUserSubscriptions(t *testing.T) { k, ctx := setupKeeper(t) dev1Addr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) dev2Addr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) user1Did := "did:key:alice" user2Did := "did:key:bob" creditAmount1 := uint64(1000) creditAmount2 := uint64(2000) sdkCtx := sdk.UnwrapSDKContext(ctx) now := sdkCtx.BlockTime() userSub1 := &types.UserSubscription{ Developer: dev1Addr.String(), UserDid: user1Did, CreditAmount: creditAmount1, Period: 3600, StartDate: now, LastRenewed: now, } userSub2 := &types.UserSubscription{ Developer: dev2Addr.String(), UserDid: user2Did, CreditAmount: creditAmount2, Period: 7200, StartDate: now, LastRenewed: now, } k.SetUserSubscription(ctx, dev1Addr, user1Did, userSub1) k.SetUserSubscription(ctx, dev2Addr, user2Did, userSub2) var foundSubscriptions []types.UserSubscription k.mustIterateUserSubscriptions(ctx, func(developerAddr sdk.AccAddress, userDid string, userSubscription types.UserSubscription) { foundSubscriptions = append(foundSubscriptions, userSubscription) }) require.Len(t, foundSubscriptions, 2) found1, found2 := false, false for _, sub := range foundSubscriptions { if sub.Developer == dev1Addr.String() && sub.UserDid == user1Did { found1 = true require.Equal(t, creditAmount1, sub.CreditAmount) } if sub.Developer == dev2Addr.String() && sub.UserDid == user2Did { found2 = true require.Equal(t, creditAmount2, sub.CreditAmount) } } require.True(t, found1, "First subscription not found") require.True(t, found2, "Second subscription not found") } func TestMustIterateUserSubscriptionsForDeveloper(t *testing.T) { k, ctx := setupKeeper(t) dev1Addr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) dev2Addr, err := sdk.AccAddressFromBech32("source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et") require.NoError(t, err) user1Did := "did:key:alice" user2Did := "did:key:bob" creditAmount := uint64(1000) sdkCtx := sdk.UnwrapSDKContext(ctx) now := sdkCtx.BlockTime() userSub1 := &types.UserSubscription{ Developer: dev1Addr.String(), UserDid: user1Did, CreditAmount: creditAmount, Period: 3600, StartDate: now, LastRenewed: now, } userSub2 := &types.UserSubscription{ Developer: dev1Addr.String(), UserDid: user2Did, CreditAmount: creditAmount, Period: 3600, StartDate: now, LastRenewed: now, } userSub3 := &types.UserSubscription{ Developer: dev2Addr.String(), UserDid: user1Did, CreditAmount: creditAmount, Period: 3600, StartDate: now, LastRenewed: now, } k.SetUserSubscription(ctx, dev1Addr, user1Did, userSub1) k.SetUserSubscription(ctx, dev1Addr, user2Did, userSub2) k.SetUserSubscription(ctx, dev2Addr, user1Did, userSub3) var foundSubscriptions []types.UserSubscription k.mustIterateUserSubscriptionsForDeveloper(ctx, dev1Addr, func(developerAddr sdk.AccAddress, userDid string, userSubscription types.UserSubscription) { foundSubscriptions = append(foundSubscriptions, userSubscription) }) require.Len(t, foundSubscriptions, 2, "Should find exactly 2 subscriptions for dev1") for _, sub := range foundSubscriptions { require.Equal(t, dev1Addr.String(), sub.Developer) } } func TestGetTotalDevGranted(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) total, err := k.getTotalDevGranted(ctx, developerAddr) require.NoError(t, err) require.True(t, total.IsZero()) amount := math.NewInt(1500) err = k.updateDeveloperTotalGranted(ctx, developerAddr, amount, true) require.NoError(t, err) total, err = k.getTotalDevGranted(ctx, developerAddr) require.NoError(t, err) require.Equal(t, amount, total) } func TestUpdateDeveloperTotalGranted(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) total, err := k.getTotalDevGranted(ctx, developerAddr) require.NoError(t, err) require.True(t, total.IsZero()) err = k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewInt(1000), true) require.NoError(t, err) total, err = k.getTotalDevGranted(ctx, developerAddr) require.NoError(t, err) require.Equal(t, math.NewInt(1000), total) err = k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewInt(500), true) require.NoError(t, err) total, err = k.getTotalDevGranted(ctx, developerAddr) require.NoError(t, err) require.Equal(t, math.NewInt(1500), total) err = k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewInt(300), false) require.NoError(t, err) total, err = k.getTotalDevGranted(ctx, developerAddr) require.NoError(t, err) require.Equal(t, math.NewInt(1200), total) err = k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewInt(2000), false) require.Error(t, err) require.ErrorContains(t, err, "subtract") } func TestValidateDeveloperCredits(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, developerAddr, math.NewInt(1400)) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) require.NoError(t, k.Lock(ctx, developerAddr, valAddr, math.NewInt(1400))) err = k.validateDeveloperCredits(ctx, developerAddr, math.NewInt(1000)) require.NoError(t, err, "Should pass when developer has enough credits") err = k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewInt(1500), true) require.NoError(t, err) err = k.validateDeveloperCredits(ctx, developerAddr, math.NewInt(300)) require.NoError(t, err, "Should pass when requesting within available credits") err = k.validateDeveloperCredits(ctx, developerAddr, math.NewInt(600)) require.Error(t, err) require.ErrorContains(t, err, "insufficient available credits") } func TestGrantPeriodicAllowance(t *testing.T) { k, ctx := setupKeeper(t) granterAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) userDid := "did:key:alice" createAccount(t, &k, ctx, granterAddr) initializeDelegator(t, &k, ctx, granterAddr, math.NewInt(1000)) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) spendLimit := sdk.NewCoins(sdk.NewCoin(appparams.MicroCreditDenom, math.NewInt(100))) period := time.Hour err = k.grantPeriodicDIDAllowance(ctx, granterAddr, userDid, spendLimit, period) require.NoError(t, err) allowance, err := k.feegrantKeeper.GetDIDAllowance(ctx, granterAddr, userDid) require.NoError(t, err) require.NotNil(t, allowance) periodicAllowance, ok := allowance.(*feegrant.PeriodicAllowance) require.True(t, ok, "Expected PeriodicAllowance") require.Equal(t, spendLimit, periodicAllowance.Basic.SpendLimit) require.Equal(t, period, periodicAllowance.Period) } func TestExpireAllowance(t *testing.T) { k, ctx := setupKeeper(t) granterAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) userDid := "did:key:alice" createAccount(t, &k, ctx, granterAddr) initializeDelegator(t, &k, ctx, granterAddr, math.NewInt(1000)) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) now := time.Now() ctx = ctx.WithBlockHeight(1).WithBlockTime(now) spendLimit := sdk.NewCoins(sdk.NewCoin(appparams.MicroCreditDenom, math.NewInt(100))) period := time.Hour // Grant periodic allowance err = k.grantPeriodicDIDAllowance(ctx, granterAddr, userDid, spendLimit, period) require.NoError(t, err) ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(time.Minute)) // Verify it's a periodic allowance before expiration allowance, err := k.feegrantKeeper.GetDIDAllowance(ctx, granterAddr, userDid) require.NoError(t, err) require.NotNil(t, allowance) periodic, ok := allowance.(*feegrant.PeriodicAllowance) require.True(t, ok, "Expected PeriodicAllowance before expiration") require.NotNil(t, periodic.PeriodReset) oldPeriodReset := periodic.PeriodReset // Call ExpireDIDAllowance err = k.feegrantKeeper.ExpireDIDAllowance(ctx, granterAddr, userDid) require.NoError(t, err) // Fetch updated allowance updatedAllowance, err := k.feegrantKeeper.GetDIDAllowance(ctx, granterAddr, userDid) require.NoError(t, err) require.NotNil(t, updatedAllowance) updatedPeriodic, ok := updatedAllowance.(*feegrant.PeriodicAllowance) require.True(t, ok, "Expected PeriodicAllowance after expiration") require.NotNil(t, updatedPeriodic.Basic.Expiration, "Expected expiration to be set in BasicAllowance") // The expiration should match the old period reset require.True(t, updatedPeriodic.Basic.Expiration.Equal(oldPeriodReset), "Expected expiration to equal previous PeriodReset") // Sanity check: expiration should be after current block time (not immediate) require.True(t, updatedPeriodic.Basic.Expiration.After(ctx.BlockTime()), "Expiration should be after current block time") // Also, period and spend limits should remain unchanged require.Equal(t, period, updatedPeriodic.Period) require.Equal(t, spendLimit, updatedPeriodic.PeriodSpendLimit) } func TestCheckDeveloperCredits(t *testing.T) { k, ctx := setupKeeper(t) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) userDid := "did:key:alice" initializeDelegator(t, &k, ctx, developerAddr, math.NewInt(1000)) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) // Set up a user subscription that requires more credits than available sdkCtx := sdk.UnwrapSDKContext(ctx) now := sdkCtx.BlockTime() creditAmount := uint64(2000) userSub := &types.UserSubscription{ Developer: developerAddr.String(), UserDid: userDid, CreditAmount: creditAmount, Period: 3600, StartDate: now, LastRenewed: now, } k.SetUserSubscription(ctx, developerAddr, userDid, userSub) err = k.updateDeveloperTotalGranted(ctx, developerAddr, math.NewIntFromUint64(creditAmount), true) require.NoError(t, err) developer := &types.Developer{ Address: developerAddr.String(), AutoLockEnabled: false, } k.SetDeveloper(ctx, developerAddr, developer) err = k.checkDeveloperCredits(ctx, 1) require.NoError(t, err) // Check that an event was emitted for insufficient credits sdkCtx = sdk.UnwrapSDKContext(ctx) events := sdkCtx.EventManager().Events() foundEvent := false for _, event := range events { if event.Type == "developer_insufficient_credits" { foundEvent = true break } } require.True(t, foundEvent, "Should emit developer_insufficient_credits event") } func TestAutoLockDeveloperCredits(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeDelegator(t, &k, ctx, developerAddr, math.NewInt(1000)) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) developer := &types.Developer{ Address: developerAddr.String(), AutoLockEnabled: true, } err = k.autoLockDeveloperCredits(ctx, developerAddr, developer, math.ZeroInt()) require.Error(t, err) require.ErrorContains(t, err, "auto-lock amount must be positive") err = k.autoLockDeveloperCredits(ctx, developerAddr, developer, math.NewInt(-100)) require.Error(t, err) require.ErrorContains(t, err, "auto-lock amount must be positive") } func TestAddLockupForRegistration(t *testing.T) { k, ctx := setupKeeper(t) developerAddr, err := sdk.AccAddressFromBech32("source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9") require.NoError(t, err) initializeDelegator(t, &k, ctx, developerAddr, math.NewInt(500)) valAddr, err := sdk.ValAddressFromBech32("sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm") require.NoError(t, err) initializeValidator(t, k.GetStakingKeeper().(*stakingkeeper.Keeper), ctx, valAddr, math.NewInt(1_000_000)) ctx = ctx.WithBlockHeight(1).WithBlockTime(time.Now()) requiredAmount := math.NewInt(300) err = k.addLockupForRegistration(ctx, developerAddr, requiredAmount) require.NoError(t, err) requiredAmount = math.NewInt(1000) // We need 670 uopen to get 1000 ucredit with current rate, but developer only has 200 uopen err = k.addLockupForRegistration(ctx, developerAddr, requiredAmount) require.Error(t, err) require.ErrorContains(t, err, "insufficient funds") initializeDelegator(t, &k, ctx, developerAddr, math.NewInt(470)) // 200 + 470 = 670 err = k.addLockupForRegistration(ctx, developerAddr, requiredAmount) require.NoError(t, err) } ================================================ FILE: x/tier/module/autocli.go ================================================ package tier import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" modulev1beta1 "github.com/sourcenetwork/sourcehub/api/sourcehub/tier/v1beta1" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ Service: modulev1beta1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Params", Use: "params", Short: "Shows the parameters of the module", }, { RpcMethod: "Lockup", Use: "lockup [delegator-address] [validator-address]", Short: "Query a locked stake based on address and validator address", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "delegator_address"}, {ProtoField: "validator_address"}}, }, { RpcMethod: "Lockups", Use: "lockups [delegator-address]", Short: "Query all locked stakes made by the delegator", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "delegator_address"}}, }, { RpcMethod: "UnlockingLockup", Use: "unlocking-lockup [delegator-address] [validator-address] [creation-height]", Short: "Query an unlocking stake based on address and validator address", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "delegator_address"}, {ProtoField: "validator_address"}, {ProtoField: "creation_height"}}, }, { RpcMethod: "UnlockingLockups", Use: "unlocking-lockups [delegator-address]", Short: "Query all unlocking stakes made by the delegator", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "delegator_address"}}, }, { RpcMethod: "Developers", Use: "developers", Short: "Query all registered developers", }, { RpcMethod: "UserSubscriptions", Use: "user-subscriptions [developer]", Short: "Query all user subscriptions for a specific developer", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "developer"}}, }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: modulev1beta1.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 }, { RpcMethod: "Lock", Use: "lock [validator-address] [stake]", Short: "Send a lock tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "stake"}}, }, { RpcMethod: "LockAuto", Use: "lock-auto [stake]", Short: "Send a lock tx with automatic validator selection", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "stake"}}, }, { RpcMethod: "Unlock", Use: "unlock [validator-address] [amount]", Short: "Send a unlock tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "stake"}}, }, { RpcMethod: "Redelegate", Use: "redelegate [src-validator-address] [dst-validator-address] [stake]", Short: "Send a redelegate tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "src_validator_address"}, {ProtoField: "dst_validator_address"}, {ProtoField: "stake"}}, }, { RpcMethod: "CancelUnlocking", Use: "cancel-unlocking [validator-address] [stake] [creation-height]", Short: "Send a cancel-unlocking tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "stake"}, {ProtoField: "creation_height"}}, }, { RpcMethod: "CreateDeveloper", Use: "create-developer [auto-lock-enabled]", Short: "Create a developer", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "auto_lock_enabled"}}, }, { RpcMethod: "UpdateDeveloper", Use: "update-developer [auto-lock-enabled]", Short: "Update a developer", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "auto_lock_enabled"}}, }, { RpcMethod: "RemoveDeveloper", Use: "remove-developer", Short: "Remove a developer", }, { RpcMethod: "AddUserSubscription", Use: "add-user-subscription [user-did] [amount] [period]", Short: "Add a user subscription", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "user_did"}, {ProtoField: "amount"}, {ProtoField: "period"}}, }, { RpcMethod: "UpdateUserSubscription", Use: "update-user-subscription [user-did] [amount] [period]", Short: "Update a user subscription", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "user_did"}, {ProtoField: "amount"}, {ProtoField: "period"}}, }, { RpcMethod: "RemoveUserSubscription", Use: "remove-user-subscription [user-did]", Short: "Remove a user subscription", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "user_did"}}, }, }, }, } } ================================================ FILE: x/tier/module/genesis.go ================================================ package tier import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx context.Context, k *keeper.Keeper, genState types.GenesisState) { if err := k.SetParams(ctx, genState.Params); err != nil { panic(err) } for _, lockup := range genState.Lockups { delAddr := sdk.MustAccAddressFromBech32(lockup.DelegatorAddress) valAddr := types.MustValAddressFromBech32(lockup.ValidatorAddress) k.AddLockup(ctx, delAddr, valAddr, lockup.Amount) } for _, unlockingLockup := range genState.UnlockingLockups { delAddr := sdk.MustAccAddressFromBech32(unlockingLockup.DelegatorAddress) valAddr := types.MustValAddressFromBech32(unlockingLockup.ValidatorAddress) if !k.HasUnlockingLockup(ctx, delAddr, valAddr, unlockingLockup.CreationHeight) { k.SetUnlockingLockup( ctx, delAddr, valAddr, unlockingLockup.CreationHeight, unlockingLockup.Amount, unlockingLockup.CompletionTime, unlockingLockup.UnlockTime, ) } } for _, insuranceLockup := range genState.InsuranceLockups { delAddr := sdk.MustAccAddressFromBech32(insuranceLockup.DelegatorAddress) valAddr := types.MustValAddressFromBech32(insuranceLockup.ValidatorAddress) k.AddInsuranceLockup(ctx, delAddr, valAddr, insuranceLockup.Amount) } for _, developer := range genState.Developers { developerAddr := sdk.MustAccAddressFromBech32(developer.Address) k.SetDeveloper(ctx, developerAddr, &developer) } for _, userSubscription := range genState.UserSubscriptions { developerAddr := sdk.MustAccAddressFromBech32(userSubscription.Developer) k.SetUserSubscription(ctx, developerAddr, userSubscription.UserDid, &userSubscription) } } // ExportGenesis returns the module's exported genesis. func ExportGenesis(ctx context.Context, k *keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) genesis.Lockups = k.GetAllLockups(ctx) genesis.UnlockingLockups = k.GetAllUnlockingLockups(ctx) genesis.InsuranceLockups = k.GetAllInsuranceLockups(ctx) genesis.Developers = k.GetAllDevelopers(ctx) genesis.UserSubscriptions = k.GetAllUserSubscriptions(ctx) return genesis } ================================================ FILE: x/tier/module/genesis_test.go ================================================ package tier_test import ( "testing" "time" "cosmossdk.io/math" "github.com/sourcenetwork/sourcehub/app" keepertest "github.com/sourcenetwork/sourcehub/testutil/keeper" "github.com/sourcenetwork/sourcehub/testutil/nullify" tier "github.com/sourcenetwork/sourcehub/x/tier/module" "github.com/sourcenetwork/sourcehub/x/tier/types" "github.com/stretchr/testify/require" ) func init() { app.SetConfig(true) } func TestGenesis(t *testing.T) { timestamp1 := time.Date(2006, time.January, 2, 15, 4, 5, 1, time.UTC) timestamp2 := time.Date(2006, time.January, 2, 15, 4, 5, 2, time.UTC) timestamp3 := time.Date(2006, time.January, 2, 15, 4, 5, 3, time.UTC) timestamp4 := time.Date(2006, time.January, 2, 15, 4, 5, 4, time.UTC) timestamp5 := time.Date(2006, time.January, 2, 15, 4, 5, 5, time.UTC) timestamp6 := time.Date(2006, time.January, 2, 15, 4, 5, 6, time.UTC) genesisState := types.GenesisState{ Params: types.DefaultParams(), Lockups: []types.Lockup{ { DelegatorAddress: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(1000), }, { DelegatorAddress: "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(500), }, { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(2000), }, }, UnlockingLockups: []types.UnlockingLockup{ { DelegatorAddress: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(1000), CreationHeight: 1, CompletionTime: timestamp1, UnlockTime: timestamp4, }, { DelegatorAddress: "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(500), CreationHeight: 2, CompletionTime: timestamp2, UnlockTime: timestamp5, }, { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(2000), CreationHeight: 3, CompletionTime: timestamp3, UnlockTime: timestamp6, }, }, Developers: []types.Developer{ { Address: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", AutoLockEnabled: true, }, { Address: "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", AutoLockEnabled: false, }, { Address: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", AutoLockEnabled: true, }, }, UserSubscriptions: []types.UserSubscription{ { Developer: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", UserDid: "did:key:alice", CreditAmount: uint64(1000), Period: 30, StartDate: timestamp1, LastRenewed: timestamp2, }, { Developer: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", UserDid: "did:key:bob", CreditAmount: uint64(500), Period: 60, StartDate: timestamp3, LastRenewed: timestamp4, }, { Developer: "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", UserDid: "did:key:charlie", CreditAmount: uint64(2000), Period: 90, StartDate: timestamp5, LastRenewed: timestamp6, }, }, } k, ctx := keepertest.TierKeeper(t) tier.InitGenesis(ctx, &k, genesisState) got := tier.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) require.Equal(t, len(genesisState.Lockups), len(got.Lockups)) for i, lockup := range genesisState.Lockups { require.Equal(t, lockup.DelegatorAddress, got.Lockups[i].DelegatorAddress) require.Equal(t, lockup.ValidatorAddress, got.Lockups[i].ValidatorAddress) require.Equal(t, lockup.Amount, got.Lockups[i].Amount) } for i, unlockingLockup := range genesisState.UnlockingLockups { require.Equal(t, unlockingLockup.DelegatorAddress, got.UnlockingLockups[i].DelegatorAddress) require.Equal(t, unlockingLockup.ValidatorAddress, got.UnlockingLockups[i].ValidatorAddress) require.Equal(t, unlockingLockup.Amount, got.UnlockingLockups[i].Amount) require.Equal(t, unlockingLockup.CreationHeight, got.UnlockingLockups[i].CreationHeight) require.Equal(t, unlockingLockup.CompletionTime.UTC(), got.UnlockingLockups[i].CompletionTime.UTC()) require.Equal(t, unlockingLockup.UnlockTime.UTC(), got.UnlockingLockups[i].UnlockTime.UTC()) } require.Equal(t, len(genesisState.Developers), len(got.Developers)) for i, developer := range genesisState.Developers { require.Equal(t, developer.Address, got.Developers[i].Address) require.Equal(t, developer.AutoLockEnabled, got.Developers[i].AutoLockEnabled) } require.Equal(t, len(genesisState.UserSubscriptions), len(got.UserSubscriptions)) for i, userSubscription := range genesisState.UserSubscriptions { require.Equal(t, userSubscription.Developer, got.UserSubscriptions[i].Developer) require.Equal(t, userSubscription.UserDid, got.UserSubscriptions[i].UserDid) require.Equal(t, userSubscription.CreditAmount, got.UserSubscriptions[i].CreditAmount) require.Equal(t, userSubscription.Period, got.UserSubscriptions[i].Period) require.Equal(t, userSubscription.StartDate.UTC(), got.UserSubscriptions[i].StartDate.UTC()) require.Equal(t, userSubscription.LastRenewed.UTC(), got.UserSubscriptions[i].LastRenewed.UTC()) } nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithMultipleIdenticalLockups(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), Lockups: []types.Lockup{ { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(1000), }, { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(2000), }, { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(3000), }, }, } k, ctx := keepertest.TierKeeper(t) tier.InitGenesis(ctx, &k, genesisState) got := tier.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) // Lockups with identical del/val are added and exported as a single record. require.Equal(t, 1, len(got.Lockups)) require.Equal(t, int64(6000), got.Lockups[0].Amount.Int64()) nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithMultipleIdenticalUnlockingLockups(t *testing.T) { timestamp1 := time.Date(2006, time.January, 2, 15, 4, 5, 1, time.UTC) timestamp2 := time.Date(2006, time.January, 2, 15, 4, 5, 2, time.UTC) timestamp3 := time.Date(2006, time.January, 2, 15, 4, 5, 3, time.UTC) timestamp4 := time.Date(2006, time.January, 2, 15, 4, 5, 4, time.UTC) timestamp5 := time.Date(2006, time.January, 2, 15, 4, 5, 5, time.UTC) timestamp6 := time.Date(2006, time.January, 2, 15, 4, 5, 6, time.UTC) genesisState := types.GenesisState{ Params: types.DefaultParams(), UnlockingLockups: []types.UnlockingLockup{ { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(1000), CreationHeight: 1, CompletionTime: timestamp1, UnlockTime: timestamp4, }, { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(2000), CreationHeight: 2, CompletionTime: timestamp2, UnlockTime: timestamp5, }, { DelegatorAddress: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", ValidatorAddress: "sourcevaloper1cy0p47z24ejzvq55pu3lesxwf73xnrnd0pzkqm", Amount: math.NewInt(3000), CreationHeight: 3, CompletionTime: timestamp3, UnlockTime: timestamp6, }, }, } k, ctx := keepertest.TierKeeper(t) tier.InitGenesis(ctx, &k, genesisState) got := tier.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) // Unlocking lockups with identical del/val and different creationHeight are added and exported separately. require.Equal(t, 3, len(got.UnlockingLockups)) require.Equal(t, int64(1000), got.UnlockingLockups[0].Amount.Int64()) require.Equal(t, int64(2000), got.UnlockingLockups[1].Amount.Int64()) require.Equal(t, int64(3000), got.UnlockingLockups[2].Amount.Int64()) nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithMultipleDevelopers(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), Developers: []types.Developer{ { Address: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", AutoLockEnabled: true, }, { Address: "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", AutoLockEnabled: false, }, { Address: "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", AutoLockEnabled: true, }, }, } k, ctx := keepertest.TierKeeper(t) tier.InitGenesis(ctx, &k, genesisState) got := tier.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) // All developers should be exported correctly require.Equal(t, 3, len(got.Developers)) require.Equal(t, "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", got.Developers[0].Address) require.Equal(t, true, got.Developers[0].AutoLockEnabled) require.Equal(t, "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", got.Developers[1].Address) require.Equal(t, false, got.Developers[1].AutoLockEnabled) require.Equal(t, "source1m4f5a896t7fzd9vc7pfgmc3fxkj8n24s68fcw9", got.Developers[2].Address) require.Equal(t, true, got.Developers[2].AutoLockEnabled) nullify.Fill(&genesisState) nullify.Fill(got) } func TestInitWithMultipleUserSubscriptions(t *testing.T) { timestamp1 := time.Date(2006, time.January, 2, 15, 4, 5, 1, time.UTC) timestamp2 := time.Date(2006, time.January, 2, 15, 4, 5, 2, time.UTC) timestamp3 := time.Date(2006, time.January, 2, 15, 4, 5, 3, time.UTC) genesisState := types.GenesisState{ Params: types.DefaultParams(), UserSubscriptions: []types.UserSubscription{ { Developer: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", UserDid: "did:key:alice", CreditAmount: uint64(1000), Period: 30, StartDate: timestamp1, LastRenewed: timestamp2, }, { Developer: "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", UserDid: "did:key:bob", CreditAmount: uint64(500), Period: 60, StartDate: timestamp2, LastRenewed: timestamp3, }, { Developer: "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", UserDid: "did:key:charlie", CreditAmount: uint64(2000), Period: 90, StartDate: timestamp3, LastRenewed: timestamp1, }, }, } k, ctx := keepertest.TierKeeper(t) tier.InitGenesis(ctx, &k, genesisState) got := tier.ExportGenesis(ctx, &k) require.NotNil(t, got) require.Equal(t, genesisState.Params, got.Params) // All user subscriptions should be exported correctly require.Equal(t, 3, len(got.UserSubscriptions)) require.Equal(t, "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", got.UserSubscriptions[0].Developer) require.Equal(t, "did:key:alice", got.UserSubscriptions[0].UserDid) require.Equal(t, uint64(1000), got.UserSubscriptions[0].CreditAmount) require.Equal(t, uint64(30), got.UserSubscriptions[0].Period) require.Equal(t, "source1wjj5v5rlf57kayyeskncpu4hwev25ty645p2et", got.UserSubscriptions[1].Developer) require.Equal(t, "did:key:bob", got.UserSubscriptions[1].UserDid) require.Equal(t, uint64(500), got.UserSubscriptions[1].CreditAmount) require.Equal(t, uint64(60), got.UserSubscriptions[1].Period) require.Equal(t, "source1n34fvpteuanu2nx2a4hql4jvcrcnal3gsrjppy", got.UserSubscriptions[2].Developer) require.Equal(t, "did:key:charlie", got.UserSubscriptions[2].UserDid) require.Equal(t, uint64(2000), got.UserSubscriptions[2].CreditAmount) require.Equal(t, uint64(90), got.UserSubscriptions[2].Period) nullify.Fill(&genesisState) nullify.Fill(got) } ================================================ FILE: x/tier/module/module.go ================================================ package tier import ( "context" "encoding/json" "fmt" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" // this line is used by starport scaffolding # 1 modulev1beta1 "github.com/sourcenetwork/sourcehub/api/sourcehub/tier/module/v1beta1" "github.com/sourcenetwork/sourcehub/app/metrics" acpkeeper "github.com/sourcenetwork/sourcehub/x/acp/keeper" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) var ( _ module.AppModuleBasic = (*AppModule)(nil) _ module.AppModuleSimulation = (*AppModule)(nil) _ module.HasGenesis = (*AppModule)(nil) _ module.HasInvariants = (*AppModule)(nil) _ module.HasConsensusVersion = (*AppModule)(nil) _ appmodule.AppModule = (*AppModule)(nil) _ appmodule.HasBeginBlocker = (*AppModule)(nil) _ appmodule.HasEndBlocker = (*AppModule)(nil) ) // ---------------------------------------------------------------------------- // AppModuleBasic // ---------------------------------------------------------------------------- // AppModuleBasic implements the AppModuleBasic interface that defines the // independent methods a Cosmos SDK module needs to implement. type AppModuleBasic struct { cdc codec.BinaryCodec } func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } // Name returns the name of the module as a string. func (AppModuleBasic) Name() string { return types.ModuleName } // RegisterLegacyAminoCodec registers the amino codec for the module, which is used // to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } // 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 (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesis()) } // ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } return genState.Validate() } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { panic(err) } } // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- // AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement type AppModule struct { AppModuleBasic keeper *keeper.Keeper bankKeeper types.BankKeeper } func NewAppModule( cdc codec.Codec, keeper *keeper.Keeper, bankKeeper types.BankKeeper, ) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, bankKeeper: bankKeeper, } } // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { // Inject instrumentation into msg service handler descriptor := metrics.WrapMsgServerServiceDescriptor(types.ModuleName, types.Msg_serviceDesc) cfg.MsgServer().RegisterService(&descriptor, keeper.NewMsgServerImpl(am.keeper)) // Inject instrumentation into query service handler descriptor = metrics.WrapQueryServiceDescriptor(types.ModuleName, types.Query_serviceDesc) cfg.QueryServer().RegisterService(&descriptor, am.keeper) } // RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the module's genesis initialization. It returns no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { var genState types.GenesisState // Initialize global index to index in genesis state cdc.MustUnmarshalJSON(gs, &genState) InitGenesis(ctx, am.keeper, genState) } // ExportGenesis returns the module's exported genesis state as raw JSON bytes. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { genState := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(genState) } // 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(ctx context.Context) error { return am.keeper.BeginBlocker(ctx) } // 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 } // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} // ---------------------------------------------------------------------------- // App Wiring Setup // ---------------------------------------------------------------------------- func init() { appmodule.Register( &modulev1beta1.Module{}, appmodule.Provide(ProvideModule), ) } type ModuleInputs struct { depinject.In StoreService store.KVStoreService Cdc codec.Codec Config *modulev1beta1.Module Logger log.Logger BankKeeper types.BankKeeper StakingKeeper types.StakingKeeper EpochsKeeper types.EpochsKeeper DistributionKeeper types.DistributionKeeper FeegrantKeeper types.FeegrantKeeper AcpKeeper *acpkeeper.Keeper } type ModuleOutputs struct { depinject.Out TierKeeper *keeper.Keeper Module appmodule.AppModule Hooks epochstypes.EpochsHooksWrapper } func ProvideModule(in ModuleInputs) ModuleOutputs { // default to governance authority if not provided authority := authtypes.NewModuleAddress(govtypes.ModuleName) if in.Config.Authority != "" { authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) } k := keeper.NewKeeper( in.Cdc, in.StoreService, in.Logger, authority.String(), in.BankKeeper, in.StakingKeeper, in.EpochsKeeper, in.DistributionKeeper, in.FeegrantKeeper, in.AcpKeeper, ) m := NewAppModule( in.Cdc, &k, in.BankKeeper, ) return ModuleOutputs{ TierKeeper: &k, Module: m, Hooks: epochstypes.EpochsHooksWrapper{EpochHooks: k.EpochHooks()}, } } ================================================ FILE: x/tier/module/simulation.go ================================================ package tier import ( "math/rand" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/sourcenetwork/sourcehub/testutil/sample" tiersimulation "github.com/sourcenetwork/sourcehub/x/tier/simulation" "github.com/sourcenetwork/sourcehub/x/tier/types" ) // avoid unused import issue var ( _ = tiersimulation.FindAccount _ = rand.Rand{} _ = sample.RandomAccAddress().String() _ = sdk.AccAddress{} _ = simulation.MsgEntryKind ) const ( opWeightMsgLockStake = "op_weight_msg_lock_stake" // TODO: Determine the simulation weight value defaultWeightMsgLockStake int = 100 opWeightMsgUnlockStake = "op_weight_msg_unlock_stake" // TODO: Determine the simulation weight value defaultWeightMsgUnlockStake int = 100 opWeightMsgRedelegateStake = "op_weight_msg_redelegate_stake" // TODO: Determine the simulation weight value defaultWeightMsgRedelegateStake int = 100 opWeightMsgCancelUnlockingStake = "op_weight_msg_cancel_unlocking_stake" // TODO: Determine the simulation weight value defaultWeightMsgCancelUnlockingStake int = 100 // this line is used by starport scaffolding # simapp/module/const ) // 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() } tierGenesis := types.GenesisState{ Params: types.DefaultParams(), // this line is used by starport scaffolding # simapp/module/genesisState } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&tierGenesis) } // 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) var weightMsgLockStake int simState.AppParams.GetOrGenerate(opWeightMsgLockStake, &weightMsgLockStake, nil, func(_ *rand.Rand) { weightMsgLockStake = defaultWeightMsgLockStake }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgLockStake, tiersimulation.SimulateMsgLockStake(am.bankKeeper, am.keeper), )) var weightMsgUnlockStake int simState.AppParams.GetOrGenerate(opWeightMsgUnlockStake, &weightMsgUnlockStake, nil, func(_ *rand.Rand) { weightMsgUnlockStake = defaultWeightMsgUnlockStake }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgUnlockStake, tiersimulation.SimulateMsgUnlockStake(am.bankKeeper, am.keeper), )) var weightMsgRedelegateStake int simState.AppParams.GetOrGenerate(opWeightMsgRedelegateStake, &weightMsgRedelegateStake, nil, func(_ *rand.Rand) { weightMsgRedelegateStake = defaultWeightMsgRedelegateStake }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgRedelegateStake, tiersimulation.SimulateMsgRedelegateStake(am.bankKeeper, am.keeper), )) var weightMsgCancelUnlockingStake int simState.AppParams.GetOrGenerate(opWeightMsgCancelUnlockingStake, &weightMsgCancelUnlockingStake, nil, func(_ *rand.Rand) { weightMsgCancelUnlockingStake = defaultWeightMsgCancelUnlockingStake }, ) operations = append(operations, simulation.NewWeightedOperation( weightMsgCancelUnlockingStake, tiersimulation.SimulateMsgCancelUnlockingStake(am.bankKeeper, am.keeper), )) // this line is used by starport scaffolding # simapp/module/operation return operations } // ProposalMsgs returns msgs used for governance proposals for simulations. func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { return []simtypes.WeightedProposalMsg{ simulation.NewWeightedProposalMsg( opWeightMsgLockStake, defaultWeightMsgLockStake, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { tiersimulation.SimulateMsgLockStake(am.bankKeeper, am.keeper) return nil }, ), simulation.NewWeightedProposalMsg( opWeightMsgUnlockStake, defaultWeightMsgUnlockStake, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { tiersimulation.SimulateMsgUnlockStake(am.bankKeeper, am.keeper) return nil }, ), simulation.NewWeightedProposalMsg( opWeightMsgRedelegateStake, defaultWeightMsgRedelegateStake, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { tiersimulation.SimulateMsgRedelegateStake(am.bankKeeper, am.keeper) return nil }, ), simulation.NewWeightedProposalMsg( opWeightMsgCancelUnlockingStake, defaultWeightMsgCancelUnlockingStake, func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { tiersimulation.SimulateMsgCancelUnlockingStake(am.bankKeeper, am.keeper) return nil }, ), // this line is used by starport scaffolding # simapp/module/OpMsg } } ================================================ FILE: x/tier/simulation/cancel_unlocking.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func SimulateMsgCancelUnlockingStake( bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgCancelUnlocking{ DelegatorAddress: simAccount.Address.String(), } // TODO: Handling the CancelUnlockingStake simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "CancelUnlockingStake simulation not implemented"), nil, nil } } ================================================ FILE: x/tier/simulation/helpers.go ================================================ package simulation import ( sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) // FindAccount find a specific address from an account list func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { creator, err := sdk.AccAddressFromBech32(address) if err != nil { panic(err) } return simtypes.FindAccount(accs, creator) } ================================================ FILE: x/tier/simulation/lock.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func SimulateMsgLockStake( bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgLock{ DelegatorAddress: simAccount.Address.String(), } // TODO: Handling the LockStake simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "LockStake simulation not implemented"), nil, nil } } ================================================ FILE: x/tier/simulation/redelegate.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func SimulateMsgRedelegateStake( bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgRedelegate{ DelegatorAddress: simAccount.Address.String(), } // TODO: Handling the RedelegateStake simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "RedelegateStake simulation not implemented"), nil, nil } } ================================================ FILE: x/tier/simulation/unlock.go ================================================ package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/sourcenetwork/sourcehub/x/tier/keeper" "github.com/sourcenetwork/sourcehub/x/tier/types" ) func SimulateMsgUnlockStake( bk types.BankKeeper, k *keeper.Keeper, ) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgUnlock{ DelegatorAddress: simAccount.Address.String(), } // TODO: Handling the UnlockStake simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UnlockStake simulation not implemented"), nil, nil } } ================================================ FILE: x/tier/types/codec.go ================================================ package types import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgLock{}, &MsgLockAuto{}, &MsgUnlock{}, &MsgRedelegate{}, &MsgCancelUnlocking{}, &MsgCreateDeveloper{}, &MsgUpdateDeveloper{}, &MsgRemoveDeveloper{}, &MsgAddUserSubscription{}, &MsgUpdateUserSubscription{}, &MsgRemoveUserSubscription{}, &MsgUpdateParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } ================================================ FILE: x/tier/types/constants.go ================================================ package types import time "time" // Tier module constants const ( EpochIdentifier = ModuleName // tier DefaultEpochDuration = time.Minute * 5 // 5 minutes DefaultUnlockingEpochs = 2 // 2 epochs DefaultDeveloperPoolFee = 2 // 2% DefaultInsurancePoolFee = 1 // 1% DefaultInsurancePoolThreshold = 100_000_000_000 // 100,000 open DefaultProcessRewardsInterval = 1000 // process rewards every 1000 blocks ) ================================================ FILE: x/tier/types/errors.go ================================================ package types // DONTCOVER import ( sdkerrors "cosmossdk.io/errors" ) // x/tier module sentinel errors var ( ErrUnauthorized = sdkerrors.Register(ModuleName, 1101, "unauthorized") ErrNotFound = sdkerrors.Register(ModuleName, 1102, "not found") ErrInvalidRequest = sdkerrors.Register(ModuleName, 1103, "invalid request") ErrInvalidAddress = sdkerrors.Register(ModuleName, 1104, "invalid address") ErrInvalidDenom = sdkerrors.Register(ModuleName, 1105, "invalid denom") ErrInvalidAmount = sdkerrors.Register(ModuleName, 1106, "invalid amount") ErrInvalidDID = sdkerrors.Register(ModuleName, 1107, "invalid DID") ErrInvalidSubscriptionPeriod = sdkerrors.Register(ModuleName, 1108, "invalid subscription period") ) ================================================ FILE: x/tier/types/events.go ================================================ package types const ( EventTypeCancelUnlocking = "cancel_unlocking" EventTypeCompleteUnlocking = "complete_unlocking" EventTypeLock = "lock" EventTypeRedelegate = "redelegate" EventTypeUnlock = "unlock" EventTypeDeveloperCreated = "developer_created" EventTypeDeveloperUpdated = "developer_updated" EventTypeDeveloperRemoved = "developer_removed" EventTypeUserSubscriptionCreated = "user_subscription_created" EventTypeUserSubscriptionUpdated = "user_subscription_updated" EventTypeUserSubscriptionRemoved = "user_subscription_removed" EventTypeDeveloperInsufficientCredits = "developer_insufficient_credits" EventTypeDeveloperInsufficientOpenForAutoLock = "developer_insufficient_open_for_auto_lock" EventTypeDeveloperAutoLockFailed = "developer_auto_lock_failed" EventTypeDeveloperAutoLockSuccess = "developer_auto_lock_success" AttributeKeyCompletionTime = "completion_time" AttributeKeyCreationHeight = "creation_height" AttributeCreditAmount = "credit_amount" AttributeKeyDestinationValidator = "destination_validator" AttributeKeySourceValidator = "source_validator" AttributeKeyUnlockTime = "unlock_time" AttributeKeyDeveloper = "developer" AttributeKeyUserDid = "user_did" AttributeKeySubscriptionPeriod = "subscription_period" AttributeKeySubscriptionAmount = "subscription_amount" AttributeKeySubscriptionExpiration = "subscription_expiration" AttributeKeyCurrentBalance = "current_balance" AttributeKeyTotalGranted = "total_granted" AttributeKeyUopenBalance = "uopen_balance" AttributeKeyRequiredLockAmount = "required_lock_amount" AttributeKeyAutoLockEnabled = "auto_lock_enabled" AttributeKeyError = "error" AttributeKeyLockAmount = "lock_amount" ) ================================================ FILE: x/tier/types/expected_keepers.go ================================================ package types import ( "context" time "time" "cosmossdk.io/math" abcitypes "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" epochstypes "github.com/sourcenetwork/sourcehub/x/epochs/types" "github.com/sourcenetwork/sourcehub/x/feegrant" ) // EpochsKeeper defines the expected interface for the Epochs module. type EpochsKeeper interface { GetEpochInfo(ctx context.Context, identifier string) epochstypes.EpochInfo SetEpochInfo(ctx context.Context, info epochstypes.EpochInfo) } // StakingKeeper defines the expected interface for the Staking module. type StakingKeeper interface { Delegate(ctx context.Context, delAddr sdk.AccAddress, bondAmt math.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (newShares math.LegacyDec, err error) Undelegate(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount math.LegacyDec) ( time.Time, math.Int, error) BeginRedelegation(ctx context.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount math.LegacyDec) (completionTime time.Time, err error) BondDenom(ctx context.Context) (string, error) GetValidator(ctx context.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, err error) IterateValidators(ctx context.Context, cb func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error IterateDelegations(ctx context.Context, delAddr sdk.AccAddress, cb func(index int64, delegation stakingtypes.DelegationI) ( stop bool)) error TotalBondedTokens(ctx context.Context) (math.Int, error) ValidateUnbondAmount(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int) ( shares math.LegacyDec, err error) GetUnbondingDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) ( ubd stakingtypes.UnbondingDelegation, err error) SetUnbondingDelegation(ctx context.Context, ubd stakingtypes.UnbondingDelegation) error RemoveUnbondingDelegation(ctx context.Context, ubd stakingtypes.UnbondingDelegation) error SetValidatorByConsAddr(ctx context.Context, addr stakingtypes.Validator) error SetValidator(ctx context.Context, addr stakingtypes.Validator) error CompleteUnbonding(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) BondedRatio(ctx context.Context) (math.LegacyDec, error) StakingTokenSupply(ctx context.Context) (math.Int, error) GetValidatorDelegations(ctx context.Context, valAddr sdk.ValAddress) ([]stakingtypes.Delegation, error) GetAllValidators(ctx context.Context) ([]stakingtypes.Validator, error) GetDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.Delegation, error) } // BankKeeper defines the expected interface for the Bank module. type BankKeeper interface { SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error DelegateCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error UndelegateCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error IterateAllBalances(ctx context.Context, cb func(addr sdk.AccAddress, coin sdk.Coin) bool) GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin } // DistributionKeeper defines the expected interface for the distribution module. type DistributionKeeper interface { AllocateTokensToValidator(ctx context.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) error AllocateTokens(ctx context.Context, totalReward int64, bondedValidators []abcitypes.VoteInfo) error GetValidatorOutstandingRewards(ctx context.Context, valAddr sdk.ValAddress) (distrtypes.ValidatorOutstandingRewards, error) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) } // FeegrantKeeper defines the expected interface for the Feegrant module. type FeegrantKeeper interface { GetAllowance(ctx context.Context, granter, grantee sdk.AccAddress) (feegrant.FeeAllowanceI, error) GrantAllowance(ctx context.Context, granter, grantee sdk.AccAddress, allowance feegrant.FeeAllowanceI) error UpdateAllowance(ctx context.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error // DID-based feegrant methods GrantDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string, allowance feegrant.FeeAllowanceI) error UpdateDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string, feeAllowance feegrant.FeeAllowanceI) error ExpireDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) error GetDIDAllowance(ctx context.Context, granter sdk.AccAddress, granteeDID string) (feegrant.FeeAllowanceI, error) } // ParamSubspace defines the expected Subspace interface for parameters. type ParamSubspace interface { Get(context.Context, []byte, interface{}) Set(context.Context, []byte, interface{}) } // AcpKeeper defines the expected interface for the ACP module. type AcpKeeper interface { // GetActorDID returns the actor DID, checking context first, then falling back to issuing from account address GetActorDID(ctx sdk.Context, accountAddr string) (string, error) // IssueDIDFromAccountAddr creates a DID from an account address IssueDIDFromAccountAddr(ctx context.Context, accountAddr string) (string, error) // GetAddressFromDID extracts and returns the bech32 address from a DID GetAddressFromDID(ctx context.Context, did string) (sdk.AccAddress, error) } ================================================ FILE: x/tier/types/genesis.go ================================================ package types // DefaultIndex is the default global index const DefaultIndex uint64 = 1 // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), Lockups: []Lockup{}, UnlockingLockups: []UnlockingLockup{}, InsuranceLockups: []Lockup{}, Developers: []Developer{}, UserSubscriptions: []UserSubscription{}, } } // Validate performs basic genesis state validation returning an error upon any // failure. func (gs GenesisState) Validate() error { // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() } ================================================ FILE: x/tier/types/genesis.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/tier/v1beta1/genesis.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 // GenesisState defines the tier 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"` Lockups []Lockup `protobuf:"bytes,2,rep,name=lockups,proto3" json:"lockups"` UnlockingLockups []UnlockingLockup `protobuf:"bytes,3,rep,name=unlockingLockups,proto3" json:"unlockingLockups"` InsuranceLockups []Lockup `protobuf:"bytes,4,rep,name=insuranceLockups,proto3" json:"insuranceLockups"` Developers []Developer `protobuf:"bytes,5,rep,name=developers,proto3" json:"developers"` UserSubscriptions []UserSubscription `protobuf:"bytes,6,rep,name=userSubscriptions,proto3" json:"userSubscriptions"` } 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_6b6509b08f7a16c3, []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 (m *GenesisState) GetLockups() []Lockup { if m != nil { return m.Lockups } return nil } func (m *GenesisState) GetUnlockingLockups() []UnlockingLockup { if m != nil { return m.UnlockingLockups } return nil } func (m *GenesisState) GetInsuranceLockups() []Lockup { if m != nil { return m.InsuranceLockups } return nil } func (m *GenesisState) GetDevelopers() []Developer { if m != nil { return m.Developers } return nil } func (m *GenesisState) GetUserSubscriptions() []UserSubscription { if m != nil { return m.UserSubscriptions } return nil } func init() { proto.RegisterType((*GenesisState)(nil), "sourcehub.tier.v1beta1.GenesisState") } func init() { proto.RegisterFile("sourcehub/tier/v1beta1/genesis.proto", fileDescriptor_6b6509b08f7a16c3) } var fileDescriptor_6b6509b08f7a16c3 = []byte{ // 371 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcd, 0x4a, 0xeb, 0x40, 0x14, 0xc7, 0x93, 0xdb, 0x7b, 0x7b, 0x71, 0x74, 0xd1, 0x06, 0x91, 0xd0, 0xc5, 0x58, 0x3f, 0xc0, 0xea, 0x22, 0x43, 0xf5, 0x09, 0xac, 0x82, 0x08, 0x5d, 0x88, 0xa5, 0x1b, 0x17, 0xc2, 0x24, 0x0e, 0x71, 0x68, 0x3b, 0x13, 0xe6, 0xa3, 0xea, 0x5b, 0xf8, 0x18, 0x2e, 0x7d, 0x8c, 0x2e, 0xbb, 0x74, 0x25, 0xd2, 0x2e, 0x7c, 0x0b, 0x91, 0xcc, 0xa4, 0x1a, 0xad, 0x51, 0xdc, 0x84, 0x49, 0xf8, 0xfd, 0x7f, 0xe7, 0x9c, 0xcc, 0x01, 0x9b, 0x92, 0x6b, 0x11, 0x91, 0x4b, 0x1d, 0x22, 0x45, 0x89, 0x40, 0xc3, 0x66, 0x48, 0x14, 0x6e, 0xa2, 0x98, 0x30, 0x22, 0xa9, 0x0c, 0x12, 0xc1, 0x15, 0xf7, 0x56, 0xde, 0xa8, 0x20, 0xa5, 0x82, 0x8c, 0xaa, 0x55, 0xf1, 0x80, 0x32, 0x8e, 0xcc, 0xd3, 0xa2, 0xb5, 0xe5, 0x98, 0xc7, 0xdc, 0x1c, 0x51, 0x7a, 0xca, 0xbe, 0x6e, 0x14, 0x94, 0xe9, 0xf3, 0xa8, 0xa7, 0x93, 0x1f, 0xa0, 0x04, 0x0b, 0x3c, 0xc8, 0x5a, 0xa9, 0x6d, 0x17, 0x40, 0x52, 0x87, 0x32, 0x12, 0x34, 0x51, 0x94, 0x33, 0x8b, 0xae, 0xbf, 0x94, 0xc0, 0xd2, 0x91, 0x9d, 0xa3, 0xa3, 0xb0, 0x22, 0xde, 0x3e, 0x28, 0x5b, 0x97, 0xef, 0xd6, 0xdd, 0xc6, 0xe2, 0x2e, 0x0c, 0xbe, 0x9e, 0x2b, 0x38, 0x31, 0x54, 0x6b, 0x61, 0xf4, 0xb8, 0xea, 0xdc, 0x3d, 0xdf, 0xef, 0xb8, 0xa7, 0x59, 0xd0, 0x3b, 0x00, 0xff, 0x6d, 0xcf, 0xd2, 0xff, 0x53, 0x2f, 0x7d, 0xe7, 0x68, 0x1b, 0x2c, 0xef, 0x98, 0x25, 0xbd, 0x73, 0x50, 0xd1, 0x2c, 0x7d, 0xa1, 0x2c, 0x6e, 0x67, 0xb6, 0x92, 0xb1, 0x6d, 0x15, 0xd9, 0xba, 0x1f, 0xf9, 0xbc, 0x76, 0xce, 0xe5, 0x75, 0x41, 0x85, 0x32, 0xa9, 0x05, 0x66, 0x11, 0x99, 0xf9, 0xff, 0xfe, 0xb6, 0xdb, 0x39, 0x85, 0xd7, 0x06, 0xe0, 0x82, 0x0c, 0x49, 0x9f, 0x27, 0x44, 0x48, 0xff, 0x9f, 0x11, 0xae, 0x15, 0x09, 0x0f, 0x67, 0x64, 0xde, 0x99, 0xcb, 0x7b, 0x18, 0x54, 0xb5, 0x24, 0xa2, 0x93, 0xbb, 0x37, 0xe9, 0x97, 0x8d, 0xb4, 0x51, 0xf8, 0x17, 0x3e, 0x05, 0xf2, 0xee, 0x79, 0x5b, 0xeb, 0x78, 0x34, 0x81, 0xee, 0x78, 0x02, 0xdd, 0xa7, 0x09, 0x74, 0x6f, 0xa7, 0xd0, 0x19, 0x4f, 0xa1, 0xf3, 0x30, 0x85, 0xce, 0x19, 0x8a, 0xa9, 0x4a, 0xed, 0x11, 0x1f, 0x20, 0x5b, 0x8b, 0x11, 0x75, 0xc5, 0x45, 0x0f, 0xbd, 0xaf, 0xd7, 0xb5, 0x5d, 0x30, 0x75, 0x93, 0x10, 0x19, 0x96, 0xcd, 0x4a, 0xed, 0xbd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x5b, 0x27, 0xe3, 0x30, 0x03, 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 if len(m.UserSubscriptions) > 0 { for iNdEx := len(m.UserSubscriptions) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.UserSubscriptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } } if len(m.Developers) > 0 { for iNdEx := len(m.Developers) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Developers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } } if len(m.InsuranceLockups) > 0 { for iNdEx := len(m.InsuranceLockups) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.InsuranceLockups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } } if len(m.UnlockingLockups) > 0 { for iNdEx := len(m.UnlockingLockups) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.UnlockingLockups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if len(m.Lockups) > 0 { for iNdEx := len(m.Lockups) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Lockups[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 { 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)) if len(m.Lockups) > 0 { for _, e := range m.Lockups { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.UnlockingLockups) > 0 { for _, e := range m.UnlockingLockups { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.InsuranceLockups) > 0 { for _, e := range m.InsuranceLockups { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.Developers) > 0 { for _, e := range m.Developers { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } if len(m.UserSubscriptions) > 0 { for _, e := range m.UserSubscriptions { l = e.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 case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Lockups", 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.Lockups = append(m.Lockups, Lockup{}) if err := m.Lockups[len(m.Lockups)-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 UnlockingLockups", 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.UnlockingLockups = append(m.UnlockingLockups, UnlockingLockup{}) if err := m.UnlockingLockups[len(m.UnlockingLockups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InsuranceLockups", 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.InsuranceLockups = append(m.InsuranceLockups, Lockup{}) if err := m.InsuranceLockups[len(m.InsuranceLockups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developers", 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.Developers = append(m.Developers, Developer{}) if err := m.Developers[len(m.Developers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserSubscriptions", 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.UserSubscriptions = append(m.UserSubscriptions, UserSubscription{}) if err := m.UserSubscriptions[len(m.UserSubscriptions)-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 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") ) ================================================ FILE: x/tier/types/keys.go ================================================ package types import ( "bytes" "strconv" sdk "github.com/cosmos/cosmos-sdk/types" ) const ( // ModuleName defines the module name ModuleName = "tier" // DeveloperPoolName defines the developer pool module account DeveloperPoolName = "developer_pool" // InsurancePoolName defines the developer insurance pool module account InsurancePoolName = "insurance_pool" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for the module RouterKey = ModuleName // QuerierRoute is the querier route for the module QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_tier" // LockupKeyPrefix is the prefix to retrieve all Lockups LockupKeyPrefix = "lockup/" // UnlockingLockupKeyPrefix is the prefix to retrieve all UnlockingLockups UnlockingLockupKeyPrefix = "unlockingLockup/" // InsuranceLockupKeyPrefix is the prefix to retrieve all insurance Lockups InsuranceLockupKeyPrefix = "insuranceLockup/" // UserSubscriptionKeyPrefix is the prefix to store user subscriptions UserSubscriptionKeyPrefix = "userSub/" // TotalDevGrantedKeyPrefix is the prefix to store developer total granted amounts TotalDevGrantedKeyPrefix = "totalDevGranted/" // DeveloperKeyPrefix is the prefix to store developer configurations DeveloperKeyPrefix = "developer/" ) var ( ParamsKey = []byte("p_tier") TotalLockupsKey = []byte("total_lockups") TotalCreditsKey = []byte("total_credits") ) func KeyPrefix(unlocking bool) []byte { if unlocking { return []byte(UnlockingLockupKeyPrefix) } return []byte(LockupKeyPrefix) } // LockupKey builds and returns a key to store/retrieve the Lockup. func LockupKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { // Calculate the size of the buffer in advance size := len(delAddr.Bytes()) + 1 + len(valAddr.Bytes()) + 1 buf := make([]byte, 0, size) // Append bytes to the buffer buf = append(buf, delAddr.Bytes()...) buf = append(buf, '/') buf = append(buf, valAddr.Bytes()...) buf = append(buf, '/') return buf } // UnlockingLockupKey builds and returns the key to store/retrieve the UnlockingLockup. func UnlockingLockupKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64) []byte { // Calculate the size of the buffer in advance, allocating 20 more bytes for creationHeight. creationHeightLength := 20 size := len(delAddr.Bytes()) + 1 + len(valAddr.Bytes()) + 1 + creationHeightLength + 1 buf := make([]byte, 0, size) // Append bytes to the buffer buf = append(buf, delAddr.Bytes()...) buf = append(buf, '/') buf = append(buf, valAddr.Bytes()...) buf = append(buf, '/') buf = strconv.AppendInt(buf, creationHeight, 10) buf = append(buf, '/') return buf } // LockupKeyToAddresses retrieves delAddr and valAddr from provided Lockup key. func LockupKeyToAddresses(key []byte) (sdk.AccAddress, sdk.ValAddress) { // Find the positions of the delimiters parts := bytes.Split(key, []byte{'/'}) if len(parts) != 3 { panic("invalid key format: expected format delAddr/valAddr/") } // Reconstruct the addresses delAddr := sdk.AccAddress(parts[0]) valAddr := sdk.ValAddress(parts[1]) return delAddr, valAddr } // UnlockingLockupKeyToAddressesAtHeight retrieves delAddr, valAddr, and creationHeight from provided unlocking Lockup key. func UnlockingLockupKeyToAddressesAtHeight(key []byte) (sdk.AccAddress, sdk.ValAddress, int64) { // Find the positions of the delimiters parts := bytes.Split(key, []byte{'/'}) if len(parts) != 4 { panic("invalid key format: expected format delAddr/valAddr/creationHeight/") } // Reconstruct the addresses and creation height delAddr := sdk.AccAddress(parts[0]) valAddr := sdk.ValAddress(parts[1]) creationHeight, err := strconv.ParseInt(string(parts[2]), 10, 64) if err != nil { panic("unexpected creation height") } return delAddr, valAddr, creationHeight } // UserSubscriptionKey builds and returns a key to store user subscription data. func UserSubscriptionKey(developerAddr sdk.AccAddress, userDid string) []byte { // Calculate the size of the buffer in advance size := len(developerAddr.Bytes()) + 1 + len([]byte(userDid)) + 1 buf := make([]byte, 0, size) // Append bytes to the buffer buf = append(buf, developerAddr.Bytes()...) buf = append(buf, '/') buf = append(buf, []byte(userDid)...) buf = append(buf, '/') return buf } // UserSubscriptionKeyToAddresses retrieves developerAddr and userDid from provided UserSubscriptionKey. func UserSubscriptionKeyToAddresses(key []byte) (sdk.AccAddress, string) { // Find the positions of the delimiters parts := bytes.Split(key, []byte{'/'}) if len(parts) != 3 { panic("invalid key format: expected format developerAddr/userDid/") } // Reconstruct the developer address and user DID developerAddr := sdk.AccAddress(parts[0]) userDid := string(parts[1]) return developerAddr, userDid } // DeveloperKey builds and returns a key to store developer configuration. func DeveloperKey(developerAddr sdk.AccAddress) []byte { // Calculate the size of the buffer in advance size := len(developerAddr.Bytes()) + 1 buf := make([]byte, 0, size) // Append bytes to the buffer buf = append(buf, developerAddr.Bytes()...) buf = append(buf, '/') return buf } // DeveloperKeyToAddress retrieves developerAddr from provided DeveloperKey. func DeveloperKeyToAddress(key []byte) sdk.AccAddress { // Find the positions of the delimiters parts := bytes.Split(key, []byte{'/'}) if len(parts) != 2 { panic("invalid key format: expected format developerAddr/") } // Reconstruct the address developerAddr := sdk.AccAddress(parts[0]) return developerAddr } // TotalDevGrantedKey builds and returns a key to store developer total granted amount. func TotalDevGrantedKey(developerAddr sdk.AccAddress) []byte { // Calculate the size of the buffer in advance size := len(developerAddr.Bytes()) + 1 buf := make([]byte, 0, size) // Append bytes to the buffer buf = append(buf, developerAddr.Bytes()...) buf = append(buf, '/') return buf } ================================================ FILE: x/tier/types/lockup.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/tier/v1beta1/lockup.proto package types import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // Lockup tracks the locked stake of a delegator. type Lockup struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Amount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` } func (m *Lockup) Reset() { *m = Lockup{} } func (m *Lockup) String() string { return proto.CompactTextString(m) } func (*Lockup) ProtoMessage() {} func (*Lockup) Descriptor() ([]byte, []int) { return fileDescriptor_2e0e6f58f533fc52, []int{0} } func (m *Lockup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Lockup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Lockup.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 *Lockup) XXX_Merge(src proto.Message) { xxx_messageInfo_Lockup.Merge(m, src) } func (m *Lockup) XXX_Size() int { return m.Size() } func (m *Lockup) XXX_DiscardUnknown() { xxx_messageInfo_Lockup.DiscardUnknown(m) } var xxx_messageInfo_Lockup proto.InternalMessageInfo func (m *Lockup) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *Lockup) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } // UnlockingLockup tracks the unlocking stake of a delegator. type UnlockingLockup struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` CreationHeight int64 `protobuf:"varint,3,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` Amount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` // The time at which the stake undelegation will be completed. CompletionTime time.Time `protobuf:"bytes,5,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` // The time after which the unlocking lockup can be completed. UnlockTime time.Time `protobuf:"bytes,6,opt,name=unlock_time,json=unlockTime,proto3,stdtime" json:"unlock_time"` } func (m *UnlockingLockup) Reset() { *m = UnlockingLockup{} } func (m *UnlockingLockup) String() string { return proto.CompactTextString(m) } func (*UnlockingLockup) ProtoMessage() {} func (*UnlockingLockup) Descriptor() ([]byte, []int) { return fileDescriptor_2e0e6f58f533fc52, []int{1} } func (m *UnlockingLockup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnlockingLockup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnlockingLockup.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 *UnlockingLockup) XXX_Merge(src proto.Message) { xxx_messageInfo_UnlockingLockup.Merge(m, src) } func (m *UnlockingLockup) XXX_Size() int { return m.Size() } func (m *UnlockingLockup) XXX_DiscardUnknown() { xxx_messageInfo_UnlockingLockup.DiscardUnknown(m) } var xxx_messageInfo_UnlockingLockup proto.InternalMessageInfo func (m *UnlockingLockup) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *UnlockingLockup) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } func (m *UnlockingLockup) GetCreationHeight() int64 { if m != nil { return m.CreationHeight } return 0 } func (m *UnlockingLockup) GetCompletionTime() time.Time { if m != nil { return m.CompletionTime } return time.Time{} } func (m *UnlockingLockup) GetUnlockTime() time.Time { if m != nil { return m.UnlockTime } return time.Time{} } func init() { proto.RegisterType((*Lockup)(nil), "sourcehub.tier.v1beta1.Lockup") proto.RegisterType((*UnlockingLockup)(nil), "sourcehub.tier.v1beta1.UnlockingLockup") } func init() { proto.RegisterFile("sourcehub/tier/v1beta1/lockup.proto", fileDescriptor_2e0e6f58f533fc52) } var fileDescriptor_2e0e6f58f533fc52 = []byte{ // 451 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x53, 0xcd, 0x8a, 0x13, 0x41, 0x10, 0x4e, 0x1b, 0x0d, 0xd8, 0x8b, 0x1b, 0x33, 0xac, 0x12, 0x03, 0x4e, 0xd6, 0xf5, 0xe0, 0xa2, 0x64, 0x9a, 0xd5, 0x27, 0x30, 0x22, 0x18, 0x11, 0x0f, 0xe3, 0xcf, 0xc1, 0x4b, 0xe8, 0xcc, 0xb4, 0x9d, 0x26, 0x33, 0x5d, 0xa1, 0xbb, 0x27, 0xea, 0x5b, 0xec, 0x63, 0x78, 0xf4, 0x10, 0x7c, 0x86, 0x3d, 0x2e, 0x39, 0x89, 0x87, 0x55, 0x12, 0xc1, 0xd7, 0x90, 0xfe, 0x99, 0x5d, 0xdd, 0x9b, 0x9e, 0xbc, 0x0c, 0x53, 0x5f, 0x7d, 0xf5, 0x7d, 0x5d, 0x45, 0x15, 0xbe, 0xad, 0xa1, 0x52, 0x19, 0x9b, 0x56, 0x13, 0x62, 0x04, 0x53, 0x64, 0x71, 0x30, 0x61, 0x86, 0x1e, 0x90, 0x02, 0xb2, 0x59, 0x35, 0x4f, 0xe6, 0x0a, 0x0c, 0x44, 0xd7, 0x4f, 0x49, 0x89, 0x25, 0x25, 0x81, 0xd4, 0xeb, 0xd0, 0x52, 0x48, 0x20, 0xee, 0xeb, 0xa9, 0xbd, 0x1b, 0x19, 0xe8, 0x12, 0xf4, 0xd8, 0x45, 0xc4, 0x07, 0x21, 0xb5, 0xc3, 0x81, 0x83, 0xc7, 0xed, 0x5f, 0x40, 0xfb, 0x1c, 0x80, 0x17, 0x8c, 0xb8, 0x68, 0x52, 0xbd, 0x25, 0x46, 0x94, 0x4c, 0x1b, 0x5a, 0x06, 0xf3, 0xbd, 0x1f, 0x08, 0xb7, 0x9e, 0xb9, 0xd7, 0x44, 0x8f, 0x71, 0x27, 0x67, 0x05, 0xe3, 0xd4, 0x80, 0x1a, 0xd3, 0x3c, 0x57, 0x4c, 0xeb, 0x2e, 0xda, 0x45, 0xfb, 0x97, 0x87, 0xdd, 0xd5, 0x72, 0xb0, 0x13, 0xec, 0x1e, 0xfa, 0xcc, 0x0b, 0xa3, 0x84, 0xe4, 0xe9, 0xd5, 0xd3, 0x92, 0x80, 0x47, 0xcf, 0x71, 0x67, 0x41, 0x0b, 0x91, 0xff, 0x21, 0x73, 0xc1, 0xc9, 0xdc, 0x5a, 0x2d, 0x07, 0x37, 0x83, 0xcc, 0xeb, 0x9a, 0x73, 0x4e, 0x6f, 0x71, 0x0e, 0x8f, 0x1e, 0xe1, 0x16, 0x2d, 0xa1, 0x92, 0xa6, 0xdb, 0x74, 0x22, 0xf7, 0x8e, 0x4e, 0xfa, 0x8d, 0xaf, 0x27, 0xfd, 0x6b, 0x5e, 0x48, 0xe7, 0xb3, 0x44, 0x00, 0x29, 0xa9, 0x99, 0x26, 0x23, 0x69, 0x56, 0xcb, 0x01, 0x0e, 0x0e, 0x23, 0x69, 0xd2, 0x50, 0xba, 0xf7, 0xb9, 0x89, 0xdb, 0xaf, 0xa4, 0x1d, 0xbb, 0x90, 0xfc, 0xff, 0xee, 0xf7, 0x0e, 0x6e, 0x67, 0x8a, 0x51, 0x23, 0x40, 0x8e, 0xa7, 0x4c, 0xf0, 0xa9, 0x6f, 0xbc, 0x99, 0x6e, 0xd7, 0xf0, 0x13, 0x87, 0xfe, 0x36, 0x98, 0x8b, 0xff, 0x3c, 0x98, 0x28, 0xc5, 0xed, 0x0c, 0xca, 0x79, 0xc1, 0x9c, 0x9f, 0xdd, 0x8e, 0xee, 0xa5, 0x5d, 0xb4, 0xbf, 0x75, 0xbf, 0x97, 0xf8, 0xd5, 0x49, 0xea, 0xd5, 0x49, 0x5e, 0xd6, 0xab, 0x33, 0xbc, 0x62, 0x9d, 0x0e, 0xbf, 0xf5, 0xd1, 0xc7, 0x9f, 0x9f, 0xee, 0xa2, 0x74, 0xfb, 0x4c, 0xc1, 0x72, 0xa2, 0xa7, 0x78, 0xab, 0x72, 0xb3, 0xf6, 0x7a, 0xad, 0xbf, 0xd5, 0xc3, 0xbe, 0xda, 0xe6, 0x87, 0xa3, 0xa3, 0x75, 0x8c, 0x8e, 0xd7, 0x31, 0xfa, 0xbe, 0x8e, 0xd1, 0xe1, 0x26, 0x6e, 0x1c, 0x6f, 0xe2, 0xc6, 0x97, 0x4d, 0xdc, 0x78, 0x43, 0xb8, 0x30, 0xf6, 0x66, 0x32, 0x28, 0x89, 0xbf, 0x20, 0xc9, 0xcc, 0x3b, 0x50, 0x33, 0x72, 0x76, 0x74, 0xef, 0xfd, 0xd9, 0x99, 0x0f, 0x73, 0xa6, 0x27, 0x2d, 0xe7, 0xfc, 0xe0, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, 0xb5, 0xd7, 0x34, 0x95, 0x03, 0x00, 0x00, } func (m *Lockup) 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 *Lockup) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Lockup) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size := m.Amount.Size() i -= size if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintLockup(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintLockup(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintLockup(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnlockingLockup) 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 *UnlockingLockup) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UnlockingLockup) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.UnlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UnlockTime):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintLockup(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x32 n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintLockup(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x2a { size := m.Amount.Size() i -= size if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintLockup(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 if m.CreationHeight != 0 { i = encodeVarintLockup(dAtA, i, uint64(m.CreationHeight)) i-- dAtA[i] = 0x18 } if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintLockup(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintLockup(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintLockup(dAtA []byte, offset int, v uint64) int { offset -= sovLockup(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Lockup) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovLockup(uint64(l)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovLockup(uint64(l)) } l = m.Amount.Size() n += 1 + l + sovLockup(uint64(l)) return n } func (m *UnlockingLockup) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovLockup(uint64(l)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovLockup(uint64(l)) } if m.CreationHeight != 0 { n += 1 + sovLockup(uint64(m.CreationHeight)) } l = m.Amount.Size() n += 1 + l + sovLockup(uint64(l)) l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime) n += 1 + l + sovLockup(uint64(l)) l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UnlockTime) n += 1 + l + sovLockup(uint64(l)) return n } func sovLockup(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozLockup(x uint64) (n int) { return sovLockup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Lockup) 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 ErrIntOverflowLockup } 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: Lockup: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Lockup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } 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 ErrInvalidLengthLockup } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } 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 ErrInvalidLengthLockup } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } 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 ErrInvalidLengthLockup } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLockup(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthLockup } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnlockingLockup) 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 ErrIntOverflowLockup } 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: UnlockingLockup: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnlockingLockup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } 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 ErrInvalidLengthLockup } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } 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 ErrInvalidLengthLockup } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } m.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } 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 ErrInvalidLengthLockup } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLockup } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnlockTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLockup } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLockup } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthLockup } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.UnlockTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLockup(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthLockup } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipLockup(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, ErrIntOverflowLockup } 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, ErrIntOverflowLockup } 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, ErrIntOverflowLockup } 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, ErrInvalidLengthLockup } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupLockup } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthLockup } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthLockup = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLockup = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLockup = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/tier/types/messages.go ================================================ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" appparams "github.com/sourcenetwork/sourcehub/app/params" ) var ( _ sdk.Msg = &MsgLock{} _ sdk.Msg = &MsgLockAuto{} _ sdk.Msg = &MsgUnlock{} _ sdk.Msg = &MsgCancelUnlocking{} _ sdk.Msg = &MsgRedelegate{} _ sdk.Msg = &MsgCreateDeveloper{} _ sdk.Msg = &MsgUpdateDeveloper{} _ sdk.Msg = &MsgRemoveDeveloper{} _ sdk.Msg = &MsgAddUserSubscription{} _ sdk.Msg = &MsgUpdateUserSubscription{} _ sdk.Msg = &MsgRemoveUserSubscription{} ) // MsgLock func NewMsgLock(delAddr, valAddr string, stake sdk.Coin) *MsgLock { return &MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: stake, } } func (msg *MsgLock) ValidateBasic() error { if err := validateAccAddr(msg.DelegatorAddress); err != nil { return err } if err := validateValAddr(msg.ValidatorAddress); err != nil { return err } if err := validateDenom(msg.Stake); err != nil { return err } return nil } // MsgLockAuto func NewMsgLockAuto(delAddr string, stake sdk.Coin) *MsgLockAuto { return &MsgLockAuto{ DelegatorAddress: delAddr, Stake: stake, } } func (msg *MsgLockAuto) ValidateBasic() error { if err := validateAccAddr(msg.DelegatorAddress); err != nil { return err } if err := validateDenom(msg.Stake); err != nil { return err } return nil } // MsgUnlock func NewMsgUnlock(delAddr, valAddr string, stake sdk.Coin) *MsgUnlock { return &MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: stake, } } func (msg *MsgUnlock) ValidateBasic() error { if err := validateAccAddr(msg.DelegatorAddress); err != nil { return err } if err := validateValAddr(msg.ValidatorAddress); err != nil { return err } if err := validateDenom(msg.Stake); err != nil { return err } return nil } // MsgCancelUnlocking func NewMsgCancelUnlocking(delAddr, valAddr string, stake sdk.Coin, creationHeight int64) *MsgCancelUnlocking { return &MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: stake, CreationHeight: creationHeight, } } func (msg *MsgCancelUnlocking) ValidateBasic() error { if err := validateAccAddr(msg.DelegatorAddress); err != nil { return err } if err := validateValAddr(msg.ValidatorAddress); err != nil { return err } if err := validateDenom(msg.Stake); err != nil { return err } return nil } // MsgRedelegate func NewMsgRedelegate(delAddress, srcValAddr, dstValAddr string, stake sdk.Coin) *MsgRedelegate { return &MsgRedelegate{ DelegatorAddress: delAddress, SrcValidatorAddress: srcValAddr, DstValidatorAddress: dstValAddr, Stake: stake, } } func (msg *MsgRedelegate) ValidateBasic() error { if msg.SrcValidatorAddress == msg.DstValidatorAddress { return ErrInvalidAddress.Wrapf("src and dst validator addresses are the same") } if err := validateAccAddr(msg.DelegatorAddress); err != nil { return err } if err := validateValAddr(msg.SrcValidatorAddress); err != nil { return err } if err := validateValAddr(msg.DstValidatorAddress); err != nil { return err } if err := validateDenom(msg.Stake); err != nil { return err } return nil } // MsgCreateDeveloper func NewMsgCreateDeveloper(developerAddr string, autoLockEnabled bool) *MsgCreateDeveloper { return &MsgCreateDeveloper{ Developer: developerAddr, AutoLockEnabled: autoLockEnabled, } } func (msg *MsgCreateDeveloper) ValidateBasic() error { if err := validateAccAddr(msg.Developer); err != nil { return err } return nil } // MsgUpdateDeveloper func NewMsgUpdateDeveloper(developerAddr string, autoLockEnabled bool) *MsgUpdateDeveloper { return &MsgUpdateDeveloper{ Developer: developerAddr, AutoLockEnabled: autoLockEnabled, } } func (msg *MsgUpdateDeveloper) ValidateBasic() error { if err := validateAccAddr(msg.Developer); err != nil { return err } return nil } // MsgRemoveDeveloper func NewMsgRemoveDeveloper(developerAddr string) *MsgRemoveDeveloper { return &MsgRemoveDeveloper{ Developer: developerAddr, } } func (msg *MsgRemoveDeveloper) ValidateBasic() error { if err := validateAccAddr(msg.Developer); err != nil { return err } return nil } // MsgAddUserSubscription func NewMsgAddUserSubscription(developerAddr, userAddr, userDid string, amount uint64, period uint64) *MsgAddUserSubscription { return &MsgAddUserSubscription{ Developer: developerAddr, UserDid: userDid, Amount: amount, Period: period, } } func (msg *MsgAddUserSubscription) ValidateBasic() error { if err := validateAccAddr(msg.Developer); err != nil { return err } if len(msg.UserDid) <= 4 || msg.UserDid[:4] != "did:" { return ErrInvalidDID } if msg.Amount <= 0 { return ErrInvalidAmount } if msg.Period <= 0 { return ErrInvalidSubscriptionPeriod } return nil } // MsgUpdateUserSubscription func NewMsgUpdateUserSubscription(developerAddr, userAddr, userDid string, amount uint64, period uint64) *MsgUpdateUserSubscription { return &MsgUpdateUserSubscription{ Developer: developerAddr, UserDid: userDid, Amount: amount, Period: period, } } func (msg *MsgUpdateUserSubscription) ValidateBasic() error { if err := validateAccAddr(msg.Developer); err != nil { return err } if len(msg.UserDid) <= 4 || msg.UserDid[:4] != "did:" { return ErrInvalidDID } if msg.Amount <= 0 { return ErrInvalidAmount } if msg.Period <= 0 { return ErrInvalidSubscriptionPeriod } return nil } // MsgRemoveUserSubscription func NewMsgRemoveUserSubscription(developerAddr, userAddr, userDid string) *MsgRemoveUserSubscription { return &MsgRemoveUserSubscription{ Developer: developerAddr, UserDid: userDid, } } func (msg *MsgRemoveUserSubscription) ValidateBasic() error { if err := validateAccAddr(msg.Developer); err != nil { return err } if len(msg.UserDid) <= 4 || msg.UserDid[:4] != "did:" { return ErrInvalidDID } return nil } func validateAccAddr(address string) error { _, err := sdk.AccAddressFromBech32(address) if err != nil { return ErrInvalidAddress.Wrapf("delegator address %s:%s", address, err) } return nil } func validateValAddr(address string) error { _, err := sdk.ValAddressFromBech32(address) if err != nil { return ErrInvalidAddress.Wrapf("validator address %s:%s", address, err) } return nil } func validateDenom(stake sdk.Coin) error { if !stake.IsValid() || !stake.Amount.IsPositive() || !stake.Amount.IsInt64() { return ErrInvalidDenom.Wrapf("invalid amount %s", stake) } if stake.Denom != appparams.DefaultBondDenom { return ErrInvalidDenom.Wrapf("got %s, expected %s", stake.Denom, appparams.DefaultBondDenom) } return nil } // Must variant which panics on error func MustValAddressFromBech32(address string) sdk.ValAddress { valAddr, err := sdk.ValAddressFromBech32(address) if err != nil { panic(err) } return valAddr } ================================================ FILE: x/tier/types/messages_test.go ================================================ package types import ( "testing" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" appparams "github.com/sourcenetwork/sourcehub/app/params" "github.com/sourcenetwork/sourcehub/testutil/sample" ) var ( bondDenom = appparams.DefaultBondDenom // bondDenom = appparams.DefaultBondDenom delAddr = sample.RandomAccAddress().String() valAddr = sample.RandomValAddress().String() valAddr2 = sample.RandomValAddress().String() stake = sdk.NewCoin(bondDenom, math.NewInt(100)) invalidAddr = "invalid_address" invalidDenomStake = sdk.NewCoin("denom1", math.NewInt(100)) nonPositiveStake = sdk.NewCoin(bondDenom, math.NewInt(0)) overflowStake = sdk.NewCoin(bondDenom, math.NewIntFromUint64(1<<63)) ) func TestMsgLock_ValidateBasic(t *testing.T) { tests := []struct { name string msg MsgLock err error }{ { name: "valid request", msg: MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: stake, }, }, { name: "invalid delegator address", msg: MsgLock{ DelegatorAddress: invalidAddr, ValidatorAddress: valAddr, Stake: stake, }, err: ErrInvalidAddress, }, { name: "invalid validator address", msg: MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: invalidAddr, Stake: stake, }, err: ErrInvalidAddress, }, { name: "invalid denom", msg: MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: invalidDenomStake, }, err: ErrInvalidDenom, }, { name: "invalid denom (non-positive amount)", msg: MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: nonPositiveStake, }, err: ErrInvalidDenom, }, { name: "invalid denom (overflowed int64 amount)", msg: MsgLock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: overflowStake, }, err: ErrInvalidDenom, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := tt.msg.ValidateBasic() if tt.err != nil { require.ErrorIs(t, err, tt.err) return } require.NoError(t, err) }) } } func TestMsgUnlockStake_ValidateBasic(t *testing.T) { tests := []struct { name string msg MsgUnlock err error }{ { name: "valid request", msg: MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: stake, }, }, { name: "invalid delegator address", msg: MsgUnlock{ DelegatorAddress: invalidAddr, ValidatorAddress: valAddr, Stake: stake, }, err: ErrInvalidAddress, }, { name: "invalid validator address", msg: MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: invalidAddr, Stake: stake, }, err: ErrInvalidAddress, }, { name: "invalid denom", msg: MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: invalidDenomStake, }, err: ErrInvalidDenom, }, { name: "invalid denom (non-positive amount)", msg: MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: nonPositiveStake, }, err: ErrInvalidDenom, }, { name: "invalid denom (overflowed int64 amount)", msg: MsgUnlock{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: overflowStake, }, err: ErrInvalidDenom, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := tt.msg.ValidateBasic() if tt.err != nil { require.ErrorIs(t, err, tt.err) return } require.NoError(t, err) }) } } func TestMsgCancelUnlockingStake_ValidateBasic(t *testing.T) { tests := []struct { name string msg MsgCancelUnlocking err error }{ { name: "valid request", msg: MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: stake, CreationHeight: 1, }, }, { name: "invalid delegator address", msg: MsgCancelUnlocking{ DelegatorAddress: invalidAddr, ValidatorAddress: valAddr, Stake: stake, CreationHeight: 1, }, err: ErrInvalidAddress, }, { name: "invalid validator address", msg: MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: invalidAddr, Stake: stake, CreationHeight: 1, }, err: ErrInvalidAddress, }, { name: "invalid denom", msg: MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: invalidDenomStake, CreationHeight: 1, }, err: ErrInvalidDenom, }, { name: "invalid denom (non-positive amount)", msg: MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: nonPositiveStake, CreationHeight: 1, }, err: ErrInvalidDenom, }, { name: "invalid denom (overflowed int64 amount)", msg: MsgCancelUnlocking{ DelegatorAddress: delAddr, ValidatorAddress: valAddr, Stake: overflowStake, CreationHeight: 1, }, err: ErrInvalidDenom, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := tt.msg.ValidateBasic() if tt.err != nil { require.ErrorIs(t, err, tt.err) return } require.NoError(t, err) }) } } func TestMsgRedelegate_ValidateBasic(t *testing.T) { tests := []struct { name string msg MsgRedelegate err error }{ { name: "valid request", msg: MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: valAddr, DstValidatorAddress: valAddr2, Stake: stake, }, }, { name: "invalid delegator address", msg: MsgRedelegate{ DelegatorAddress: invalidAddr, SrcValidatorAddress: valAddr, DstValidatorAddress: valAddr2, Stake: stake, }, err: ErrInvalidAddress, }, { name: "invalid src validator address", msg: MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: invalidAddr, DstValidatorAddress: valAddr2, Stake: stake, }, err: ErrInvalidAddress, }, { name: "src and dst validator address are the same", msg: MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: valAddr, DstValidatorAddress: valAddr, Stake: stake, }, err: ErrInvalidAddress, }, { name: "invalid denom", msg: MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: valAddr, DstValidatorAddress: valAddr2, Stake: invalidDenomStake, }, err: ErrInvalidDenom, }, { name: "invalid denom (non-positive amount)", msg: MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: valAddr, DstValidatorAddress: valAddr2, Stake: nonPositiveStake, }, err: ErrInvalidDenom, }, { name: "invalid denom (overflowed int64 amount)", msg: MsgRedelegate{ DelegatorAddress: delAddr, SrcValidatorAddress: valAddr, DstValidatorAddress: valAddr2, Stake: overflowStake, }, err: ErrInvalidDenom, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := tt.msg.ValidateBasic() if tt.err != nil { require.ErrorIs(t, err, tt.err) return } require.NoError(t, err) }) } } ================================================ FILE: x/tier/types/params.go ================================================ package types import ( "fmt" time "time" "cosmossdk.io/math" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) // Parameter store keys var ( KeyEpochDuration = []byte("EpochDuration") KeyUnlockingEpochs = []byte("UnlockingEpochs") KeyDeveloperPoolFee = []byte("DeveloperPoolFee") KeyInsurancePoolFee = []byte("InsurancePoolFee") KeyInsurancePoolThreshold = []byte("InsurancePoolThreshold") KeyProcessRewardsInterval = []byte("ProcessRewardsInterval") KeyRewardRates = []byte("RewardRates") ) // ParamKeyTable for module parameters func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } // NewParams creates a new Params object func NewParams( epochDuration *time.Duration, unlockingEpochs, developerPoolFee, insurancePoolFee, insurancePoolThreshold, processRewardsInterval int64, rewardRates []Rate, ) Params { return Params{ EpochDuration: epochDuration, UnlockingEpochs: unlockingEpochs, DeveloperPoolFee: developerPoolFee, InsurancePoolFee: insurancePoolFee, InsurancePoolThreshold: insurancePoolThreshold, ProcessRewardsInterval: processRewardsInterval, RewardRates: rewardRates, } } // DefaultParams returns default parameters. // Rate in RewardRates, DeveloperPoolFee, and InsurancePoolFee are integers representing percentages // with 2 decimal precision (e.g. a rate of 150 represents 150%, a fee of 2 represents 2%). // InsurancePoolThreshold represents a threshold in "uopen", after which insurance pool is considered "full". // When the insurance pool is full, the insurance fee is allocated to the developer pool instead. func DefaultParams() Params { epochDuration := DefaultEpochDuration return NewParams( &epochDuration, // 5 minutes DefaultUnlockingEpochs, // 2 epochs DefaultDeveloperPoolFee, // 2% DefaultInsurancePoolFee, // 1% DefaultInsurancePoolThreshold, // 100,000 open DefaultProcessRewardsInterval, // 1000 blocks []Rate{ {Amount: math.NewInt(300), Rate: 150}, // x1.5 from 300 {Amount: math.NewInt(200), Rate: 120}, // x1.2 from 200 to 300 {Amount: math.NewInt(100), Rate: 110}, // x1.1 from 100 to 200 {Amount: math.NewInt(0), Rate: 100}, // x1.0 from 0 to 100 }, ) } // Validate validates the params func (p Params) Validate() error { if err := validateEpochDuration(p.EpochDuration); err != nil { return err } if err := validateUnlockingEpochs(p.UnlockingEpochs); err != nil { return err } if err := validateDeveloperPoolFee(p.DeveloperPoolFee); err != nil { return err } if err := validateInsurancePoolFee(p.InsurancePoolFee); err != nil { return err } if err := validateInsurancePoolThreshold(p.InsurancePoolThreshold); err != nil { return err } if err := validateProcessRewardsInterval(p.ProcessRewardsInterval); err != nil { return err } if err := validateRewardRates(p.RewardRates); err != nil { return err } return nil } // ParamSetPairs implements the ParamSet interface and returns all the key/value pairs func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ {Key: KeyEpochDuration, Value: &p.EpochDuration, ValidatorFn: validateEpochDuration}, {Key: KeyUnlockingEpochs, Value: &p.UnlockingEpochs, ValidatorFn: validateUnlockingEpochs}, {Key: KeyDeveloperPoolFee, Value: &p.DeveloperPoolFee, ValidatorFn: validateDeveloperPoolFee}, {Key: KeyInsurancePoolFee, Value: &p.InsurancePoolFee, ValidatorFn: validateInsurancePoolFee}, {Key: KeyInsurancePoolThreshold, Value: &p.InsurancePoolThreshold, ValidatorFn: validateInsurancePoolThreshold}, {Key: KeyProcessRewardsInterval, Value: &p.ProcessRewardsInterval, ValidatorFn: validateProcessRewardsInterval}, {Key: KeyRewardRates, Value: &p.RewardRates, ValidatorFn: validateRewardRates}, } } func validateEpochDuration(i interface{}) error { duration, ok := i.(*time.Duration) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if duration == nil || *duration <= 0 { return fmt.Errorf("invalid epoch duration: %d", duration) } return nil } func validateUnlockingEpochs(i interface{}) error { epochs, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if epochs <= 0 { return fmt.Errorf("invalid unlocking epochs: %d", epochs) } return nil } func validateDeveloperPoolFee(i interface{}) error { fee, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if fee < 0 { return fmt.Errorf("invalid developer pool fee: %d", fee) } return nil } func validateInsurancePoolFee(i interface{}) error { fee, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if fee < 0 { return fmt.Errorf("invalid insurance pool fee: %d", fee) } return nil } func validateInsurancePoolThreshold(i interface{}) error { threshold, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if threshold < 0 { return fmt.Errorf("invalid insurance pool threshold: %d", threshold) } return nil } func validateProcessRewardsInterval(i interface{}) error { interval, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if interval <= 0 { return fmt.Errorf("invalid process rewards interval: %d", interval) } return nil } func validateRewardRates(i interface{}) error { rates, ok := i.([]Rate) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } for _, rate := range rates { if rate.Amount.IsNegative() { return fmt.Errorf("invalid locked stake: %s", rate.Amount) } if rate.Rate <= 0 { return fmt.Errorf("invalid rate: %d", rate.Rate) } } return nil } ================================================ FILE: x/tier/types/params.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/tier/v1beta1/params.proto package types import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 { EpochDuration *time.Duration `protobuf:"bytes,1,opt,name=epoch_duration,json=epochDuration,proto3,stdduration" json:"epoch_duration,omitempty"` UnlockingEpochs int64 `protobuf:"varint,2,opt,name=unlocking_epochs,json=unlockingEpochs,proto3" json:"unlocking_epochs,omitempty"` DeveloperPoolFee int64 `protobuf:"varint,3,opt,name=developer_pool_fee,json=developerPoolFee,proto3" json:"developer_pool_fee,omitempty"` InsurancePoolFee int64 `protobuf:"varint,4,opt,name=insurance_pool_fee,json=insurancePoolFee,proto3" json:"insurance_pool_fee,omitempty"` InsurancePoolThreshold int64 `protobuf:"varint,5,opt,name=insurance_pool_threshold,json=insurancePoolThreshold,proto3" json:"insurance_pool_threshold,omitempty"` ProcessRewardsInterval int64 `protobuf:"varint,6,opt,name=process_rewards_interval,json=processRewardsInterval,proto3" json:"process_rewards_interval,omitempty"` RewardRates []Rate `protobuf:"bytes,7,rep,name=reward_rates,json=rewardRates,proto3" json:"reward_rates"` } 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_a6ec74918331e1a2, []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 (m *Params) GetEpochDuration() *time.Duration { if m != nil { return m.EpochDuration } return nil } func (m *Params) GetUnlockingEpochs() int64 { if m != nil { return m.UnlockingEpochs } return 0 } func (m *Params) GetDeveloperPoolFee() int64 { if m != nil { return m.DeveloperPoolFee } return 0 } func (m *Params) GetInsurancePoolFee() int64 { if m != nil { return m.InsurancePoolFee } return 0 } func (m *Params) GetInsurancePoolThreshold() int64 { if m != nil { return m.InsurancePoolThreshold } return 0 } func (m *Params) GetProcessRewardsInterval() int64 { if m != nil { return m.ProcessRewardsInterval } return 0 } func (m *Params) GetRewardRates() []Rate { if m != nil { return m.RewardRates } return nil } // Rate defines the rate for a specific locked stake. type Rate struct { // amount of locked stake required for earning rewards at this rate. Amount cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` Rate int64 `protobuf:"varint,2,opt,name=rate,proto3" json:"rate,omitempty"` } func (m *Rate) Reset() { *m = Rate{} } func (m *Rate) String() string { return proto.CompactTextString(m) } func (*Rate) ProtoMessage() {} func (*Rate) Descriptor() ([]byte, []int) { return fileDescriptor_a6ec74918331e1a2, []int{1} } func (m *Rate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Rate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Rate.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 *Rate) XXX_Merge(src proto.Message) { xxx_messageInfo_Rate.Merge(m, src) } func (m *Rate) XXX_Size() int { return m.Size() } func (m *Rate) XXX_DiscardUnknown() { xxx_messageInfo_Rate.DiscardUnknown(m) } var xxx_messageInfo_Rate proto.InternalMessageInfo func (m *Rate) GetRate() int64 { if m != nil { return m.Rate } return 0 } func init() { proto.RegisterType((*Params)(nil), "sourcehub.tier.v1beta1.Params") proto.RegisterType((*Rate)(nil), "sourcehub.tier.v1beta1.Rate") } func init() { proto.RegisterFile("sourcehub/tier/v1beta1/params.proto", fileDescriptor_a6ec74918331e1a2) } var fileDescriptor_a6ec74918331e1a2 = []byte{ // 492 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x6e, 0xd3, 0x40, 0x10, 0xc6, 0x63, 0x12, 0x82, 0xba, 0xe1, 0x4f, 0xb1, 0xa0, 0xb8, 0x55, 0xe5, 0x44, 0xe5, 0x12, 0x0a, 0xec, 0xaa, 0xe5, 0x82, 0x38, 0x06, 0xa8, 0x14, 0x4e, 0x95, 0xc5, 0x89, 0x8b, 0xb5, 0x71, 0xa6, 0xb6, 0x15, 0x7b, 0xc7, 0xda, 0x5d, 0xa7, 0xf0, 0x0a, 0x9c, 0x38, 0xf2, 0x08, 0x1c, 0x7b, 0x80, 0x77, 0xe8, 0xb1, 0xe2, 0x84, 0x38, 0x14, 0x94, 0x1c, 0xfa, 0x1a, 0xc8, 0xbb, 0x76, 0x2a, 0xa0, 0x17, 0x6b, 0xe7, 0xfb, 0x7e, 0xdf, 0x68, 0xac, 0x19, 0xf2, 0x50, 0x61, 0x29, 0x23, 0x48, 0xca, 0x09, 0xd3, 0x29, 0x48, 0x36, 0xdf, 0x9b, 0x80, 0xe6, 0x7b, 0xac, 0xe0, 0x92, 0xe7, 0x8a, 0x16, 0x12, 0x35, 0xba, 0x1b, 0x2b, 0x88, 0x56, 0x10, 0xad, 0xa1, 0xad, 0xbb, 0x3c, 0x4f, 0x05, 0x32, 0xf3, 0xb5, 0xe8, 0xd6, 0x66, 0x84, 0x2a, 0x47, 0x15, 0x9a, 0x8a, 0xd9, 0xa2, 0xb6, 0xee, 0xc5, 0x18, 0xa3, 0xd5, 0xab, 0x57, 0xad, 0xfa, 0x31, 0x62, 0x9c, 0x01, 0x33, 0xd5, 0xa4, 0x3c, 0x62, 0xd3, 0x52, 0x72, 0x9d, 0xa2, 0xb0, 0xfe, 0xce, 0xb7, 0x36, 0xe9, 0x1e, 0x9a, 0x61, 0xdc, 0x03, 0x72, 0x1b, 0x0a, 0x8c, 0x92, 0xb0, 0x41, 0x3c, 0x67, 0xe0, 0x0c, 0x7b, 0xfb, 0x9b, 0xd4, 0xf6, 0xa0, 0x4d, 0x0f, 0xfa, 0xaa, 0x06, 0x46, 0x9d, 0xcf, 0xbf, 0xfa, 0x4e, 0x70, 0xcb, 0xc4, 0x1a, 0xd1, 0x7d, 0x44, 0xd6, 0x4b, 0x91, 0x61, 0x34, 0x4b, 0x45, 0x1c, 0x1a, 0x4b, 0x79, 0xd7, 0x06, 0xce, 0xb0, 0x1d, 0xdc, 0x59, 0xe9, 0xaf, 0x8d, 0xec, 0x3e, 0x21, 0xee, 0x14, 0xe6, 0x90, 0x61, 0x01, 0x32, 0x2c, 0x10, 0xb3, 0xf0, 0x08, 0xc0, 0x6b, 0x1b, 0x78, 0x7d, 0xe5, 0x1c, 0x22, 0x66, 0x07, 0x00, 0x15, 0x9d, 0x0a, 0x55, 0x4a, 0x2e, 0x22, 0xb8, 0xa4, 0x3b, 0x96, 0x5e, 0x39, 0x0d, 0xfd, 0x9c, 0x78, 0xff, 0xd0, 0x3a, 0x91, 0xa0, 0x12, 0xcc, 0xa6, 0xde, 0x75, 0x93, 0xd9, 0xf8, 0x2b, 0xf3, 0xb6, 0x71, 0xab, 0x64, 0x21, 0x31, 0x02, 0xa5, 0x42, 0x09, 0xc7, 0x5c, 0x4e, 0x55, 0x98, 0x0a, 0x0d, 0x72, 0xce, 0x33, 0xaf, 0x6b, 0x93, 0xb5, 0x1f, 0x58, 0x7b, 0x5c, 0xbb, 0xee, 0x1b, 0x72, 0xd3, 0x26, 0x42, 0xc9, 0x35, 0x28, 0xef, 0xc6, 0xa0, 0x3d, 0xec, 0xed, 0x6f, 0xd3, 0xab, 0x17, 0x4c, 0x03, 0xae, 0x61, 0xb4, 0x76, 0x7a, 0xde, 0x6f, 0x7d, 0xb9, 0x38, 0xd9, 0x75, 0x82, 0x9e, 0x0d, 0x57, 0xb2, 0x7a, 0xb1, 0xfd, 0xf1, 0xe2, 0x64, 0xf7, 0xc1, 0xe5, 0xfd, 0xbc, 0xb7, 0x17, 0x64, 0x97, 0xb5, 0x13, 0x92, 0x4e, 0x85, 0xb9, 0x2f, 0x49, 0x97, 0xe7, 0x58, 0x0a, 0x6d, 0x96, 0xb5, 0x36, 0x7a, 0x5c, 0x75, 0xfb, 0x79, 0xde, 0xbf, 0x6f, 0x6f, 0x43, 0x4d, 0x67, 0x34, 0x45, 0x96, 0x73, 0x9d, 0xd0, 0xb1, 0xd0, 0xdf, 0xbf, 0x3e, 0x25, 0xf5, 0xd1, 0x8c, 0x85, 0x0e, 0xea, 0xa8, 0xeb, 0x92, 0x4e, 0x35, 0x6f, 0xbd, 0x25, 0xf3, 0x1e, 0x8d, 0x4f, 0x17, 0xbe, 0x73, 0xb6, 0xf0, 0x9d, 0xdf, 0x0b, 0xdf, 0xf9, 0xb4, 0xf4, 0x5b, 0x67, 0x4b, 0xbf, 0xf5, 0x63, 0xe9, 0xb7, 0xde, 0xb1, 0x38, 0xd5, 0xd5, 0xaf, 0x44, 0x98, 0x33, 0x3b, 0x9e, 0x00, 0x7d, 0x8c, 0x72, 0xc6, 0xfe, 0x1b, 0x56, 0x7f, 0x28, 0x40, 0x4d, 0xba, 0xe6, 0x70, 0x9e, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x03, 0xc9, 0xd4, 0x13, 0x0d, 0x03, 0x00, 0x00, } 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 if len(m.RewardRates) > 0 { for iNdEx := len(m.RewardRates) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.RewardRates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintParams(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } } if m.ProcessRewardsInterval != 0 { i = encodeVarintParams(dAtA, i, uint64(m.ProcessRewardsInterval)) i-- dAtA[i] = 0x30 } if m.InsurancePoolThreshold != 0 { i = encodeVarintParams(dAtA, i, uint64(m.InsurancePoolThreshold)) i-- dAtA[i] = 0x28 } if m.InsurancePoolFee != 0 { i = encodeVarintParams(dAtA, i, uint64(m.InsurancePoolFee)) i-- dAtA[i] = 0x20 } if m.DeveloperPoolFee != 0 { i = encodeVarintParams(dAtA, i, uint64(m.DeveloperPoolFee)) i-- dAtA[i] = 0x18 } if m.UnlockingEpochs != 0 { i = encodeVarintParams(dAtA, i, uint64(m.UnlockingEpochs)) i-- dAtA[i] = 0x10 } if m.EpochDuration != nil { n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.EpochDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.EpochDuration):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintParams(dAtA, i, uint64(n1)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Rate) 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 *Rate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Rate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Rate != 0 { i = encodeVarintParams(dAtA, i, uint64(m.Rate)) i-- dAtA[i] = 0x10 } { size := m.Amount.Size() i -= size if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa 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 if m.EpochDuration != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.EpochDuration) n += 1 + l + sovParams(uint64(l)) } if m.UnlockingEpochs != 0 { n += 1 + sovParams(uint64(m.UnlockingEpochs)) } if m.DeveloperPoolFee != 0 { n += 1 + sovParams(uint64(m.DeveloperPoolFee)) } if m.InsurancePoolFee != 0 { n += 1 + sovParams(uint64(m.InsurancePoolFee)) } if m.InsurancePoolThreshold != 0 { n += 1 + sovParams(uint64(m.InsurancePoolThreshold)) } if m.ProcessRewardsInterval != 0 { n += 1 + sovParams(uint64(m.ProcessRewardsInterval)) } if len(m.RewardRates) > 0 { for _, e := range m.RewardRates { l = e.Size() n += 1 + l + sovParams(uint64(l)) } } return n } func (m *Rate) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.Amount.Size() n += 1 + l + sovParams(uint64(l)) if m.Rate != 0 { n += 1 + sovParams(uint64(m.Rate)) } 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 { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EpochDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthParams } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthParams } if postIndex > l { return io.ErrUnexpectedEOF } if m.EpochDuration == nil { m.EpochDuration = new(time.Duration) } if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.EpochDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UnlockingEpochs", wireType) } m.UnlockingEpochs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.UnlockingEpochs |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DeveloperPoolFee", wireType) } m.DeveloperPoolFee = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.DeveloperPoolFee |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field InsurancePoolFee", wireType) } m.InsurancePoolFee = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.InsurancePoolFee |= int64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field InsurancePoolThreshold", wireType) } m.InsurancePoolThreshold = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.InsurancePoolThreshold |= int64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProcessRewardsInterval", wireType) } m.ProcessRewardsInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProcessRewardsInterval |= int64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RewardRates", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthParams } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthParams } if postIndex > l { return io.ErrUnexpectedEOF } m.RewardRates = append(m.RewardRates, Rate{}) if err := m.RewardRates[len(m.RewardRates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex 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 (m *Rate) 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: Rate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Rate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } 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 ErrInvalidLengthParams } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthParams } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) } m.Rate = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Rate |= int64(b&0x7F) << shift if b < 0x80 { break } } 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") ) ================================================ FILE: x/tier/types/query.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/tier/v1beta1/query.proto package types import ( context "context" fmt "fmt" 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" 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" 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 // 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_f694a74eba313686, []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_f694a74eba313686, []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{} } // LockupRequest is the request type for the Query/Lockup RPC method. type LockupRequest struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } func (m *LockupRequest) Reset() { *m = LockupRequest{} } func (m *LockupRequest) String() string { return proto.CompactTextString(m) } func (*LockupRequest) ProtoMessage() {} func (*LockupRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{2} } func (m *LockupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LockupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_LockupRequest.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 *LockupRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_LockupRequest.Merge(m, src) } func (m *LockupRequest) XXX_Size() int { return m.Size() } func (m *LockupRequest) XXX_DiscardUnknown() { xxx_messageInfo_LockupRequest.DiscardUnknown(m) } var xxx_messageInfo_LockupRequest proto.InternalMessageInfo func (m *LockupRequest) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *LockupRequest) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } // LockupResponse is the response type for the Query/Lockup RPC method. type LockupResponse struct { Lockup Lockup `protobuf:"bytes,1,opt,name=lockup,proto3" json:"lockup"` } func (m *LockupResponse) Reset() { *m = LockupResponse{} } func (m *LockupResponse) String() string { return proto.CompactTextString(m) } func (*LockupResponse) ProtoMessage() {} func (*LockupResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{3} } func (m *LockupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LockupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_LockupResponse.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 *LockupResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_LockupResponse.Merge(m, src) } func (m *LockupResponse) XXX_Size() int { return m.Size() } func (m *LockupResponse) XXX_DiscardUnknown() { xxx_messageInfo_LockupResponse.DiscardUnknown(m) } var xxx_messageInfo_LockupResponse proto.InternalMessageInfo func (m *LockupResponse) GetLockup() Lockup { if m != nil { return m.Lockup } return Lockup{} } // LockupsRequest is the request type for the Query/Lockups RPC method. type LockupsRequest struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *LockupsRequest) Reset() { *m = LockupsRequest{} } func (m *LockupsRequest) String() string { return proto.CompactTextString(m) } func (*LockupsRequest) ProtoMessage() {} func (*LockupsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{4} } func (m *LockupsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LockupsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_LockupsRequest.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 *LockupsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_LockupsRequest.Merge(m, src) } func (m *LockupsRequest) XXX_Size() int { return m.Size() } func (m *LockupsRequest) XXX_DiscardUnknown() { xxx_messageInfo_LockupsRequest.DiscardUnknown(m) } var xxx_messageInfo_LockupsRequest proto.InternalMessageInfo func (m *LockupsRequest) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *LockupsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // LockupsResponse is the response type for the Query/Lockups RPC method. type LockupsResponse struct { Lockups []Lockup `protobuf:"bytes,1,rep,name=lockups,proto3" json:"lockups"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *LockupsResponse) Reset() { *m = LockupsResponse{} } func (m *LockupsResponse) String() string { return proto.CompactTextString(m) } func (*LockupsResponse) ProtoMessage() {} func (*LockupsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{5} } func (m *LockupsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LockupsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_LockupsResponse.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 *LockupsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_LockupsResponse.Merge(m, src) } func (m *LockupsResponse) XXX_Size() int { return m.Size() } func (m *LockupsResponse) XXX_DiscardUnknown() { xxx_messageInfo_LockupsResponse.DiscardUnknown(m) } var xxx_messageInfo_LockupsResponse proto.InternalMessageInfo func (m *LockupsResponse) GetLockups() []Lockup { if m != nil { return m.Lockups } return nil } func (m *LockupsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } // UnlockingLockupRequest is the request type for the Query/UnlockingLockup RPC method. type UnlockingLockupRequest struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` CreationHeight int64 `protobuf:"varint,3,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` } func (m *UnlockingLockupRequest) Reset() { *m = UnlockingLockupRequest{} } func (m *UnlockingLockupRequest) String() string { return proto.CompactTextString(m) } func (*UnlockingLockupRequest) ProtoMessage() {} func (*UnlockingLockupRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{6} } func (m *UnlockingLockupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnlockingLockupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnlockingLockupRequest.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 *UnlockingLockupRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_UnlockingLockupRequest.Merge(m, src) } func (m *UnlockingLockupRequest) XXX_Size() int { return m.Size() } func (m *UnlockingLockupRequest) XXX_DiscardUnknown() { xxx_messageInfo_UnlockingLockupRequest.DiscardUnknown(m) } var xxx_messageInfo_UnlockingLockupRequest proto.InternalMessageInfo func (m *UnlockingLockupRequest) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *UnlockingLockupRequest) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } func (m *UnlockingLockupRequest) GetCreationHeight() int64 { if m != nil { return m.CreationHeight } return 0 } // UnlockingLockupResponse is the response type for the Query/UnlockingLockup RPC method. type UnlockingLockupResponse struct { UnlockingLockup UnlockingLockup `protobuf:"bytes,1,opt,name=unlockingLockup,proto3" json:"unlockingLockup"` } func (m *UnlockingLockupResponse) Reset() { *m = UnlockingLockupResponse{} } func (m *UnlockingLockupResponse) String() string { return proto.CompactTextString(m) } func (*UnlockingLockupResponse) ProtoMessage() {} func (*UnlockingLockupResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{7} } func (m *UnlockingLockupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnlockingLockupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnlockingLockupResponse.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 *UnlockingLockupResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_UnlockingLockupResponse.Merge(m, src) } func (m *UnlockingLockupResponse) XXX_Size() int { return m.Size() } func (m *UnlockingLockupResponse) XXX_DiscardUnknown() { xxx_messageInfo_UnlockingLockupResponse.DiscardUnknown(m) } var xxx_messageInfo_UnlockingLockupResponse proto.InternalMessageInfo func (m *UnlockingLockupResponse) GetUnlockingLockup() UnlockingLockup { if m != nil { return m.UnlockingLockup } return UnlockingLockup{} } // UnlockingLockupsRequest is the request type for the Query/UnlockingLockups RPC method. type UnlockingLockupsRequest struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *UnlockingLockupsRequest) Reset() { *m = UnlockingLockupsRequest{} } func (m *UnlockingLockupsRequest) String() string { return proto.CompactTextString(m) } func (*UnlockingLockupsRequest) ProtoMessage() {} func (*UnlockingLockupsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{8} } func (m *UnlockingLockupsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnlockingLockupsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnlockingLockupsRequest.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 *UnlockingLockupsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_UnlockingLockupsRequest.Merge(m, src) } func (m *UnlockingLockupsRequest) XXX_Size() int { return m.Size() } func (m *UnlockingLockupsRequest) XXX_DiscardUnknown() { xxx_messageInfo_UnlockingLockupsRequest.DiscardUnknown(m) } var xxx_messageInfo_UnlockingLockupsRequest proto.InternalMessageInfo func (m *UnlockingLockupsRequest) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *UnlockingLockupsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // UnlockingLockupsResponse is the response type for the Query/UnlockingLockups RPC method. type UnlockingLockupsResponse struct { UnlockingLockups []UnlockingLockup `protobuf:"bytes,1,rep,name=unlockingLockups,proto3" json:"unlockingLockups"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *UnlockingLockupsResponse) Reset() { *m = UnlockingLockupsResponse{} } func (m *UnlockingLockupsResponse) String() string { return proto.CompactTextString(m) } func (*UnlockingLockupsResponse) ProtoMessage() {} func (*UnlockingLockupsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{9} } func (m *UnlockingLockupsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnlockingLockupsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnlockingLockupsResponse.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 *UnlockingLockupsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_UnlockingLockupsResponse.Merge(m, src) } func (m *UnlockingLockupsResponse) XXX_Size() int { return m.Size() } func (m *UnlockingLockupsResponse) XXX_DiscardUnknown() { xxx_messageInfo_UnlockingLockupsResponse.DiscardUnknown(m) } var xxx_messageInfo_UnlockingLockupsResponse proto.InternalMessageInfo func (m *UnlockingLockupsResponse) GetUnlockingLockups() []UnlockingLockup { if m != nil { return m.UnlockingLockups } return nil } func (m *UnlockingLockupsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } // DevelopersRequest is the request type for the Query/Developers RPC method. type DevelopersRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *DevelopersRequest) Reset() { *m = DevelopersRequest{} } func (m *DevelopersRequest) String() string { return proto.CompactTextString(m) } func (*DevelopersRequest) ProtoMessage() {} func (*DevelopersRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{10} } func (m *DevelopersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DevelopersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DevelopersRequest.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 *DevelopersRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_DevelopersRequest.Merge(m, src) } func (m *DevelopersRequest) XXX_Size() int { return m.Size() } func (m *DevelopersRequest) XXX_DiscardUnknown() { xxx_messageInfo_DevelopersRequest.DiscardUnknown(m) } var xxx_messageInfo_DevelopersRequest proto.InternalMessageInfo func (m *DevelopersRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // DevelopersResponse is the response type for the Query/Developers RPC method. type DevelopersResponse struct { Developers []Developer `protobuf:"bytes,1,rep,name=developers,proto3" json:"developers"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *DevelopersResponse) Reset() { *m = DevelopersResponse{} } func (m *DevelopersResponse) String() string { return proto.CompactTextString(m) } func (*DevelopersResponse) ProtoMessage() {} func (*DevelopersResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{11} } func (m *DevelopersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DevelopersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DevelopersResponse.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 *DevelopersResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_DevelopersResponse.Merge(m, src) } func (m *DevelopersResponse) XXX_Size() int { return m.Size() } func (m *DevelopersResponse) XXX_DiscardUnknown() { xxx_messageInfo_DevelopersResponse.DiscardUnknown(m) } var xxx_messageInfo_DevelopersResponse proto.InternalMessageInfo func (m *DevelopersResponse) GetDevelopers() []Developer { if m != nil { return m.Developers } return nil } func (m *DevelopersResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } // UserSubscriptionsRequest is the request type for the Query/UserSubscriptions RPC method. type UserSubscriptionsRequest struct { Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *UserSubscriptionsRequest) Reset() { *m = UserSubscriptionsRequest{} } func (m *UserSubscriptionsRequest) String() string { return proto.CompactTextString(m) } func (*UserSubscriptionsRequest) ProtoMessage() {} func (*UserSubscriptionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{12} } func (m *UserSubscriptionsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UserSubscriptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UserSubscriptionsRequest.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 *UserSubscriptionsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_UserSubscriptionsRequest.Merge(m, src) } func (m *UserSubscriptionsRequest) XXX_Size() int { return m.Size() } func (m *UserSubscriptionsRequest) XXX_DiscardUnknown() { xxx_messageInfo_UserSubscriptionsRequest.DiscardUnknown(m) } var xxx_messageInfo_UserSubscriptionsRequest proto.InternalMessageInfo func (m *UserSubscriptionsRequest) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *UserSubscriptionsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } // UserSubscriptionsResponse is the response type for the Query/UserSubscriptions RPC method. type UserSubscriptionsResponse struct { UserSubscriptions []UserSubscription `protobuf:"bytes,1,rep,name=user_subscriptions,json=userSubscriptions,proto3" json:"user_subscriptions"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *UserSubscriptionsResponse) Reset() { *m = UserSubscriptionsResponse{} } func (m *UserSubscriptionsResponse) String() string { return proto.CompactTextString(m) } func (*UserSubscriptionsResponse) ProtoMessage() {} func (*UserSubscriptionsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f694a74eba313686, []int{13} } func (m *UserSubscriptionsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UserSubscriptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UserSubscriptionsResponse.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 *UserSubscriptionsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_UserSubscriptionsResponse.Merge(m, src) } func (m *UserSubscriptionsResponse) XXX_Size() int { return m.Size() } func (m *UserSubscriptionsResponse) XXX_DiscardUnknown() { xxx_messageInfo_UserSubscriptionsResponse.DiscardUnknown(m) } var xxx_messageInfo_UserSubscriptionsResponse proto.InternalMessageInfo func (m *UserSubscriptionsResponse) GetUserSubscriptions() []UserSubscription { if m != nil { return m.UserSubscriptions } return nil } func (m *UserSubscriptionsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } func init() { proto.RegisterType((*QueryParamsRequest)(nil), "sourcehub.tier.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "sourcehub.tier.v1beta1.QueryParamsResponse") proto.RegisterType((*LockupRequest)(nil), "sourcehub.tier.v1beta1.LockupRequest") proto.RegisterType((*LockupResponse)(nil), "sourcehub.tier.v1beta1.LockupResponse") proto.RegisterType((*LockupsRequest)(nil), "sourcehub.tier.v1beta1.LockupsRequest") proto.RegisterType((*LockupsResponse)(nil), "sourcehub.tier.v1beta1.LockupsResponse") proto.RegisterType((*UnlockingLockupRequest)(nil), "sourcehub.tier.v1beta1.UnlockingLockupRequest") proto.RegisterType((*UnlockingLockupResponse)(nil), "sourcehub.tier.v1beta1.UnlockingLockupResponse") proto.RegisterType((*UnlockingLockupsRequest)(nil), "sourcehub.tier.v1beta1.UnlockingLockupsRequest") proto.RegisterType((*UnlockingLockupsResponse)(nil), "sourcehub.tier.v1beta1.UnlockingLockupsResponse") proto.RegisterType((*DevelopersRequest)(nil), "sourcehub.tier.v1beta1.DevelopersRequest") proto.RegisterType((*DevelopersResponse)(nil), "sourcehub.tier.v1beta1.DevelopersResponse") proto.RegisterType((*UserSubscriptionsRequest)(nil), "sourcehub.tier.v1beta1.UserSubscriptionsRequest") proto.RegisterType((*UserSubscriptionsResponse)(nil), "sourcehub.tier.v1beta1.UserSubscriptionsResponse") } func init() { proto.RegisterFile("sourcehub/tier/v1beta1/query.proto", fileDescriptor_f694a74eba313686) } var fileDescriptor_f694a74eba313686 = []byte{ // 887 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x97, 0xcf, 0x6b, 0x2b, 0x55, 0x14, 0xc7, 0x73, 0x5f, 0x35, 0x8f, 0x9c, 0x87, 0x2f, 0xcd, 0xf5, 0x51, 0x6b, 0x29, 0x63, 0x1d, 0xb5, 0x69, 0x53, 0x98, 0xdb, 0xa4, 0x8a, 0x28, 0x2a, 0xb4, 0x48, 0x5b, 0x41, 0x8a, 0x46, 0xc4, 0x1f, 0xa5, 0x94, 0x49, 0x72, 0x99, 0x0e, 0x4d, 0xe6, 0x4e, 0xe7, 0xce, 0x54, 0x4b, 0x09, 0x88, 0xe0, 0xc2, 0x8d, 0x0a, 0x82, 0x0b, 0xdd, 0xab, 0x3b, 0x05, 0x5d, 0xbb, 0x71, 0xd3, 0x65, 0xc1, 0x85, 0xae, 0x44, 0x5a, 0xc1, 0x7f, 0x43, 0xe6, 0xde, 0x3b, 0x93, 0x64, 0xa6, 0xd3, 0x4c, 0x4b, 0xd0, 0x4d, 0x09, 0x77, 0xbe, 0xe7, 0x9c, 0xcf, 0xf9, 0xce, 0xc9, 0xb9, 0x29, 0xe8, 0x9c, 0x05, 0x5e, 0x9b, 0x1e, 0x04, 0x2d, 0xe2, 0xdb, 0xd4, 0x23, 0xc7, 0xf5, 0x16, 0xf5, 0xcd, 0x3a, 0x39, 0x0a, 0xa8, 0x77, 0x62, 0xb8, 0x1e, 0xf3, 0x19, 0x9e, 0x89, 0x35, 0x46, 0xa8, 0x31, 0x94, 0x66, 0xae, 0x62, 0xf6, 0x6c, 0x87, 0x11, 0xf1, 0x57, 0x4a, 0xe7, 0x6a, 0x6d, 0xc6, 0x7b, 0x8c, 0x93, 0x96, 0xc9, 0xa9, 0xcc, 0x11, 0x67, 0x74, 0x4d, 0xcb, 0x76, 0x4c, 0xdf, 0x66, 0x8e, 0xd2, 0x3e, 0xb0, 0x98, 0xc5, 0xc4, 0x47, 0x12, 0x7e, 0x52, 0xa7, 0xf3, 0x16, 0x63, 0x56, 0x97, 0x12, 0xd3, 0xb5, 0x89, 0xe9, 0x38, 0xcc, 0x17, 0x21, 0x5c, 0x3d, 0x7d, 0x2a, 0x03, 0xb7, 0xcb, 0xda, 0x87, 0x81, 0x3b, 0x46, 0xe4, 0x9a, 0x9e, 0xd9, 0x8b, 0x32, 0x2d, 0x67, 0x88, 0x78, 0xd0, 0xe2, 0x6d, 0xcf, 0x76, 0x07, 0xa0, 0xfa, 0x03, 0xc0, 0x6f, 0x86, 0xad, 0xbc, 0x21, 0xe2, 0x9b, 0xf4, 0x28, 0xa0, 0xdc, 0xd7, 0xdf, 0x85, 0x47, 0x47, 0x4e, 0xb9, 0xcb, 0x1c, 0x4e, 0xf1, 0x3a, 0x14, 0x65, 0x9d, 0x59, 0xb4, 0x80, 0x96, 0xee, 0x35, 0x34, 0xe3, 0x6a, 0xf7, 0x0c, 0x19, 0xb7, 0x51, 0x3a, 0xfb, 0xf3, 0x89, 0xc2, 0xf7, 0xff, 0xfc, 0x58, 0x43, 0x4d, 0x15, 0xa8, 0xdb, 0xf0, 0xc8, 0xeb, 0xa2, 0x1f, 0x55, 0x0a, 0xaf, 0x40, 0xa5, 0x43, 0xbb, 0xd4, 0x32, 0x7d, 0xe6, 0xed, 0x9b, 0x9d, 0x8e, 0x47, 0xb9, 0x4c, 0x5f, 0x6a, 0x4e, 0xc7, 0x0f, 0xd6, 0xe5, 0x79, 0x28, 0x3e, 0x36, 0xbb, 0x76, 0x67, 0x44, 0x7c, 0x47, 0x8a, 0xe3, 0x07, 0x4a, 0xac, 0xef, 0xc0, 0xfd, 0xa8, 0x94, 0xe2, 0x7f, 0x09, 0x8a, 0xd2, 0xcc, 0x71, 0xfc, 0x32, 0x6e, 0xe3, 0xa1, 0x90, 0xbf, 0xa9, 0x62, 0xf4, 0x4f, 0x50, 0x94, 0x90, 0xdf, 0x0a, 0x7e, 0x13, 0x60, 0x30, 0x27, 0x82, 0xfa, 0x5e, 0x63, 0xd1, 0x90, 0x43, 0x65, 0x84, 0x43, 0x65, 0xc8, 0xc1, 0x1c, 0x98, 0x68, 0x51, 0x55, 0xa8, 0x39, 0x14, 0xa9, 0x7f, 0x8d, 0xa0, 0x1c, 0x73, 0xa8, 0xce, 0x5e, 0x81, 0xbb, 0x92, 0x32, 0x2c, 0x3f, 0x95, 0xbb, 0xb5, 0x28, 0x08, 0x6f, 0x5d, 0xc1, 0x56, 0x1d, 0xcb, 0x26, 0x8b, 0x8f, 0xc0, 0x7d, 0x83, 0x60, 0xe6, 0x6d, 0x27, 0x4c, 0x6b, 0x3b, 0xd6, 0x7f, 0xf4, 0xa6, 0x71, 0x15, 0xca, 0x6d, 0x8f, 0x0a, 0x80, 0xfd, 0x03, 0x6a, 0x5b, 0x07, 0xfe, 0xec, 0xd4, 0x02, 0x5a, 0x9a, 0x6a, 0xde, 0x8f, 0x8e, 0xb7, 0xc5, 0xa9, 0xee, 0xc1, 0x63, 0x29, 0x38, 0xe5, 0xe0, 0x3b, 0x50, 0x0e, 0x46, 0x1f, 0xa9, 0x21, 0xa9, 0x66, 0x39, 0x99, 0xc8, 0xa4, 0x2c, 0x4d, 0x66, 0xd1, 0x3f, 0x43, 0xa9, 0xa2, 0xff, 0xef, 0xfc, 0xfc, 0x82, 0x60, 0x36, 0x0d, 0xa4, 0x6c, 0x78, 0x0f, 0xa6, 0x13, 0x0d, 0x44, 0x13, 0x75, 0x43, 0x1f, 0x52, 0x69, 0x26, 0x37, 0x63, 0xbb, 0x50, 0x79, 0x95, 0x1e, 0xd3, 0x2e, 0x73, 0xa9, 0x17, 0x5b, 0x39, 0xea, 0x0e, 0xba, 0xb5, 0x3b, 0xdf, 0x22, 0xc0, 0xc3, 0xd9, 0x95, 0x2f, 0x5b, 0x00, 0x9d, 0xf8, 0x54, 0x39, 0xf2, 0x64, 0x96, 0x23, 0x71, 0xbc, 0xf2, 0x62, 0x28, 0x74, 0x72, 0x2e, 0x7c, 0x14, 0xbe, 0x46, 0x4e, 0xbd, 0xb7, 0x86, 0x96, 0x7a, 0xec, 0xc6, 0x3c, 0x94, 0xe2, 0x9a, 0x6a, 0xa0, 0x06, 0x07, 0x13, 0x9b, 0xa4, 0x5f, 0x11, 0x3c, 0x7e, 0x05, 0x82, 0xb2, 0x6c, 0x0f, 0x70, 0xc0, 0xa9, 0xb7, 0x3f, 0x7c, 0xeb, 0x44, 0xd6, 0x2d, 0x65, 0x0e, 0x53, 0x22, 0x9d, 0x72, 0xb0, 0x12, 0x24, 0xcb, 0x4c, 0xcc, 0xc8, 0xc6, 0x0f, 0x25, 0x78, 0x58, 0xdc, 0x76, 0xf8, 0x53, 0x04, 0x45, 0x79, 0x75, 0xe1, 0x5a, 0x16, 0x60, 0xfa, 0xb6, 0x9c, 0x5b, 0xc9, 0xa5, 0x95, 0x95, 0xf5, 0xc5, 0x8f, 0x7f, 0xfb, 0xfb, 0xcb, 0x3b, 0x0b, 0x58, 0x23, 0xd7, 0xde, 0xe4, 0xf8, 0x3b, 0x04, 0x45, 0xf9, 0xcd, 0xc1, 0xcf, 0x5c, 0xbf, 0xcb, 0x23, 0x8c, 0xc5, 0x71, 0x32, 0x45, 0xb0, 0x23, 0x08, 0xb6, 0xf1, 0x26, 0xb9, 0xe6, 0x07, 0x07, 0xed, 0x90, 0xd3, 0xd4, 0x6a, 0xea, 0x93, 0xd3, 0xd4, 0x52, 0xee, 0xe3, 0xaf, 0x10, 0xdc, 0x8d, 0xbe, 0xe3, 0x63, 0x18, 0x62, 0xcb, 0xaa, 0x63, 0x75, 0x0a, 0xf6, 0x45, 0x01, 0xfb, 0x2c, 0x6e, 0xdc, 0x1c, 0x16, 0xff, 0x8e, 0xa0, 0x9c, 0x58, 0x4e, 0xd8, 0xc8, 0xb9, 0xc5, 0x22, 0x50, 0x92, 0x5b, 0xaf, 0x80, 0xdb, 0x02, 0x78, 0x0f, 0xef, 0x66, 0x01, 0xc7, 0x7b, 0x31, 0xaf, 0xc1, 0xe4, 0x34, 0x71, 0xb9, 0xf5, 0xf1, 0xcf, 0x08, 0xa6, 0x93, 0x2b, 0x1c, 0xe7, 0x45, 0x8d, 0x5f, 0xc2, 0x6a, 0xfe, 0x00, 0xd5, 0xdc, 0xcb, 0xa2, 0xb9, 0xe7, 0xf1, 0x73, 0xb7, 0x6a, 0x0e, 0x7f, 0x8e, 0x00, 0x06, 0xbb, 0x15, 0x2f, 0x8f, 0xdd, 0x9f, 0x31, 0x6a, 0x2d, 0x8f, 0x54, 0x41, 0xd6, 0x04, 0xe4, 0xd3, 0x58, 0xcf, 0x82, 0x1c, 0xda, 0xc6, 0x3f, 0x21, 0xa8, 0xa4, 0x36, 0x18, 0x5e, 0xcd, 0xbb, 0x9d, 0x62, 0xbe, 0xfa, 0x0d, 0x22, 0x14, 0xe6, 0x0b, 0x02, 0x73, 0x0d, 0xd7, 0x49, 0x8e, 0x5f, 0xeb, 0x3c, 0xf4, 0x53, 0x51, 0xf7, 0x37, 0x5e, 0x3b, 0xbb, 0xd0, 0xd0, 0xf9, 0x85, 0x86, 0xfe, 0xba, 0xd0, 0xd0, 0x17, 0x97, 0x5a, 0xe1, 0xfc, 0x52, 0x2b, 0xfc, 0x71, 0xa9, 0x15, 0xde, 0x27, 0x96, 0xed, 0x87, 0x0c, 0x6d, 0xd6, 0x53, 0x69, 0x1d, 0xea, 0x7f, 0xc0, 0xbc, 0xc3, 0xa1, 0x22, 0x1f, 0xca, 0x32, 0xfe, 0x89, 0x4b, 0x79, 0xab, 0x28, 0xfe, 0x0d, 0x58, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0x29, 0x9d, 0xc5, 0x75, 0x2c, 0x0d, 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) // Lockup queries a lockup by delegator and validator address. Lockup(ctx context.Context, in *LockupRequest, opts ...grpc.CallOption) (*LockupResponse, error) // Lockups queries all the lockups of a delegator. Lockups(ctx context.Context, in *LockupsRequest, opts ...grpc.CallOption) (*LockupsResponse, error) // UnlockingLockup queries an unlocking lockup by delegator and validator address. UnlockingLockup(ctx context.Context, in *UnlockingLockupRequest, opts ...grpc.CallOption) (*UnlockingLockupResponse, error) // UnlockingLockups queries all the unlocking lockups of a delegator. UnlockingLockups(ctx context.Context, in *UnlockingLockupsRequest, opts ...grpc.CallOption) (*UnlockingLockupsResponse, error) // Developers queries all registered developers. Developers(ctx context.Context, in *DevelopersRequest, opts ...grpc.CallOption) (*DevelopersResponse, error) // UserSubscriptions queries all user subscriptions for a specific developer. UserSubscriptions(ctx context.Context, in *UserSubscriptionsRequest, opts ...grpc.CallOption) (*UserSubscriptionsResponse, 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, "/sourcehub.tier.v1beta1.Query/Params", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Lockup(ctx context.Context, in *LockupRequest, opts ...grpc.CallOption) (*LockupResponse, error) { out := new(LockupResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Query/Lockup", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Lockups(ctx context.Context, in *LockupsRequest, opts ...grpc.CallOption) (*LockupsResponse, error) { out := new(LockupsResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Query/Lockups", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) UnlockingLockup(ctx context.Context, in *UnlockingLockupRequest, opts ...grpc.CallOption) (*UnlockingLockupResponse, error) { out := new(UnlockingLockupResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Query/UnlockingLockup", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) UnlockingLockups(ctx context.Context, in *UnlockingLockupsRequest, opts ...grpc.CallOption) (*UnlockingLockupsResponse, error) { out := new(UnlockingLockupsResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Query/UnlockingLockups", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) Developers(ctx context.Context, in *DevelopersRequest, opts ...grpc.CallOption) (*DevelopersResponse, error) { out := new(DevelopersResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Query/Developers", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *queryClient) UserSubscriptions(ctx context.Context, in *UserSubscriptionsRequest, opts ...grpc.CallOption) (*UserSubscriptionsResponse, error) { out := new(UserSubscriptionsResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Query/UserSubscriptions", 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) // Lockup queries a lockup by delegator and validator address. Lockup(context.Context, *LockupRequest) (*LockupResponse, error) // Lockups queries all the lockups of a delegator. Lockups(context.Context, *LockupsRequest) (*LockupsResponse, error) // UnlockingLockup queries an unlocking lockup by delegator and validator address. UnlockingLockup(context.Context, *UnlockingLockupRequest) (*UnlockingLockupResponse, error) // UnlockingLockups queries all the unlocking lockups of a delegator. UnlockingLockups(context.Context, *UnlockingLockupsRequest) (*UnlockingLockupsResponse, error) // Developers queries all registered developers. Developers(context.Context, *DevelopersRequest) (*DevelopersResponse, error) // UserSubscriptions queries all user subscriptions for a specific developer. UserSubscriptions(context.Context, *UserSubscriptionsRequest) (*UserSubscriptionsResponse, 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 (*UnimplementedQueryServer) Lockup(ctx context.Context, req *LockupRequest) (*LockupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Lockup not implemented") } func (*UnimplementedQueryServer) Lockups(ctx context.Context, req *LockupsRequest) (*LockupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Lockups not implemented") } func (*UnimplementedQueryServer) UnlockingLockup(ctx context.Context, req *UnlockingLockupRequest) (*UnlockingLockupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnlockingLockup not implemented") } func (*UnimplementedQueryServer) UnlockingLockups(ctx context.Context, req *UnlockingLockupsRequest) (*UnlockingLockupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnlockingLockups not implemented") } func (*UnimplementedQueryServer) Developers(ctx context.Context, req *DevelopersRequest) (*DevelopersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Developers not implemented") } func (*UnimplementedQueryServer) UserSubscriptions(ctx context.Context, req *UserSubscriptionsRequest) (*UserSubscriptionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserSubscriptions 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: "/sourcehub.tier.v1beta1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Lockup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LockupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Lockup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Query/Lockup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Lockup(ctx, req.(*LockupRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Lockups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LockupsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Lockups(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Query/Lockups", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Lockups(ctx, req.(*LockupsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_UnlockingLockup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnlockingLockupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).UnlockingLockup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Query/UnlockingLockup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UnlockingLockup(ctx, req.(*UnlockingLockupRequest)) } return interceptor(ctx, in, info, handler) } func _Query_UnlockingLockups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnlockingLockupsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).UnlockingLockups(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Query/UnlockingLockups", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UnlockingLockups(ctx, req.(*UnlockingLockupsRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Developers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DevelopersRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).Developers(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Query/Developers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Developers(ctx, req.(*DevelopersRequest)) } return interceptor(ctx, in, info, handler) } func _Query_UserSubscriptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserSubscriptionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(QueryServer).UserSubscriptions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Query/UserSubscriptions", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UserSubscriptions(ctx, req.(*UserSubscriptionsRequest)) } return interceptor(ctx, in, info, handler) } var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.tier.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Params", Handler: _Query_Params_Handler, }, { MethodName: "Lockup", Handler: _Query_Lockup_Handler, }, { MethodName: "Lockups", Handler: _Query_Lockups_Handler, }, { MethodName: "UnlockingLockup", Handler: _Query_UnlockingLockup_Handler, }, { MethodName: "UnlockingLockups", Handler: _Query_UnlockingLockups_Handler, }, { MethodName: "Developers", Handler: _Query_Developers_Handler, }, { MethodName: "UserSubscriptions", Handler: _Query_UserSubscriptions_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/tier/v1beta1/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 (m *LockupRequest) 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 *LockupRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LockupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *LockupResponse) 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 *LockupResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LockupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Lockup.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 (m *LockupsRequest) 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 *LockupsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LockupsRequest) 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.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *LockupsResponse) 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 *LockupsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LockupsResponse) 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.Lockups) > 0 { for iNdEx := len(m.Lockups) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Lockups[iNdEx].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 (m *UnlockingLockupRequest) 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 *UnlockingLockupRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UnlockingLockupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.CreationHeight != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.CreationHeight)) i-- dAtA[i] = 0x18 } if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnlockingLockupResponse) 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 *UnlockingLockupResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UnlockingLockupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.UnlockingLockup.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 (m *UnlockingLockupsRequest) 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 *UnlockingLockupsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UnlockingLockupsRequest) 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.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnlockingLockupsResponse) 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 *UnlockingLockupsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UnlockingLockupsResponse) 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.UnlockingLockups) > 0 { for iNdEx := len(m.UnlockingLockups) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.UnlockingLockups[iNdEx].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 (m *DevelopersRequest) 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 *DevelopersRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DevelopersRequest) 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] = 0xa } return len(dAtA) - i, nil } func (m *DevelopersResponse) 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 *DevelopersResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DevelopersResponse) 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.Developers) > 0 { for iNdEx := len(m.Developers) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Developers[iNdEx].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 (m *UserSubscriptionsRequest) 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 *UserSubscriptionsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UserSubscriptionsRequest) 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.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintQuery(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UserSubscriptionsResponse) 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 *UserSubscriptionsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UserSubscriptionsResponse) 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.UserSubscriptions) > 0 { for iNdEx := len(m.UserSubscriptions) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.UserSubscriptions[iNdEx].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 (m *LockupRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } func (m *LockupResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.Lockup.Size() n += 1 + l + sovQuery(uint64(l)) return n } func (m *LockupsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) 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 *LockupsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Lockups) > 0 { for _, e := range m.Lockups { 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 (m *UnlockingLockupRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } if m.CreationHeight != 0 { n += 1 + sovQuery(uint64(m.CreationHeight)) } return n } func (m *UnlockingLockupResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.UnlockingLockup.Size() n += 1 + l + sovQuery(uint64(l)) return n } func (m *UnlockingLockupsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) 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 *UnlockingLockupsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.UnlockingLockups) > 0 { for _, e := range m.UnlockingLockups { 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 (m *DevelopersRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } return n } func (m *DevelopersResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Developers) > 0 { for _, e := range m.Developers { 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 (m *UserSubscriptionsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) 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 *UserSubscriptionsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.UserSubscriptions) > 0 { for _, e := range m.UserSubscriptions { 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 } 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 (m *LockupRequest) 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: LockupRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LockupRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) 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 *LockupResponse) 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: LockupResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LockupResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Lockup", 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.Lockup.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 *LockupsRequest) 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: LockupsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LockupsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) 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 *LockupsResponse) 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: LockupsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LockupsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Lockups", 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.Lockups = append(m.Lockups, Lockup{}) if err := m.Lockups[len(m.Lockups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *UnlockingLockupRequest) 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: UnlockingLockupRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnlockingLockupRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } m.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } 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 *UnlockingLockupResponse) 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: UnlockingLockupResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnlockingLockupResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnlockingLockup", 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.UnlockingLockup.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 *UnlockingLockupsRequest) 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: UnlockingLockupsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnlockingLockupsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) 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 *UnlockingLockupsResponse) 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: UnlockingLockupsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnlockingLockupsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnlockingLockups", 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.UnlockingLockups = append(m.UnlockingLockups, UnlockingLockup{}) if err := m.UnlockingLockups[len(m.UnlockingLockups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *DevelopersRequest) 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: DevelopersRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DevelopersRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: 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 *DevelopersResponse) 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: DevelopersResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DevelopersResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developers", 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.Developers = append(m.Developers, Developer{}) if err := m.Developers[len(m.Developers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 (m *UserSubscriptionsRequest) 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: UserSubscriptionsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UserSubscriptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery } 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 ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } m.Developer = string(dAtA[iNdEx:postIndex]) 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 *UserSubscriptionsResponse) 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: UserSubscriptionsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UserSubscriptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserSubscriptions", 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.UserSubscriptions = append(m.UserSubscriptions, UserSubscription{}) if err := m.UserSubscriptions[len(m.UserSubscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } 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.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 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") ) ================================================ FILE: x/tier/types/query.pb.gw.go ================================================ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // source: sourcehub/tier/v1beta1/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 } func request_Query_Lockup_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LockupRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } val, ok = pathParams["validator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) } msg, err := client.Lockup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Lockup_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LockupRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } val, ok = pathParams["validator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) } msg, err := server.Lockup(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_Lockups_0 = &utilities.DoubleArray{Encoding: map[string]int{"delegator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_Lockups_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LockupsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Lockups_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Lockups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Lockups_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LockupsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Lockups_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.Lockups(ctx, &protoReq) return msg, metadata, err } func request_Query_UnlockingLockup_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnlockingLockupRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } val, ok = pathParams["validator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) } val, ok = pathParams["creation_height"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "creation_height") } protoReq.CreationHeight, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "creation_height", err) } msg, err := client.UnlockingLockup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_UnlockingLockup_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnlockingLockupRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } val, ok = pathParams["validator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) } val, ok = pathParams["creation_height"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "creation_height") } protoReq.CreationHeight, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "creation_height", err) } msg, err := server.UnlockingLockup(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_UnlockingLockups_0 = &utilities.DoubleArray{Encoding: map[string]int{"delegator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_UnlockingLockups_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnlockingLockupsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnlockingLockups_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.UnlockingLockups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_UnlockingLockups_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnlockingLockupsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["delegator_address"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnlockingLockups_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.UnlockingLockups(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_Developers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) func request_Query_Developers_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DevelopersRequest 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_Developers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Developers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Developers_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DevelopersRequest 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_Developers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.Developers(ctx, &protoReq) return msg, metadata, err } var ( filter_Query_UserSubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{"developer": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_UserSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UserSubscriptionsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["developer"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "developer") } protoReq.Developer, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "developer", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.UserSubscriptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_UserSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UserSubscriptionsRequest var metadata runtime.ServerMetadata var ( val string ok bool err error _ = err ) val, ok = pathParams["developer"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "developer") } protoReq.Developer, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "developer", err) } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.UserSubscriptions(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()...) }) mux.Handle("GET", pattern_Query_Lockup_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_Lockup_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_Lockup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Lockups_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_Lockups_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_Lockups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_UnlockingLockup_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_UnlockingLockup_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_UnlockingLockup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_UnlockingLockups_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_UnlockingLockups_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_UnlockingLockups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Developers_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_Developers_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_Developers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_UserSubscriptions_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_UserSubscriptions_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_UserSubscriptions_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()...) }) mux.Handle("GET", pattern_Query_Lockup_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_Lockup_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_Lockup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Lockups_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_Lockups_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_Lockups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_UnlockingLockup_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_UnlockingLockup_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_UnlockingLockup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_UnlockingLockups_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_UnlockingLockups_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_UnlockingLockups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_Developers_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_Developers_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_Developers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_UserSubscriptions_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_UserSubscriptions_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_UserSubscriptions_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}, []string{"sourcehub", "tier", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Lockup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sourcehub", "tier", "v1beta1", "locked", "delegator_address", "validator_address"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Lockups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcehub", "tier", "v1beta1", "locked", "delegator_address"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_UnlockingLockup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"sourcehub", "tier", "v1beta1", "unlocking", "delegator_address", "validator_address", "creation_height"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_UnlockingLockups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcehub", "tier", "v1beta1", "unlocking", "delegator_address"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Developers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sourcehub", "tier", "v1beta1", "developers"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_UserSubscriptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sourcehub", "tier", "v1beta1", "subscriptions", "developer"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_Lockup_0 = runtime.ForwardResponseMessage forward_Query_Lockups_0 = runtime.ForwardResponseMessage forward_Query_UnlockingLockup_0 = runtime.ForwardResponseMessage forward_Query_UnlockingLockups_0 = runtime.ForwardResponseMessage forward_Query_Developers_0 = runtime.ForwardResponseMessage forward_Query_UserSubscriptions_0 = runtime.ForwardResponseMessage ) ================================================ FILE: x/tier/types/subscription.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/tier/v1beta1/subscription.proto package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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 // Developer represents a developer configuration. type Developer struct { // address is the address of the developer. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. AutoLockEnabled bool `protobuf:"varint,2,opt,name=auto_lock_enabled,json=autoLockEnabled,proto3" json:"auto_lock_enabled,omitempty"` } func (m *Developer) Reset() { *m = Developer{} } func (m *Developer) String() string { return proto.CompactTextString(m) } func (*Developer) ProtoMessage() {} func (*Developer) Descriptor() ([]byte, []int) { return fileDescriptor_67e933babece0b2c, []int{0} } func (m *Developer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Developer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Developer.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 *Developer) XXX_Merge(src proto.Message) { xxx_messageInfo_Developer.Merge(m, src) } func (m *Developer) XXX_Size() int { return m.Size() } func (m *Developer) XXX_DiscardUnknown() { xxx_messageInfo_Developer.DiscardUnknown(m) } var xxx_messageInfo_Developer proto.InternalMessageInfo func (m *Developer) GetAddress() string { if m != nil { return m.Address } return "" } func (m *Developer) GetAutoLockEnabled() bool { if m != nil { return m.AutoLockEnabled } return false } // UserSubscription represents a user subscribed to a developer. type UserSubscription struct { // developer is the address of the developer who registered this user. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the registered user. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` // credit_amount is the credit amount allocated to this user. CreditAmount uint64 `protobuf:"varint,3,opt,name=credit_amount,json=creditAmount,proto3" json:"credit_amount,omitempty"` // period is the subscription period duration in seconds. Period uint64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` // start_date is when the subscription started. StartDate time.Time `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3,stdtime" json:"start_date"` // last_renewed is when the subscription was last renewed. LastRenewed time.Time `protobuf:"bytes,6,opt,name=last_renewed,json=lastRenewed,proto3,stdtime" json:"last_renewed"` } func (m *UserSubscription) Reset() { *m = UserSubscription{} } func (m *UserSubscription) String() string { return proto.CompactTextString(m) } func (*UserSubscription) ProtoMessage() {} func (*UserSubscription) Descriptor() ([]byte, []int) { return fileDescriptor_67e933babece0b2c, []int{1} } func (m *UserSubscription) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UserSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UserSubscription.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 *UserSubscription) XXX_Merge(src proto.Message) { xxx_messageInfo_UserSubscription.Merge(m, src) } func (m *UserSubscription) XXX_Size() int { return m.Size() } func (m *UserSubscription) XXX_DiscardUnknown() { xxx_messageInfo_UserSubscription.DiscardUnknown(m) } var xxx_messageInfo_UserSubscription proto.InternalMessageInfo func (m *UserSubscription) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *UserSubscription) GetUserDid() string { if m != nil { return m.UserDid } return "" } func (m *UserSubscription) GetCreditAmount() uint64 { if m != nil { return m.CreditAmount } return 0 } func (m *UserSubscription) GetPeriod() uint64 { if m != nil { return m.Period } return 0 } func (m *UserSubscription) GetStartDate() time.Time { if m != nil { return m.StartDate } return time.Time{} } func (m *UserSubscription) GetLastRenewed() time.Time { if m != nil { return m.LastRenewed } return time.Time{} } // TotalDevGranted represents the total credit amount granted by a developer to all users. type TotalDevGranted struct { // developer is the address of the developer. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // total_granted is the total credit amount granted to all users. TotalGranted uint64 `protobuf:"varint,2,opt,name=total_granted,json=totalGranted,proto3" json:"total_granted,omitempty"` } func (m *TotalDevGranted) Reset() { *m = TotalDevGranted{} } func (m *TotalDevGranted) String() string { return proto.CompactTextString(m) } func (*TotalDevGranted) ProtoMessage() {} func (*TotalDevGranted) Descriptor() ([]byte, []int) { return fileDescriptor_67e933babece0b2c, []int{2} } func (m *TotalDevGranted) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TotalDevGranted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_TotalDevGranted.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 *TotalDevGranted) XXX_Merge(src proto.Message) { xxx_messageInfo_TotalDevGranted.Merge(m, src) } func (m *TotalDevGranted) XXX_Size() int { return m.Size() } func (m *TotalDevGranted) XXX_DiscardUnknown() { xxx_messageInfo_TotalDevGranted.DiscardUnknown(m) } var xxx_messageInfo_TotalDevGranted proto.InternalMessageInfo func (m *TotalDevGranted) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *TotalDevGranted) GetTotalGranted() uint64 { if m != nil { return m.TotalGranted } return 0 } func init() { proto.RegisterType((*Developer)(nil), "sourcehub.tier.v1beta1.Developer") proto.RegisterType((*UserSubscription)(nil), "sourcehub.tier.v1beta1.UserSubscription") proto.RegisterType((*TotalDevGranted)(nil), "sourcehub.tier.v1beta1.TotalDevGranted") } func init() { proto.RegisterFile("sourcehub/tier/v1beta1/subscription.proto", fileDescriptor_67e933babece0b2c) } var fileDescriptor_67e933babece0b2c = []byte{ // 476 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x31, 0x6f, 0xd3, 0x5c, 0x14, 0x8d, 0xfb, 0xe5, 0x4b, 0xeb, 0xd7, 0x44, 0xa5, 0x56, 0x55, 0xb9, 0x19, 0x9c, 0x28, 0x5d, 0x42, 0x25, 0x6c, 0xb5, 0x48, 0xec, 0x8d, 0x82, 0x00, 0xa9, 0x93, 0x5b, 0x16, 0x16, 0xeb, 0xd9, 0xef, 0x62, 0x9e, 0x62, 0xfb, 0x5a, 0xef, 0x5d, 0xa7, 0xf0, 0x2f, 0xfa, 0x33, 0x18, 0x19, 0x98, 0xf8, 0x05, 0x1d, 0x2b, 0x26, 0x26, 0x40, 0xc9, 0xc0, 0xdf, 0x40, 0xf6, 0x73, 0x28, 0x1b, 0x82, 0xc5, 0xf2, 0x39, 0xf7, 0xdc, 0x73, 0xed, 0xa3, 0xc3, 0x1e, 0x6a, 0xac, 0x54, 0x02, 0x6f, 0xaa, 0x38, 0x20, 0x09, 0x2a, 0x58, 0x9e, 0xc6, 0x40, 0xfc, 0x34, 0xd0, 0x55, 0xac, 0x13, 0x25, 0x4b, 0x92, 0x58, 0xf8, 0xa5, 0x42, 0x42, 0xe7, 0xf0, 0x97, 0xd4, 0xaf, 0xa5, 0x7e, 0x2b, 0x1d, 0xee, 0xf3, 0x5c, 0x16, 0x18, 0x34, 0x4f, 0x23, 0x1d, 0x1e, 0x25, 0xa8, 0x73, 0xd4, 0x51, 0x83, 0x02, 0x03, 0xda, 0xd1, 0x41, 0x8a, 0x29, 0x1a, 0xbe, 0x7e, 0x6b, 0xd9, 0x51, 0x8a, 0x98, 0x66, 0x10, 0x34, 0x28, 0xae, 0x5e, 0x07, 0x24, 0x73, 0xd0, 0xc4, 0xf3, 0xd2, 0x08, 0x26, 0x0b, 0x66, 0xcf, 0x61, 0x09, 0x19, 0x96, 0xa0, 0x9c, 0x33, 0xb6, 0xcd, 0x85, 0x50, 0xa0, 0xb5, 0x6b, 0x8d, 0xad, 0xa9, 0x3d, 0x73, 0x3f, 0x7f, 0x7c, 0x74, 0xd0, 0x9e, 0x39, 0x37, 0x93, 0x4b, 0x52, 0xb2, 0x48, 0xc3, 0x8d, 0xd0, 0x39, 0x61, 0xfb, 0xbc, 0x22, 0x8c, 0x32, 0x4c, 0x16, 0x11, 0x14, 0x3c, 0xce, 0x40, 0xb8, 0x5b, 0x63, 0x6b, 0xba, 0x13, 0xee, 0xd5, 0x83, 0x0b, 0x4c, 0x16, 0x4f, 0x0d, 0x3d, 0xf9, 0xb4, 0xc5, 0x1e, 0xbc, 0xd4, 0xa0, 0x2e, 0x7f, 0x0b, 0xc1, 0x79, 0xc2, 0x6c, 0xb1, 0xf9, 0x82, 0x3f, 0x9e, 0xbd, 0x97, 0x3a, 0x47, 0x6c, 0xa7, 0xd2, 0xa0, 0x22, 0x21, 0xcd, 0x3d, 0x3b, 0xdc, 0xae, 0xf1, 0x5c, 0x0a, 0xe7, 0x98, 0x0d, 0x12, 0x05, 0x42, 0x52, 0xc4, 0x73, 0xac, 0x0a, 0x72, 0xff, 0x1b, 0x5b, 0xd3, 0x6e, 0xd8, 0x37, 0xe4, 0x79, 0xc3, 0x39, 0x87, 0xac, 0x57, 0x82, 0x92, 0x28, 0xdc, 0x6e, 0x33, 0x6d, 0x91, 0xf3, 0x9c, 0x31, 0x4d, 0x5c, 0x51, 0x24, 0x38, 0x81, 0xfb, 0xff, 0xd8, 0x9a, 0xee, 0x9e, 0x0d, 0x7d, 0x93, 0xa3, 0xbf, 0xc9, 0xd1, 0xbf, 0xda, 0xe4, 0x38, 0x1b, 0xdc, 0x7e, 0x1d, 0x75, 0x6e, 0xbe, 0x8d, 0xac, 0xf7, 0x3f, 0x3e, 0x9c, 0x58, 0xa1, 0xdd, 0x2c, 0xcf, 0x39, 0x81, 0x73, 0xc1, 0xfa, 0x19, 0xd7, 0x14, 0x29, 0x28, 0xe0, 0x1a, 0x84, 0xdb, 0xfb, 0x5b, 0xaf, 0xdd, 0x7a, 0x3d, 0x34, 0xdb, 0x93, 0x82, 0xed, 0x5d, 0x21, 0xf1, 0x6c, 0x0e, 0xcb, 0x67, 0x8a, 0x17, 0x04, 0xe2, 0x9f, 0xa3, 0x3b, 0x66, 0x03, 0xaa, 0xad, 0xa2, 0xd4, 0x18, 0x35, 0xf9, 0x75, 0xc3, 0x7e, 0x43, 0xb6, 0xe6, 0xb3, 0x17, 0xb7, 0x2b, 0xcf, 0xba, 0x5b, 0x79, 0xd6, 0xf7, 0x95, 0x67, 0xdd, 0xac, 0xbd, 0xce, 0xdd, 0xda, 0xeb, 0x7c, 0x59, 0x7b, 0x9d, 0x57, 0x41, 0x2a, 0xa9, 0x6e, 0x6b, 0x82, 0x79, 0x60, 0xba, 0x5b, 0x00, 0x5d, 0xa3, 0x5a, 0x04, 0xf7, 0xa5, 0x7f, 0x6b, 0x6a, 0x4f, 0xef, 0x4a, 0xd0, 0x71, 0xaf, 0xf9, 0xd5, 0xc7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xa9, 0x31, 0xce, 0x15, 0x03, 0x00, 0x00, } func (m *Developer) 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 *Developer) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Developer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.AutoLockEnabled { i-- if m.AutoLockEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintSubscription(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UserSubscription) 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 *UserSubscription) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UserSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastRenewed, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastRenewed):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintSubscription(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x32 n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartDate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartDate):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintSubscription(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x2a if m.Period != 0 { i = encodeVarintSubscription(dAtA, i, uint64(m.Period)) i-- dAtA[i] = 0x20 } if m.CreditAmount != 0 { i = encodeVarintSubscription(dAtA, i, uint64(m.CreditAmount)) i-- dAtA[i] = 0x18 } if len(m.UserDid) > 0 { i -= len(m.UserDid) copy(dAtA[i:], m.UserDid) i = encodeVarintSubscription(dAtA, i, uint64(len(m.UserDid))) i-- dAtA[i] = 0x12 } if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintSubscription(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *TotalDevGranted) 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 *TotalDevGranted) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *TotalDevGranted) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.TotalGranted != 0 { i = encodeVarintSubscription(dAtA, i, uint64(m.TotalGranted)) i-- dAtA[i] = 0x10 } if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintSubscription(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintSubscription(dAtA []byte, offset int, v uint64) int { offset -= sovSubscription(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Developer) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Address) if l > 0 { n += 1 + l + sovSubscription(uint64(l)) } if m.AutoLockEnabled { n += 2 } return n } func (m *UserSubscription) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovSubscription(uint64(l)) } l = len(m.UserDid) if l > 0 { n += 1 + l + sovSubscription(uint64(l)) } if m.CreditAmount != 0 { n += 1 + sovSubscription(uint64(m.CreditAmount)) } if m.Period != 0 { n += 1 + sovSubscription(uint64(m.Period)) } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartDate) n += 1 + l + sovSubscription(uint64(l)) l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastRenewed) n += 1 + l + sovSubscription(uint64(l)) return n } func (m *TotalDevGranted) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovSubscription(uint64(l)) } if m.TotalGranted != 0 { n += 1 + sovSubscription(uint64(m.TotalGranted)) } return n } func sovSubscription(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozSubscription(x uint64) (n int) { return sovSubscription(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Developer) 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 ErrIntOverflowSubscription } 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: Developer: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Developer: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } 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 ErrInvalidLengthSubscription } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubscription } if postIndex > l { return io.ErrUnexpectedEOF } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AutoLockEnabled", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.AutoLockEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := skipSubscription(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubscription } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UserSubscription) 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 ErrIntOverflowSubscription } 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: UserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } 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 ErrInvalidLengthSubscription } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubscription } if postIndex > l { return io.ErrUnexpectedEOF } m.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } 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 ErrInvalidLengthSubscription } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubscription } if postIndex > l { return io.ErrUnexpectedEOF } m.UserDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreditAmount", wireType) } m.CreditAmount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CreditAmount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } m.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartDate", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSubscription } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubscription } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartDate, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastRenewed", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSubscription } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubscription } if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastRenewed, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSubscription(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubscription } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TotalDevGranted) 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 ErrIntOverflowSubscription } 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: TotalDevGranted: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TotalDevGranted: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } 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 ErrInvalidLengthSubscription } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubscription } if postIndex > l { return io.ErrUnexpectedEOF } m.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TotalGranted", wireType) } m.TotalGranted = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubscription } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TotalGranted |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipSubscription(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubscription } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipSubscription(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, ErrIntOverflowSubscription } 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, ErrIntOverflowSubscription } 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, ErrIntOverflowSubscription } 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, ErrInvalidLengthSubscription } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupSubscription } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthSubscription } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthSubscription = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSubscription = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSubscription = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: x/tier/types/tx.pb.go ================================================ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: sourcehub/tier/v1beta1/tx.proto package types import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "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" _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" 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" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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"` // 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_a120ff6388a0dc08, []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_a120ff6388a0dc08, []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 // MsgLock is the Msg/Lock request type. type MsgLock struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Stake types.Coin `protobuf:"bytes,3,opt,name=stake,proto3" json:"stake"` } func (m *MsgLock) Reset() { *m = MsgLock{} } func (m *MsgLock) String() string { return proto.CompactTextString(m) } func (*MsgLock) ProtoMessage() {} func (*MsgLock) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{2} } func (m *MsgLock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgLock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgLock.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 *MsgLock) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgLock.Merge(m, src) } func (m *MsgLock) XXX_Size() int { return m.Size() } func (m *MsgLock) XXX_DiscardUnknown() { xxx_messageInfo_MsgLock.DiscardUnknown(m) } var xxx_messageInfo_MsgLock proto.InternalMessageInfo func (m *MsgLock) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *MsgLock) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } func (m *MsgLock) GetStake() types.Coin { if m != nil { return m.Stake } return types.Coin{} } // MsgLockResponse defines the response structure for executing a MsgLock message. type MsgLockResponse struct { } func (m *MsgLockResponse) Reset() { *m = MsgLockResponse{} } func (m *MsgLockResponse) String() string { return proto.CompactTextString(m) } func (*MsgLockResponse) ProtoMessage() {} func (*MsgLockResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{3} } func (m *MsgLockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgLockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgLockResponse.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 *MsgLockResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgLockResponse.Merge(m, src) } func (m *MsgLockResponse) XXX_Size() int { return m.Size() } func (m *MsgLockResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgLockResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgLockResponse proto.InternalMessageInfo // MsgLockAuto is the Msg/LockAuto request type. type MsgLockAuto struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Stake types.Coin `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake"` } func (m *MsgLockAuto) Reset() { *m = MsgLockAuto{} } func (m *MsgLockAuto) String() string { return proto.CompactTextString(m) } func (*MsgLockAuto) ProtoMessage() {} func (*MsgLockAuto) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{4} } func (m *MsgLockAuto) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgLockAuto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgLockAuto.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 *MsgLockAuto) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgLockAuto.Merge(m, src) } func (m *MsgLockAuto) XXX_Size() int { return m.Size() } func (m *MsgLockAuto) XXX_DiscardUnknown() { xxx_messageInfo_MsgLockAuto.DiscardUnknown(m) } var xxx_messageInfo_MsgLockAuto proto.InternalMessageInfo func (m *MsgLockAuto) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *MsgLockAuto) GetStake() types.Coin { if m != nil { return m.Stake } return types.Coin{} } // MsgLockAutoResponse defines the response structure for executing a MsgLockAuto message. type MsgLockAutoResponse struct { ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } func (m *MsgLockAutoResponse) Reset() { *m = MsgLockAutoResponse{} } func (m *MsgLockAutoResponse) String() string { return proto.CompactTextString(m) } func (*MsgLockAutoResponse) ProtoMessage() {} func (*MsgLockAutoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{5} } func (m *MsgLockAutoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgLockAutoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgLockAutoResponse.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 *MsgLockAutoResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgLockAutoResponse.Merge(m, src) } func (m *MsgLockAutoResponse) XXX_Size() int { return m.Size() } func (m *MsgLockAutoResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgLockAutoResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgLockAutoResponse proto.InternalMessageInfo func (m *MsgLockAutoResponse) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } // MsgUnlock is the Msg/Unlock request type. type MsgUnlock struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Stake types.Coin `protobuf:"bytes,3,opt,name=stake,proto3" json:"stake"` } func (m *MsgUnlock) Reset() { *m = MsgUnlock{} } func (m *MsgUnlock) String() string { return proto.CompactTextString(m) } func (*MsgUnlock) ProtoMessage() {} func (*MsgUnlock) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{6} } func (m *MsgUnlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgUnlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUnlock.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 *MsgUnlock) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUnlock.Merge(m, src) } func (m *MsgUnlock) XXX_Size() int { return m.Size() } func (m *MsgUnlock) XXX_DiscardUnknown() { xxx_messageInfo_MsgUnlock.DiscardUnknown(m) } var xxx_messageInfo_MsgUnlock proto.InternalMessageInfo func (m *MsgUnlock) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *MsgUnlock) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } func (m *MsgUnlock) GetStake() types.Coin { if m != nil { return m.Stake } return types.Coin{} } // MsgUnlockResponse defines the response structure for executing a MsgUnlock message. type MsgUnlockResponse struct { CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` UnlockTime time.Time `protobuf:"bytes,3,opt,name=unlock_time,json=unlockTime,proto3,stdtime" json:"unlock_time"` } func (m *MsgUnlockResponse) Reset() { *m = MsgUnlockResponse{} } func (m *MsgUnlockResponse) String() string { return proto.CompactTextString(m) } func (*MsgUnlockResponse) ProtoMessage() {} func (*MsgUnlockResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{7} } func (m *MsgUnlockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgUnlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUnlockResponse.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 *MsgUnlockResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUnlockResponse.Merge(m, src) } func (m *MsgUnlockResponse) XXX_Size() int { return m.Size() } func (m *MsgUnlockResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUnlockResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgUnlockResponse proto.InternalMessageInfo func (m *MsgUnlockResponse) GetCreationHeight() int64 { if m != nil { return m.CreationHeight } return 0 } func (m *MsgUnlockResponse) GetCompletionTime() time.Time { if m != nil { return m.CompletionTime } return time.Time{} } func (m *MsgUnlockResponse) GetUnlockTime() time.Time { if m != nil { return m.UnlockTime } return time.Time{} } // MsgRedelegate is the Msg/Redelegate request type. type MsgRedelegate struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` SrcValidatorAddress string `protobuf:"bytes,2,opt,name=src_validator_address,json=srcValidatorAddress,proto3" json:"src_validator_address,omitempty"` DstValidatorAddress string `protobuf:"bytes,3,opt,name=dst_validator_address,json=dstValidatorAddress,proto3" json:"dst_validator_address,omitempty"` Stake types.Coin `protobuf:"bytes,4,opt,name=stake,proto3" json:"stake"` } func (m *MsgRedelegate) Reset() { *m = MsgRedelegate{} } func (m *MsgRedelegate) String() string { return proto.CompactTextString(m) } func (*MsgRedelegate) ProtoMessage() {} func (*MsgRedelegate) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{8} } func (m *MsgRedelegate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRedelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRedelegate.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 *MsgRedelegate) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRedelegate.Merge(m, src) } func (m *MsgRedelegate) XXX_Size() int { return m.Size() } func (m *MsgRedelegate) XXX_DiscardUnknown() { xxx_messageInfo_MsgRedelegate.DiscardUnknown(m) } var xxx_messageInfo_MsgRedelegate proto.InternalMessageInfo func (m *MsgRedelegate) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *MsgRedelegate) GetSrcValidatorAddress() string { if m != nil { return m.SrcValidatorAddress } return "" } func (m *MsgRedelegate) GetDstValidatorAddress() string { if m != nil { return m.DstValidatorAddress } return "" } func (m *MsgRedelegate) GetStake() types.Coin { if m != nil { return m.Stake } return types.Coin{} } // MsgRedelegateResponse defines the response structure for executing a MsgRedelegate message. type MsgRedelegateResponse struct { CompletionTime time.Time `protobuf:"bytes,1,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` } func (m *MsgRedelegateResponse) Reset() { *m = MsgRedelegateResponse{} } func (m *MsgRedelegateResponse) String() string { return proto.CompactTextString(m) } func (*MsgRedelegateResponse) ProtoMessage() {} func (*MsgRedelegateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{9} } func (m *MsgRedelegateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRedelegateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRedelegateResponse.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 *MsgRedelegateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRedelegateResponse.Merge(m, src) } func (m *MsgRedelegateResponse) XXX_Size() int { return m.Size() } func (m *MsgRedelegateResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgRedelegateResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgRedelegateResponse proto.InternalMessageInfo func (m *MsgRedelegateResponse) GetCompletionTime() time.Time { if m != nil { return m.CompletionTime } return time.Time{} } // MsgCancelUnlocking is the Msg/CancelUnlocking request type. type MsgCancelUnlocking struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // amount is always less than or equal to unlocking delegation entry balance. Stake types.Coin `protobuf:"bytes,3,opt,name=stake,proto3" json:"stake"` // creation_height is the height which the unlocking took place. CreationHeight int64 `protobuf:"varint,4,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` } func (m *MsgCancelUnlocking) Reset() { *m = MsgCancelUnlocking{} } func (m *MsgCancelUnlocking) String() string { return proto.CompactTextString(m) } func (*MsgCancelUnlocking) ProtoMessage() {} func (*MsgCancelUnlocking) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{10} } func (m *MsgCancelUnlocking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCancelUnlocking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCancelUnlocking.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 *MsgCancelUnlocking) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCancelUnlocking.Merge(m, src) } func (m *MsgCancelUnlocking) XXX_Size() int { return m.Size() } func (m *MsgCancelUnlocking) XXX_DiscardUnknown() { xxx_messageInfo_MsgCancelUnlocking.DiscardUnknown(m) } var xxx_messageInfo_MsgCancelUnlocking proto.InternalMessageInfo func (m *MsgCancelUnlocking) GetDelegatorAddress() string { if m != nil { return m.DelegatorAddress } return "" } func (m *MsgCancelUnlocking) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } return "" } func (m *MsgCancelUnlocking) GetStake() types.Coin { if m != nil { return m.Stake } return types.Coin{} } func (m *MsgCancelUnlocking) GetCreationHeight() int64 { if m != nil { return m.CreationHeight } return 0 } // MsgCancelUnlockingResponse defines the response structure for executing a MsgCancelUnlocking message. type MsgCancelUnlockingResponse struct { } func (m *MsgCancelUnlockingResponse) Reset() { *m = MsgCancelUnlockingResponse{} } func (m *MsgCancelUnlockingResponse) String() string { return proto.CompactTextString(m) } func (*MsgCancelUnlockingResponse) ProtoMessage() {} func (*MsgCancelUnlockingResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{11} } func (m *MsgCancelUnlockingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCancelUnlockingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCancelUnlockingResponse.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 *MsgCancelUnlockingResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCancelUnlockingResponse.Merge(m, src) } func (m *MsgCancelUnlockingResponse) XXX_Size() int { return m.Size() } func (m *MsgCancelUnlockingResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgCancelUnlockingResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgCancelUnlockingResponse proto.InternalMessageInfo // MsgCreateDeveloper is the Msg/CreateDeveloper request type. type MsgCreateDeveloper struct { // developer is the address of the developer being created. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. AutoLockEnabled bool `protobuf:"varint,2,opt,name=auto_lock_enabled,json=autoLockEnabled,proto3" json:"auto_lock_enabled,omitempty"` } func (m *MsgCreateDeveloper) Reset() { *m = MsgCreateDeveloper{} } func (m *MsgCreateDeveloper) String() string { return proto.CompactTextString(m) } func (*MsgCreateDeveloper) ProtoMessage() {} func (*MsgCreateDeveloper) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{12} } func (m *MsgCreateDeveloper) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCreateDeveloper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCreateDeveloper.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 *MsgCreateDeveloper) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCreateDeveloper.Merge(m, src) } func (m *MsgCreateDeveloper) XXX_Size() int { return m.Size() } func (m *MsgCreateDeveloper) XXX_DiscardUnknown() { xxx_messageInfo_MsgCreateDeveloper.DiscardUnknown(m) } var xxx_messageInfo_MsgCreateDeveloper proto.InternalMessageInfo func (m *MsgCreateDeveloper) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *MsgCreateDeveloper) GetAutoLockEnabled() bool { if m != nil { return m.AutoLockEnabled } return false } // MsgCreateDeveloperResponse defines the response structure for executing a MsgCreateDeveloper message. type MsgCreateDeveloperResponse struct { } func (m *MsgCreateDeveloperResponse) Reset() { *m = MsgCreateDeveloperResponse{} } func (m *MsgCreateDeveloperResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateDeveloperResponse) ProtoMessage() {} func (*MsgCreateDeveloperResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{13} } func (m *MsgCreateDeveloperResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgCreateDeveloperResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgCreateDeveloperResponse.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 *MsgCreateDeveloperResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgCreateDeveloperResponse.Merge(m, src) } func (m *MsgCreateDeveloperResponse) XXX_Size() int { return m.Size() } func (m *MsgCreateDeveloperResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgCreateDeveloperResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgCreateDeveloperResponse proto.InternalMessageInfo // MsgUpdateDeveloper is the Msg/UpdateDeveloper request type. type MsgUpdateDeveloper struct { // developer is the address of the developer being updated. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // auto_lock_enabled indicates whether the module should automatically lock more #OPEN tokens, // so that the developer always has enough credits to cover all active user subscriptions. AutoLockEnabled bool `protobuf:"varint,2,opt,name=auto_lock_enabled,json=autoLockEnabled,proto3" json:"auto_lock_enabled,omitempty"` } func (m *MsgUpdateDeveloper) Reset() { *m = MsgUpdateDeveloper{} } func (m *MsgUpdateDeveloper) String() string { return proto.CompactTextString(m) } func (*MsgUpdateDeveloper) ProtoMessage() {} func (*MsgUpdateDeveloper) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{14} } func (m *MsgUpdateDeveloper) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgUpdateDeveloper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateDeveloper.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 *MsgUpdateDeveloper) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateDeveloper.Merge(m, src) } func (m *MsgUpdateDeveloper) XXX_Size() int { return m.Size() } func (m *MsgUpdateDeveloper) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateDeveloper.DiscardUnknown(m) } var xxx_messageInfo_MsgUpdateDeveloper proto.InternalMessageInfo func (m *MsgUpdateDeveloper) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *MsgUpdateDeveloper) GetAutoLockEnabled() bool { if m != nil { return m.AutoLockEnabled } return false } // MsgUpdateDeveloperResponse defines the response structure for executing a MsgUpdateDeveloper message. type MsgUpdateDeveloperResponse struct { } func (m *MsgUpdateDeveloperResponse) Reset() { *m = MsgUpdateDeveloperResponse{} } func (m *MsgUpdateDeveloperResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateDeveloperResponse) ProtoMessage() {} func (*MsgUpdateDeveloperResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{15} } func (m *MsgUpdateDeveloperResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgUpdateDeveloperResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateDeveloperResponse.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 *MsgUpdateDeveloperResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateDeveloperResponse.Merge(m, src) } func (m *MsgUpdateDeveloperResponse) XXX_Size() int { return m.Size() } func (m *MsgUpdateDeveloperResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateDeveloperResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgUpdateDeveloperResponse proto.InternalMessageInfo // MsgRemoveDeveloper is the Msg/RemoveDeveloper request type. type MsgRemoveDeveloper struct { // developer is the address of the developer being removed. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` } func (m *MsgRemoveDeveloper) Reset() { *m = MsgRemoveDeveloper{} } func (m *MsgRemoveDeveloper) String() string { return proto.CompactTextString(m) } func (*MsgRemoveDeveloper) ProtoMessage() {} func (*MsgRemoveDeveloper) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{16} } func (m *MsgRemoveDeveloper) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRemoveDeveloper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveDeveloper.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 *MsgRemoveDeveloper) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveDeveloper.Merge(m, src) } func (m *MsgRemoveDeveloper) XXX_Size() int { return m.Size() } func (m *MsgRemoveDeveloper) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveDeveloper.DiscardUnknown(m) } var xxx_messageInfo_MsgRemoveDeveloper proto.InternalMessageInfo func (m *MsgRemoveDeveloper) GetDeveloper() string { if m != nil { return m.Developer } return "" } // MsgRemoveDeveloperResponse defines the response structure for executing a MsgRemoveDeveloper message. type MsgRemoveDeveloperResponse struct { } func (m *MsgRemoveDeveloperResponse) Reset() { *m = MsgRemoveDeveloperResponse{} } func (m *MsgRemoveDeveloperResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveDeveloperResponse) ProtoMessage() {} func (*MsgRemoveDeveloperResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{17} } func (m *MsgRemoveDeveloperResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRemoveDeveloperResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveDeveloperResponse.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 *MsgRemoveDeveloperResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveDeveloperResponse.Merge(m, src) } func (m *MsgRemoveDeveloperResponse) XXX_Size() int { return m.Size() } func (m *MsgRemoveDeveloperResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveDeveloperResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgRemoveDeveloperResponse proto.InternalMessageInfo // MsgAddUserSubscription is the Msg/AddUserSubscription request type. type MsgAddUserSubscription struct { // developer is the address of the developer adding the subscription. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the user being added to the subscription. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` // amount is the credit amount to be allocated to the user per period. Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // period is the subscription period duration in seconds. Period uint64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` } func (m *MsgAddUserSubscription) Reset() { *m = MsgAddUserSubscription{} } func (m *MsgAddUserSubscription) String() string { return proto.CompactTextString(m) } func (*MsgAddUserSubscription) ProtoMessage() {} func (*MsgAddUserSubscription) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{18} } func (m *MsgAddUserSubscription) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgAddUserSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAddUserSubscription.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 *MsgAddUserSubscription) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAddUserSubscription.Merge(m, src) } func (m *MsgAddUserSubscription) XXX_Size() int { return m.Size() } func (m *MsgAddUserSubscription) XXX_DiscardUnknown() { xxx_messageInfo_MsgAddUserSubscription.DiscardUnknown(m) } var xxx_messageInfo_MsgAddUserSubscription proto.InternalMessageInfo func (m *MsgAddUserSubscription) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *MsgAddUserSubscription) GetUserDid() string { if m != nil { return m.UserDid } return "" } func (m *MsgAddUserSubscription) GetAmount() uint64 { if m != nil { return m.Amount } return 0 } func (m *MsgAddUserSubscription) GetPeriod() uint64 { if m != nil { return m.Period } return 0 } // MsgAddUserSubscriptionResponse defines the response structure for executing a MsgAddUserSubscription message. type MsgAddUserSubscriptionResponse struct { } func (m *MsgAddUserSubscriptionResponse) Reset() { *m = MsgAddUserSubscriptionResponse{} } func (m *MsgAddUserSubscriptionResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddUserSubscriptionResponse) ProtoMessage() {} func (*MsgAddUserSubscriptionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{19} } func (m *MsgAddUserSubscriptionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgAddUserSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAddUserSubscriptionResponse.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 *MsgAddUserSubscriptionResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAddUserSubscriptionResponse.Merge(m, src) } func (m *MsgAddUserSubscriptionResponse) XXX_Size() int { return m.Size() } func (m *MsgAddUserSubscriptionResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgAddUserSubscriptionResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgAddUserSubscriptionResponse proto.InternalMessageInfo // MsgUpdateUserSubscription is the Msg/UpdateUserSubscription request type. type MsgUpdateUserSubscription struct { // developer is the address of the developer updating the subscription. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the user whose subscription is being updated. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` // amount is the new credit amount to be allocated to the user per period. Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // period is the new subscription period duration in seconds. Period uint64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` } func (m *MsgUpdateUserSubscription) Reset() { *m = MsgUpdateUserSubscription{} } func (m *MsgUpdateUserSubscription) String() string { return proto.CompactTextString(m) } func (*MsgUpdateUserSubscription) ProtoMessage() {} func (*MsgUpdateUserSubscription) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{20} } func (m *MsgUpdateUserSubscription) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgUpdateUserSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateUserSubscription.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 *MsgUpdateUserSubscription) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateUserSubscription.Merge(m, src) } func (m *MsgUpdateUserSubscription) XXX_Size() int { return m.Size() } func (m *MsgUpdateUserSubscription) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateUserSubscription.DiscardUnknown(m) } var xxx_messageInfo_MsgUpdateUserSubscription proto.InternalMessageInfo func (m *MsgUpdateUserSubscription) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *MsgUpdateUserSubscription) GetUserDid() string { if m != nil { return m.UserDid } return "" } func (m *MsgUpdateUserSubscription) GetAmount() uint64 { if m != nil { return m.Amount } return 0 } func (m *MsgUpdateUserSubscription) GetPeriod() uint64 { if m != nil { return m.Period } return 0 } // MsgUpdateUserSubscriptionResponse defines the response structure for executing a MsgUpdateUserSubscription message. type MsgUpdateUserSubscriptionResponse struct { } func (m *MsgUpdateUserSubscriptionResponse) Reset() { *m = MsgUpdateUserSubscriptionResponse{} } func (m *MsgUpdateUserSubscriptionResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateUserSubscriptionResponse) ProtoMessage() {} func (*MsgUpdateUserSubscriptionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{21} } func (m *MsgUpdateUserSubscriptionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgUpdateUserSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateUserSubscriptionResponse.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 *MsgUpdateUserSubscriptionResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateUserSubscriptionResponse.Merge(m, src) } func (m *MsgUpdateUserSubscriptionResponse) XXX_Size() int { return m.Size() } func (m *MsgUpdateUserSubscriptionResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateUserSubscriptionResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgUpdateUserSubscriptionResponse proto.InternalMessageInfo // MsgRemoveUserSubscription is the Msg/RemoveUserSubscription request type. // This message removes the user subscription and expires the associated allowance at the end of the current period. type MsgRemoveUserSubscription struct { // developer is the address of the developer removing the subscription. Developer string `protobuf:"bytes,1,opt,name=developer,proto3" json:"developer,omitempty"` // user_did is the DID of the user whose subscription is being removed. UserDid string `protobuf:"bytes,2,opt,name=user_did,json=userDid,proto3" json:"user_did,omitempty"` } func (m *MsgRemoveUserSubscription) Reset() { *m = MsgRemoveUserSubscription{} } func (m *MsgRemoveUserSubscription) String() string { return proto.CompactTextString(m) } func (*MsgRemoveUserSubscription) ProtoMessage() {} func (*MsgRemoveUserSubscription) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{22} } func (m *MsgRemoveUserSubscription) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRemoveUserSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveUserSubscription.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 *MsgRemoveUserSubscription) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveUserSubscription.Merge(m, src) } func (m *MsgRemoveUserSubscription) XXX_Size() int { return m.Size() } func (m *MsgRemoveUserSubscription) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveUserSubscription.DiscardUnknown(m) } var xxx_messageInfo_MsgRemoveUserSubscription proto.InternalMessageInfo func (m *MsgRemoveUserSubscription) GetDeveloper() string { if m != nil { return m.Developer } return "" } func (m *MsgRemoveUserSubscription) GetUserDid() string { if m != nil { return m.UserDid } return "" } // MsgRemoveUserSubscriptionResponse defines the response structure for executing a MsgRemoveUserSubscription message. type MsgRemoveUserSubscriptionResponse struct { } func (m *MsgRemoveUserSubscriptionResponse) Reset() { *m = MsgRemoveUserSubscriptionResponse{} } func (m *MsgRemoveUserSubscriptionResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveUserSubscriptionResponse) ProtoMessage() {} func (*MsgRemoveUserSubscriptionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a120ff6388a0dc08, []int{23} } func (m *MsgRemoveUserSubscriptionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgRemoveUserSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveUserSubscriptionResponse.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 *MsgRemoveUserSubscriptionResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveUserSubscriptionResponse.Merge(m, src) } func (m *MsgRemoveUserSubscriptionResponse) XXX_Size() int { return m.Size() } func (m *MsgRemoveUserSubscriptionResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveUserSubscriptionResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgRemoveUserSubscriptionResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgUpdateParams)(nil), "sourcehub.tier.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "sourcehub.tier.v1beta1.MsgUpdateParamsResponse") proto.RegisterType((*MsgLock)(nil), "sourcehub.tier.v1beta1.MsgLock") proto.RegisterType((*MsgLockResponse)(nil), "sourcehub.tier.v1beta1.MsgLockResponse") proto.RegisterType((*MsgLockAuto)(nil), "sourcehub.tier.v1beta1.MsgLockAuto") proto.RegisterType((*MsgLockAutoResponse)(nil), "sourcehub.tier.v1beta1.MsgLockAutoResponse") proto.RegisterType((*MsgUnlock)(nil), "sourcehub.tier.v1beta1.MsgUnlock") proto.RegisterType((*MsgUnlockResponse)(nil), "sourcehub.tier.v1beta1.MsgUnlockResponse") proto.RegisterType((*MsgRedelegate)(nil), "sourcehub.tier.v1beta1.MsgRedelegate") proto.RegisterType((*MsgRedelegateResponse)(nil), "sourcehub.tier.v1beta1.MsgRedelegateResponse") proto.RegisterType((*MsgCancelUnlocking)(nil), "sourcehub.tier.v1beta1.MsgCancelUnlocking") proto.RegisterType((*MsgCancelUnlockingResponse)(nil), "sourcehub.tier.v1beta1.MsgCancelUnlockingResponse") proto.RegisterType((*MsgCreateDeveloper)(nil), "sourcehub.tier.v1beta1.MsgCreateDeveloper") proto.RegisterType((*MsgCreateDeveloperResponse)(nil), "sourcehub.tier.v1beta1.MsgCreateDeveloperResponse") proto.RegisterType((*MsgUpdateDeveloper)(nil), "sourcehub.tier.v1beta1.MsgUpdateDeveloper") proto.RegisterType((*MsgUpdateDeveloperResponse)(nil), "sourcehub.tier.v1beta1.MsgUpdateDeveloperResponse") proto.RegisterType((*MsgRemoveDeveloper)(nil), "sourcehub.tier.v1beta1.MsgRemoveDeveloper") proto.RegisterType((*MsgRemoveDeveloperResponse)(nil), "sourcehub.tier.v1beta1.MsgRemoveDeveloperResponse") proto.RegisterType((*MsgAddUserSubscription)(nil), "sourcehub.tier.v1beta1.MsgAddUserSubscription") proto.RegisterType((*MsgAddUserSubscriptionResponse)(nil), "sourcehub.tier.v1beta1.MsgAddUserSubscriptionResponse") proto.RegisterType((*MsgUpdateUserSubscription)(nil), "sourcehub.tier.v1beta1.MsgUpdateUserSubscription") proto.RegisterType((*MsgUpdateUserSubscriptionResponse)(nil), "sourcehub.tier.v1beta1.MsgUpdateUserSubscriptionResponse") proto.RegisterType((*MsgRemoveUserSubscription)(nil), "sourcehub.tier.v1beta1.MsgRemoveUserSubscription") proto.RegisterType((*MsgRemoveUserSubscriptionResponse)(nil), "sourcehub.tier.v1beta1.MsgRemoveUserSubscriptionResponse") } func init() { proto.RegisterFile("sourcehub/tier/v1beta1/tx.proto", fileDescriptor_a120ff6388a0dc08) } var fileDescriptor_a120ff6388a0dc08 = []byte{ // 1103 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x4f, 0xdc, 0xc6, 0x1b, 0xc6, 0x40, 0x08, 0xbc, 0xfc, 0x02, 0xbf, 0x35, 0x09, 0x01, 0xab, 0x5d, 0x60, 0x51, 0x45, 0xba, 0x15, 0xb6, 0x96, 0x48, 0x91, 0xca, 0x0d, 0x92, 0x48, 0x6d, 0xd5, 0xad, 0x22, 0xa7, 0x70, 0xa8, 0x22, 0xad, 0xbc, 0xf6, 0xd4, 0x6b, 0xb1, 0xf6, 0xb8, 0x9e, 0xf1, 0x36, 0x39, 0xb4, 0xaa, 0x7a, 0xa8, 0xaa, 0x9e, 0xf2, 0x31, 0x90, 0x2a, 0x55, 0x1c, 0x72, 0xaf, 0x7a, 0xcb, 0x31, 0xca, 0x29, 0x87, 0xaa, 0xad, 0xe0, 0xc0, 0x17, 0xa8, 0x7a, 0xae, 0x66, 0xc6, 0x3b, 0xcb, 0x7a, 0x6d, 0xef, 0x12, 0x50, 0xd5, 0x3f, 0x97, 0x84, 0x99, 0x79, 0xe6, 0x79, 0x9f, 0xf7, 0x99, 0xd7, 0xef, 0x0c, 0xc0, 0x0a, 0xc1, 0x71, 0x64, 0xa3, 0x56, 0xdc, 0x34, 0xa8, 0x87, 0x22, 0xa3, 0x53, 0x6b, 0x22, 0x6a, 0xd5, 0x0c, 0xfa, 0x58, 0x0f, 0x23, 0x4c, 0xb1, 0xba, 0x28, 0x01, 0x3a, 0x03, 0xe8, 0x09, 0x40, 0x2b, 0x59, 0xbe, 0x17, 0x60, 0x83, 0xff, 0x2b, 0xa0, 0x5a, 0xd9, 0xc6, 0xc4, 0xc7, 0xc4, 0x68, 0x5a, 0x04, 0x49, 0x22, 0x1b, 0x7b, 0x41, 0xb2, 0x7e, 0x33, 0x59, 0xf7, 0x89, 0x6b, 0x74, 0x6a, 0xec, 0xbf, 0x64, 0x61, 0x59, 0x2c, 0x34, 0xf8, 0xc8, 0x10, 0x83, 0x64, 0xe9, 0xba, 0x8b, 0x5d, 0x2c, 0xe6, 0xd9, 0x4f, 0xc9, 0xec, 0x8a, 0x8b, 0xb1, 0xdb, 0x46, 0x06, 0x1f, 0x35, 0xe3, 0x4f, 0x0d, 0xea, 0xf9, 0x88, 0x50, 0xcb, 0x0f, 0x13, 0xc0, 0x7a, 0x4e, 0x5a, 0xa1, 0x15, 0x59, 0x7e, 0xc2, 0x5d, 0xf9, 0x49, 0x81, 0xf9, 0x3a, 0x71, 0xf7, 0x42, 0xc7, 0xa2, 0xe8, 0x01, 0x5f, 0x51, 0xef, 0xc0, 0x8c, 0x15, 0xd3, 0x16, 0x8e, 0x3c, 0xfa, 0x64, 0x49, 0x59, 0x55, 0x6e, 0xcd, 0xec, 0x2e, 0xbd, 0x7c, 0xb6, 0x79, 0x3d, 0x11, 0xb5, 0xe3, 0x38, 0x11, 0x22, 0xe4, 0x21, 0x8d, 0xbc, 0xc0, 0x35, 0x7b, 0x50, 0x75, 0x07, 0xa6, 0x04, 0xf7, 0xd2, 0xf8, 0xaa, 0x72, 0x6b, 0x76, 0xab, 0xac, 0x67, 0xfb, 0xa6, 0x8b, 0x38, 0xbb, 0x33, 0xcf, 0x7f, 0x59, 0x19, 0x3b, 0x3c, 0x3d, 0xaa, 0x2a, 0x66, 0xb2, 0x71, 0xfb, 0xf6, 0xd7, 0xa7, 0x47, 0xd5, 0x1e, 0xe5, 0x77, 0xa7, 0x47, 0xd5, 0xd5, 0x5e, 0x1a, 0x8f, 0x45, 0x22, 0x29, 0xbd, 0x95, 0x65, 0xb8, 0x99, 0x9a, 0x32, 0x11, 0x09, 0x71, 0x40, 0x50, 0xe5, 0x77, 0x05, 0xae, 0xd6, 0x89, 0xfb, 0x21, 0xb6, 0x0f, 0xd4, 0xfb, 0x50, 0x72, 0x50, 0x1b, 0xb9, 0x16, 0xc5, 0x51, 0xc3, 0x12, 0x49, 0x0c, 0x4d, 0xef, 0xff, 0x72, 0x4b, 0x32, 0xaf, 0x7e, 0x04, 0xa5, 0x8e, 0xd5, 0xf6, 0x9c, 0x3e, 0x9a, 0x71, 0x4e, 0xb3, 0xf6, 0xf2, 0xd9, 0xe6, 0x9b, 0x09, 0xcd, 0x7e, 0x17, 0x93, 0xe2, 0xeb, 0xa4, 0xe6, 0xd5, 0x6d, 0xb8, 0x42, 0xa8, 0x75, 0x80, 0x96, 0x26, 0xb8, 0x69, 0xcb, 0x7a, 0x42, 0xc0, 0x2a, 0x48, 0x3a, 0x76, 0x17, 0x7b, 0xc1, 0x59, 0xbf, 0xc4, 0x96, 0xed, 0x45, 0x66, 0xd7, 0x60, 0x56, 0x95, 0x12, 0x3f, 0x54, 0x96, 0xb5, 0x74, 0xe2, 0x50, 0x81, 0xd9, 0x64, 0x6e, 0x27, 0xa6, 0xf8, 0xb2, 0xdc, 0x90, 0xea, 0xc7, 0x2f, 0x4f, 0x3d, 0x82, 0x85, 0x33, 0x4a, 0xbb, 0x19, 0x64, 0x1b, 0xaf, 0xbc, 0xb6, 0xf1, 0x95, 0x3f, 0x14, 0x98, 0x61, 0x75, 0x13, 0xb4, 0xff, 0x63, 0xd5, 0xf1, 0xb3, 0x02, 0x25, 0x99, 0xb8, 0xb4, 0x77, 0x03, 0xe6, 0xed, 0x08, 0x59, 0xd4, 0xc3, 0x41, 0xa3, 0x85, 0x3c, 0xb7, 0x45, 0x79, 0xfa, 0x13, 0xe6, 0x5c, 0x77, 0xfa, 0x3d, 0x3e, 0xab, 0x9a, 0x30, 0x6f, 0x63, 0x3f, 0x6c, 0x23, 0x0e, 0x65, 0x5d, 0x27, 0x39, 0x7c, 0x4d, 0x17, 0x2d, 0x49, 0xef, 0xb6, 0x24, 0xfd, 0xe3, 0x6e, 0x4b, 0xda, 0xbd, 0xc6, 0xd4, 0x3d, 0xfd, 0x75, 0x45, 0x11, 0x0a, 0xe7, 0x7a, 0x0c, 0x0c, 0xa3, 0x7e, 0x00, 0xb3, 0x31, 0x97, 0x23, 0xf8, 0x26, 0xce, 0xcb, 0x07, 0x62, 0x37, 0x5b, 0xaf, 0xbc, 0x1a, 0x87, 0x6b, 0x75, 0xe2, 0x9a, 0x28, 0xc9, 0x1c, 0x5d, 0xd6, 0xd9, 0xee, 0xc1, 0x0d, 0x12, 0xd9, 0x8d, 0x0b, 0x9c, 0xef, 0x02, 0x89, 0xec, 0xf4, 0x12, 0xa3, 0x75, 0x08, 0xcd, 0xa0, 0x9d, 0x18, 0x99, 0xd6, 0x21, 0x74, 0x3f, 0xb7, 0x72, 0x26, 0x2f, 0xaf, 0x72, 0x0e, 0xe0, 0x46, 0x9f, 0xb3, 0xb2, 0x78, 0x32, 0x6a, 0x42, 0xb9, 0x60, 0x4d, 0x54, 0x0e, 0xc7, 0x41, 0xad, 0x13, 0xf7, 0xae, 0x15, 0xd8, 0xa8, 0x2d, 0x8a, 0xd5, 0x0b, 0xdc, 0x7f, 0xe1, 0x87, 0x9a, 0xf5, 0xe9, 0x4d, 0x66, 0x7d, 0x7a, 0xb9, 0xe7, 0xf2, 0x06, 0x68, 0x83, 0x4e, 0xc9, 0xd6, 0xff, 0xad, 0x22, 0x8c, 0x64, 0x5c, 0xe8, 0x1e, 0xea, 0xa0, 0x36, 0x0e, 0x51, 0xc4, 0xae, 0x79, 0xa7, 0x3b, 0x18, 0x7e, 0xcd, 0x4b, 0xa8, 0x5a, 0x85, 0x92, 0x15, 0x53, 0xdc, 0xe0, 0x9f, 0x2b, 0x0a, 0xac, 0x66, 0x1b, 0x39, 0xdc, 0xb9, 0x69, 0x73, 0x9e, 0x2d, 0xb0, 0xc6, 0x7d, 0x5f, 0x4c, 0x6f, 0xcf, 0xf1, 0xfb, 0x5c, 0xee, 0xed, 0x0a, 0xed, 0x57, 0x92, 0x16, 0x2a, 0x6e, 0xf2, 0xbf, 0x83, 0xd0, 0x94, 0x12, 0x29, 0xf4, 0x11, 0xd7, 0x69, 0x22, 0x1f, 0x77, 0x2e, 0xae, 0x33, 0x27, 0x76, 0x8a, 0x5d, 0xc6, 0xfe, 0x5e, 0x81, 0xc5, 0x3a, 0x71, 0x77, 0x1c, 0x67, 0x8f, 0xa0, 0xe8, 0x61, 0xdc, 0x24, 0x76, 0xe4, 0x85, 0xac, 0x48, 0x5e, 0xdb, 0xa8, 0x65, 0x98, 0x8e, 0x09, 0x8a, 0x1a, 0x8e, 0x27, 0xfc, 0x99, 0x31, 0xaf, 0xb2, 0xf1, 0x3d, 0xcf, 0x51, 0x17, 0x61, 0xca, 0xf2, 0x71, 0x1c, 0x50, 0x5e, 0xd7, 0x93, 0x66, 0x32, 0x62, 0xf3, 0x21, 0x8a, 0x3c, 0xec, 0xf0, 0x4a, 0x9d, 0x34, 0x93, 0xd1, 0x40, 0x2e, 0xab, 0x50, 0xce, 0x16, 0x2b, 0xf3, 0xf9, 0x41, 0x81, 0x65, 0x69, 0xf5, 0x3f, 0x21, 0xa5, 0x75, 0x58, 0xcb, 0xd5, 0x2b, 0xb3, 0xfa, 0x92, 0x27, 0x25, 0xce, 0xf0, 0x2f, 0x48, 0x2a, 0x47, 0x64, 0x76, 0xfc, 0xae, 0xc8, 0xad, 0x1f, 0x01, 0x26, 0xea, 0xc4, 0x55, 0x5b, 0xf0, 0xbf, 0xbe, 0x5f, 0x00, 0x36, 0xf2, 0x1e, 0xee, 0xa9, 0x67, 0xb6, 0x66, 0x8c, 0x08, 0x94, 0xf7, 0xc4, 0x03, 0x98, 0xe4, 0x6f, 0xf1, 0x95, 0x82, 0x8d, 0x0c, 0xa0, 0x6d, 0x0c, 0x01, 0x48, 0xc6, 0x47, 0x30, 0x2d, 0xdf, 0xb4, 0xeb, 0x43, 0x36, 0x31, 0x90, 0xf6, 0xce, 0x08, 0x20, 0xc9, 0xbe, 0x0f, 0x53, 0xc9, 0xfb, 0x70, 0xad, 0x28, 0x55, 0x0e, 0xd1, 0xde, 0x1e, 0x0a, 0x91, 0xbc, 0x4d, 0x80, 0x33, 0xef, 0x93, 0xb7, 0x0a, 0x36, 0xf6, 0x60, 0xda, 0xe6, 0x48, 0x30, 0x19, 0xe3, 0x33, 0x98, 0x4f, 0xdf, 0x9d, 0xd5, 0x02, 0x86, 0x14, 0x56, 0xdb, 0x1a, 0x1d, 0xdb, 0x17, 0x32, 0x75, 0xcb, 0x14, 0x86, 0xec, 0xc7, 0x16, 0x87, 0xcc, 0xbe, 0x33, 0x58, 0xc8, 0xf4, 0x7d, 0x51, 0x1d, 0x5a, 0x95, 0xa3, 0x85, 0xcc, 0xe9, 0xfe, 0x2c, 0x64, 0xba, 0xf5, 0x57, 0x0b, 0x8f, 0xa6, 0x0f, 0x5b, 0x18, 0x32, 0xa7, 0xe9, 0xab, 0x5f, 0xc0, 0x42, 0x56, 0xc3, 0xd7, 0x0b, 0xa8, 0x32, 0xf0, 0xda, 0x9d, 0xf3, 0xe1, 0x65, 0xf8, 0x6f, 0x14, 0x58, 0xcc, 0x69, 0xd0, 0xb5, 0xa1, 0x06, 0x0e, 0xa8, 0x78, 0xf7, 0xdc, 0x5b, 0xfa, 0x84, 0xe4, 0x34, 0xd5, 0xda, 0x50, 0x5b, 0xcf, 0x25, 0xa4, 0xb8, 0x75, 0x6a, 0x57, 0xbe, 0x62, 0x0f, 0xb8, 0xdd, 0xf7, 0x9f, 0x1f, 0x97, 0x95, 0x17, 0xc7, 0x65, 0xe5, 0xb7, 0xe3, 0xb2, 0xf2, 0xf4, 0xa4, 0x3c, 0xf6, 0xe2, 0xa4, 0x3c, 0xf6, 0xea, 0xa4, 0x3c, 0xf6, 0x89, 0xe1, 0x7a, 0x94, 0xf1, 0xda, 0xd8, 0x37, 0x44, 0x94, 0x00, 0xd1, 0xcf, 0x71, 0x74, 0x60, 0x0c, 0xfc, 0x3d, 0x83, 0x3e, 0x09, 0x11, 0x69, 0x4e, 0xf1, 0x17, 0xf2, 0xed, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xed, 0x23, 0x80, 0xa5, 0x8e, 0x12, 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) // Lock defines a (developer) operation for locking a stake. Lock(ctx context.Context, in *MsgLock, opts ...grpc.CallOption) (*MsgLockResponse, error) // LockAuto defines a (developer) operation for locking a stake with automatic validator selection. LockAuto(ctx context.Context, in *MsgLockAuto, opts ...grpc.CallOption) (*MsgLockAutoResponse, error) // Unlock defines a (developer) operation for unlocking a stake. Unlock(ctx context.Context, in *MsgUnlock, opts ...grpc.CallOption) (*MsgUnlockResponse, error) // Redelegate defines a (developer) operation for re-delegating a stake. Redelegate(ctx context.Context, in *MsgRedelegate, opts ...grpc.CallOption) (*MsgRedelegateResponse, error) // CancelUnlocking defines a (developer) operation for canceling an unlocking stake. CancelUnlocking(ctx context.Context, in *MsgCancelUnlocking, opts ...grpc.CallOption) (*MsgCancelUnlockingResponse, error) // CreateDeveloper defines a (developer) operation for creating a new developer record. CreateDeveloper(ctx context.Context, in *MsgCreateDeveloper, opts ...grpc.CallOption) (*MsgCreateDeveloperResponse, error) // UpdateDeveloper defines a (developer) operation for updating an existing developer record. UpdateDeveloper(ctx context.Context, in *MsgUpdateDeveloper, opts ...grpc.CallOption) (*MsgUpdateDeveloperResponse, error) // RemoveDeveloper defines a (developer) operation for removing a developer record. RemoveDeveloper(ctx context.Context, in *MsgRemoveDeveloper, opts ...grpc.CallOption) (*MsgRemoveDeveloperResponse, error) // AddUserSubscription defines a (developer) operation for adding a user subscription. AddUserSubscription(ctx context.Context, in *MsgAddUserSubscription, opts ...grpc.CallOption) (*MsgAddUserSubscriptionResponse, error) // UpdateUserSubscription defines a (developer) operation for updating a user subscription. UpdateUserSubscription(ctx context.Context, in *MsgUpdateUserSubscription, opts ...grpc.CallOption) (*MsgUpdateUserSubscriptionResponse, error) // RemoveUserSubscription defines a (developer) operation for removing a user subscription. // This expires the allowance at the end of the current period rather than immediately revoking it. RemoveUserSubscription(ctx context.Context, in *MsgRemoveUserSubscription, opts ...grpc.CallOption) (*MsgRemoveUserSubscriptionResponse, 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, "/sourcehub.tier.v1beta1.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) Lock(ctx context.Context, in *MsgLock, opts ...grpc.CallOption) (*MsgLockResponse, error) { out := new(MsgLockResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/Lock", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) LockAuto(ctx context.Context, in *MsgLockAuto, opts ...grpc.CallOption) (*MsgLockAutoResponse, error) { out := new(MsgLockAutoResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/LockAuto", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) Unlock(ctx context.Context, in *MsgUnlock, opts ...grpc.CallOption) (*MsgUnlockResponse, error) { out := new(MsgUnlockResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/Unlock", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) Redelegate(ctx context.Context, in *MsgRedelegate, opts ...grpc.CallOption) (*MsgRedelegateResponse, error) { out := new(MsgRedelegateResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/Redelegate", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CancelUnlocking(ctx context.Context, in *MsgCancelUnlocking, opts ...grpc.CallOption) (*MsgCancelUnlockingResponse, error) { out := new(MsgCancelUnlockingResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/CancelUnlocking", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) CreateDeveloper(ctx context.Context, in *MsgCreateDeveloper, opts ...grpc.CallOption) (*MsgCreateDeveloperResponse, error) { out := new(MsgCreateDeveloperResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/CreateDeveloper", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) UpdateDeveloper(ctx context.Context, in *MsgUpdateDeveloper, opts ...grpc.CallOption) (*MsgUpdateDeveloperResponse, error) { out := new(MsgUpdateDeveloperResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/UpdateDeveloper", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RemoveDeveloper(ctx context.Context, in *MsgRemoveDeveloper, opts ...grpc.CallOption) (*MsgRemoveDeveloperResponse, error) { out := new(MsgRemoveDeveloperResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/RemoveDeveloper", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) AddUserSubscription(ctx context.Context, in *MsgAddUserSubscription, opts ...grpc.CallOption) (*MsgAddUserSubscriptionResponse, error) { out := new(MsgAddUserSubscriptionResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/AddUserSubscription", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) UpdateUserSubscription(ctx context.Context, in *MsgUpdateUserSubscription, opts ...grpc.CallOption) (*MsgUpdateUserSubscriptionResponse, error) { out := new(MsgUpdateUserSubscriptionResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/UpdateUserSubscription", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *msgClient) RemoveUserSubscription(ctx context.Context, in *MsgRemoveUserSubscription, opts ...grpc.CallOption) (*MsgRemoveUserSubscriptionResponse, error) { out := new(MsgRemoveUserSubscriptionResponse) err := c.cc.Invoke(ctx, "/sourcehub.tier.v1beta1.Msg/RemoveUserSubscription", 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) // Lock defines a (developer) operation for locking a stake. Lock(context.Context, *MsgLock) (*MsgLockResponse, error) // LockAuto defines a (developer) operation for locking a stake with automatic validator selection. LockAuto(context.Context, *MsgLockAuto) (*MsgLockAutoResponse, error) // Unlock defines a (developer) operation for unlocking a stake. Unlock(context.Context, *MsgUnlock) (*MsgUnlockResponse, error) // Redelegate defines a (developer) operation for re-delegating a stake. Redelegate(context.Context, *MsgRedelegate) (*MsgRedelegateResponse, error) // CancelUnlocking defines a (developer) operation for canceling an unlocking stake. CancelUnlocking(context.Context, *MsgCancelUnlocking) (*MsgCancelUnlockingResponse, error) // CreateDeveloper defines a (developer) operation for creating a new developer record. CreateDeveloper(context.Context, *MsgCreateDeveloper) (*MsgCreateDeveloperResponse, error) // UpdateDeveloper defines a (developer) operation for updating an existing developer record. UpdateDeveloper(context.Context, *MsgUpdateDeveloper) (*MsgUpdateDeveloperResponse, error) // RemoveDeveloper defines a (developer) operation for removing a developer record. RemoveDeveloper(context.Context, *MsgRemoveDeveloper) (*MsgRemoveDeveloperResponse, error) // AddUserSubscription defines a (developer) operation for adding a user subscription. AddUserSubscription(context.Context, *MsgAddUserSubscription) (*MsgAddUserSubscriptionResponse, error) // UpdateUserSubscription defines a (developer) operation for updating a user subscription. UpdateUserSubscription(context.Context, *MsgUpdateUserSubscription) (*MsgUpdateUserSubscriptionResponse, error) // RemoveUserSubscription defines a (developer) operation for removing a user subscription. // This expires the allowance at the end of the current period rather than immediately revoking it. RemoveUserSubscription(context.Context, *MsgRemoveUserSubscription) (*MsgRemoveUserSubscriptionResponse, 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 (*UnimplementedMsgServer) Lock(ctx context.Context, req *MsgLock) (*MsgLockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented") } func (*UnimplementedMsgServer) LockAuto(ctx context.Context, req *MsgLockAuto) (*MsgLockAutoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LockAuto not implemented") } func (*UnimplementedMsgServer) Unlock(ctx context.Context, req *MsgUnlock) (*MsgUnlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented") } func (*UnimplementedMsgServer) Redelegate(ctx context.Context, req *MsgRedelegate) (*MsgRedelegateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Redelegate not implemented") } func (*UnimplementedMsgServer) CancelUnlocking(ctx context.Context, req *MsgCancelUnlocking) (*MsgCancelUnlockingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelUnlocking not implemented") } func (*UnimplementedMsgServer) CreateDeveloper(ctx context.Context, req *MsgCreateDeveloper) (*MsgCreateDeveloperResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDeveloper not implemented") } func (*UnimplementedMsgServer) UpdateDeveloper(ctx context.Context, req *MsgUpdateDeveloper) (*MsgUpdateDeveloperResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateDeveloper not implemented") } func (*UnimplementedMsgServer) RemoveDeveloper(ctx context.Context, req *MsgRemoveDeveloper) (*MsgRemoveDeveloperResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveDeveloper not implemented") } func (*UnimplementedMsgServer) AddUserSubscription(ctx context.Context, req *MsgAddUserSubscription) (*MsgAddUserSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddUserSubscription not implemented") } func (*UnimplementedMsgServer) UpdateUserSubscription(ctx context.Context, req *MsgUpdateUserSubscription) (*MsgUpdateUserSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSubscription not implemented") } func (*UnimplementedMsgServer) RemoveUserSubscription(ctx context.Context, req *MsgRemoveUserSubscription) (*MsgRemoveUserSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveUserSubscription 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: "/sourcehub.tier.v1beta1.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } func _Msg_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgLock) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).Lock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/Lock", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Lock(ctx, req.(*MsgLock)) } return interceptor(ctx, in, info, handler) } func _Msg_LockAuto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgLockAuto) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).LockAuto(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/LockAuto", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).LockAuto(ctx, req.(*MsgLockAuto)) } return interceptor(ctx, in, info, handler) } func _Msg_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUnlock) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).Unlock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/Unlock", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Unlock(ctx, req.(*MsgUnlock)) } return interceptor(ctx, in, info, handler) } func _Msg_Redelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRedelegate) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).Redelegate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/Redelegate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Redelegate(ctx, req.(*MsgRedelegate)) } return interceptor(ctx, in, info, handler) } func _Msg_CancelUnlocking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCancelUnlocking) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CancelUnlocking(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/CancelUnlocking", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CancelUnlocking(ctx, req.(*MsgCancelUnlocking)) } return interceptor(ctx, in, info, handler) } func _Msg_CreateDeveloper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreateDeveloper) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).CreateDeveloper(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/CreateDeveloper", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreateDeveloper(ctx, req.(*MsgCreateDeveloper)) } return interceptor(ctx, in, info, handler) } func _Msg_UpdateDeveloper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateDeveloper) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).UpdateDeveloper(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/UpdateDeveloper", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateDeveloper(ctx, req.(*MsgUpdateDeveloper)) } return interceptor(ctx, in, info, handler) } func _Msg_RemoveDeveloper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveDeveloper) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RemoveDeveloper(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/RemoveDeveloper", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RemoveDeveloper(ctx, req.(*MsgRemoveDeveloper)) } return interceptor(ctx, in, info, handler) } func _Msg_AddUserSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAddUserSubscription) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).AddUserSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/AddUserSubscription", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AddUserSubscription(ctx, req.(*MsgAddUserSubscription)) } return interceptor(ctx, in, info, handler) } func _Msg_UpdateUserSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateUserSubscription) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).UpdateUserSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/UpdateUserSubscription", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateUserSubscription(ctx, req.(*MsgUpdateUserSubscription)) } return interceptor(ctx, in, info, handler) } func _Msg_RemoveUserSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveUserSubscription) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MsgServer).RemoveUserSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/sourcehub.tier.v1beta1.Msg/RemoveUserSubscription", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RemoveUserSubscription(ctx, req.(*MsgRemoveUserSubscription)) } return interceptor(ctx, in, info, handler) } var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "sourcehub.tier.v1beta1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, { MethodName: "Lock", Handler: _Msg_Lock_Handler, }, { MethodName: "LockAuto", Handler: _Msg_LockAuto_Handler, }, { MethodName: "Unlock", Handler: _Msg_Unlock_Handler, }, { MethodName: "Redelegate", Handler: _Msg_Redelegate_Handler, }, { MethodName: "CancelUnlocking", Handler: _Msg_CancelUnlocking_Handler, }, { MethodName: "CreateDeveloper", Handler: _Msg_CreateDeveloper_Handler, }, { MethodName: "UpdateDeveloper", Handler: _Msg_UpdateDeveloper_Handler, }, { MethodName: "RemoveDeveloper", Handler: _Msg_RemoveDeveloper_Handler, }, { MethodName: "AddUserSubscription", Handler: _Msg_AddUserSubscription_Handler, }, { MethodName: "UpdateUserSubscription", Handler: _Msg_UpdateUserSubscription_Handler, }, { MethodName: "RemoveUserSubscription", Handler: _Msg_RemoveUserSubscription_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sourcehub/tier/v1beta1/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 (m *MsgLock) 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 *MsgLock) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgLock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgLockResponse) 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 *MsgLockResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgLockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgLockAuto) 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 *MsgLockAuto) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgLockAuto) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgLockAutoResponse) 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 *MsgLockAutoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgLockAutoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgUnlock) 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 *MsgUnlock) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgUnlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgUnlockResponse) 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 *MsgUnlockResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgUnlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.UnlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UnlockTime):]) if err5 != nil { return 0, err5 } i -= n5 i = encodeVarintTx(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x1a n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime):]) if err6 != nil { return 0, err6 } i -= n6 i = encodeVarintTx(dAtA, i, uint64(n6)) i-- dAtA[i] = 0x12 if m.CreationHeight != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CreationHeight)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MsgRedelegate) 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 *MsgRedelegate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRedelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 if len(m.DstValidatorAddress) > 0 { i -= len(m.DstValidatorAddress) copy(dAtA[i:], m.DstValidatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.DstValidatorAddress))) i-- dAtA[i] = 0x1a } if len(m.SrcValidatorAddress) > 0 { i -= len(m.SrcValidatorAddress) copy(dAtA[i:], m.SrcValidatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.SrcValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgRedelegateResponse) 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 *MsgRedelegateResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRedelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l n8, err8 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime):]) if err8 != nil { return 0, err8 } i -= n8 i = encodeVarintTx(dAtA, i, uint64(n8)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *MsgCancelUnlocking) 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 *MsgCancelUnlocking) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCancelUnlocking) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.CreationHeight != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CreationHeight)) i-- dAtA[i] = 0x20 } { size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ValidatorAddress) > 0 { i -= len(m.ValidatorAddress) copy(dAtA[i:], m.ValidatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) i-- dAtA[i] = 0x12 } if len(m.DelegatorAddress) > 0 { i -= len(m.DelegatorAddress) copy(dAtA[i:], m.DelegatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgCancelUnlockingResponse) 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 *MsgCancelUnlockingResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCancelUnlockingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgCreateDeveloper) 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 *MsgCreateDeveloper) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCreateDeveloper) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.AutoLockEnabled { i-- if m.AutoLockEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintTx(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgCreateDeveloperResponse) 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 *MsgCreateDeveloperResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgCreateDeveloperResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgUpdateDeveloper) 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 *MsgUpdateDeveloper) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgUpdateDeveloper) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.AutoLockEnabled { i-- if m.AutoLockEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintTx(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgUpdateDeveloperResponse) 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 *MsgUpdateDeveloperResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgUpdateDeveloperResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgRemoveDeveloper) 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 *MsgRemoveDeveloper) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRemoveDeveloper) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintTx(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgRemoveDeveloperResponse) 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 *MsgRemoveDeveloperResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRemoveDeveloperResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgAddUserSubscription) 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 *MsgAddUserSubscription) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgAddUserSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Period != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Period)) i-- dAtA[i] = 0x20 } if m.Amount != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Amount)) i-- dAtA[i] = 0x18 } if len(m.UserDid) > 0 { i -= len(m.UserDid) copy(dAtA[i:], m.UserDid) i = encodeVarintTx(dAtA, i, uint64(len(m.UserDid))) i-- dAtA[i] = 0x12 } if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintTx(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgAddUserSubscriptionResponse) 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 *MsgAddUserSubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgAddUserSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgUpdateUserSubscription) 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 *MsgUpdateUserSubscription) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgUpdateUserSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Period != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Period)) i-- dAtA[i] = 0x20 } if m.Amount != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Amount)) i-- dAtA[i] = 0x18 } if len(m.UserDid) > 0 { i -= len(m.UserDid) copy(dAtA[i:], m.UserDid) i = encodeVarintTx(dAtA, i, uint64(len(m.UserDid))) i-- dAtA[i] = 0x12 } if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintTx(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgUpdateUserSubscriptionResponse) 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 *MsgUpdateUserSubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgUpdateUserSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *MsgRemoveUserSubscription) 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 *MsgRemoveUserSubscription) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRemoveUserSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.UserDid) > 0 { i -= len(m.UserDid) copy(dAtA[i:], m.UserDid) i = encodeVarintTx(dAtA, i, uint64(len(m.UserDid))) i-- dAtA[i] = 0x12 } if len(m.Developer) > 0 { i -= len(m.Developer) copy(dAtA[i:], m.Developer) i = encodeVarintTx(dAtA, i, uint64(len(m.Developer))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MsgRemoveUserSubscriptionResponse) 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 *MsgRemoveUserSubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgRemoveUserSubscriptionResponse) 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 (m *MsgLock) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = m.Stake.Size() n += 1 + l + sovTx(uint64(l)) return n } func (m *MsgLockResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgLockAuto) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = m.Stake.Size() n += 1 + l + sovTx(uint64(l)) return n } func (m *MsgLockAutoResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgUnlock) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = m.Stake.Size() n += 1 + l + sovTx(uint64(l)) return n } func (m *MsgUnlockResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.CreationHeight != 0 { n += 1 + sovTx(uint64(m.CreationHeight)) } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime) n += 1 + l + sovTx(uint64(l)) l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UnlockTime) n += 1 + l + sovTx(uint64(l)) return n } func (m *MsgRedelegate) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.SrcValidatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.DstValidatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = m.Stake.Size() n += 1 + l + sovTx(uint64(l)) return n } func (m *MsgRedelegateResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime) n += 1 + l + sovTx(uint64(l)) return n } func (m *MsgCancelUnlocking) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.DelegatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = m.Stake.Size() n += 1 + l + sovTx(uint64(l)) if m.CreationHeight != 0 { n += 1 + sovTx(uint64(m.CreationHeight)) } return n } func (m *MsgCancelUnlockingResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgCreateDeveloper) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.AutoLockEnabled { n += 2 } return n } func (m *MsgCreateDeveloperResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgUpdateDeveloper) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.AutoLockEnabled { n += 2 } return n } func (m *MsgUpdateDeveloperResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgRemoveDeveloper) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgRemoveDeveloperResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgAddUserSubscription) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.UserDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.Amount != 0 { n += 1 + sovTx(uint64(m.Amount)) } if m.Period != 0 { n += 1 + sovTx(uint64(m.Period)) } return n } func (m *MsgAddUserSubscriptionResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgUpdateUserSubscription) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.UserDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } if m.Amount != 0 { n += 1 + sovTx(uint64(m.Amount)) } if m.Period != 0 { n += 1 + sovTx(uint64(m.Period)) } return n } func (m *MsgUpdateUserSubscriptionResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *MsgRemoveUserSubscription) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Developer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.UserDid) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } func (m *MsgRemoveUserSubscriptionResponse) 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 (m *MsgLock) 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: MsgLock: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgLock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stake", 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.Stake.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 *MsgLockResponse) 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: MsgLockResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgLockResponse: 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 (m *MsgLockAuto) 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: MsgLockAuto: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgLockAuto: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stake", 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.Stake.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 *MsgLockAutoResponse) 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: MsgLockAutoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgLockAutoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) 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 *MsgUnlock) 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: MsgUnlock: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgUnlock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stake", 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.Stake.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 *MsgUnlockResponse) 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: MsgUnlockResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgUnlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } m.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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 := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnlockTime", 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 := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.UnlockTime, 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 *MsgRedelegate) 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: MsgRedelegate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRedelegate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SrcValidatorAddress", 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.SrcValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DstValidatorAddress", 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.DstValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stake", 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.Stake.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 *MsgRedelegateResponse) 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: MsgRedelegateResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRedelegateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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 := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CompletionTime, 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 *MsgCancelUnlocking) 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: MsgCancelUnlocking: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCancelUnlocking: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stake", 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.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) } m.CreationHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CreationHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } 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 *MsgCancelUnlockingResponse) 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: MsgCancelUnlockingResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCancelUnlockingResponse: 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 (m *MsgCreateDeveloper) 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: MsgCreateDeveloper: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCreateDeveloper: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", 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.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AutoLockEnabled", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.AutoLockEnabled = bool(v != 0) 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 *MsgCreateDeveloperResponse) 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: MsgCreateDeveloperResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgCreateDeveloperResponse: 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 (m *MsgUpdateDeveloper) 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: MsgUpdateDeveloper: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgUpdateDeveloper: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", 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.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AutoLockEnabled", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.AutoLockEnabled = bool(v != 0) 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 *MsgUpdateDeveloperResponse) 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: MsgUpdateDeveloperResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgUpdateDeveloperResponse: 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 (m *MsgRemoveDeveloper) 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: MsgRemoveDeveloper: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRemoveDeveloper: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", 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.Developer = string(dAtA[iNdEx:postIndex]) 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 *MsgRemoveDeveloperResponse) 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: MsgRemoveDeveloperResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRemoveDeveloperResponse: 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 (m *MsgAddUserSubscription) 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: MsgAddUserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgAddUserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", 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.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserDid", 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.UserDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } m.Amount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Amount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } m.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } } 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 *MsgAddUserSubscriptionResponse) 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: MsgAddUserSubscriptionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgAddUserSubscriptionResponse: 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 (m *MsgUpdateUserSubscription) 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: MsgUpdateUserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgUpdateUserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", 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.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserDid", 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.UserDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } m.Amount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Amount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } m.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Period |= uint64(b&0x7F) << shift if b < 0x80 { break } } 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 *MsgUpdateUserSubscriptionResponse) 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: MsgUpdateUserSubscriptionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgUpdateUserSubscriptionResponse: 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 (m *MsgRemoveUserSubscription) 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: MsgRemoveUserSubscription: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRemoveUserSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Developer", 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.Developer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserDid", 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.UserDid = string(dAtA[iNdEx:postIndex]) 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 *MsgRemoveUserSubscriptionResponse) 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: MsgRemoveUserSubscriptionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgRemoveUserSubscriptionResponse: 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") )